npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@akio/eslint-plugin

v1.0.1

Published

Akio's ESLint plugin

Downloads

6

Readme

@akio/eslint-plugin NPM MIT License Dependencies

Personal ESLint plugin for JavaScript, TypeScript and Angular with mainly configuration and some self-written rules. Feel free to suggest changes but I'll be keeping my tabs :)

Installation

Install via npm:

npm i --save-dev @akio/eslint-plugin

Setup

Create your .eslintrc.json file and configure it according to the steps in the Configuration section.

After ESLint is configured, run the following command:

npx akiolint checkdeps auto

This will show you all the dependencies you are missing so that your configuration can work. Executing the above command will print you an npm install command. You need to execute it.

Finally the editor needs to be restarted after installation for ESLint to properly work.

Updating

To update this package, follow all the steps of the installation guide again, except configuring the .eslintrc.json file.

For easier access, you can put the following in your package.json:

{
    "scripts": {
        "update-akiolint": "npm view @akio/eslint-plugin version && npm i --save-dev @akio/eslint-plugin@latest && akiolint checkdeps auto"
    }
}

Run npm run update-akiolint to update and check dependencies. If there's an npm install command printed, execute it.

Configuration

Put the .eslintrc.json file into the root folder of your project. Some default environments may be given, but they should be configured according to https://eslint.org/docs/user-guide/configuring#specifying-environments

For JavaScript linting

.eslintrc.json:

{
    "extends": [
        "plugin:@akio/javascript"
    ],
    "env": {

    },
    "ignorePatterns": [
        "node_modules/",
        "dist/",
        "build/"
    ]
}

For TypeScript linting

.eslintrc.json:

{
    "extends": [
        "plugin:@akio/typescript"
    ],
    "env": {
        "es2020": true,
    },
    "ignorePatterns": [
        "node_modules/",
        "dist/",
        "build/"
    ]
}

For Angular linting

.eslintrc.json:

{
    "extends": [
        "plugin:@akio/typescript",
        "plugin:@akio/angular-typescript",
        "plugin:@akio/angular-template"
    ],
    "env": {
        "es2020": true,
        "browser": true
    },
    "ignorePatterns": [
        "node_modules/",
        "dist/",
        "build/"
    ]
}

Also place the following .eslintrc.json file into the project folder of your Angular application and replace the comments with the projects component / directive prefix.

{
    "extends": "../../.eslintrc.json",
    "rules": {
        "@angular-eslint/component-selector": [
            "error",
            {
                "type": "element",
                "prefix": /* Replace with prefix for components */,
                "style": "kebab-case"
            }
        ],
        "@angular-eslint/directive-selector": [
            "error",
            {
                "type": "attribute",
                "prefix": /* Replace with prefix for directives */,
                "style": "camelCase"
            }
        ]
    }
}