@modernpoacher/cogs 1.0.285 → 1.0.287

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 CHANGED
@@ -1,9 +1,11 @@
1
+ /**
2
+ * @typedef {import('eslint').Linter.RulesRecord} RulesRecord
3
+ */
4
+
1
5
  import globals from 'globals'
2
6
  import standard from '@sequencemedia/eslint-config-standard/configs/recommended/merge'
3
7
  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'
8
+ import reactPlugin from '@eslint-react/eslint-plugin'
7
9
  import storybookPlugin from 'eslint-plugin-storybook'
8
10
 
9
11
  const reactParserOptions = {
@@ -20,6 +22,9 @@ const storybookPlugins = {
20
22
  storybook: storybookPlugin
21
23
  }
22
24
 
25
+ /**
26
+ * @type {RulesRecord}
27
+ */
23
28
  const reactRules = {
24
29
  'no-unused-vars': [
25
30
  'error',
@@ -27,30 +32,27 @@ const reactRules = {
27
32
  varsIgnorePattern: 'React'
28
33
  }
29
34
  ],
30
- quotes: [
35
+ '@stylistic/quotes': [
31
36
  'error',
32
37
  'single'
33
38
  ],
34
- 'jsx-quotes': [
39
+ '@stylistic/jsx-quotes': [
35
40
  'error',
36
41
  'prefer-single'
37
42
  ],
38
- 'react/jsx-indent': [
43
+ '@stylistic/indent': [
39
44
  'error',
40
45
  2,
41
46
  {
42
- checkAttributes: true,
43
- indentLogicalExpressions: true
47
+ SwitchCase: 1,
48
+ ignoredNodes: [
49
+ 'TemplateLiteral *'
50
+ ],
51
+ offsetTernaryExpressions: true
44
52
  }
45
53
  ]
46
54
  }
47
55
 
48
- const reactSettings = {
49
- react: {
50
- version: 'detect'
51
- }
52
- }
53
-
54
56
  export default [
55
57
  {
56
58
  ignores: [
@@ -61,10 +63,10 @@ export default [
61
63
  * React config for all `jsx` files
62
64
  */
63
65
  {
64
- ...reactPlugin.configs.flat.recommended,
65
- settings: {
66
- ...reactSettings
67
- }
66
+ ...reactPlugin.configs.recommended,
67
+ files: [
68
+ '**/*.jsx'
69
+ ]
68
70
  },
69
71
  /**
70
72
  * Storybook config
@@ -89,6 +91,9 @@ export default [
89
91
  }
90
92
  }
91
93
  }),
94
+ /**
95
+ * Standard config for `mjs` and `mts` files
96
+ */
92
97
  standard({
93
98
  files: [
94
99
  'src/**/*.{mjs,cjs,mts,cts}',
@@ -123,10 +128,8 @@ export default [
123
128
  'stories/**/__tests__/**/*.jsx'
124
129
  ],
125
130
  languageOptions: {
126
- parser: babelParser,
127
131
  parserOptions: {
128
- ...reactParserOptions,
129
- project: null
132
+ ...reactParserOptions
130
133
  },
131
134
  globals: {
132
135
  ...globals.browser
@@ -135,14 +138,14 @@ export default [
135
138
  plugins: {
136
139
  ...reactPlugins,
137
140
  ...storybookPlugins
138
- }, // @ts-expect-error Storybook
141
+ },
139
142
  rules: {
140
143
  ...reactRules
141
- },
142
- settings: {
143
- ...reactSettings
144
144
  }
145
145
  }),
146
+ /**
147
+ * Standard config for `jsx` files
148
+ */
146
149
  standard({
147
150
  files: [
148
151
  'src/**/__tests__/**/*.jsx',
@@ -150,10 +153,8 @@ export default [
150
153
  'jest.*.mjs'
151
154
  ],
152
155
  languageOptions: {
153
- parser: babelParser,
154
156
  parserOptions: {
155
- ...reactParserOptions,
156
- project: null
157
+ ...reactParserOptions
157
158
  },
158
159
  globals: {
159
160
  ...globals.browser,
@@ -163,12 +164,9 @@ export default [
163
164
  plugins: {
164
165
  ...reactPlugins,
165
166
  ...storybookPlugins
166
- }, // @ts-expect-error Storybook
167
+ },
167
168
  rules: {
168
169
  ...reactRules
169
- },
170
- settings: {
171
- ...reactSettings
172
170
  }
173
171
  }),
174
172
  /**
@@ -183,10 +181,6 @@ export default [
183
181
  'test'
184
182
  ],
185
183
  languageOptions: {
186
- parser: typescriptParser,
187
- parserOptions: {
188
- projectService: true
189
- },
190
184
  globals: {
191
185
  ...globals.node,
192
186
  CogsTypes: 'readonly'
@@ -199,10 +193,6 @@ export default [
199
193
  'test/**/*.{mts,cts}'
200
194
  ],
201
195
  languageOptions: {
202
- parser: typescriptParser,
203
- parserOptions: {
204
- projectService: true
205
- },
206
196
  globals: {
207
197
  ...globals.browser,
208
198
  CogsTypes: 'readonly'
package/husky.mjs CHANGED
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ if (process.env.CI === 'true') process.exit(0)
4
+
3
5
  // @ts-ignore
4
6
  Promise.resolve(import('husky'))
5
7
  .then(({ default: husky }) => { husky() })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/cogs",
3
- "version": "1.0.285",
3
+ "version": "1.0.287",
4
4
  "description": "Cogs",
5
5
  "keywords": [
6
6
  "Cogs",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "license": "ISC",
18
18
  "engines": {
19
- "node": ">=22.11.0"
19
+ "node": ">=22.23.4"
20
20
  },
21
21
  "repository": {
22
22
  "type": "git",
@@ -48,9 +48,9 @@
48
48
  },
49
49
  "allowScripts": {
50
50
  "@parcel/watcher@2.6.0": true,
51
- "core-js@3.50.0": true,
52
51
  "esbuild@0.28.2": true,
53
- "unrs-resolver@1.12.2": true
52
+ "unrs-resolver@1.12.2": true,
53
+ "core-js@3.51.0": true
54
54
  },
55
55
  "dependencies": {
56
56
  "classnames": "^2.5.1",
@@ -58,14 +58,14 @@
58
58
  },
59
59
  "devDependencies": {
60
60
  "@babel/core": "7.29.7",
61
- "@babel/eslint-parser": "7.29.7",
62
61
  "@babel/plugin-syntax-jsx": "7.29.7",
63
62
  "@babel/preset-env": "7.29.7",
64
63
  "@babel/preset-react": "7.29.7",
65
64
  "@babel/register": "7.29.7",
65
+ "@eslint-react/eslint-plugin": "5.28.8",
66
66
  "@modernpoacher/design-system": "2.0.41",
67
- "@sequencemedia/eslint-config-standard": "0.2.132",
68
- "@sequencemedia/eslint-config-typescript": "0.1.230",
67
+ "@sequencemedia/eslint-config-standard": "0.3.2",
68
+ "@sequencemedia/eslint-config-typescript": "0.2.3",
69
69
  "@storybook/addon-docs": "^10.6.2",
70
70
  "@storybook/addon-links": "^10.6.2",
71
71
  "@storybook/addon-webpack5-compiler-babel": "^4.0.1",
@@ -81,13 +81,11 @@
81
81
  "@types/react": "^19.3.0",
82
82
  "@types/react-dom": "^19.3.0",
83
83
  "@typescript-eslint/eslint-plugin": "^8.71.2",
84
- "@typescript-eslint/parser": "^8.71.2",
85
84
  "autoprefixer": "^10.6.1",
86
85
  "chai": "^6.3.0",
87
86
  "core-js": "^3.50.0",
88
87
  "cross-env": "^10.1.0",
89
- "eslint": "9.38.0",
90
- "eslint-plugin-react": "^7.37.5",
88
+ "eslint": "10.14.0",
91
89
  "eslint-plugin-storybook": "^10.6.2",
92
90
  "globals": "^17.13.0",
93
91
  "husky": "^9.1.7",
@@ -46,7 +46,7 @@ export default class TextareaField extends ValueField {
46
46
  return (
47
47
  <textarea
48
48
  name={name}
49
- id={id}
49
+ id={id}
50
50
  value={toInputValue(value)}
51
51
  required={required}
52
52
  disabled={disabled}