@shakuroinc/eslint-config-react 4.3.0 → 5.1.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/.eslintrc.js +82 -36
- package/package.json +28 -28
package/.eslintrc.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
plugins: [
|
|
3
|
+
'@typescript-eslint',
|
|
4
|
+
'react',
|
|
5
|
+
'react-hooks',
|
|
6
|
+
'jsx-a11y',
|
|
7
|
+
'simple-import-sort',
|
|
8
|
+
'tailwindcss',
|
|
9
|
+
],
|
|
5
10
|
|
|
6
11
|
extends: [
|
|
7
12
|
'plugin:@typescript-eslint/recommended',
|
|
@@ -11,7 +16,7 @@ module.exports = {
|
|
|
11
16
|
],
|
|
12
17
|
|
|
13
18
|
parserOptions: {
|
|
14
|
-
ecmaVersion:
|
|
19
|
+
ecmaVersion: 2020,
|
|
15
20
|
sourceType: 'module',
|
|
16
21
|
ecmaFeatures: {
|
|
17
22
|
jsx: true,
|
|
@@ -28,19 +33,24 @@ module.exports = {
|
|
|
28
33
|
},
|
|
29
34
|
|
|
30
35
|
rules: {
|
|
36
|
+
'@typescript-eslint/ban-ts-ignore': 0,
|
|
37
|
+
'@typescript-eslint/explicit-function-return-type': 0,
|
|
38
|
+
'@typescript-eslint/explicit-member-accessibility': 0,
|
|
39
|
+
'@typescript-eslint/explicit-module-boundary-types': 0,
|
|
40
|
+
'@typescript-eslint/interface-name-prefix': 0,
|
|
31
41
|
'@typescript-eslint/naming-convention': [
|
|
32
42
|
'error',
|
|
33
43
|
{
|
|
34
44
|
selector: 'default',
|
|
35
45
|
format: ['PascalCase', 'camelCase'],
|
|
36
|
-
leadingUnderscore: '
|
|
37
|
-
trailingUnderscore: '
|
|
46
|
+
leadingUnderscore: 'forbid',
|
|
47
|
+
trailingUnderscore: 'forbid',
|
|
38
48
|
},
|
|
39
49
|
{
|
|
40
50
|
selector: ['variable', 'property'],
|
|
41
51
|
format: ['PascalCase', 'camelCase', 'UPPER_CASE'],
|
|
42
|
-
leadingUnderscore: '
|
|
43
|
-
trailingUnderscore: '
|
|
52
|
+
leadingUnderscore: 'forbid',
|
|
53
|
+
trailingUnderscore: 'forbid',
|
|
44
54
|
},
|
|
45
55
|
{
|
|
46
56
|
selector: 'typeLike',
|
|
@@ -56,14 +66,66 @@ module.exports = {
|
|
|
56
66
|
format: null,
|
|
57
67
|
},
|
|
58
68
|
],
|
|
59
|
-
'@typescript-eslint/ban-ts-ignore': 0,
|
|
60
|
-
'@typescript-eslint/explicit-function-return-type': 0,
|
|
61
|
-
'@typescript-eslint/explicit-member-accessibility': 0,
|
|
62
|
-
'@typescript-eslint/explicit-module-boundary-types': 0,
|
|
63
|
-
'@typescript-eslint/interface-name-prefix': 0,
|
|
64
69
|
'@typescript-eslint/no-empty-function': 0,
|
|
65
70
|
'@typescript-eslint/no-explicit-any': 0,
|
|
66
71
|
'@typescript-eslint/no-object-literal-type-assertion': 0,
|
|
72
|
+
'@typescript-eslint/padding-line-between-statements': [
|
|
73
|
+
'error',
|
|
74
|
+
{
|
|
75
|
+
blankLine: 'always',
|
|
76
|
+
prev: ['interface', 'type'],
|
|
77
|
+
next: '*',
|
|
78
|
+
},
|
|
79
|
+
{ blankLine: 'always', prev: '*', next: ['return'] },
|
|
80
|
+
{ blankLine: 'always', prev: 'function', next: 'function' },
|
|
81
|
+
{ blankLine: 'always', prev: 'multiline-const', next: '*' },
|
|
82
|
+
{
|
|
83
|
+
blankLine: 'always',
|
|
84
|
+
prev: 'import',
|
|
85
|
+
next: [
|
|
86
|
+
'interface',
|
|
87
|
+
'type',
|
|
88
|
+
'block',
|
|
89
|
+
'block-like',
|
|
90
|
+
'case',
|
|
91
|
+
'class',
|
|
92
|
+
'const',
|
|
93
|
+
'export',
|
|
94
|
+
'expression',
|
|
95
|
+
'for',
|
|
96
|
+
'function',
|
|
97
|
+
'if',
|
|
98
|
+
'let',
|
|
99
|
+
'return',
|
|
100
|
+
'throw',
|
|
101
|
+
'try',
|
|
102
|
+
'while',
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
blankLine: 'always',
|
|
107
|
+
prev: [
|
|
108
|
+
'import',
|
|
109
|
+
'interface',
|
|
110
|
+
'type',
|
|
111
|
+
'block',
|
|
112
|
+
'block-like',
|
|
113
|
+
'case',
|
|
114
|
+
'class',
|
|
115
|
+
'const',
|
|
116
|
+
'expression',
|
|
117
|
+
'for',
|
|
118
|
+
'function',
|
|
119
|
+
'if',
|
|
120
|
+
'let',
|
|
121
|
+
'return',
|
|
122
|
+
'throw',
|
|
123
|
+
'try',
|
|
124
|
+
'while',
|
|
125
|
+
],
|
|
126
|
+
next: 'export',
|
|
127
|
+
},
|
|
128
|
+
],
|
|
67
129
|
'jsx-a11y/anchor-is-valid': [
|
|
68
130
|
'error',
|
|
69
131
|
{
|
|
@@ -151,33 +213,17 @@ module.exports = {
|
|
|
151
213
|
|
|
152
214
|
overrides: [
|
|
153
215
|
{
|
|
154
|
-
files: ['*.md'],
|
|
155
|
-
extends:
|
|
156
|
-
|
|
157
|
-
'
|
|
158
|
-
'max-lines': 0,
|
|
159
|
-
'prettier/prettier': [
|
|
160
|
-
2,
|
|
161
|
-
{
|
|
162
|
-
parser: 'markdown',
|
|
163
|
-
},
|
|
164
|
-
],
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
files: ['*.mdx'],
|
|
169
|
-
extends: ['plugin:mdx/overrides'],
|
|
170
|
-
rules: {
|
|
171
|
-
'@typescript-eslint/naming-convention': 0,
|
|
172
|
-
'max-lines': 0,
|
|
216
|
+
files: ['*.mdx', '*.md'],
|
|
217
|
+
extends: 'plugin:mdx/recommended',
|
|
218
|
+
parserOptions: {
|
|
219
|
+
ecmaVersion: 'latest',
|
|
173
220
|
},
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
files: '**/*.{md,mdx}/**',
|
|
177
|
-
extends: ['plugin:mdx/code-blocks', 'plugin:mdx/recommended'],
|
|
178
221
|
rules: {
|
|
222
|
+
'@next/next/no-img-element': 0,
|
|
179
223
|
'@typescript-eslint/naming-convention': 0,
|
|
180
224
|
'max-lines': 0,
|
|
225
|
+
'no-unused-expressions': 0,
|
|
226
|
+
'react/self-closing-comp': 0,
|
|
181
227
|
},
|
|
182
228
|
},
|
|
183
229
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shakuroinc/eslint-config-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"main": ".eslintrc.js",
|
|
5
5
|
"author": "Shakuro team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,36 +10,36 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
14
|
-
"@typescript-eslint/parser": "^5.
|
|
15
|
-
"eslint": "^8.
|
|
13
|
+
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
|
14
|
+
"@typescript-eslint/parser": "^5.43.0",
|
|
15
|
+
"eslint": "^8.27.0",
|
|
16
16
|
"eslint-config-prettier": "^8.5.0",
|
|
17
|
-
"eslint-mdx": "^
|
|
18
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
19
|
-
"eslint-plugin-mdx": "^
|
|
20
|
-
"eslint-plugin-prettier": "^4.
|
|
21
|
-
"eslint-plugin-react": "7.
|
|
22
|
-
"eslint-plugin-react-hooks": "^4.
|
|
23
|
-
"eslint-plugin-simple-import-sort": "^
|
|
24
|
-
"eslint-plugin-tailwindcss": "^3.
|
|
25
|
-
"prettier": "^2.
|
|
26
|
-
"prettier-plugin-tailwindcss": "^0.1.
|
|
17
|
+
"eslint-mdx": "^2.0.5",
|
|
18
|
+
"eslint-plugin-jsx-a11y": "^6.6.1",
|
|
19
|
+
"eslint-plugin-mdx": "^2.0.5",
|
|
20
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
21
|
+
"eslint-plugin-react": "7.31.10",
|
|
22
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
23
|
+
"eslint-plugin-simple-import-sort": "^8.0.0",
|
|
24
|
+
"eslint-plugin-tailwindcss": "^3.7.0",
|
|
25
|
+
"prettier": "^2.7.1",
|
|
26
|
+
"prettier-plugin-tailwindcss": "^0.1.13"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
30
|
-
"@typescript-eslint/parser": "^5.
|
|
31
|
-
"eslint": "^8.
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
|
30
|
+
"@typescript-eslint/parser": "^5.43.0",
|
|
31
|
+
"eslint": "^8.27.0",
|
|
32
32
|
"eslint-config-prettier": "^8.5.0",
|
|
33
|
-
"eslint-mdx": "^
|
|
34
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
35
|
-
"eslint-plugin-mdx": "^
|
|
36
|
-
"eslint-plugin-prettier": "^4.
|
|
37
|
-
"eslint-plugin-react": "7.
|
|
38
|
-
"eslint-plugin-react-hooks": "^4.
|
|
39
|
-
"eslint-plugin-simple-import-sort": "^
|
|
40
|
-
"eslint-plugin-tailwindcss": "^3.
|
|
41
|
-
"prettier": "^2.
|
|
42
|
-
"prettier-plugin-tailwindcss": "^0.1.
|
|
33
|
+
"eslint-mdx": "^2.0.5",
|
|
34
|
+
"eslint-plugin-jsx-a11y": "^6.6.1",
|
|
35
|
+
"eslint-plugin-mdx": "^2.0.5",
|
|
36
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
37
|
+
"eslint-plugin-react": "7.31.10",
|
|
38
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
39
|
+
"eslint-plugin-simple-import-sort": "^8.0.0",
|
|
40
|
+
"eslint-plugin-tailwindcss": "^3.7.0",
|
|
41
|
+
"prettier": "^2.7.1",
|
|
42
|
+
"prettier-plugin-tailwindcss": "^0.1.13"
|
|
43
43
|
},
|
|
44
44
|
"lint-staged": {
|
|
45
45
|
"*.{js,ts,tsx}": "eslint"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"volta": {
|
|
53
|
-
"node": "
|
|
53
|
+
"node": "18.12.1",
|
|
54
54
|
"yarn": "1.18.0"
|
|
55
55
|
}
|
|
56
56
|
}
|