-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy patheslint.config.mjs
53 lines (51 loc) · 1.87 KB
/
eslint.config.mjs
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
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint, { parser as tsParser } from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import pluginReactHooks from "eslint-plugin-react-hooks";
import pluginJsxA11y from "eslint-plugin-jsx-a11y";
import { fixupPluginRules } from "@eslint/compat";
export default [
{files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"]},
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
pluginJsxA11y.flatConfigs.strict,
{
plugins: {
"react-hooks": fixupPluginRules(pluginReactHooks),
},
settings: {
react: {
version: "detect"
}
},
rules: {
"no-prototype-builtins": "off",
"prefer-const": "warn",
"semi": "warn",
"indent": ["warn", 4, {"SwitchCase": 1}],
"jsx-a11y/no-static-element-interactions": "warn",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"@typescript-eslint/no-unused-vars": ["warn", {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-empty-interface": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/jsx-no-target-blank": "off", // https://github.com/isaacphysics/isaac-react-app/pull/1134#discussion_r1774839755
},
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaFeatures: {
"jsx": true
}
}
}
}
];