-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy patheslint.config.mjs
More file actions
61 lines (55 loc) · 1.39 KB
/
eslint.config.mjs
File metadata and controls
61 lines (55 loc) · 1.39 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
53
54
55
56
57
58
59
60
61
import globals from "globals";
import { defineConfig, globalIgnores } from "eslint/config";
import typescriptEslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import js from "@eslint/js";
export default defineConfig([
globalIgnores([
"**/node_modules",
"website/.docusaurus",
"website/build",
"website/static/js/build",
"website/static/repl",
]),
{
languageOptions: {
globals: {
...globals.node,
...globals.es2025,
...globals.browser,
},
parserOptions: {
ecmaFeatures: { jsx: true },
},
ecmaVersion: "latest",
sourceType: "module",
},
},
...typescriptEslint.config({
files: ["**/*.{ts,tsx}"],
extends: typescriptEslint.configs.recommended,
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ caughtErrorsIgnorePattern: "^_", ignoreRestSiblings: true },
],
},
}),
{
files: ["js/**/*.js", "website/**/*.js"],
plugins: {
react: pluginReact,
},
rules: {
...js.configs.recommended.rules,
"no-unused-vars": [
"error",
{ caughtErrorsIgnorePattern: "^_", ignoreRestSiblings: true },
],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
},
},
]);