shinkansen-engine 1.2.489 → 1.2.491
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/eslint.config.mjs +265 -0
- package/package.json +27 -24
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import globals from 'globals'
|
|
2
|
+
import standard from '@sequencemedia/eslint-config-standard/configs/recommended/merge'
|
|
3
|
+
import typescript from '@sequencemedia/eslint-config-typescript/configs/recommended/merge'
|
|
4
|
+
import babelParser from '@babel/eslint-parser'
|
|
5
|
+
import typescriptParser from '@typescript-eslint/parser'
|
|
6
|
+
import reactPlugin from 'eslint-plugin-react'
|
|
7
|
+
import storybookPlugin from 'eslint-plugin-storybook'
|
|
8
|
+
|
|
9
|
+
const reactParserOptions = {
|
|
10
|
+
ecmaFeatures: {
|
|
11
|
+
jsx: true
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const reactPlugins = {
|
|
16
|
+
react: reactPlugin
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const storybookPlugins = {
|
|
20
|
+
storybook: storybookPlugin
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const reactRules = {
|
|
24
|
+
'no-unused-vars': [
|
|
25
|
+
'error',
|
|
26
|
+
{
|
|
27
|
+
varsIgnorePattern: 'React'
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
quotes: [
|
|
31
|
+
'error',
|
|
32
|
+
'single'
|
|
33
|
+
],
|
|
34
|
+
'jsx-quotes': [
|
|
35
|
+
'error',
|
|
36
|
+
'prefer-single'
|
|
37
|
+
],
|
|
38
|
+
'react/jsx-indent': [
|
|
39
|
+
'error',
|
|
40
|
+
2,
|
|
41
|
+
{
|
|
42
|
+
checkAttributes: true,
|
|
43
|
+
indentLogicalExpressions: true
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const reactSettings = {
|
|
49
|
+
react: {
|
|
50
|
+
version: 'detect'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default [
|
|
55
|
+
{
|
|
56
|
+
ignores: [
|
|
57
|
+
'coverage'
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
/**
|
|
61
|
+
* React config for all `jsx` and `tsx` files
|
|
62
|
+
*/
|
|
63
|
+
{
|
|
64
|
+
...reactPlugin.configs.flat.recommended,
|
|
65
|
+
settings: {
|
|
66
|
+
...reactPlugin.configs.flat.recommended.settings,
|
|
67
|
+
...reactSettings
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Storybook config
|
|
72
|
+
*/
|
|
73
|
+
...storybookPlugin.configs['flat/recommended'],
|
|
74
|
+
/**
|
|
75
|
+
* Standard config
|
|
76
|
+
*/
|
|
77
|
+
standard({
|
|
78
|
+
files: [
|
|
79
|
+
'**/*.{mjs,cjs,mts,cts}'
|
|
80
|
+
],
|
|
81
|
+
ignores: [
|
|
82
|
+
'src',
|
|
83
|
+
'stories',
|
|
84
|
+
'test'
|
|
85
|
+
],
|
|
86
|
+
languageOptions: {
|
|
87
|
+
globals: {
|
|
88
|
+
...globals.node
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}),
|
|
92
|
+
standard({
|
|
93
|
+
files: [
|
|
94
|
+
'src/**/*.{mjs,cjs,mts,cts}',
|
|
95
|
+
'stories/**/*.{mjs,cjs,mts,cts}'
|
|
96
|
+
],
|
|
97
|
+
languageOptions: {
|
|
98
|
+
globals: {
|
|
99
|
+
...globals.browser
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}),
|
|
103
|
+
standard({
|
|
104
|
+
files: [
|
|
105
|
+
'test/**/*.{mjs,cjs,mts,cts}'
|
|
106
|
+
],
|
|
107
|
+
languageOptions: {
|
|
108
|
+
globals: {
|
|
109
|
+
...globals.mocha
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}),
|
|
113
|
+
/**
|
|
114
|
+
* Standard config for all `jsx` and `tsx` files
|
|
115
|
+
*/
|
|
116
|
+
standard({
|
|
117
|
+
files: [
|
|
118
|
+
'src/**/*.tsx',
|
|
119
|
+
'stories/**/*.jsx'
|
|
120
|
+
],
|
|
121
|
+
ignores: [
|
|
122
|
+
'src/**/__tests__/**/*.tsx',
|
|
123
|
+
'stories/**/__tests__/**/*.jsx'
|
|
124
|
+
],
|
|
125
|
+
languageOptions: {
|
|
126
|
+
parser: babelParser,
|
|
127
|
+
parserOptions: {
|
|
128
|
+
...reactParserOptions,
|
|
129
|
+
project: null
|
|
130
|
+
},
|
|
131
|
+
globals: {
|
|
132
|
+
...globals.browser
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
plugins: {
|
|
136
|
+
...reactPlugins,
|
|
137
|
+
...storybookPlugins
|
|
138
|
+
},
|
|
139
|
+
rules: {
|
|
140
|
+
...reactRules
|
|
141
|
+
},
|
|
142
|
+
settings: {
|
|
143
|
+
...reactSettings,
|
|
144
|
+
'import/resolver': {
|
|
145
|
+
'babel-module': {}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}),
|
|
149
|
+
standard({
|
|
150
|
+
files: [
|
|
151
|
+
'src/**/__tests__/**/*.tsx',
|
|
152
|
+
'stories/**/__tests__/**/*.jsx'
|
|
153
|
+
],
|
|
154
|
+
languageOptions: {
|
|
155
|
+
parser: babelParser,
|
|
156
|
+
parserOptions: {
|
|
157
|
+
...reactParserOptions,
|
|
158
|
+
project: null
|
|
159
|
+
},
|
|
160
|
+
globals: {
|
|
161
|
+
...globals.browser,
|
|
162
|
+
...globals.jest
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
plugins: {
|
|
166
|
+
...reactPlugins,
|
|
167
|
+
...storybookPlugins
|
|
168
|
+
},
|
|
169
|
+
rules: {
|
|
170
|
+
...reactRules
|
|
171
|
+
},
|
|
172
|
+
settings: {
|
|
173
|
+
...reactSettings,
|
|
174
|
+
'import/resolver': {
|
|
175
|
+
'babel-module': {}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}),
|
|
179
|
+
/**
|
|
180
|
+
* TypeScript config
|
|
181
|
+
*/
|
|
182
|
+
typescript({
|
|
183
|
+
files: [
|
|
184
|
+
'**/*.{mts,cts}'
|
|
185
|
+
],
|
|
186
|
+
ignores: [
|
|
187
|
+
'src',
|
|
188
|
+
'stories',
|
|
189
|
+
'test'
|
|
190
|
+
],
|
|
191
|
+
languageOptions: {
|
|
192
|
+
globals: {
|
|
193
|
+
...globals.node
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}),
|
|
197
|
+
typescript({
|
|
198
|
+
files: [
|
|
199
|
+
'src/**/*.{mts,cts}',
|
|
200
|
+
'test/**/*.{mts,cts}'
|
|
201
|
+
],
|
|
202
|
+
languageOptions: {
|
|
203
|
+
globals: {
|
|
204
|
+
...globals.browser
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}),
|
|
208
|
+
/**
|
|
209
|
+
* TypeScript config for only `tsx` files
|
|
210
|
+
*/
|
|
211
|
+
typescript({
|
|
212
|
+
files: [
|
|
213
|
+
'src/**/*.tsx'
|
|
214
|
+
],
|
|
215
|
+
ignores: [
|
|
216
|
+
'src/**/__tests__/**/*.tsx'
|
|
217
|
+
],
|
|
218
|
+
languageOptions: {
|
|
219
|
+
parser: typescriptParser,
|
|
220
|
+
parserOptions: {
|
|
221
|
+
...reactParserOptions,
|
|
222
|
+
projectService: true,
|
|
223
|
+
project: 'tsconfig.json'
|
|
224
|
+
},
|
|
225
|
+
globals: {
|
|
226
|
+
...globals.browser
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
plugins: {
|
|
230
|
+
...reactPlugins
|
|
231
|
+
},
|
|
232
|
+
rules: {
|
|
233
|
+
...reactRules
|
|
234
|
+
},
|
|
235
|
+
settings: {
|
|
236
|
+
...reactSettings
|
|
237
|
+
}
|
|
238
|
+
}),
|
|
239
|
+
typescript({
|
|
240
|
+
files: [
|
|
241
|
+
'src/**/__tests__/**/*.tsx'
|
|
242
|
+
],
|
|
243
|
+
languageOptions: {
|
|
244
|
+
parser: typescriptParser,
|
|
245
|
+
parserOptions: {
|
|
246
|
+
...reactParserOptions,
|
|
247
|
+
projectService: true,
|
|
248
|
+
project: 'tsconfig.json'
|
|
249
|
+
},
|
|
250
|
+
globals: {
|
|
251
|
+
...globals.browser,
|
|
252
|
+
...globals.jest
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
plugins: {
|
|
256
|
+
...reactPlugins
|
|
257
|
+
},
|
|
258
|
+
rules: {
|
|
259
|
+
...reactRules
|
|
260
|
+
},
|
|
261
|
+
settings: {
|
|
262
|
+
...reactSettings
|
|
263
|
+
}
|
|
264
|
+
})
|
|
265
|
+
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shinkansen-engine",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.491",
|
|
4
4
|
"description": "Shinkansen Engine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Shinkansen",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"build": "cross-env DEBUG=shinkansen-engine* webpack",
|
|
32
32
|
"build-storybook": "storybook build",
|
|
33
33
|
"build:watch": "cross-env DEBUG=shinkansen-engine* webpack --watch",
|
|
34
|
-
"lint": "eslint
|
|
34
|
+
"lint": "eslint",
|
|
35
35
|
"lint:fix": "npm run lint -- --fix",
|
|
36
36
|
"nvm": "bash nvm.sh",
|
|
37
37
|
"prelint": "npm run nvm",
|
|
@@ -56,23 +56,26 @@
|
|
|
56
56
|
"@babel/preset-react": "^7.26.3",
|
|
57
57
|
"@babel/register": "^7.25.9",
|
|
58
58
|
"@modernpoacher/design-system": "1.1.21",
|
|
59
|
+
"@sequencemedia/eslint-config-standard": "^0.2.10",
|
|
60
|
+
"@sequencemedia/eslint-config-typescript": "^0.1.15",
|
|
59
61
|
"@storybook/addon-actions": "7.6.20",
|
|
60
62
|
"@storybook/addon-essentials": "7.6.20",
|
|
61
63
|
"@storybook/addon-links": "7.6.20",
|
|
62
64
|
"@storybook/react": "7.6.20",
|
|
63
65
|
"@storybook/react-webpack5": "7.6.20",
|
|
64
|
-
"@types/react": "
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "
|
|
66
|
-
"@typescript-eslint/parser": "
|
|
66
|
+
"@types/react": "18.3.13",
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^8.19.1",
|
|
68
|
+
"@typescript-eslint/parser": "^8.19.1",
|
|
67
69
|
"autoprefixer": "^10.4.20",
|
|
68
70
|
"chai": "^5.1.2",
|
|
69
71
|
"clean-webpack-plugin": "^4.0.0",
|
|
70
|
-
"core-js": "^3.
|
|
72
|
+
"core-js": "^3.40.0",
|
|
71
73
|
"cross-env": "^7.0.3",
|
|
72
|
-
"eslint": "
|
|
73
|
-
"eslint-
|
|
74
|
-
"eslint-
|
|
75
|
-
"eslint-plugin-
|
|
74
|
+
"eslint": "^9.17.0",
|
|
75
|
+
"eslint-import-resolver-babel-module": "^5.3.2",
|
|
76
|
+
"eslint-plugin-react": "^7.37.3",
|
|
77
|
+
"eslint-plugin-storybook": "^0.11.2",
|
|
78
|
+
"globals": "^15.14.0",
|
|
76
79
|
"husky": "^9.1.7",
|
|
77
80
|
"jest": "^29.7.0",
|
|
78
81
|
"mini-css-extract-plugin": "^2.9.2",
|
|
@@ -85,25 +88,25 @@
|
|
|
85
88
|
"postcss-loader": "^8.1.1",
|
|
86
89
|
"postcss-map": "^0.11.0",
|
|
87
90
|
"prop-types": "^15.8.1",
|
|
88
|
-
"react": "
|
|
89
|
-
"react-dom": "
|
|
90
|
-
"react-router": "^7.
|
|
91
|
-
"react-test-renderer": "
|
|
91
|
+
"react": "18.3.1",
|
|
92
|
+
"react-dom": "18.3.1",
|
|
93
|
+
"react-router": "^7.1.1",
|
|
94
|
+
"react-test-renderer": "18.3.1",
|
|
92
95
|
"remove-files-webpack-plugin": "^1.5.0",
|
|
93
|
-
"sass": "^1.
|
|
96
|
+
"sass": "^1.83.1",
|
|
94
97
|
"sass-loader": "^16.0.4",
|
|
95
|
-
"shinkansen-cogs": "1.7.
|
|
98
|
+
"shinkansen-cogs": "1.7.282",
|
|
96
99
|
"shinkansen-gears": "1.1.445",
|
|
97
|
-
"shinkansen-pantograph": "1.3.
|
|
98
|
-
"shinkansen-pinion": "1.1.
|
|
99
|
-
"shinkansen-rails": "1.0.
|
|
100
|
-
"shinkansen-signals": "1.1.
|
|
101
|
-
"shinkansen-sprockets": "1.1.
|
|
102
|
-
"shinkansen-transmission": "2.2.
|
|
100
|
+
"shinkansen-pantograph": "1.3.325",
|
|
101
|
+
"shinkansen-pinion": "1.1.525",
|
|
102
|
+
"shinkansen-rails": "1.0.260",
|
|
103
|
+
"shinkansen-signals": "1.1.188",
|
|
104
|
+
"shinkansen-sprockets": "1.1.441",
|
|
105
|
+
"shinkansen-transmission": "2.2.211",
|
|
103
106
|
"sinon": "^19.0.2",
|
|
104
107
|
"storybook": "7.6.20",
|
|
105
|
-
"webpack": "^5.97.
|
|
106
|
-
"webpack-cli": "^
|
|
108
|
+
"webpack": "^5.97.1",
|
|
109
|
+
"webpack-cli": "^6.0.1"
|
|
107
110
|
},
|
|
108
111
|
"peerDependencies": {
|
|
109
112
|
"shinkansen-cogs": "1.7.x",
|