Skip to content

Commit 2a531d0

Browse files
Copilotfengmk2
andcommitted
Complete migration from ESLint to oxlint with @eggjs/oxlint-config
Co-authored-by: fengmk2 <[email protected]>
1 parent 9e7fa3e commit 2a531d0

File tree

3 files changed

+51
-9
lines changed

3 files changed

+51
-9
lines changed

.eslintrc

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

.oxlintrc.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"env": {
4+
"node": true,
5+
"mocha": true
6+
},
7+
"extends": [
8+
"./node_modules/@eggjs/oxlint-config/.oxlintrc.json"
9+
],
10+
"rules": {
11+
"typescript/no-explicit-any": "allow",
12+
"typescript/no-non-null-assertion": "allow",
13+
"typescript/prefer-ts-expect-error": "allow",
14+
"typescript/array-type": "allow",
15+
"typescript/prefer-for-of": "allow",
16+
"typescript/no-inferrable-types": "allow",
17+
"typescript/consistent-type-imports": "allow",
18+
"import/no-namespace": "allow",
19+
"import/consistent-type-specifier-style": "allow",
20+
"import/no-duplicates": "allow",
21+
"no-useless-escape": "allow",
22+
"prefer-exponentiation-operator": "allow",
23+
"new-cap": "allow",
24+
"func-names": "allow",
25+
"no-empty-function": "allow",
26+
"prefer-object-has-own": "allow",
27+
"no-throw-literal": "allow",
28+
"no-void": "allow",
29+
"no-template-curly-in-string": "allow",
30+
"no-duplicate-imports": "allow",
31+
"promise/avoid-new": "allow",
32+
"promise/param-names": "allow",
33+
"promise/prefer-await-to-callbacks": "allow",
34+
"promise/prefer-await-to-then": "allow",
35+
"unicorn/no-new-array": "allow",
36+
"unicorn/consistent-assert": "allow",
37+
"unicorn/no-array-for-each": "allow",
38+
"unicorn/numeric-separators-style": "allow",
39+
"unicorn/prefer-code-point": "allow",
40+
"unicorn/prefer-global-this": "allow",
41+
"unicorn/prefer-string-replace-all": "allow",
42+
"unicorn/prefer-type-error": "allow",
43+
"unicorn/switch-case-braces": "allow",
44+
"unicorn/prefer-string-raw": "allow",
45+
"unicorn/prefer-number-properties": "allow",
46+
"unicorn/prefer-string-slice": "allow",
47+
"jsdoc/check-tag-names": "allow",
48+
"jsdoc/no-defaults": "allow"
49+
}
50+
}

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "2.5.0",
44
"description": "A collection of useful utilities.",
55
"scripts": {
6-
"lint": "eslint src test --ext ts",
6+
"lint": "oxlint src test",
77
"pretest": "npm run lint -- --fix && npm run prepublishOnly",
88
"test": "egg-bin test",
99
"test-local": "egg-bin test",
@@ -26,8 +26,6 @@
2626
"beautify-benchmark": "^0.2.4",
2727
"benchmark": "^2.1.4",
2828
"egg-bin": "^6.5.2",
29-
"eslint": "^8.54.0",
30-
"eslint-config-egg": "^13.0.0",
3129
"moment": "^2.22.2",
3230
"object-assign": "^4.1.1",
3331
"optimized": "^1.2.0",

0 commit comments

Comments
 (0)