forked from recharts/recharts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
114 lines (112 loc) · 3.32 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
104
105
106
107
108
109
110
111
112
113
114
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"eslint-config-airbnb",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"prettier",
"plugin:storybook/recommended"
],
"env": {
"browser": true,
"node": true,
"jest": true
},
"parser": "@typescript-eslint/parser",
"plugins": ["react", "@typescript-eslint"],
"rules": {
"prettier/prettier": [
"error",
{
"printWidth": 120,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "all",
"arrowParens": "avoid",
"endOfLine": "auto"
}
],
"import/extensions": "off",
"valid-jsdoc": "error",
"react/no-did-update-set-state": "warn",
"react/sort-comp": "off",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/react-in-jsx-scope": "error",
"react/jsx-filename-extension": ["error", { "extensions": [".ts", ".tsx", ".js", ".jsx"] }],
"no-var": "error",
"react/jsx-no-bind": "error",
"no-unused-vars": "off",
"one-var": ["error", { "uninitialized": "always" }],
"one-var-declaration-per-line": ["error", "initializations"],
"no-plusplus": "off",
"no-bitwise": "off",
"react/no-unused-prop-types": "off",
"class-methods-use-this": "error",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
],
"max-len": ["warn", 120],
"prefer-destructuring": "error",
"object-curly-newline": "off",
"function-paren-newline": "off",
"react/require-default-props": "off",
"no-restricted-globals": "error",
"react/default-props-match-prop-types": "off",
"react/no-array-index-key": "warn",
"no-multi-assign": "off",
"react/no-access-state-in-setstate": "off",
"react/destructuring-assignment": ["off"],
"react/jsx-closing-tag-location": "error",
"react/no-unused-state": "error",
"react/prefer-stateless-function": "error",
"react/jsx-props-no-spreading": "off",
"react/state-in-constructor": "off",
"react/static-property-placement": "off",
"import/prefer-default-export": "off",
"import/no-named-as-default": "error",
"import/no-cycle": "error",
"import/no-default-export": "error",
"import/no-import-module-exports": "error",
"import/no-relative-packages": "error",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "after-used",
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_"
}
]
},
"overrides": [
{
"files": ["./storybook/**/*.stories.@(ts|tsx)", "./storybook/**/*.@(ts|tsx)", "*.js"],
"rules": {
"react/prop-types": "off",
"no-useless-constructor": "off",
"import/no-default-export": "off",
"react-hooks/rules-of-hooks": "off"
}
}
],
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}