Skip to content

Commit 4df0f24

Browse files
committed
Migrate from ESLint to Oxlint
TL;DR: ESLint 9 goes EOL in about a week, not all the plugins I was using support ESLint 10, and Oxlint is associated with the VoidZero ecosystem that I've already tied myself into with Vite. More thoughts on this in the branch commits. This also unblocks my adoption of TypeScript 7, so I can now use Go on the frontend too, kinda sorta in a way.
2 parents 35f3cdb + e31a674 commit 4df0f24

7 files changed

Lines changed: 778 additions & 4483 deletions

File tree

‎client/eslint.config.js‎

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

‎client/oxlint.config.ts‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { defineConfig } from "oxlint";
2+
3+
import confusingBrowserGlobals from "confusing-browser-globals";
4+
5+
export default defineConfig({
6+
plugins: ["eslint", "jsx-a11y", "react", "typescript"],
7+
ignorePatterns: ["dist/**/*"],
8+
env: {
9+
builtin: true,
10+
},
11+
categories: {
12+
correctness: "error",
13+
},
14+
rules: {
15+
"no-array-constructor": "error",
16+
"no-case-declarations": "error",
17+
"no-empty": "error",
18+
"no-fallthrough": "error",
19+
"no-prototype-builtins": "error",
20+
"no-redeclare": "error",
21+
"no-regex-spaces": "error",
22+
"no-restricted-globals": ["error", ...confusingBrowserGlobals],
23+
"no-unexpected-multiline": "error",
24+
"no-var": "error",
25+
"prefer-const": "error",
26+
"prefer-rest-params": "error",
27+
"prefer-spread": "error",
28+
"react/display-name": "error",
29+
"react/jsx-no-comment-textnodes": "error",
30+
"react/jsx-no-target-blank": "error",
31+
"react/no-unescaped-entities": "error",
32+
"react/no-unknown-property": "error",
33+
"react/rules-of-hooks": "error",
34+
"typescript/ban-ts-comment": "error",
35+
"typescript/no-empty-object-type": "error",
36+
"typescript/no-explicit-any": "error",
37+
"typescript/no-require-imports": "error",
38+
"typescript/no-unnecessary-type-constraint": "error",
39+
},
40+
});

0 commit comments

Comments
 (0)