-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_eslint.config.js.next
68 lines (67 loc) · 1.96 KB
/
_eslint.config.js.next
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
// not ready: updating to new ESLint syntax, depending on AirBnb and Ally supporting flat config.
import globals from "globals";
import js from "@eslint/js";
import esLintParser from "@typescript-eslint/parser";
import tsEsLintPlugin from "@typescript-eslint/eslint-plugin";
import allyPlugin from "eslint-plugin-jsx-a11y";
import reactPlugin from "eslint-plugin-react";
import prettierConfig from "eslint-config-prettier";
import airBnbConfig from "eslint-config-airbnb";
export default [
js.configs.recommended,
prettierConfig,
airBnbConfig,
{
"languageOptions": {
"ecmaVersion": 2022,
"sourceType": "module",
"globals": {
...globals.browser
},
"parser": esLintParser,
parserOptions: {
ecmaFeatures: {
jsx: true
}
}
},
"plugins": {
"@typescript-eslint": tsEsLintPlugin,
"react": reactPlugin,
"ally": allyPlugin,
},
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"moduleDirectory": ["node_modules", "src/"]
}
},
"rules": {
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/require-default-props": "off",
"react/react-in-jsx-scope": "off",
"import/no-extraneous-dependencies": "off",
"import/no-unresolved": "off",
"import/extensions": "off",
"indent": "off",
"implicit-arrow-linebreak": "off",
"operator-linebreak": "off",
"react/jsx-props-no-spreading": "off",
"func-names": "off",
"react/jsx-filename-extension": [1,
{
"extensions": [
".tsx"
]
}
],
"react/function-component-definition": [2, { "namedComponents": "function-expression" }]
},
}
}
]