|
2 | 2 | "root": true,
|
3 | 3 | "ignorePatterns": ["**/*"],
|
4 | 4 | "plugins": ["@nrwl/nx"],
|
| 5 | + "extends": [ |
| 6 | + "airbnb-typescript/base", |
| 7 | + "eslint:recommended", |
| 8 | + "plugin:@typescript-eslint/recommended", |
| 9 | + "plugin:@typescript-eslint/recommended-requiring-type-checking", |
| 10 | + "plugin:jest/recommended", |
| 11 | + "plugin:jest/style", |
| 12 | + "plugin:import/errors", |
| 13 | + "plugin:import/warnings", |
| 14 | + "plugin:import/typescript", |
| 15 | + "plugin:prettier/recommended" |
| 16 | + ], |
5 | 17 | "overrides": [
|
6 | 18 | {
|
7 | 19 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
30 | 42 | "files": ["*.js", "*.jsx"],
|
31 | 43 | "extends": ["plugin:@nrwl/nx/javascript"],
|
32 | 44 | "rules": {}
|
| 45 | + }, |
| 46 | + { |
| 47 | + "files": ["*.ts"], |
| 48 | + "rules": { |
| 49 | + // airbnb default is 1 |
| 50 | + "max-classes-per-file": ["error", 5], |
| 51 | + // never allow default export |
| 52 | + "import/prefer-default-export": "off", |
| 53 | + // never allow default export |
| 54 | + "import/no-default-export": "error", |
| 55 | + // added by airbnb not-practical for entity-relation definitions |
| 56 | + "import/no-cycle": "off", |
| 57 | + // needed so we can use class scoped generics in methods. |
| 58 | + "class-methods-use-this": "off", |
| 59 | + // airbnb default this doesn't work when using parameter decorators. |
| 60 | + "@typescript-eslint/no-useless-constructor": "off", |
| 61 | + // override airbnb to allow class interface merging |
| 62 | + "@typescript-eslint/no-redeclare": ["error", {"ignoreDeclarationMerge": true}] |
| 63 | + } |
| 64 | + }, |
| 65 | + { |
| 66 | + "files": ["*.spec.ts"], |
| 67 | + "rules": { |
| 68 | + "@typescript-eslint/no-unsafe-assignment": "off", |
| 69 | + "@typescript-eslint/no-unsafe-argument": "off", |
| 70 | + "@typescript-eslint/no-unsafe-member-access": "off", |
| 71 | + "@typescript-eslint/ban-ts-comment": "off", |
| 72 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 73 | + "@typescript-eslint/no-explicit-any": "off" |
| 74 | + } |
33 | 75 | }
|
34 | 76 | ]
|
35 | 77 | }
|
0 commit comments