@kachkaev/eslint-config-base

0.6.0 • Public • Published

@kachkaev → eslint config (base)

Compatible with ESLint v7. Requires TypeScript to be present as a dependency.

See also @kachkaev/eslint-config-react.

Adding to project

  1. Install the package:

    npm install -D @kachkaev/eslint-config-base
    ## or
    yarn add -D @kachkaev/eslint-config-base
  2. Create .eslintrc.js with the following contents:

    module.exports = {
      extends: ["@kachkaev/eslint-config-base"],
    };

    If you want extra typechecking (tsconfig.json needs to exist in repo dir):

    module.exports = {
      extends: [
        "@kachkaev/eslint-config-base",
        "@kachkaev/eslint-config-base/extra-type-checking",
      ],
    };
  3. Create .eslintignore. For example,

    #####################
    ## Specific to ESLint
    #####################
    
    ## Ignore all files (but still allow sub-folder scanning)
    *
    !*/
    
    ## Allow certain file types
    !*.cjs
    !*.cts
    !*.js
    !*.json
    !*.mjs
    !*.mts
    !*.ts
    
    ########################
    ## Same as in .gitignore
    ########################
    
    # (paste lines from .gitignore here)
  4. Optionally, configure package scripts and a pre-commit hook to make sure that all project files are always formatted. See example in njtpackage.json.

Readme

Keywords

none

Package Sidebar

Install

npm i @kachkaev/eslint-config-base

Weekly Downloads

53

Version

0.6.0

License

MIT

Unpacked Size

354 kB

Total Files

5

Last publish

Collaborators

  • kachkaev