-
Notifications
You must be signed in to change notification settings - Fork 141
/
.eslintrc
98 lines (95 loc) · 2.81 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
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"eslint-config-airbnb",
"plugin:prettier/recommended",
"prettier"
],
"env": {
"browser": true,
"mocha": true,
"node": true
},
"parser": "babel-eslint",
"plugins": ["react"],
"ignorePatterns": ["src/docs/**/*.js"],
"ecmaFeatures": {
"classes": true,
"jsx": true,
"experimentalDecorators": true
},
"rules": {
"prettier/prettier": [
"error",
{
"printWidth": 120,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "all"
}
],
"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": ["off", { "extensions": [".ts", ".tsx", ".js", ".jsx"] }],
"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",
"import/prefer-default-export": "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-named-as-default": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["demo/**", "test/**", "*.config.js", "scripts/**", "**/Spec.js", "./vite.config.ts"]
}
],
"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",
"import/no-cycle": "warn",
"react/jsx-props-no-spreading": "off",
"react/state-in-constructor": "off",
"react/prop-types": "off",
"react/static-property-placement": "off"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
}