Skip to content

Commit 5836de6

Browse files
committed
oxlint & oxfmt
1 parent eb43b0b commit 5836de6

74 files changed

Lines changed: 4690 additions & 4145 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.husky/pre-commit

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# pnpm types
2-
pnpm eslint src/
1+
pnpm exec oxlint src/

.oxfmtrc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"ignorePatterns": [],
4+
"semi": true,
5+
"singleQuote": true,
6+
"jsxSingleQuote": true,
7+
"useTabs": false,
8+
"tabWidth": 4,
9+
"arrowParens": "avoid",
10+
"insertFinalNewline": true,
11+
"quoteProps": "as-needed",
12+
"trailingComma": "all",
13+
"bracketSpacing": true,
14+
"bracketSameLine": true,
15+
"proseWrap": "preserve",
16+
"printWidth": 120
17+
}

.oxlintrc.json

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": [
4+
"typescript",
5+
"eslint",
6+
"import",
7+
"node",
8+
"oxc",
9+
"promise",
10+
"jsdoc"
11+
],
12+
"categories": {
13+
"correctness": "off"
14+
},
15+
"env": {
16+
"builtin": true
17+
},
18+
"ignorePatterns": [
19+
"out/**",
20+
"**/dist/**",
21+
"playground/**",
22+
"**/vscode*.d.ts",
23+
"**/.venv/**",
24+
"**/venv/**",
25+
"**/.vscode-test/**",
26+
"**/.vscode-test-web/**",
27+
"src/types/**/*.d.ts",
28+
"project-files/**/*",
29+
".vscode-test.mjs",
30+
"check-malicious-packages.js",
31+
"coverage-desktop/**",
32+
"coverage-web/**",
33+
"scripts/check-malicious-packages.js",
34+
"media/**"
35+
],
36+
"rules": {
37+
"constructor-super": "error",
38+
"for-direction": "error",
39+
"getter-return": "error",
40+
"no-async-promise-executor": "error",
41+
"no-case-declarations": "error",
42+
"no-class-assign": "error",
43+
"no-compare-neg-zero": "error",
44+
"no-cond-assign": "error",
45+
"no-const-assign": "error",
46+
"no-constant-binary-expression": "error",
47+
"no-constant-condition": "error",
48+
"no-control-regex": "error",
49+
"no-debugger": "error",
50+
"no-delete-var": "error",
51+
"no-dupe-class-members": "error",
52+
"no-dupe-else-if": "error",
53+
"no-dupe-keys": "error",
54+
"no-duplicate-case": "error",
55+
"no-empty": "error",
56+
"no-empty-character-class": "error",
57+
"no-empty-pattern": "error",
58+
"no-empty-static-block": "error",
59+
"no-ex-assign": "error",
60+
"no-extra-boolean-cast": "error",
61+
"no-fallthrough": "error",
62+
"no-func-assign": "error",
63+
"no-global-assign": "error",
64+
"no-import-assign": "error",
65+
"no-invalid-regexp": "error",
66+
"no-irregular-whitespace": "error",
67+
"no-loss-of-precision": "error",
68+
"no-misleading-character-class": "error",
69+
"no-new-native-nonconstructor": "error",
70+
"no-nonoctal-decimal-escape": "error",
71+
"no-obj-calls": "error",
72+
"no-prototype-builtins": "error",
73+
"no-redeclare": "error",
74+
"no-regex-spaces": "error",
75+
"no-self-assign": "error",
76+
"no-setter-return": "error",
77+
"no-shadow-restricted-names": "error",
78+
"no-sparse-arrays": "error",
79+
"no-this-before-super": "error",
80+
"no-unassigned-vars": "error",
81+
"no-undef": "error",
82+
"no-unexpected-multiline": "error",
83+
"no-unreachable": "error",
84+
"no-unsafe-finally": "error",
85+
"no-unsafe-negation": "error",
86+
"no-unsafe-optional-chaining": "error",
87+
"no-unused-labels": "error",
88+
"no-unused-private-class-members": "error",
89+
"no-unused-vars": "error",
90+
"no-useless-assignment": "error",
91+
"no-useless-backreference": "error",
92+
"no-useless-catch": "error",
93+
"no-useless-escape": "error",
94+
"no-with": "error",
95+
"preserve-caught-error": "error",
96+
"require-yield": "error",
97+
"use-isnan": "error",
98+
"valid-typeof": "error",
99+
"no-array-constructor": "error",
100+
"no-unused-expressions": "error",
101+
"no-empty-function": "error",
102+
"typescript/ban-ts-comment": "error",
103+
"typescript/no-duplicate-enum-values": "error",
104+
"typescript/no-empty-object-type": "error",
105+
"typescript/no-explicit-any": "error",
106+
"typescript/no-extra-non-null-assertion": "error",
107+
"typescript/no-misused-new": "error",
108+
"typescript/no-namespace": "error",
109+
"typescript/no-non-null-asserted-optional-chain": "error",
110+
"typescript/no-require-imports": "error",
111+
"typescript/no-this-alias": "error",
112+
"typescript/no-unnecessary-type-constraint": "error",
113+
"typescript/no-unsafe-declaration-merging": "error",
114+
"typescript/no-unsafe-function-type": "error",
115+
"typescript/no-wrapper-object-types": "error",
116+
"typescript/prefer-as-const": "error",
117+
"typescript/prefer-namespace-keyword": "error",
118+
"typescript/triple-slash-reference": "error",
119+
"typescript/adjacent-overload-signatures": "error",
120+
"typescript/array-type": "error",
121+
"typescript/ban-tslint-comment": "error",
122+
"typescript/class-literal-property-style": "error",
123+
"typescript/consistent-generic-constructors": "error",
124+
"typescript/consistent-indexed-object-style": "error",
125+
"typescript/consistent-type-assertions": "error",
126+
"typescript/consistent-type-definitions": "error",
127+
"typescript/no-confusing-non-null-assertion": "error",
128+
"typescript/no-inferrable-types": "error",
129+
"typescript/prefer-for-of": "error",
130+
"typescript/prefer-function-type": "error"
131+
},
132+
"options": {
133+
"typeAware": true,
134+
"typeCheck": true,
135+
},
136+
"overrides": [
137+
{
138+
"files": [
139+
"**/*.ts",
140+
"**/*.tsx",
141+
"**/*.mts",
142+
"**/*.cts"
143+
],
144+
"rules": {
145+
"constructor-super": "off",
146+
"getter-return": "off",
147+
"no-class-assign": "off",
148+
"no-const-assign": "off",
149+
"no-dupe-class-members": "off",
150+
"no-dupe-keys": "off",
151+
"no-func-assign": "off",
152+
"no-import-assign": "off",
153+
"no-new-native-nonconstructor": "off",
154+
"no-obj-calls": "off",
155+
"no-redeclare": "off",
156+
"no-setter-return": "off",
157+
"no-this-before-super": "off",
158+
"no-undef": "off",
159+
"no-unreachable": "off",
160+
"no-unsafe-negation": "off",
161+
"no-var": "error",
162+
"no-with": "off",
163+
"prefer-const": "error",
164+
"prefer-rest-params": "error",
165+
"prefer-spread": "error"
166+
}
167+
},
168+
{
169+
"files": [
170+
"**/*.{ts,mts,cts,tsx}",
171+
"webview/**/*.js"
172+
],
173+
"rules": {
174+
"curly": "off",
175+
"no-control-regex": "off",
176+
"no-useless-assignment": "warn",
177+
"prefer-const": "warn",
178+
"unicorn/catch-error-name": [
179+
"error",
180+
{
181+
"name": "erm"
182+
}
183+
],
184+
"no-empty-function": "off",
185+
"no-unused-vars": [
186+
"warn",
187+
{
188+
"argsIgnorePattern": "^_"
189+
}
190+
]
191+
},
192+
"plugins": [
193+
"unicorn"
194+
]
195+
},
196+
{
197+
"files": [
198+
"src/test/**/*.ts"
199+
],
200+
"env": {
201+
"mocha": true
202+
}
203+
},
204+
{
205+
"files": [
206+
"src/test/suite/desktop/**/*.ts",
207+
"src/test/test_utils.ts"
208+
],
209+
"env": {
210+
"mocha": true,
211+
"node": true
212+
}
213+
},
214+
{
215+
"files": [
216+
"src/test/suite/web/**/*.ts"
217+
],
218+
"env": {
219+
"browser": true,
220+
"mocha": true
221+
}
222+
},
223+
{
224+
"files": [
225+
"**/*.{js,mjs,cjs}",
226+
"eslint.config.mjs",
227+
"esbuild.mjs",
228+
"**/*.esbuild.{m,c,}js"
229+
],
230+
"rules": {
231+
"curly": "off",
232+
"no-control-regex": "off",
233+
"prefer-const": "warn",
234+
"unicorn/catch-error-name": [
235+
"error",
236+
{
237+
"name": "erm"
238+
}
239+
]
240+
},
241+
"plugins": [
242+
"unicorn"
243+
],
244+
"env": {
245+
"node": true
246+
}
247+
}
248+
]
249+
}

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@
1010
],
1111
"python.testing.pytestEnabled": false,
1212
"python.testing.unittestEnabled": false,
13-
"python.testing.promptToConfigure": false
13+
"python.testing.promptToConfigure": false,
14+
"js/ts.experimental.useTsgo": true,
15+
"oxc.enable": true,
1416
}

