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

eslint-cook

v0.0.9

Published

[![NPM badge](https://img.shields.io/npm/v/eslint-cook.svg)](https://www.npmjs.com/package/eslint-cook)

Downloads

6

Readme

eslint-cook

NPM badge

Usage: eslint-cook [options]

Generate eslint configuration file

Options:
  -m, --modules [names...]  eslint module names.
                            possible values: typescript, ts, prettier, react,
                            reactjs, import, imports, effector, effectorjs,
                            babel, babeljs, a11y, next, nextjs,
                            styled-components, sc, unicorn
  -r, --rewrite             rewrite existing eslint config file (default:
                            false)
  -o, --output <string>     output path (default: "./.eslintrc")
  -v, --version             output the current version
  -h, --help                display help for command

How to use

npx eslint-cook -m typescript react -o ./eslintrc 

Possible module names typescript, ts, prettier, react, reactjs, import, imports, effector, effectorjs, babel, babeljs, a11y, next, nextjs, styled-components, sc, unicorn

modules

typescript

dependencies: @typescript-eslint/eslint-plugin@^4.28.3, @typescript-eslint/parser@^4.28.3

definitions:
ts, typescript
conflicts:
babel

configuration:


{
  "parser": "@typescript-eslint/parser",
  "extends": [
    "plugin:@typescript-eslint/recommended"
  ],
  "plugins": [
    "@typescript-eslint"
  ],
  "rules": {
    "no-empty-interface": "off",
    "@typescript-eslint/no-empty-interface": "off",
    "no-use-before-define": "off",
    "@typescript-eslint/no-use-before-define": "error",
    "no-unused-vars": "off",
    "@typescript-eslint/no-unused-vars": "error",
    "@typescript-eslint/explicit-module-boundary-types": "off"
  }
}

prettier

dependencies: prettier@^2.4.1, eslint-plugin-prettier@^4.0.0, eslint-config-prettier@^8.3.0

definitions:
prettier

configuration:


{
  "extends": [
    "plugin:prettier/recommended"
  ],
  "plugins": [
    "prettier"
  ],
  "rules": {
    "prettier/prettier": [
      "error",
      {
        "endOfLine": "auto",
        "printWidth": 80,
        "tabWidth": 2,
        "trailingComma": "all",
        "semi": true
      }
    ]
  }
}

react

dependencies: eslint-plugin-react@^7.25.1, eslint-plugin-react-hooks@^4.2.0

definitions:
react, reactjs

configuration:


{
  "settings": {
    "react": {
      "version": "detect"
    }
  },
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true
    }
  },
  "extends": [
    "plugin:react/recommended",
    "plugin:react-hooks/recommended"
  ],
  "plugins": [
    "react",
    "react-hooks"
  ],
  "rules": {
    "react/display-name": "off",
    "react/prop-types": "off",
    "react-hooks/rules-of-hooks": "error"
  }
}

import

dependencies: eslint-plugin-import@^2.25.1, eslint-import-resolver-alias@^1.1.2

definitions:
import, imports

configuration:


{
  "settings": {
    "import/resolver": {
      "alias": {
        "extensions": [
          ".js",
          ".jsx",
          ".json"
        ]
      }
    }
  },
  "extends": [
    "plugin:import/errors",
    "plugin:import/warnings"
  ],
  "plugins": [
    "import"
  ],
  "rules": {
    "import/order": [
      "error",
      {
        "groups": [
          [
            "external"
          ],
          [
            "builtin"
          ],
          [
            "internal"
          ],
          [
            "parent"
          ],
          [
            "sibling"
          ],
          [
            "object"
          ],
          [
            "index"
          ]
        ],
        "newlines-between": "always",
        "alphabetize": {
          "order": "asc",
          "caseInsensitive": true
        }
      }
    ]
  }
}

relations:

  • typescript
    
{
  "settings": {
    "import/resolver": {
      "alias": {
        "extensions": [
          ".ts",
          ".tsx",
          ".js",
          ".jsx",
          ".json"
        ]
      }
    }
  },
  "extends": [
    "plugin:import/typescript"
  ],
  "plugins": [],
  "rules": {}
}    

effector

dependencies: eslint-plugin-effector@^0.2.0

definitions:
effector, effectorjs

configuration:


{
  "extends": [
    "plugin:effector/recommended"
  ],
  "plugins": [
    "effector"
  ],
  "rules": {}
}

babel

dependencies: @babel/eslint-parser@^7.15.7

definitions:
babel, babeljs
conflicts:
typescript

configuration:


{
  "parser": "@babel/eslint-parser",
  "parserOptions": {
    "sourceType": "module",
    "allowImportExportEverywhere": false,
    "ecmaFeatures": {
      "globalReturn": false
    }
  },
  "extends": [],
  "plugins": [],
  "rules": {}
}

a11y

dependencies: eslint-plugin-jsx-a11y@^6.4.1

definitions:
a11y

configuration:


{
  "extends": [
    "plugin:jsx-a11y/recommended"
  ],
  "plugins": [
    "jsx-a11y"
  ],
  "rules": {}
}

next

dependencies: eslint-config-next@^11.1.2

definitions:
next, nextjs

configuration:


{
  "extends": [
    "next/core-web-vitals"
  ],
  "plugins": [],
  "rules": {}
}

styled-components

dependencies: eslint-plugin-better-styled-components@^1.1.2

definitions:
sc, styled-components

configuration:


{
  "extends": [],
  "plugins": [
    "better-styled-components"
  ],
  "rules": {
    "better-styled-components/sort-declarations-alphabetically": 2
  }
}

unicorn

dependencies: eslint-plugin-unicorn@^36.0.0

definitions:
unicorn

configuration:


{
  "extends": [
    "plugin:unicorn/recommended"
  ],
  "plugins": [
    "unicorn"
  ],
  "rules": {}
}