|
1 |
| -# eslint-config-typescript |
| 1 | +[](https://badge.fury.io/js/%40eslint-recommended%2Feslint-config-typescript) |
| 2 | +[](https://github.com/eslint-recommended/eslint-config-typescript/actions/workflows/eslint.yml) |
| 3 | + |
| 4 | +# @eslint-recommended/eslint-config-typescript |
| 5 | + |
2 | 6 | Recommended ESLint Shareable Config for TypeScript
|
| 7 | + |
| 8 | +## Peer dependencies |
| 9 | + |
| 10 | +- [eslint](https://www.npmjs.com/package/eslint) |
| 11 | +- [eslint-config-standard-with-typescript](https://www.npmjs.com/package/eslint-config-standard-with-typescript) |
| 12 | +- [eslint-plugin-eslint-comments](https://www.npmjs.com/package/eslint-plugin-eslint-comments) |
| 13 | +- [eslint-plugin-import](https://www.npmjs.com/package/eslint-plugin-import) |
| 14 | +- [eslint-plugin-n](https://www.npmjs.com/package/eslint-plugin-n) |
| 15 | +- [eslint-plugin-promise](https://www.npmjs.com/package/eslint-plugin-promise) |
| 16 | +- [eslint-plugin-unicorn](https://www.npmjs.com/package/eslint-plugin-unicorn) |
| 17 | +- [@typescript-eslint/eslint-plugin](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin) |
| 18 | + |
| 19 | +## Usage |
| 20 | + |
| 21 | +### Install packages |
| 22 | + |
| 23 | +#### npm@>=7 |
| 24 | + |
| 25 | +Install `@eslint-recommended/eslint-config-typescript`. |
| 26 | + |
| 27 | +```sh |
| 28 | +npm i -D @eslint-recommended/eslint-config-typescript |
| 29 | +``` |
| 30 | + |
| 31 | +#### npm@<7 |
| 32 | + |
| 33 | +Install `@eslint-recommended/eslint-config-typescript` and its peer dependencies. |
| 34 | + |
| 35 | +```sh |
| 36 | +npm i -D \ |
| 37 | + eslint \ |
| 38 | + eslint-config-standard-with-typescript \ |
| 39 | + eslint-plugin-eslint-comments \ |
| 40 | + eslint-plugin-import \ |
| 41 | + eslint-plugin-n \ |
| 42 | + eslint-plugin-promise \ |
| 43 | + eslint-plugin-unicorn \ |
| 44 | + @typescript-eslint/eslint-plugin \ |
| 45 | + @eslint-recommended/eslint-config-typescript |
| 46 | +``` |
| 47 | + |
| 48 | +### Use in ESLint config |
| 49 | + |
| 50 | +Add `@eslint-recommended/eslint-config-typescript` to `extends` of your ESLint config. |
| 51 | + |
| 52 | +```json |
| 53 | +{ |
| 54 | + "extends": [ |
| 55 | + "@eslint-recommended/eslint-config-typescript" |
| 56 | + ] |
| 57 | +} |
| 58 | +``` |
0 commit comments