@shakuroinc/eslint-config-react 4.2.0 → 5.0.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 +40 -27
- 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,
|
|
@@ -75,6 +80,30 @@ module.exports = {
|
|
|
75
80
|
curly: ['error', 'multi-line'],
|
|
76
81
|
'import/order': 0,
|
|
77
82
|
'no-duplicate-imports': 2,
|
|
83
|
+
'no-restricted-imports': [
|
|
84
|
+
'error',
|
|
85
|
+
{
|
|
86
|
+
paths: ['ui'],
|
|
87
|
+
patterns: [
|
|
88
|
+
{
|
|
89
|
+
group: ['@sh/app', '@sh/app/*'],
|
|
90
|
+
message: 'Importing from `app` package is disallowed for architecture reasons',
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
'import/no-restricted-paths': [
|
|
96
|
+
'error',
|
|
97
|
+
{
|
|
98
|
+
zones: [
|
|
99
|
+
{
|
|
100
|
+
target: 'ui',
|
|
101
|
+
from: 'app',
|
|
102
|
+
message: 'Importing from `app` package is disallowed for architecture reasons',
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
],
|
|
78
107
|
'react-hooks/exhaustive-deps': 2,
|
|
79
108
|
'react-hooks/rules-of-hooks': 2,
|
|
80
109
|
'react/button-has-type': 2,
|
|
@@ -127,33 +156,17 @@ module.exports = {
|
|
|
127
156
|
|
|
128
157
|
overrides: [
|
|
129
158
|
{
|
|
130
|
-
files: ['*.md'],
|
|
131
|
-
extends:
|
|
132
|
-
|
|
133
|
-
'
|
|
134
|
-
'max-lines': 0,
|
|
135
|
-
'prettier/prettier': [
|
|
136
|
-
2,
|
|
137
|
-
{
|
|
138
|
-
parser: 'markdown',
|
|
139
|
-
},
|
|
140
|
-
],
|
|
159
|
+
files: ['*.mdx', '*.md'],
|
|
160
|
+
extends: 'plugin:mdx/recommended',
|
|
161
|
+
parserOptions: {
|
|
162
|
+
ecmaVersion: 'latest',
|
|
141
163
|
},
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
files: ['*.mdx'],
|
|
145
|
-
extends: ['plugin:mdx/overrides'],
|
|
146
|
-
rules: {
|
|
147
|
-
'@typescript-eslint/naming-convention': 0,
|
|
148
|
-
'max-lines': 0,
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
files: '**/*.{md,mdx}/**',
|
|
153
|
-
extends: ['plugin:mdx/code-blocks', 'plugin:mdx/recommended'],
|
|
154
164
|
rules: {
|
|
165
|
+
'@next/next/no-img-element': 0,
|
|
155
166
|
'@typescript-eslint/naming-convention': 0,
|
|
156
167
|
'max-lines': 0,
|
|
168
|
+
'no-unused-expressions': 0,
|
|
169
|
+
'react/self-closing-comp': 0,
|
|
157
170
|
},
|
|
158
171
|
},
|
|
159
172
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shakuroinc/eslint-config-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.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
|
}
|