Skip to content

Commit cb944d2

Browse files
style(lint): use oxlint
1 parent c8c81b8 commit cb944d2

File tree

11 files changed

+305
-416
lines changed

11 files changed

+305
-416
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
},
66
"customizations": {
77
"vscode": {
8-
"extensions": ["oxc.oxc-vscode", "dbaeumer.vscode-eslint"]
8+
"extensions": ["oxc.oxc-vscode"]
99
}
1010
},
1111
"onCreateCommand": "pnpm install",

.oxlintrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": ["node_modules/@nihalgonsalves/esconfig/.oxlintrc.json"],
3+
"ignorePatterns": ["package-test/"],
4+
"rules": {
5+
"typescript/no-duplicate-enum-values": "off"
6+
}
7+
}

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "recommendations": ["oxc.oxc-vscode", "dbaeumer.vscode-eslint"] }
1+
{ "recommendations": ["oxc.oxc-vscode"] }

.vscode/settings.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
"editor.formatOnSave": true,
44
"editor.defaultFormatter": "oxc.oxc-vscode",
55
"editor.codeActionsOnSave": {
6-
"source.fixAll.eslint": "explicit"
6+
"source.fixAll.oxc": "explicit"
77
},
8+
"oxc.typeAware": true,
89
"yaml.schemas": {
9-
"https://json.schemastore.org/lefthook.json": ["lefthook.yml", "lefthook-local.yml"]
10+
"node_modules/lefthook/schema.json": ["lefthook.yml", "lefthook-local.yml"]
1011
}
1112
}

bin/sync.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable import/no-extraneous-dependencies */
2-
31
import { writeFileSync } from "fs";
42

53
import { z } from "zod";

eslint.config.js

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

lefthook.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ pre-commit:
77
glob: "*.{js,ts,jsx,tsx,mjs,mts,cjs,cts,json,yml,yaml,md}"
88
run: pnpm oxfmt --no-error-on-unmatched-pattern {staged_files}
99
stage_fixed: true
10-
eslint:
10+
oxlint:
1111
glob: "*.{js,ts,jsx,tsx,mjs,mts,cjs,cts}"
12-
run: pnpm eslint --no-warn-ignored --fix {staged_files}
12+
run: pnpm oxlint --fix {staged_files}
1313
stage_fixed: true
1414
typescript-build:
1515
glob: "*.{js,ts,jsx,tsx,mjs,mts,cjs,cts}"

package-test/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@
2828
"clean": "rm -rf ./dist/",
2929
"typecheck": "tsc --noEmit --project tsconfig.json && tsc --noEmit --project tsconfig.build.json",
3030
"build": "tsc --build tsconfig.build.json",
31-
"lint:check": "eslint",
31+
"lint:check": "oxlint --type-aware --report-unused-disable-directives",
3232
"format:check": "oxfmt --check",
3333
"format:write": "oxfmt",
3434
"prepublishOnly": "npm run build",
3535
"test": "node bin/test.js"
3636
},
3737
"devDependencies": {
38-
"@nihalgonsalves/esconfig": "^0.13.4",
38+
"@nihalgonsalves/esconfig": "^0.14.0",
3939
"@types/node": "^22",
40-
"eslint": "^9.39.2",
4140
"knip": "^5.82.1",
4241
"lefthook": "^2.0.16",
4342
"oxfmt": "^0.33.0",
43+
"oxlint": "^1.48.0",
44+
"oxlint-tsgolint": "^0.14.0",
4445
"typescript": "^5.9.3",
45-
"typescript-eslint": "^8.54.0",
4646
"zod": "^4.3.6"
4747
},
4848
"engines": {

0 commit comments

Comments
 (0)