@kununu/eslint-config 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +16 -16
- package/package.json +5 -2
package/index.js
CHANGED
|
@@ -21,11 +21,6 @@ const baseRules = {
|
|
|
21
21
|
'no-param-reassign': ['error', {props: false}],
|
|
22
22
|
'no-prototype-builtins': 'off', // Objects aren't created that don't extend from Object.prototype (Airbnb rule change)
|
|
23
23
|
'object-curly-spacing': 'off', // Disabled in favor of @babel/object-curly-spacing in order to avoid false positives with ECMAScript modules (Airbnb rule change)
|
|
24
|
-
'space-before-function-paren': ['error', {
|
|
25
|
-
anonymous: 'always', // const foo = function () {}
|
|
26
|
-
named: 'always', // function foo () {} (Airbnb rule change)
|
|
27
|
-
asyncArrow: 'always', // const foo = async (a) => await a
|
|
28
|
-
}],
|
|
29
24
|
|
|
30
25
|
// https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules
|
|
31
26
|
'react/no-direct-mutation-state': 'error', // Use .setState() always (Airbnb rule change)
|
|
@@ -57,9 +52,6 @@ const baseRules = {
|
|
|
57
52
|
specialLink: ['to'],
|
|
58
53
|
}],
|
|
59
54
|
|
|
60
|
-
// https://eslint.org/docs/rules/operator-linebreak
|
|
61
|
-
'operator-linebreak': ['error', 'after'],
|
|
62
|
-
|
|
63
55
|
// https://eslint.org/docs/rules/no-confusing-arrow
|
|
64
56
|
// turn off to prevent conflict with
|
|
65
57
|
// https://eslint.org/docs/rules/arrow-body-style
|
|
@@ -79,10 +71,6 @@ const baseRules = {
|
|
|
79
71
|
'blankLine': 'any', 'prev': ['const', 'let', 'var'], 'next': ['const', 'let', 'var'],
|
|
80
72
|
}],
|
|
81
73
|
|
|
82
|
-
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md
|
|
83
|
-
// jsx props should be on separate lines each
|
|
84
|
-
'react/jsx-max-props-per-line': ['error', {'maximum': 1}],
|
|
85
|
-
|
|
86
74
|
// https://www.npmjs.com/package/eslint-plugin-react-hooks
|
|
87
75
|
// enforces the rules of react-hooks (call at top level and only from functional components; checks dependencies)
|
|
88
76
|
'react-hooks/rules-of-hooks': 'error',
|
|
@@ -163,6 +151,19 @@ const baseRules = {
|
|
|
163
151
|
|
|
164
152
|
'testing-library/prefer-screen-queries': 'off',
|
|
165
153
|
'testing-library/render-result-naming-convention': 'off',
|
|
154
|
+
|
|
155
|
+
'indent': 'off',
|
|
156
|
+
|
|
157
|
+
'prettier/prettier': [
|
|
158
|
+
'error',
|
|
159
|
+
{
|
|
160
|
+
'arrowParens': 'avoid',
|
|
161
|
+
'bracketSpacing': false,
|
|
162
|
+
'semi': true,
|
|
163
|
+
'singleQuote': true,
|
|
164
|
+
'trailingComma': 'all',
|
|
165
|
+
},
|
|
166
|
+
],
|
|
166
167
|
};
|
|
167
168
|
|
|
168
169
|
module.exports = {
|
|
@@ -170,6 +171,7 @@ module.exports = {
|
|
|
170
171
|
'airbnb', // Many strict rules for ECMAScript and React
|
|
171
172
|
'airbnb/hooks',
|
|
172
173
|
'plugin:jest-dom/recommended',
|
|
174
|
+
'plugin:prettier/recommended',
|
|
173
175
|
'plugin:testing-library/react'
|
|
174
176
|
],
|
|
175
177
|
|
|
@@ -199,6 +201,7 @@ module.exports = {
|
|
|
199
201
|
'airbnb-typescript',
|
|
200
202
|
'airbnb/hooks',
|
|
201
203
|
'plugin:jest-dom/recommended',
|
|
204
|
+
'plugin:prettier/recommended',
|
|
202
205
|
'plugin:testing-library/react',
|
|
203
206
|
],
|
|
204
207
|
parser: '@typescript-eslint/parser',
|
|
@@ -208,12 +211,9 @@ module.exports = {
|
|
|
208
211
|
],
|
|
209
212
|
rules: {
|
|
210
213
|
...baseRules,
|
|
211
|
-
'indent': 'off',
|
|
212
|
-
'@typescript-eslint/indent': ['error', 2],
|
|
214
|
+
'@typescript-eslint/indent': 'off',
|
|
213
215
|
'object-curly-spacing': 'off',
|
|
214
216
|
'@typescript-eslint/object-curly-spacing': ['error', 'never'],
|
|
215
|
-
'space-before-function-paren': 'off',
|
|
216
|
-
'@typescript-eslint/space-before-function-paren': ['error', 'always'],
|
|
217
217
|
'@typescript-eslint/no-var-requires': 'off',
|
|
218
218
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
219
219
|
'no-use-before-define': 'off',
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kununu/eslint-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "kununu's ESLint config",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"repository": "kununu/
|
|
6
|
+
"repository": "kununu/eslint-config",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"eslint",
|
|
9
9
|
"eslintconfig",
|
|
@@ -27,13 +27,16 @@
|
|
|
27
27
|
"eslint": "8.4.0",
|
|
28
28
|
"eslint-config-airbnb": "19.0.2",
|
|
29
29
|
"eslint-config-airbnb-typescript": "16.1.0",
|
|
30
|
+
"eslint-config-prettier": "8.3.0",
|
|
30
31
|
"eslint-import-resolver-alias": "1.1.2",
|
|
31
32
|
"eslint-plugin-import": "2.25.3",
|
|
32
33
|
"eslint-plugin-jest-dom": "3.9.2",
|
|
33
34
|
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
35
|
+
"eslint-plugin-prettier": "4.0.0",
|
|
34
36
|
"eslint-plugin-react": "7.27.1",
|
|
35
37
|
"eslint-plugin-react-hooks": "4.3.0",
|
|
36
38
|
"eslint-plugin-testing-library": "5.0.1",
|
|
39
|
+
"prettier": "2.5.1",
|
|
37
40
|
"typescript": "4.5.2"
|
|
38
41
|
}
|
|
39
42
|
}
|