-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
75 lines (75 loc) · 2.26 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
71
72
73
74
75
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"airbnb",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended",
"plugin:react/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint", "react", "prettier", "react-hooks"],
"rules": {
"import/no-unresolved": 0,
"react-hooks/exhaustive-deps": 0,
"react/react-in-jsx-scope": 0, // Disabled because in version 17.xx JSX there is new JSX transform which is not requring to import React
"import/prefer-default-export": "off",
// Allow for non-used variables with prefix "_"
"no-unused-vars": [
2,
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false,
"argsIgnorePattern": "^_"
}
],
"react/jsx-filename-extension": [
1,
{
"extensions": [".ts", ".tsx"]
}
],
"no-unused-expressions": [2, { "allowShortCircuit": true }],
"no-console": [1, { "allow": ["warn", "error"] }],
"prettier/prettier": ["warn"],
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
"react/prop-types": 0,
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
"import/extensions": "off",
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"global-require": "off",
"@typescript-eslint/no-var-requires": "off",
"react/jsx-props-no-spreading": ["warn", { "custom": "ignore" }],
"@typescript-eslint/explicit-module-boundary-types": [0], // Disabled, we don't need to expose return types of functions
"react/state-in-constructor": [0], // Disabled because we want to allow to write components with and without constructor
"camelcase": "off",
"react/function-component-definition": [
2,
{
"namedComponents": ["arrow-function", "function-declaration"],
"unnamedComponents": "arrow-function"
}
],
"react/no-unstable-nested-components": [
"error",
{
"allowAsProps": true
}
]
}
}