-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.json
42 lines (42 loc) · 1.16 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
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "import", "sonarjs", "cypress", "react"],
"parserOptions": {
"ecmaVersion": "latest",
"project": "./tsconfig.eslint.json",
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"plugin:sonarjs/recommended-legacy",
"prettier"
],
"rules": {
"no-console": "off",
"react/react-in-jsx-scope": "off",
// Already using TypeScript. Not sure we should also do runtime props validation, disabling this rule for now
"react/prop-types": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/no-use-before-define": ["error", { "functions": false }],
"sonarjs/cognitive-complexity": "warn",
"sonarjs/prefer-immediate-return": "off"
},
"env": {
"cypress/globals": true
},
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"alias": {
"map": [["@", "./src"]]
}
}
}
}