Skip to content

Commit 7a1e724

Browse files
authored
refactor(linter): migrate from eslint to oxlint (#152)
1 parent 827ea8a commit 7a1e724

30 files changed

+926
-3364
lines changed

.oxlintrc.json

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"categories": {
4+
"correctness": "error",
5+
"nursery": "error",
6+
"pedantic": "error",
7+
"perf": "error",
8+
"restriction": "error",
9+
"style": "error",
10+
"suspicious": "error"
11+
},
12+
"env": {
13+
"es2022": true,
14+
"shared-node-browser": true
15+
},
16+
"plugins": [
17+
"typescript",
18+
"unicorn",
19+
"vitest",
20+
"import",
21+
"eslint",
22+
"oxc",
23+
"promise"
24+
],
25+
"rules": {
26+
"@typescript-eslint/no-empty-object-type": [
27+
"error",
28+
{
29+
"allowInterfaces": "with-single-extends"
30+
}
31+
],
32+
"@typescript-eslint/no-explicit-any": "off",
33+
"@typescript-eslint/no-unsafe-declaration-merging": "off",
34+
"eslint/curly": "error",
35+
"eslint/max-depth": "off",
36+
"eslint/max-lines": "off",
37+
"eslint/max-lines-per-function": "off",
38+
"eslint/max-nested-callbacks": "off",
39+
"eslint/no-duplicate-imports": "off",
40+
"func-style": [
41+
"error",
42+
"declaration",
43+
{
44+
"overrides": {
45+
"namedExports": "declaration"
46+
}
47+
}
48+
],
49+
"import/exports-last": "off",
50+
"import/group-exports": "off",
51+
"import/max-dependencies": "off",
52+
"import/no-anonymous-default-export": [
53+
"error",
54+
{
55+
"allowCallExpression": true
56+
}
57+
],
58+
"import/no-default-export": "off",
59+
"max-params": "off",
60+
"no-async-await": "off",
61+
"no-console": "off",
62+
"no-continue": "off",
63+
"no-magic-numbers": "off",
64+
"no-nested-ternary": "off",
65+
"no-optional-chaining": "off",
66+
"no-ternary": "off",
67+
"no-undefined": "off",
68+
"oxc/no-barrel-file": "off",
69+
"oxc/no-rest-spread-properties": "off",
70+
"promise/catch-or-return": "off",
71+
"sort-imports": "off",
72+
"sort-keys": "off",
73+
"sort-vars": "off",
74+
"typescript/consistent-indexed-object-style": "error",
75+
"typescript/explicit-function-return-type": "off",
76+
"typescript/no-empty-interface": "off",
77+
"unicorn/error-message": "off",
78+
"unicorn/filename-case": [
79+
"error",
80+
{
81+
"cases": {
82+
"camelCase": true,
83+
"kebabCase": false,
84+
"pascalCase": true,
85+
"snakeCase": false
86+
}
87+
}
88+
],
89+
"unicorn/no-nested-ternary": "off",
90+
"unicorn/no-null": "off",
91+
"unicorn/number-literal-case": "off",
92+
"vitest/consistent-test-it": [
93+
"error",
94+
{
95+
"fn": "test",
96+
"withinDescribe": "test"
97+
}
98+
],
99+
"vitest/max-expects": "off",
100+
"vitest/no-hooks": "off",
101+
"vitest/prefer-lowercase-title": "off",
102+
"vitest/prefer-strict-equal": "off",
103+
"vitest/prefer-to-be-falsy": "off",
104+
"vitest/prefer-to-be-truthy": "off",
105+
"vitest/require-top-level-describe": "off",
106+
"yoda": "error"
107+
}
108+
}

eslint.config.mjs

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

package.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
],
4343
"scripts": {
4444
"build": "rm -rf lib && tsc --project tsconfig.build.json",
45-
"lint": "eslint src",
46-
"lint:fix": "eslint src --fix",
45+
"lint": "oxlint",
46+
"lint:fix": "oxlint --fix",
4747
"test": "vitest",
4848
"typecheck": "tsc --noEmit",
4949
"test:coverage": "vitest --coverage"
@@ -56,26 +56,17 @@
5656
"lodash.get": "^4.4.0"
5757
},
5858
"devDependencies": {
59-
"@eslint/compat": "^1.2.5",
60-
"@eslint/eslintrc": "^3.2.0",
61-
"@eslint/js": "^9.19.0",
6259
"@types/inflection": "^1.13.0",
6360
"@types/jsonld": "^1.5.0",
6461
"@types/lodash.get": "^4.4.0",
6562
"@types/node": "^22.0.0",
6663
"@vitest/coverage-v8": "3.2.2",
67-
"eslint": "^9.0.0",
68-
"eslint-config-prettier": "^10.0.0",
69-
"eslint-import-resolver-typescript": "^3.5.1",
70-
"eslint-plugin-import": "^2.26.0",
71-
"eslint-plugin-prettier": "^5.0.0",
72-
"eslint-watch": "^8.0.0",
7364
"globals": "^15.14.0",
7465
"msw": "^2.9.0",
7566
"openapi-types": "^12.0.0",
67+
"oxlint": "^1.1.0",
7668
"prettier": "^3.0.0",
7769
"typescript": "^5.7.0",
78-
"typescript-eslint": "^8.22.0",
7970
"vitest": "^3.2.2"
8071
},
8172
"packageManager": "[email protected]+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977",

0 commit comments

Comments
 (0)