0.6.0 • Published 11 months ago

@kachkaev/eslint-config-react v0.6.0

Weekly downloads
11
License
MIT
Repository
github
Last release
11 months ago

@kachkaev → eslint config (react)

Compatible with ESLint v8. Requires TypeScript and React to be present as a dependency.

See also @kachkaev/eslint-config-base.

Adding to project

  1. Install the package:

    npm install -D @kachkaev/eslint-config-react
    ## or
    yarn add -D @kachkaev/eslint-config-react

    If you use Next.js:

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

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

    If you use Next.js:

    module.exports = {
      extends: [
        "@kachkaev/eslint-config-react",
        "plugin:@next/next/recommended",
      ],
    };

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

    module.exports = {
      extends: [
        "@kachkaev/eslint-config-react",
        "@kachkaev/eslint-config-react/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
    !*.jsx
    !*.mjs
    !*.mts
    !*.ts
    !*.tsx
    
    ########################
    ## 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.

0.6.0

11 months ago

0.5.0

2 years ago

0.5.1

1 year ago

0.3.0

2 years ago

0.4.5

2 years ago

0.4.4

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.2.3

3 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago