Skip to content

Commit 1fa85ad

Browse files
authored
Merge pull request #23 from dctalbot/oxlint
replace eslint with oxlint
2 parents 8a14f89 + 5821192 commit 1fa85ad

File tree

8 files changed

+466
-3292
lines changed

8 files changed

+466
-3292
lines changed

.oxlintrc.json

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

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ check:
1616
npm dedupe
1717
npx prettier --log-level warn --write .
1818
npx tsc
19-
npx eslint . --fix
19+
npx oxlint . --fix
2020
npx vitest --run
2121
npx expo-doctor
2222

cloudflare-worker/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function getTTL(path) {
3939
const SPINITRON_BASE = "https://spinitron.com";
4040

4141
export default {
42-
async fetch(request, env, ctx) {
42+
async fetch(request, env, _ctx) {
4343
const url = new URL(request.url);
4444
const apiKey = env.SPINITRON_API_KEY;
4545
if (!apiKey) {

eslint.config.js

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

0 commit comments

Comments
 (0)