forked from recharts/recharts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
111 lines (106 loc) · 3.27 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
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"eslint-config-airbnb",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"prettier"
],
"env": {
"browser": true,
"mocha": true,
"node": 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"
}
],
"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"] }],
"no-var": "error",
// Temporarily disabled for test/* until babel/babel-eslint#33 is resolved
"padded-blocks": "off",
"react/jsx-no-bind": "error",
"strict": "off",
"no-unused-vars": "off",
"one-var": ["error", { "uninitialized": "always" }],
"one-var-declaration-per-line": ["error", "initializations"],
"no-mixed-operators": "off",
"no-plusplus": "off",
"react/forbid-prop-types": "off",
"no-bitwise": "off",
"object-property-newline": "off",
"react/no-unused-prop-types": "off",
"class-methods-use-this": "error",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["demo/**", "test/**", "*.config.js", "scripts/**", "**/Spec.js"]
}
],
"max-len": ["warn", 120],
// Errors introduced while upgrading eslint & plugins
"no-restricted-properties": "error",
"prefer-destructuring": "error",
"object-curly-newline": "off",
"function-paren-newline": "off",
"react/require-default-props": "off",
"no-restricted-globals": "error",
"comma-dangle": "off",
"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",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
"@typescript-eslint/explicit-function-return-type": "off",
"@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": "^_"
}]
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}