generated from cremalab/app-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
70 lines (70 loc) · 1.84 KB
/
.eslintrc.json
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
{
"parser": "@typescript-eslint/parser", // Specifies the ESLint parser
"settings": {
"react": {
"version": "detect" // Tells eslint-plugin-react to automatically detect the version of React to use
},
"jest": {
"version": 27
}
},
"root": true,
"parserOptions": {
"ecmaVersion": "latest", // Allows for the parsing of modern ECMAScript features
"sourceType": "module" // Allows for the use of imports
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:jsx-a11y/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"react-app",
"prettier"
],
"rules": {
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_" }
],
"sort-imports": [
"error",
{
"ignoreDeclarationSort": true
}
],
"import/order": [
"error",
{
"newlines-between": "never"
}
],
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "multiline-expression", "next": "*" },
{ "blankLine": "always", "prev": "*", "next": "multiline-expression" }
]
},
"overrides": [
// Test files.
{
"files": ["./**/*.spec.*", "./**/*.test.*"],
"extends": [
"plugin:cypress/recommended",
"plugin:jest/recommended",
"plugin:testing-library/react"
]
},
// Stories.
{
"files": ["./**/*.story.*", "./**/*.stories.*"],
"extends": ["plugin:storybook/recommended"]
}
],
"ignorePatterns": ["**/build/**", "**/coverage/**"]
}