|
1 | 1 | { |
2 | | - "extends": [ |
3 | | - "eslint:recommended", |
4 | | - "plugin:@typescript-eslint/recommended", |
5 | | - "prettier", |
6 | | - "prettier/@typescript-eslint", |
7 | | - "plugin:prettier/recommended" |
8 | | - ], |
9 | | - "parser": "@typescript-eslint/parser", |
10 | | - "parserOptions": { |
11 | | - "project": "./tsconfig.json" |
12 | | - }, |
13 | | - "plugins": [ |
14 | | - "@typescript-eslint", |
15 | | - "prettier" |
16 | | - ], |
17 | | - "env": { |
18 | | - "es6": true, |
19 | | - "mocha": true, |
20 | | - "node": true |
21 | | - }, |
22 | | - "rules": { |
23 | | - "prefer-spread": "off", |
24 | | - "@typescript-eslint/explicit-function-return-type": "off", |
25 | | - "@typescript-eslint/explicit-member-accessibility": "off", |
26 | | - "eqeqeq": "error", |
| 2 | + "root": true, |
| 3 | + "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:prettier/recommended"], |
| 4 | + "env": { |
| 5 | + "es6": true, |
| 6 | + "node": true |
| 7 | + }, |
| 8 | + "rules": { |
| 9 | + "prefer-spread": "off", |
| 10 | + "eqeqeq": "error" |
| 11 | + }, |
| 12 | + "ignorePatterns": ["examples/**", "dist/**"], |
| 13 | + "overrides": [ |
| 14 | + { |
| 15 | + "files": ["**/*.ts"], |
| 16 | + "parser": "@typescript-eslint/parser", |
| 17 | + "parserOptions": { |
| 18 | + "project": ["./tsconfig.build.json", "./tsconfig.spec.json"] |
| 19 | + }, |
| 20 | + "plugins": ["@typescript-eslint", "prettier"], |
| 21 | + "rules": { |
| 22 | + "@typescript-eslint/naming-convention": "error", |
27 | 23 | "@typescript-eslint/no-floating-promises": "error", |
28 | 24 | "@typescript-eslint/no-unnecessary-type-arguments": "error", |
29 | 25 | "@typescript-eslint/no-non-null-assertion": "error", |
|
32 | 28 | "@typescript-eslint/no-extra-non-null-assertion": "error", |
33 | 29 | "@typescript-eslint/prefer-nullish-coalescing": "error", |
34 | 30 | "@typescript-eslint/prefer-optional-chain": "error", |
35 | | - "@typescript-eslint/ban-ts-ignore": "error", |
| 31 | + "@typescript-eslint/ban-ts-comment": "error", |
36 | 32 | "@typescript-eslint/prefer-includes": "error", |
37 | 33 | "@typescript-eslint/prefer-for-of": "error", |
38 | 34 | "@typescript-eslint/prefer-string-starts-ends-with": "error", |
|
41 | 37 | "@typescript-eslint/await-thenable": "error", |
42 | 38 | "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", |
43 | 39 | "@typescript-eslint/switch-exhaustiveness-check": "error" |
| 40 | + } |
| 41 | + }, |
| 42 | + { |
| 43 | + "files": ["test/*.ts"], |
| 44 | + "plugins": ["jest"], |
| 45 | + "env": { |
| 46 | + "jest/globals": true |
| 47 | + }, |
| 48 | + "rules": { |
| 49 | + "@typescript-eslint/no-explicit-any": "off", |
| 50 | + "@typescript-eslint/no-var-requires": "off", |
| 51 | + "@typescript-eslint/ban-ts-comment": "warn", |
| 52 | + "@typescript-eslint/naming-convention": "off" |
| 53 | + } |
44 | 54 | }, |
45 | | - "overrides": [ |
46 | | - { |
47 | | - "files": [ |
48 | | - "test/*.ts" |
49 | | - ], |
50 | | - "plugins": [ |
51 | | - "mocha" |
52 | | - ], |
53 | | - "extends": [ |
54 | | - "plugin:mocha/recommended" |
55 | | - ], |
56 | | - "rules": { |
57 | | - "@typescript-eslint/no-explicit-any": "off", |
58 | | - "@typescript-eslint/no-var-requires": "off", |
59 | | - "@typescript-eslint/camelcase": "off", |
60 | | - "mocha/no-setup-in-describe": "off", |
61 | | - "mocha/no-hooks-for-single-case": "off", |
62 | | - "mocha/no-exclusive-tests": "error" |
63 | | - } |
64 | | - } |
65 | | - ] |
| 55 | + { |
| 56 | + "files": ["**/*.js"], |
| 57 | + "env": { |
| 58 | + "browser": true |
| 59 | + }, |
| 60 | + "rules": {} |
| 61 | + } |
| 62 | + ] |
66 | 63 | } |
0 commit comments