Skip to content

Commit 679d779

Browse files
committed
chore: migrate to oxlint
1 parent 28b1d7e commit 679d779

4 files changed

Lines changed: 244 additions & 26 deletions

File tree

.oxlintrc.json

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": [
4+
"unicorn",
5+
"typescript",
6+
"oxc"
7+
],
8+
"categories": {},
9+
"rules": {
10+
"constructor-super": "warn",
11+
"for-direction": "warn",
12+
"no-async-promise-executor": "warn",
13+
"no-caller": "warn",
14+
"no-class-assign": "warn",
15+
"no-compare-neg-zero": "warn",
16+
"no-cond-assign": "warn",
17+
"no-const-assign": "warn",
18+
"no-constant-binary-expression": "warn",
19+
"no-constant-condition": "warn",
20+
"no-control-regex": "warn",
21+
"no-debugger": "warn",
22+
"no-delete-var": "warn",
23+
"no-dupe-class-members": "warn",
24+
"no-dupe-else-if": "warn",
25+
"no-dupe-keys": "warn",
26+
"no-duplicate-case": "warn",
27+
"no-empty-character-class": "warn",
28+
"no-empty-pattern": "warn",
29+
"no-empty-static-block": "warn",
30+
"no-eval": "warn",
31+
"no-ex-assign": "warn",
32+
"no-extra-boolean-cast": "warn",
33+
"no-func-assign": "warn",
34+
"no-global-assign": "warn",
35+
"no-import-assign": "warn",
36+
"no-invalid-regexp": "warn",
37+
"no-irregular-whitespace": "warn",
38+
"no-loss-of-precision": "warn",
39+
"no-new-native-nonconstructor": "warn",
40+
"no-nonoctal-decimal-escape": "warn",
41+
"no-obj-calls": "warn",
42+
"no-self-assign": "warn",
43+
"no-setter-return": "warn",
44+
"no-shadow-restricted-names": "warn",
45+
"no-sparse-arrays": "warn",
46+
"no-this-before-super": "warn",
47+
"no-unassigned-vars": "warn",
48+
"no-unsafe-finally": "warn",
49+
"no-unsafe-negation": "warn",
50+
"no-unsafe-optional-chaining": "warn",
51+
"no-unused-expressions": "warn",
52+
"no-unused-labels": "warn",
53+
"no-unused-private-class-members": "warn",
54+
"no-unused-vars": "warn",
55+
"no-useless-backreference": "warn",
56+
"no-useless-catch": "warn",
57+
"no-useless-escape": "warn",
58+
"no-useless-rename": "warn",
59+
"no-with": "warn",
60+
"require-yield": "warn",
61+
"use-isnan": "warn",
62+
"valid-typeof": "warn",
63+
"oxc/bad-array-method-on-arguments": "warn",
64+
"oxc/bad-char-at-comparison": "warn",
65+
"oxc/bad-comparison-sequence": "warn",
66+
"oxc/bad-min-max-func": "warn",
67+
"oxc/bad-object-literal-comparison": "warn",
68+
"oxc/bad-replace-all-arg": "warn",
69+
"oxc/const-comparisons": "warn",
70+
"oxc/double-comparisons": "warn",
71+
"oxc/erasing-op": "warn",
72+
"oxc/missing-throw": "warn",
73+
"oxc/number-arg-out-of-range": "warn",
74+
"oxc/only-used-in-recursion": "warn",
75+
"oxc/uninvoked-array-callback": "warn",
76+
"typescript/await-thenable": "warn",
77+
"typescript/no-array-delete": "warn",
78+
"typescript/no-base-to-string": "warn",
79+
"typescript/no-duplicate-enum-values": "warn",
80+
"typescript/no-duplicate-type-constituents": "warn",
81+
"typescript/no-extra-non-null-assertion": "warn",
82+
"typescript/no-floating-promises": "warn",
83+
"typescript/no-for-in-array": "warn",
84+
"typescript/no-implied-eval": "warn",
85+
"typescript/no-meaningless-void-operator": "warn",
86+
"typescript/no-misused-new": "warn",
87+
"typescript/no-misused-spread": "warn",
88+
"typescript/no-non-null-asserted-optional-chain": "warn",
89+
"typescript/no-redundant-type-constituents": "warn",
90+
"typescript/no-this-alias": "warn",
91+
"typescript/no-unnecessary-parameter-property-assignment": "warn",
92+
"typescript/no-unsafe-declaration-merging": "warn",
93+
"typescript/no-unsafe-unary-minus": "warn",
94+
"typescript/no-useless-empty-export": "warn",
95+
"typescript/no-wrapper-object-types": "warn",
96+
"typescript/prefer-as-const": "warn",
97+
"typescript/require-array-sort-compare": "warn",
98+
"typescript/restrict-template-expressions": "warn",
99+
"typescript/triple-slash-reference": "warn",
100+
"typescript/unbound-method": "warn",
101+
"unicorn/no-await-in-promise-methods": "warn",
102+
"unicorn/no-empty-file": "warn",
103+
"unicorn/no-invalid-fetch-options": "warn",
104+
"unicorn/no-invalid-remove-event-listener": "warn",
105+
"unicorn/no-new-array": "warn",
106+
"unicorn/no-single-promise-in-promise-methods": "warn",
107+
"unicorn/no-thenable": "warn",
108+
"unicorn/no-unnecessary-await": "warn",
109+
"unicorn/no-useless-fallback-in-spread": "warn",
110+
"unicorn/no-useless-length-check": "warn",
111+
"unicorn/no-useless-spread": "warn",
112+
"unicorn/prefer-set-size": "warn",
113+
"unicorn/prefer-string-starts-ends-with": "warn"
114+
},
115+
"settings": {
116+
"jsx-a11y": {
117+
"polymorphicPropName": null,
118+
"components": {},
119+
"attributes": {}
120+
},
121+
"next": {
122+
"rootDir": []
123+
},
124+
"react": {
125+
"formComponents": [],
126+
"linkComponents": [],
127+
"version": null
128+
},
129+
"jsdoc": {
130+
"ignorePrivate": false,
131+
"ignoreInternal": false,
132+
"ignoreReplacesDocs": true,
133+
"overrideReplacesDocs": true,
134+
"augmentsExtendsReplacesDocs": false,
135+
"implementsReplacesDocs": false,
136+
"exemptDestructuredRootsFromChecks": false,
137+
"tagNamePreference": {}
138+
},
139+
"vitest": {
140+
"typecheck": false
141+
}
142+
},
143+
"env": {
144+
"builtin": true
145+
},
146+
"globals": {},
147+
"ignorePatterns": [
148+
"translators/zotero/**",
149+
]
150+
}

eslint.config.mjs

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

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@
77
"build": "web-ext build",
88
"lint": "pnpm lint:eslint && pnpm lint:firefox",
99
"lint:firefox": "web-ext lint",
10-
"lint:eslint": "eslint . --ignore-pattern 'translators/*'",
10+
"lint:oxlint": "oxlint",
1111
"submit:firefox": "web-ext sign",
1212
"test": "node test.js arXiv.org.js"
1313
},
14-
"dependencies": {
15-
},
1614
"devDependencies": {
17-
"jsdom": "^27.4.0",
1815
"@eslint/js": "^9.39.2",
1916
"eslint": "^9.39.2",
2017
"globals": "^17.0.0",
18+
"jsdom": "^27.4.0",
19+
"oxlint": "^1.41.0",
2120
"web-ext": "^9.2.0"
2221
},
2322
"repository": {

pnpm-lock.yaml

Lines changed: 91 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)