package.json

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,8 @@
806806
"build": "pnpm types && pnpm vendor-codicons && node ./scripts/esbuild.mjs",
807807
"compile": "cross-env NODE_ENV=0 pnpm build",
808808
"package": "cross-env NODE_ENV=1 pnpm build",
809-
"lint": "eslint --fix",
809+
"lint": "oxlint --fix",
810+
"fmt": "oxfmt",
810811
"test": "npm-run-all -s test:web test:desktop --continue-on-error",
811812
"qa:test:clean": "node ./scripts/test-utils/run-all-clean.mjs",
812813
"qa:test:summary": "node ./scripts/test-utils/parse-failures.mjs",
@@ -846,8 +847,6 @@
846847
"test:desktop:vscode": "vscode-test --label desktopUnitTest"
847848
},
848849
"devDependencies": {
849-
"@eslint/js": "^10.0.1",
850-
"@stylistic/eslint-plugin": "^5.10.0",
851850
"@types/glob-to-regexp": "^0.4.4",
852851
"@types/json-schema": "^7.0.15",
853852
"@types/mocha": "^10.0.10",
@@ -859,25 +858,22 @@
859858
"@vscode/test-electron": "^3.0.0",
860859
"@vscode/test-web": "^0.0.81",
861860
"@vscode/vsce": "^3.9.2",
861+
"ansis": "^4.3.1",
862862
"baseline-browser-mapping": "^2.11.1",
863-
"chalk": "^5.6.2",
864863
"cross-env": "^10.1.0",
865864
"esbuild": "^0.28.1",
866865
"esbuild-plugin-polyfill-node": "^0.3.0",
867-
"eslint": "^10.7.0",
868-
"eslint-plugin-jsdoc": "^63.2.1",
869-
"eslint-plugin-unicorn": "^72.0.0",
870-
"glob": "^13.0.6",
871-
"globals": "^17.7.0",
872866
"husky": "^9.1.7",
873867
"mocha": "^11.7.6",
874-
"npm-run-all": "^4.1.5",
868+
"npm-run-all2": "^9.0.2",
875869
"ovsx": "^1.0.2",
870+
"oxfmt": "^0.60.0",
871+
"oxlint": "^1.75.0",
872+
"oxlint-tsgolint": "^7.0.2001",
876873
"playwright": "^1.61.1",
877874
"ts-mockito": "^2.6.1",
878875
"tsx": "^4.23.1",
879876
"typescript": "npm:@typescript/typescript6@^6.0.2",
880-
"typescript-eslint": "^8.65.0",
881877
"yaml": "^2.9.0"
882878
},
883879
"dependencies": {

0 commit comments

Comments
 (0)