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

@neogeek/eslint-config-standards

v5.0.1

Published

ESLint Config Standards

Downloads

133

Readme

ESLint Config Standards

Build Status NPM Version

Install

$ npm install eslint babel-eslint @neogeek/eslint-config-standards --save-dev

Then create a .eslintrc file in the root of your project with the following contents:

{
    "extends": ["@neogeek/eslint-config-standards"]
}

Configuration

See http://eslint.org/docs/rules/ for more information.

This package enables errors on all of the available flags except the following:

Best Practices

| Flag | Description | Value | | --------------- | ------------------------------------------------- | ----------------------------- | | dot-location | Enforce consistent newlines before and after dots | 0 | | no-magic-number | Disallow Magic Numbers | [2, {"ignore": [-1, 0, 1]}] |

ECMAScript 6

| Flag | Description | Value | | ------------ | --------------------------------------------------- | ------------------------ | | arrow-parens | require parentheses around arrow function arguments | ["error", "as-needed"] |

Stylistic Issues

| Flag | Description | Value | | ------------------------ | --------------------------------------------------------------------------- | ---------------------------------------------------------------------- | | implicit-arrow-linebreak | Enforce the location of arrow function bodies with implicit returns | 0 | | max-len | Enforce a maximum line length | [1, 80, 4, {"ignoreComments": true, "ignoreTemplateLiterals": true}] | | max-lines | Enforce a maximum file length | 0 | | object-curly-newline | Enforce consistent line breaks inside braces | 0 | | one-var | Enforce variables to be declared either together or separately in functions | 0 | | quotes | Enforce the consistent use of either backticks, double, or single quotes | [2, "single"] | | spaced-comment | enforce consistent spacing after the // or /* in a comment | ["error", "always", {"block": {"markers": ["!"]}}] |

Variables

| Flag | Description | Value | | -------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------- | | no-shadow | disallow variable declarations from shadowing variables declared in the outer scope | ["error", {"allow": ["err"]}] | | no-unused-vars | disallow unused variables | "no-unused-vars": ["warn", {"ignoreRestSiblings": true}] |

Extended .eslintrc Configuration

{
    "extends": [
        "@neogeek/eslint-config-standards/.eslintrc-best-practices",
        "@neogeek/eslint-config-standards/.eslintrc-ecmascript-6",
        "@neogeek/eslint-config-standards/.eslintrc-possible-errors",
        "@neogeek/eslint-config-standards/.eslintrc-react",
        "@neogeek/eslint-config-standards/.eslintrc-strict-mode",
        "@neogeek/eslint-config-standards/.eslintrc-stylistic-issues",
        "@neogeek/eslint-config-standards/.eslintrc-variables"
    ],
    "rules": {
        "quotes": [2, "double"]
    }
}
{
    "extends": ["@neogeek/eslint-config-standards/.eslintrc-tests"]
}

Prettier Config

Create a .prettierrc file with the following contents:

{
    "printWidth": 80,
    "tabWidth": 4
}

Install the prettier-eslint-cli.

$ npm install prettier-eslint-cli --save-dev

Add NPM script for automation.

{
    "scripts": {
        "prettier": "prettier-eslint --eslint-config-path .eslintrc --write \"src/**/*.js\""
    }
}