-
-
Notifications
You must be signed in to change notification settings - Fork 190
/
eslint.config.mjs
79 lines (71 loc) · 2.38 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import pluginJs from "@eslint/js";
import pluginReact from "eslint-plugin-react";
import tseslint from "typescript-eslint";
/** @type {import("eslint").Linter.Config[]} */
export default [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
{
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
// ...globals.browser,
},
ecmaVersion: "latest",
sourceType: "module",
},
settings: {
react: {
version: "18",
},
},
rules: {
"no-undef": "off",
"space-before-function-paren": 0,
"react/prop-types": 0,
"react/jsx-handler-names": 0,
"react/jsx-fragments": 0,
"react/no-unused-prop-types": 0,
"react/react-in-jsx-scope": "off",
"import/export": 0,
"no-use-before-define": "off",
"no-empty-pattern": "off",
"no-unused-vars": "warn",
"no-shadow": "warn",
"padded-blocks": "off",
"brace-style": "off",
curly: "off",
semi: 0,
"key-spacing": "warn",
"no-trailing-spaces": "warn",
"comma-dangle": "warn",
"no-multi-spaces": "warn",
"comma-spacing": "warn",
"keyword-spacing": "warn",
"no-multiple-empty-lines": "warn",
"object-curly-spacing": ["warn", "always"],
"multiline-ternary": "off",
"space-before-blocks": "warn",
"object-property-newline": "warn",
"eol-last": "warn",
"spaced-comment": "off",
indent: [0, 4],
quotes: [1, "double", {
avoidEscape: true,
}],
// "react-hooks/rules-of-hooks": "error",
// "react-hooks/exhaustive-deps": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-inferrable-types": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-explicit-any": "off",
}
}
];