Skip to content

Commit c6c7f8d

Browse files
Copilotfengmk2
andcommitted
Successfully migrate from ESLint to OXLint with @eggjs/oxlint-config
Co-authored-by: fengmk2 <[email protected]>
1 parent 22597d4 commit c6c7f8d

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

.eslintignore

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

.eslintrc

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

.oxlintrc.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
"func-names": "allow",
12+
"typescript/no-explicit-any": "allow",
13+
"unicorn/prefer-string-raw": "allow",
14+
"unicorn/prefer-string-replace-all": "allow",
15+
"unicorn/prefer-string-slice": "allow",
16+
"no-useless-escape": "allow",
17+
"typescript/prefer-ts-expect-error": "allow"
18+
}
19+
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
"@types/node": "22",
3030
"@types/mocha": "10",
3131
"@eggjs/bin": "7",
32-
"eslint": "8",
33-
"eslint-config-egg": "14",
32+
"@eggjs/oxlint-config": "1",
33+
"oxlint": "1",
3434
"rimraf": "6",
3535
"tshy": "3",
3636
"tshy-after": "1",
3737
"typescript": "5"
3838
},
3939
"scripts": {
40-
"lint": "eslint --cache src test --ext .ts",
40+
"lint": "oxlint src test",
4141
"pretest": "npm run clean && npm run lint -- --fix",
4242
"test": "egg-bin test",
4343
"preci": "npm run clean && npm run lint",

0 commit comments

Comments
 (0)