|
5 | 5 | "node": true, |
6 | 6 | "jest": true |
7 | 7 | }, |
| 8 | + "parser": "@typescript-eslint/parser", |
8 | 9 | "parserOptions": { |
9 | 10 | "ecmaVersion": 8 |
10 | 11 | }, |
11 | | - "extends": ["eslint:recommended", "prettier"], |
12 | | - "ignorePatterns": ["dist", "node_modules", "bin"] |
| 12 | + "plugins": ["@typescript-eslint", "unused-imports"], |
| 13 | + "extends": ["eslint:recommended", "prettier", "plugin:@typescript-eslint/recommended"], |
| 14 | + "ignorePatterns": ["dist", "node_modules", "bin"], |
| 15 | + "rules": { |
| 16 | + // default rules are overriden by the plugins |
| 17 | + "no-unused-vars": "off", |
| 18 | + "no-use-before-define": "off", |
| 19 | + "@typescript-eslint/no-unused-vars": "off", |
| 20 | + |
| 21 | + "guard-for-in": "error", |
| 22 | + "@typescript-eslint/no-use-before-define": [ |
| 23 | + "error", |
| 24 | + { |
| 25 | + "functions": false, |
| 26 | + "classes": true, |
| 27 | + "variables": true, |
| 28 | + "enums": true, |
| 29 | + "typedefs": true |
| 30 | + } |
| 31 | + ], |
| 32 | + "@typescript-eslint/no-require-imports": "off", |
| 33 | + "unused-imports/no-unused-imports": "error", |
| 34 | + "unused-imports/no-unused-vars": [ |
| 35 | + "warn", |
| 36 | + { |
| 37 | + "vars": "all", |
| 38 | + "varsIgnorePattern": "^_", |
| 39 | + "args": "after-used", |
| 40 | + "argsIgnorePattern": "^_", |
| 41 | + "caughtErrors": "all", |
| 42 | + "caughtErrorsIgnorePattern": "^_" |
| 43 | + } |
| 44 | + ] |
| 45 | + } |
13 | 46 | } |
0 commit comments