|
6 | 6 |
|
7 | 7 | ESLint Shareable Config for TypeScript
|
8 | 8 |
|
9 |
| -## Peer dependencies |
10 |
| - |
11 |
| -- [@eslint-recommended/eslint-config-typescript](https://www.npmjs.com/package/@eslint-recommended/eslint-config-typescript) |
12 |
| -- [@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin) |
13 |
| -- [eslint](https://www.npmjs.com/package/eslint) |
14 |
| -- [eslint-config-standard-with-typescript](https://www.npmjs.com/package/eslint-config-standard-with-typescript) |
15 |
| -- [eslint-plugin-eslint-comments](https://www.npmjs.com/package/eslint-plugin-eslint-comments) |
16 |
| -- [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import) |
17 |
| -- [eslint-plugin-import-newlines](https://www.npmjs.com/package/eslint-plugin-impor-newlines) |
18 |
| -- [eslint-plugin-jsdoc](https://www.npmjs.com/package/eslint-plugin-jsdoc) |
19 |
| -- [eslint-plugin-n](https://www.npmjs.com/package/eslint-plugin-n) |
20 |
| -- [eslint-plugin-promise](https://www.npmjs.com/package/eslint-plugin-promise) |
21 |
| -- [eslint-plugin-tsdoc](https://www.npmjs.com/package/eslint-plugin-tsdoc) |
22 |
| -- [eslint-plugin-unicorn](https://www.npmjs.com/package/eslint-plugin-unicorn) |
23 |
| -- [typescript](https://www.npmjs.com/package/typescript) |
24 |
| - |
25 | 9 | ## Installation
|
26 | 10 |
|
27 |
| -### npm@>=7 |
28 |
| - |
29 |
| -Install `@npm-update-package/eslint-config-typescript`. |
| 11 | +npm: |
30 | 12 |
|
31 | 13 | ```sh
|
32 | 14 | npm i -D @npm-update-package/eslint-config-typescript
|
33 | 15 | ```
|
34 | 16 |
|
35 |
| -### npm@<7 |
36 |
| - |
37 |
| -Install `@npm-update-package/eslint-config-typescript` and its peer dependencies. |
| 17 | +Yarn: |
38 | 18 |
|
39 | 19 | ```sh
|
40 |
| -npm i -D \ |
41 |
| - @eslint-recommended/eslint-config-typescript \ |
42 |
| - @typescript-eslint/eslint-plugin \ |
43 |
| - eslint \ |
44 |
| - eslint-config-standard-with-typescript \ |
45 |
| - eslint-plugin-eslint-comments \ |
46 |
| - eslint-plugin-import \ |
47 |
| - eslint-plugin-import-newlines \ |
48 |
| - eslint-plugin-jsdoc \ |
49 |
| - eslint-plugin-n \ |
50 |
| - eslint-plugin-promise \ |
51 |
| - eslint-plugin-tsdoc \ |
52 |
| - eslint-plugin-unicorn \ |
53 |
| - typescript \ |
54 |
| - @npm-update-package/eslint-config-typescript |
| 20 | +yarn add -D @npm-update-package/eslint-config-typescript |
55 | 21 | ```
|
56 | 22 |
|
57 | 23 | ## Usage
|
58 | 24 |
|
59 | 25 | Add `@npm-update-package/eslint-config-typescript` to `extends` of your ESLint config.
|
60 | 26 |
|
61 |
| -```json |
62 |
| -{ |
63 |
| - "extends": [ |
64 |
| - "@npm-update-package/eslint-config-typescript" |
65 |
| - ] |
| 27 | +```js |
| 28 | +module.exports = { |
| 29 | + extends: [ |
| 30 | + '@npm-update-package/eslint-config-typescript' |
| 31 | + // add other rulesets here if needed |
| 32 | + ], |
| 33 | + rules: { |
| 34 | + // override/add rules settings here if needed |
| 35 | + } |
66 | 36 | }
|
67 | 37 | ```
|
0 commit comments