8.2.5 • Published 2 years ago

@ken0x0a/eslint-config v8.2.5

Weekly downloads
23
License
MIT
Repository
-
Last release
2 years ago

Install

yarn add @ken0x0a/eslint-config

# if you use `react` configuration, also need to install `@ken0x0a/eslint-config-react-deps`
yarn add @ken0x0a/eslint-config @ken0x0a/eslint-config-react-deps # optional

Usage

module.exports = require('@ken0x0a/eslint-config')

module.exports = {
  extends: ['@ken0x0a/eslint-config'],
}
module.exports = {
  extends: ['@ken0x0a/eslint-config', '@ken0x0a/eslint-config/autofix'],
}

// or if you prefer to pick only what you want ( the following is default )
module.exports = {
  /**
   * NOTE: The **order is important**, to properly override rules by later one
   */
  extends: [
    '@ken0x0a/eslint-config/base',
    '@ken0x0a/eslint-config/import',
    '@ken0x0a/eslint-config/jest',
    // '@ken0x0a/eslint-config/autofix', // DO NOT USE WITH TypeScript, as it doesn't care about `interface` & `type` and remove them.
    // '@ken0x0a/eslint-config/graphql', // requires to install `eslint-plugin-graphql`
    /**
     * if you need to use `react` related configs like following,
     * you need to install optional dependency "@ken0x0a/eslint-config-react-deps" by
     * `yarn add -D "@ken0x0a/eslint-config-react-deps"`
     */
    '@ken0x0a/eslint-config/react',
    // '@ken0x0a/eslint-config/react-native',
    '@ken0x0a/eslint-config/expo', // extends "./react-native"
    '@ken0x0a/eslint-config/typescript',
  ],
}

Command

https://eslint.org/docs/user-guide/command-line-interface

yarn --silent eslint -c .eslintrc.js --ext .ts,.tsx .
yarn --silent eslint --ext .ts,.tsx .
yarn --silent eslint --ext .ts,.tsx --report-unused-disable-directives .
# "--no-error-on-unmatched-pattern" from 3.8.0
yarn --silent eslint --ext .ts,.tsx --report-unused-disable-directives --no-error-on-unmatched-pattern .
yarn --silent eslint --ext .ts,.tsx --ignore-pattern '**/*.d.ts' --report-unused-disable-directives
yarn --silent eslint '**/*.ts{,x}'
yarn --silent eslint '*.ts{,x}'
yarn --silent eslint --report-unused-disable-directives '*.ts'
yarn --silent eslint --cache '*.ts'
yarn --silent eslint --no-inline-config some-file.ts

husky config

module.exports = {
  '*.{ts,tsx}': [
    /**
     * https://eslint.org/docs/user-guide/command-line-interface#--ignore-pattern
     */
    "eslint --fix --ext .ts,.tsx --ignore-pattern '**/*.d.ts' --report-unused-disable-directives",
    'git add',
  ],
}

NOTE

eslint-plugin-autofix doesn't care interface & type. Thus, really useless with TypeScript

8.2.5

2 years ago

8.2.4

2 years ago

8.2.3

3 years ago

8.2.2

3 years ago

8.2.1

3 years ago

8.2.0

3 years ago

8.0.3

4 years ago

8.0.2

4 years ago

8.0.1

4 years ago

8.0.0

4 years ago

7.15.3

5 years ago

7.15.2

5 years ago

7.15.1

5 years ago

7.15.0

5 years ago

7.14.2

5 years ago

7.14.1

5 years ago

7.13.0

5 years ago

7.14.0

5 years ago

7.12.9

5 years ago

7.12.8

5 years ago

7.12.7

5 years ago

7.12.6

5 years ago

7.12.5

5 years ago

7.12.4

5 years ago

7.12.3

5 years ago

7.12.2

5 years ago

7.12.1

5 years ago

7.12.0

5 years ago

7.11.0

5 years ago

7.10.0

5 years ago

7.9.1

5 years ago

7.9.0

5 years ago

7.8.0

5 years ago

7.7.18

5 years ago

7.7.17

5 years ago

7.7.16

5 years ago

7.7.15

5 years ago

7.7.14

5 years ago

7.7.13

5 years ago

7.7.12

5 years ago

7.7.11

5 years ago

7.7.10

5 years ago

7.7.9

5 years ago

7.7.8

5 years ago

7.7.7

5 years ago

7.7.6

5 years ago

7.7.5

5 years ago

7.7.4

5 years ago

7.7.3

5 years ago

7.7.0

5 years ago

7.6.4

5 years ago

7.6.3

5 years ago

7.6.2

5 years ago

7.6.1

5 years ago

7.6.0

5 years ago

7.5.0

5 years ago

7.4.13

5 years ago

7.4.12

5 years ago

7.4.11

6 years ago

7.4.10

6 years ago

7.4.9

6 years ago

7.4.8

6 years ago

7.4.7

6 years ago

7.4.6

6 years ago

7.4.5

6 years ago

7.4.4

6 years ago

7.4.3

6 years ago

7.4.2

6 years ago

7.4.1

6 years ago

7.4.0

6 years ago

7.3.7

6 years ago

7.3.6

6 years ago

7.3.5

6 years ago

7.3.4

6 years ago

7.3.3

6 years ago

7.3.2

6 years ago

7.3.1

6 years ago

7.3.0

6 years ago

7.2.3

6 years ago

7.2.2

6 years ago

7.2.1

6 years ago

7.2.0

6 years ago

7.1.1

6 years ago

7.1.0

6 years ago

7.0.7

6 years ago

7.0.6

6 years ago

7.0.5

6 years ago

7.0.4

6 years ago

7.0.3

6 years ago

7.0.2

6 years ago

7.0.1

6 years ago

7.0.0

6 years ago

6.0.0

6 years ago

5.0.1

6 years ago

5.0.0

6 years ago

4.6.2

6 years ago

4.6.1

6 years ago

4.6.0

6 years ago

4.5.1

6 years ago

4.5.0

6 years ago

4.4.0

6 years ago

4.3.0

6 years ago

4.1.0

6 years ago

4.0.6-beta

6 years ago

4.0.5

6 years ago

4.0.4

6 years ago

4.0.3

6 years ago

4.0.1

6 years ago

4.0.0

6 years ago

3.1.0

6 years ago

3.0.0

6 years ago

2.0.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.0-alpha1

6 years ago