shinkansen-engine 1.2.488 → 1.2.490

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.
Files changed (2) hide show
  1. package/eslint.config.mjs +202 -0
  2. package/package.json +28 -25
@@ -0,0 +1,202 @@
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
+ languageOptions: {
122
+ parser: babelParser,
123
+ parserOptions: {
124
+ ...reactParserOptions,
125
+ project: null
126
+ },
127
+ globals: {
128
+ ...globals.browser
129
+ }
130
+ },
131
+ plugins: {
132
+ ...reactPlugins,
133
+ ...storybookPlugins
134
+ },
135
+ rules: {
136
+ ...reactRules
137
+ },
138
+ settings: {
139
+ ...reactSettings,
140
+ 'import/resolver': {
141
+ 'babel-module': {}
142
+ }
143
+ }
144
+ }),
145
+ /**
146
+ * TypeScript config
147
+ */
148
+ typescript({
149
+ files: [
150
+ '**/*.{mts,cts}'
151
+ ],
152
+ ignores: [
153
+ 'src',
154
+ 'stories',
155
+ 'test'
156
+ ],
157
+ languageOptions: {
158
+ globals: {
159
+ ...globals.node
160
+ }
161
+ }
162
+ }),
163
+ typescript({
164
+ files: [
165
+ 'src/**/*.{mts,cts}',
166
+ 'test/**/*.{mts,cts}'
167
+ ],
168
+ languageOptions: {
169
+ globals: {
170
+ ...globals.browser
171
+ }
172
+ }
173
+ }),
174
+ /**
175
+ * TypeScript config for only `tsx` files
176
+ */
177
+ typescript({
178
+ files: [
179
+ 'src/**/*.tsx'
180
+ ],
181
+ languageOptions: {
182
+ parser: typescriptParser,
183
+ parserOptions: {
184
+ ...reactParserOptions,
185
+ projectService: true,
186
+ project: 'tsconfig.json'
187
+ },
188
+ globals: {
189
+ ...globals.browser
190
+ }
191
+ },
192
+ plugins: {
193
+ ...reactPlugins
194
+ },
195
+ rules: {
196
+ ...reactRules
197
+ },
198
+ settings: {
199
+ ...reactSettings
200
+ }
201
+ })
202
+ ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shinkansen-engine",
3
- "version": "1.2.488",
3
+ "version": "1.2.490",
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 . .storybook --ext .mjs,.cjs,.jsx,.mts,.cts",
34
+ "lint": "eslint",
35
35
  "lint:fix": "npm run lint -- --fix",
36
36
  "nvm": "bash nvm.sh",
37
37
  "prelint": "npm run nvm",
@@ -55,24 +55,27 @@
55
55
  "@babel/preset-env": "^7.26.0",
56
56
  "@babel/preset-react": "^7.26.3",
57
57
  "@babel/register": "^7.25.9",
58
- "@modernpoacher/design-system": "1.1.20",
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": "^18.3.13",
65
- "@typescript-eslint/eslint-plugin": "7.18.0",
66
- "@typescript-eslint/parser": "7.18.0",
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.39.0",
72
+ "core-js": "^3.40.0",
71
73
  "cross-env": "^7.0.3",
72
- "eslint": "8.57.1",
73
- "eslint-config-love": "47.0.0",
74
- "eslint-config-standard": "^17.1.0",
75
- "eslint-plugin-react": "^7.37.2",
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": "^18.3.1",
89
- "react-dom": "^18.3.1",
90
- "react-router": "^7.0.2",
91
- "react-test-renderer": "^18.3.1",
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.82.0",
96
+ "sass": "^1.83.1",
94
97
  "sass-loader": "^16.0.4",
95
- "shinkansen-cogs": "1.7.280",
98
+ "shinkansen-cogs": "1.7.281",
96
99
  "shinkansen-gears": "1.1.445",
97
- "shinkansen-pantograph": "1.3.319",
98
- "shinkansen-pinion": "1.1.523",
99
- "shinkansen-rails": "1.0.258",
100
- "shinkansen-signals": "1.1.186",
101
- "shinkansen-sprockets": "1.1.439",
102
- "shinkansen-transmission": "2.2.209",
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.0",
106
- "webpack-cli": "^5.1.4"
108
+ "webpack": "^5.97.1",
109
+ "webpack-cli": "^6.0.1"
107
110
  },
108
111
  "peerDependencies": {
109
112
  "shinkansen-cogs": "1.7.x",