-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
93 lines (88 loc) · 2.55 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
{
"ignorePatterns": ["**/*.d.ts", "serviceWorker.ts",".storybook/**/*","src/gql/generated/**/*"],
"globals" : {
"JSX" : "readonly",
"vi": true
},
"root": true,
"extends": [
"react-app",
"airbnb",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended"
],
"plugins": ["cypress", "simple-import-sort"],
"rules": {
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"jsx-a11y/label-has-associated-control": [
"error",
{
"required": {
"some": ["nesting", "id"]
}
}
],
"jsx-a11y/label-has-for": [
"error",
{
"required": {
"some": ["nesting", "id"]
}
}
],
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md#how-to-use
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
// We mostly use functional components anyhow
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-default-props.md
"react/require-default-props": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
"react/jsx-filename-extension": [1, { "extensions": ["ts", "tsx"] }],
"prettier/prettier": [
"error",
{
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid",
"endOfLine": "auto"
}
],
"import/extensions": ["error", "never"],
"simple-import-sort/imports": [
"error",
{
"groups": [
// Packages. `react` related packages come first.
["^react", "^@?\\w"],
// Internal packages.
[
"^(assets|components|constants|contexts|data|hooks|i18n|images|queries|reducers|sagas|types|utils|validations|views)(/.*|$)"
],
// Side effect imports.
["^\\u0000"],
// Parent imports. Put `..` last.
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
// Other relative imports. Put same-folder imports and `.` last.
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
// Style imports.
["^.+\\.s?css$"]
]
}
],
"react/jsx-props-no-spreading": "off"
},
"settings": {
"import/resolver": {
"node": {
"paths": ["src"],
"extensions": [".js", ".jsx", ".ts", ".tsx", ".d.ts"]
}
}
},
"env": {
"cypress/globals": true
}
}