|
10 | 10 |
|
11 | 11 | "ignorePatterns": [ |
12 | 12 | "resources/playground/**", |
13 | | - "packages/app-neovim/cursorless.nvim/**" |
| 13 | + "packages/app-neovim/cursorless.nvim/**", |
| 14 | + "packages/app-vscode/src/keyboard/grammar/generated/**", |
| 15 | + "packages/lib-engine/src/customCommandGrammar/generated/**", |
| 16 | + "packages/lib-engine/src/snippets/vendor/**" |
14 | 17 | ], |
15 | 18 |
|
16 | 19 | "options": { |
|
19 | 22 | }, |
20 | 23 |
|
21 | 24 | "rules": { |
22 | | - "import/no-relative-packages": "warn", |
23 | | - "import/no-duplicates": "warn", |
24 | | - "typescript/consistent-type-imports": "warn", |
25 | | - "typescript/consistent-type-assertions": [ |
| 25 | + "curly": "warn", |
| 26 | + "eqeqeq": [ |
26 | 27 | "warn", |
| 28 | + "always", |
27 | 29 | { |
28 | | - "assertionStyle": "as" |
| 30 | + "null": "never" |
29 | 31 | } |
30 | 32 | ], |
31 | | - "typescript/no-explicit-any": "off", |
32 | | - "typescript/no-inferrable-types": "off", |
33 | | - "typescript/restrict-template-expressions": "off", |
34 | | - "typescript/no-base-to-string": "off", |
35 | | - "typescript/unbound-method": "off", |
| 33 | + "eslint/no-constant-condition": [ |
| 34 | + "warn", |
| 35 | + { |
| 36 | + "checkLoops": false |
| 37 | + } |
| 38 | + ], |
| 39 | + "eslint/no-restricted-imports": [ |
| 40 | + "warn", |
| 41 | + { |
| 42 | + "patterns": [ |
| 43 | + { |
| 44 | + "group": ["../*/src", "../*/src/*", "../../*/src", "../../*/src/*"], |
| 45 | + "message": "Relative package imports are not allowed" |
| 46 | + } |
| 47 | + ] |
| 48 | + } |
| 49 | + ], |
| 50 | + "eslint/no-throw-literal": "warn", |
36 | 51 | "eslint/no-unused-vars": [ |
37 | 52 | "warn", |
38 | 53 | { |
|
42 | 57 | "ignoreRestSiblings": true |
43 | 58 | } |
44 | 59 | ], |
45 | | - "curly": "warn", |
46 | | - "eqeqeq": [ |
47 | | - "warn", |
48 | | - "always", |
49 | | - { |
50 | | - "null": "never" |
51 | | - } |
52 | | - ], |
| 60 | + "import/no-duplicates": "warn", |
| 61 | + "mocha/no-exclusive-tests": "warn", |
| 62 | + "mocha/no-pending-tests": "warn", |
53 | 63 | "no-warning-comments": [ |
54 | 64 | "warn", |
55 | 65 | { |
56 | 66 | "terms": ["todo"] |
57 | 67 | } |
58 | 68 | ], |
59 | | - "eslint/no-constant-condition": [ |
| 69 | + "typescript/consistent-type-assertions": [ |
60 | 70 | "warn", |
61 | 71 | { |
62 | | - "checkLoops": false |
| 72 | + "assertionStyle": "as" |
63 | 73 | } |
64 | 74 | ], |
65 | | - "eslint/no-throw-literal": "warn", |
66 | | - "unicorn/prefer-module": "warn", |
67 | | - "mocha/no-pending-tests": "warn", |
68 | | - "mocha/no-exclusive-tests": "warn" |
69 | | - } |
| 75 | + "typescript/consistent-type-imports": "warn", |
| 76 | + "typescript/no-base-to-string": "off", |
| 77 | + "typescript/restrict-template-expressions": "off", |
| 78 | + "typescript/unbound-method": "off", |
| 79 | + "unicorn/prefer-module": "warn" |
| 80 | + }, |
| 81 | + "overrides": [ |
| 82 | + { |
| 83 | + "files": ["packages/app-vscode/src/scripts/**/*.ts"], |
| 84 | + "rules": { |
| 85 | + "no-restricted-imports": [ |
| 86 | + "warn", |
| 87 | + { |
| 88 | + "paths": [ |
| 89 | + { |
| 90 | + "name": "vscode", |
| 91 | + "message": "Scripts shouldn't depend on vscode" |
| 92 | + } |
| 93 | + ] |
| 94 | + } |
| 95 | + ] |
| 96 | + } |
| 97 | + }, |
| 98 | + |
| 99 | + { |
| 100 | + "files": ["packages/lib-common/**/*.ts", "packages/lib-engine/**/*.ts"], |
| 101 | + "rules": { |
| 102 | + "import/no-nodejs-modules": "warn" |
| 103 | + } |
| 104 | + }, |
| 105 | + |
| 106 | + { |
| 107 | + "files": [ |
| 108 | + "packages/lib-common/**/*.test.ts", |
| 109 | + "packages/lib-engine/**/*.test.ts", |
| 110 | + "packages/lib-engine/src/scripts/**/*.ts", |
| 111 | + "packages/lib-engine/src/testUtil/**/*.ts" |
| 112 | + ], |
| 113 | + "rules": { |
| 114 | + "import/no-nodejs-modules": "off" |
| 115 | + } |
| 116 | + }, |
| 117 | + |
| 118 | + { |
| 119 | + "files": ["packages/lib-common/src/types/command/**/*.ts"], |
| 120 | + "rules": { |
| 121 | + "eslint/no-restricted-imports": [ |
| 122 | + "warn", |
| 123 | + { |
| 124 | + "patterns": [ |
| 125 | + { |
| 126 | + "group": ["@cursorless/*", "../*"], |
| 127 | + "message": "API types shouldn't have any dependencies" |
| 128 | + } |
| 129 | + ], |
| 130 | + "paths": [ |
| 131 | + { |
| 132 | + "name": "@*", |
| 133 | + "message": "API types shouldn't have any dependencies" |
| 134 | + } |
| 135 | + ] |
| 136 | + } |
| 137 | + ] |
| 138 | + } |
| 139 | + } |
| 140 | + ] |
70 | 141 | } |
0 commit comments