Skip to content

Commit f34917f

Browse files
Remove nested configs
1 parent b81440a commit f34917f

4 files changed

Lines changed: 97 additions & 111 deletions

File tree

.oxlintrc.json

Lines changed: 97 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010

1111
"ignorePatterns": [
1212
"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/**"
1417
],
1518

1619
"options": {
@@ -19,20 +22,32 @@
1922
},
2023

2124
"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": [
2627
"warn",
28+
"always",
2729
{
28-
"assertionStyle": "as"
30+
"null": "never"
2931
}
3032
],
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",
3651
"eslint/no-unused-vars": [
3752
"warn",
3853
{
@@ -42,29 +57,85 @@
4257
"ignoreRestSiblings": true
4358
}
4459
],
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",
5363
"no-warning-comments": [
5464
"warn",
5565
{
5666
"terms": ["todo"]
5767
}
5868
],
59-
"eslint/no-constant-condition": [
69+
"typescript/consistent-type-assertions": [
6070
"warn",
6171
{
62-
"checkLoops": false
72+
"assertionStyle": "as"
6373
}
6474
],
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+
]
70141
}

packages/app-vscode/.oxlintrc.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/lib-common/.oxlintrc.json

Lines changed: 0 additions & 41 deletions
This file was deleted.

packages/lib-engine/.oxlintrc.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)