-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
103 lines (103 loc) · 2.92 KB
/
.eslintrc
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
"env": {
"browser": true,
"es2021": true,
"node": true,
"jest": true
},
"extends": [
"airbnb",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/typescript",
"plugin:import/warnings",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "react-hooks", "@typescript-eslint", "prettier", "import", "jsx-a11y", "simple-import-sort"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/no-unused-vars": ["error"],
"default-param-last": "off",
"import/extensions": "off",
"import/no-anonymous-default-export": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"jest.setup.ts",
"**/*.test.{js,jsx,ts,tsx}",
"**/*.spec.{js,jsx,ts,tsx}",
"**/*.stories.{js,jsx,ts,tsx}"
]
}
],
"import/no-unresolved": "error",
"import/prefer-default-export": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/no-onchange": "off",
"no-bitwise": "off",
"no-param-reassign": "off",
"no-shadow": "off",
"no-unused-vars": "off",
"prettier/prettier": "error",
"react/function-component-definition": "off",
"react/jsx-filename-extension": "off",
"react/jsx-props-no-spreading": "off",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"simple-import-sort/exports": "error",
"simple-import-sort/imports": "error"
},
"overrides": [
{
"files": ["**/*.js", "**/*.ts", "**/*.tsx"],
"rules": {
"simple-import-sort/imports": [
"error",
{
"groups": [
// `react` first, `next` second, then packages starting with a character
["^react$", "^next", "^[a-z]"],
// Packages starting with `@`
["^@"],
// Packages starting with `~`
["^~"],
// Imports starting with `../`
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
// Imports starting with `./`
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
// Style imports
["^.+\\.s?css$", "^.+\\.styles"],
// Side effect imports
["^\\u0000"]
]
}
]
}
}
],
"settings": {
"react": {
"version": "detect" // Tells eslint-plugin-react to automatically detect the version of React to use
},
"import/resolver": {
// use <root>/tsconfig.json
"typescript": {
"project": "."
}
}
}
}