forked from danushka9999/msclubwebsite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
142 lines (141 loc) · 4.77 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{
"extends": [ "airbnb","plugin:prettier/recommended", "prettier/react"],
"parser": "babel-eslint",
"parserOptions": { "sourceType": "module" },
"rules": {
// eslint
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": ["error", "always"],
"arrow-spacing": "error",
"camelcase": "error",
"comma-dangle": ["error", "always-multiline"],
"curly": "error",
"default-case": "error",
"dot-notation": "warn",
"eqeqeq": "error",
"max-len": [
"warn",
{
"code": 180,
"ignoreUrls": true,
"ignoreRegExpLiterals": true
}
],
"newline-per-chained-call": "off",
"no-alert": "warn",
"no-confusing-arrow": "off",
"no-console": "error",
"no-duplicate-imports": ["error", { "includeExports": true }],
"no-else-return": "error",
"no-eq-null": "error",
"no-extra-bind": "error",
"no-lone-blocks": "error",
"no-multiple-empty-lines": ["error"],
"no-nested-ternary": ["error"],
"no-param-reassign": "error",
"no-return-assign": "error",
"no-return-await": "warn",
"no-self-compare": "error",
"no-template-curly-in-string": "error",
"no-underscore-dangle": ["warn", { "allowAfterSuper": true, "enforceInMethodNames": true }],
"no-useless-concat": "error",
"no-useless-constructor": "error",
"no-useless-escape": "error",
"no-var": "error",
"prefer-const": "error",
"prefer-promise-reject-errors": "error",
"prefer-template": "error",
"prettier/prettier": [
"error",
{
"printWidth": 120,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "always"
}
],
"require-await": "warn",
"spaced-comment": "error",
"symbol-description": "error",
// import
"import/newline-after-import": [
"error",
{
"count": 1
}
],
"import/no-dynamic-require": "off",
"import/no-extraneous-dependencies": "off",
"import/no-named-as-default": "off",
// react
"react/boolean-prop-naming": "error",
"react/default-props-match-prop-types": ["error", { "allowRequiredDefaults": true }],
"react/forbid-prop-types": "off",
"react/jsx-boolean-value": "error",
"react/jsx-filename-extension": "off",
"react/jsx-handler-names": "error",
"react/jsx-key": "error",
"react/jsx-indent": ["error", 2],
"react/jsx-indent-props": ["error", 2],
"react/jsx-no-bind": "error",
"react/jsx-no-comment-textnodes": "error",
"react/jsx-no-duplicate-props": "error",
"react/no-direct-mutation-state": "error",
"react/jsx-no-undef": "error",
"react/jsx-pascal-case": "error",
"react/no-typos": "error",
"react/prefer-es6-class": ["error", "always"],
"react/sort-comp": [
"error",
{
"order": [
"type-annotations",
"instance-variables",
"static-methods",
"lifecycle",
"instance-methods",
"/^handle.+$/",
"everything-else",
"rendering"
],
"groups": {
"rendering": ["/^render.+$/", "render"]
}
}
],
"jsx-quotes": ["Error", "prefer-double"],
"quote-props": ["Error", "as-needed", { "unnecessary": false }],
// // jest
// "jest/consistent-test-it": ["error", { "fn": "it" }],
// "jest/lowercase-name": "error",
// "jest/no-test-prefixes": "error",
// "jest/prefer-to-be-null": "error",
// "jest/prefer-to-be-undefined": "error",
// "jest/valid-describe": "error",
// "jest/valid-expect-in-promise": "error",
// // JSDoc
// "jsdoc/check-param-names": "warn",
// "jsdoc/check-tag-names": "warn",
// "jsdoc/check-types": "warn",
// "jsdoc/require-description-complete-sentence": "warn",
// "jsdoc/require-param": "warn",
// "jsdoc/require-param-name": "warn",
// "jsdoc/require-param-type": "warn",
// "jsdoc/require-returns-description": "warn",
// "jsdoc/require-returns-type": "warn",
"jsx-a11y/label-has-associated-control": ["error", {
"required": {
"some": ["nesting", "id"]
}
}],
"jsx-a11y/label-has-for": ["error", {
"required": {
"some": ["nesting", "id"]
}
}]
},
"env": {
"browser": true
}
}