|
1 | 1 | { |
2 | | - "root": true, |
3 | | - "parser": "@typescript-eslint/parser", |
4 | | - "parserOptions": { |
5 | | - "ecmaVersion": 6, |
6 | | - "sourceType": "module" |
7 | | - }, |
8 | | - "plugins": [ |
9 | | - "@typescript-eslint" |
| 2 | + "root": true, |
| 3 | + "parser": "@typescript-eslint/parser", |
| 4 | + "parserOptions": { |
| 5 | + "ecmaVersion": 6, |
| 6 | + "sourceType": "module", |
| 7 | + "project": ["src/tsconfig.json"] |
| 8 | + }, |
| 9 | + "plugins": ["@typescript-eslint"], |
| 10 | + "extends": [ |
| 11 | + "eslint:recommended", |
| 12 | + "plugin:@typescript-eslint/recommended", |
| 13 | + "plugin:rxjs/recommended" |
| 14 | + ], |
| 15 | + "rules": { |
| 16 | + "no-console": "error", |
| 17 | + "prefer-const": "error", |
| 18 | + "no-param-reassign": "error", |
| 19 | + "no-else-return": "error", |
| 20 | + "max-len": [ |
| 21 | + "error", |
| 22 | + { |
| 23 | + "code": 100, |
| 24 | + "ignoreStrings": true, |
| 25 | + "ignoreUrls": true, |
| 26 | + "ignoreTemplateLiterals": true, |
| 27 | + "ignoreRegExpLiterals": true |
| 28 | + } |
10 | 29 | ], |
11 | | - "rules": { |
12 | | - "@typescript-eslint/naming-convention": "warn", |
13 | | - "@typescript-eslint/semi": "warn", |
14 | | - "curly": "warn", |
15 | | - "eqeqeq": "warn", |
16 | | - "no-throw-literal": "warn", |
17 | | - "semi": "off" |
| 30 | + "class-methods-use-this": "error", |
| 31 | + "no-magic-numbers": "off", |
| 32 | + "@typescript-eslint/no-magic-numbers": [ |
| 33 | + "error", |
| 34 | + { "ignore": [0, 1], "ignoreDefaultValues": true } |
| 35 | + ], |
| 36 | + "@typescript-eslint/explicit-module-boundary-types": "off", |
| 37 | + "@typescript-eslint/no-explicit-any": "off", |
| 38 | + "@typescript-eslint/no-unused-vars": [ |
| 39 | + "error", |
| 40 | + { "argsIgnorePattern": "^_" } |
| 41 | + ], |
| 42 | + "@typescript-eslint/array-type": "error", |
| 43 | + "@typescript-eslint/no-unnecessary-condition": "error", |
| 44 | + "@typescript-eslint/no-unnecessary-qualifier": "error", |
| 45 | + "@typescript-eslint/no-unnecessary-type-arguments": "error", |
| 46 | + "@typescript-eslint/prefer-for-of": "error", |
| 47 | + "@typescript-eslint/prefer-function-type": "error", |
| 48 | + "@typescript-eslint/prefer-includes": "error", |
| 49 | + "@typescript-eslint/prefer-nullish-coalescing": "error", |
| 50 | + "@typescript-eslint/prefer-optional-chain": "error", |
| 51 | + "@typescript-eslint/prefer-readonly": "error", |
| 52 | + "@typescript-eslint/prefer-as-const": "error", |
| 53 | + "@typescript-eslint/prefer-string-starts-ends-with": "error", |
| 54 | + "@typescript-eslint/prefer-ts-expect-error": "error", |
| 55 | + "@typescript-eslint/promise-function-async": [ |
| 56 | + "error", |
| 57 | + { "checkArrowFunctions": false } |
| 58 | + ], |
| 59 | + "@typescript-eslint/member-ordering": [ |
| 60 | + "error", |
| 61 | + { |
| 62 | + "default": [ |
| 63 | + "static-field", |
| 64 | + "abstract-field", |
| 65 | + "instance-field", |
| 66 | + "decorated-field", |
| 67 | + "constructor", |
| 68 | + "static-method", |
| 69 | + "abstract-method", |
| 70 | + "instance-method", |
| 71 | + "decorated-method" |
| 72 | + ] |
| 73 | + } |
| 74 | + ], |
| 75 | + "rxjs/finnish": "error", |
| 76 | + "rxjs/no-ignored-notifier": "off" |
| 77 | + }, |
| 78 | + "ignorePatterns": ["**/*.d.ts"], |
| 79 | + "overrides": [ |
| 80 | + { |
| 81 | + "files": ["**/test/**/*.ts"], |
| 82 | + "rules": { |
| 83 | + "@typescript-eslint/no-magic-numbers": "off", |
| 84 | + "no-console": ["error", { "allow": ["error"] }] |
| 85 | + } |
18 | 86 | } |
| 87 | + ] |
19 | 88 | } |
0 commit comments