8.2.5 • Published 1 year ago

@ken0x0a/eslint-config v8.2.5

Weekly downloads
23
License
MIT
Repository
-
Last release
1 year 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

1 year ago

8.2.4

1 year ago

8.2.3

2 years ago

8.2.2

2 years ago

8.2.1

2 years ago

8.2.0

2 years ago

8.0.3

3 years ago

8.0.2

3 years ago

8.0.1

3 years ago

8.0.0

3 years ago

7.15.3

4 years ago

7.15.2

4 years ago

7.15.1

4 years ago

7.15.0

4 years ago

7.14.2

4 years ago

7.14.1

4 years ago

7.13.0

4 years ago

7.14.0

4 years ago

7.12.9

4 years ago

7.12.8

4 years ago

7.12.7

4 years ago

7.12.6

4 years ago

7.12.5

4 years ago

7.12.4

4 years ago

7.12.3

4 years ago

7.12.2

4 years ago

7.12.1

4 years ago

7.12.0

4 years ago

7.11.0

4 years ago

7.10.0

4 years ago

7.9.1

4 years ago

7.9.0

4 years ago

7.8.0

4 years ago

7.7.18

4 years ago

7.7.17

4 years ago

7.7.16

4 years ago

7.7.15

4 years ago

7.7.14

4 years ago

7.7.13

4 years ago

7.7.12

4 years ago

7.7.11

4 years ago

7.7.10

4 years ago

7.7.9

4 years ago

7.7.8

4 years ago

7.7.7

4 years ago

7.7.6

4 years ago

7.7.5

4 years ago

7.7.4

4 years ago

7.7.3

4 years ago

7.7.0

4 years ago

7.6.4

4 years ago

7.6.3

4 years ago

7.6.2

4 years ago

7.6.1

4 years ago

7.6.0

4 years ago

7.5.0

4 years ago

7.4.13

4 years ago

7.4.12

4 years ago

7.4.11

4 years ago

7.4.10

4 years ago

7.4.9

4 years ago

7.4.8

4 years ago

7.4.7

4 years ago

7.4.6

4 years ago

7.4.5

4 years ago

7.4.4

4 years ago

7.4.3

4 years ago

7.4.2

4 years ago

7.4.1

4 years ago

7.4.0

4 years ago

7.3.7

4 years ago

7.3.6

4 years ago

7.3.5

4 years ago

7.3.4

4 years ago

7.3.3

4 years ago

7.3.2

5 years ago

7.3.1

5 years ago

7.3.0

5 years ago

7.2.3

5 years ago

7.2.2

5 years ago

7.2.1

5 years ago

7.2.0

5 years ago

7.1.1

5 years ago

7.1.0

5 years ago

7.0.7

5 years ago

7.0.6

5 years ago

7.0.5

5 years ago

7.0.4

5 years ago

7.0.3

5 years ago

7.0.2

5 years ago

7.0.1

5 years ago

7.0.0

5 years ago

6.0.0

5 years ago

5.0.1

5 years ago

5.0.0

5 years ago

4.6.2

5 years ago

4.6.1

5 years ago

4.6.0

5 years ago

4.5.1

5 years ago

4.5.0

5 years ago

4.4.0

5 years ago

4.3.0

5 years ago

4.1.0

5 years ago

4.0.6-beta

5 years ago

4.0.5

5 years ago

4.0.4

5 years ago

4.0.3

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.0.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

1.0.0-alpha1

5 years ago