-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy patheslint.config.js
More file actions
52 lines (48 loc) · 1.88 KB
/
eslint.config.js
File metadata and controls
52 lines (48 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import js from "@eslint/js";
import mm from "@maxmilton/eslint-config";
import { defineConfig } from "eslint/config";
import oxlint from "eslint-plugin-oxlint";
import unicorn from "eslint-plugin-unicorn";
import ts from "typescript-eslint";
export default defineConfig(
js.configs.recommended,
ts.configs.strictTypeChecked,
ts.configs.stylisticTypeChecked,
unicorn.configs.recommended,
mm.configs.recommended,
...oxlint.buildFromOxlintConfigFile(".oxlintrc.json"),
{
linterOptions: {
reportUnusedDisableDirectives: "error",
reportUnusedInlineConfigs: "error",
},
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
/* Rules not supported in oxlint yet */
// https://github.com/oxc-project/oxc/issues/481
// https://github.com/oxc-project/oxc/issues?q=%E2%98%82%EF%B8%8F
"no-underscore-dangle": "off", // synthetic event handler names
"unicorn/import-style": "off",
/* Performance */
"@typescript-eslint/no-confusing-void-expression": "off", // byte savings (but reduces readability)
"@typescript-eslint/restrict-plus-operands": "off", // byte savings (but harder to debug)
"@typescript-eslint/restrict-template-expressions": "off", // byte savings (but harder to debug)
// TODO: Remove these once buildFromOxlintConfigFile correctly disables them.
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/prefer-string-starts-ends-with": "off",
"unicorn/explicit-length-check": "off",
"unicorn/no-array-for-each": "off",
"unicorn/no-array-sort": "off",
"unicorn/no-await-expression-member": "off",
"unicorn/prefer-add-event-listener": "off",
"unicorn/prefer-dom-node-append": "off",
"unicorn/prefer-global-this": "off",
},
},
{ ignores: ["dist"] },
);