eslint-config-entva 2.44.0 → 2.46.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.
Files changed (3) hide show
  1. package/index.js +0 -34
  2. package/package.json +11 -6
  3. package/storybook.js +37 -0
package/index.js CHANGED
@@ -3,7 +3,6 @@ import react from 'eslint-plugin-react';
3
3
  import jsxA11Y from 'eslint-plugin-jsx-a11y';
4
4
  import reactHooks from 'eslint-plugin-react-hooks';
5
5
  import importPlugin from 'eslint-plugin-import';
6
- import storybook from 'eslint-plugin-storybook';
7
6
  import globals from 'globals';
8
7
 
9
8
  export const mainRule = {
@@ -515,42 +514,9 @@ export const mainRule = {
515
514
  },
516
515
  };
517
516
 
518
- const baseDevDeps = baseMainRule.rules['import/no-extraneous-dependencies'][1].devDependencies;
519
-
520
- export const storybookRules = [
521
- ...storybook.configs['flat/recommended'],
522
- {
523
- files: ['**/*.stories.*'],
524
- rules: {
525
- 'react-hooks/rules-of-hooks': 'off',
526
- },
527
- },
528
- {
529
- plugins: {
530
- import: importPlugin,
531
- },
532
- rules: {
533
- 'import/no-extraneous-dependencies': [
534
- 'error',
535
- {
536
- devDependencies: [
537
- ...baseDevDeps,
538
- '**/eslint.*',
539
- '**/vitest.*',
540
- '**/*.stories.*',
541
- '**/.storybook/**',
542
- ],
543
- optionalDependencies: false,
544
- },
545
- ],
546
- },
547
- },
548
- ];
549
-
550
517
  export default [
551
518
  ignoreRule,
552
519
  baseMainRule,
553
520
  mainRule,
554
521
  testRule,
555
- ...storybookRules,
556
522
  ];
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "url": "git+https://github.com/entva/styleguide.git"
10
10
  },
11
11
  "bugs": "https://github.com/entva/styleguide/issues",
12
- "version": "2.44.0",
12
+ "version": "2.46.0",
13
13
  "keywords": [
14
14
  "linter",
15
15
  "config",
@@ -26,18 +26,23 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "eslint": "^9.39.4",
29
- "react": "^19.2.4"
29
+ "react": "^19.2.7"
30
30
  },
31
31
  "dependencies": {
32
32
  "eslint-config-entva-base": "^2.x.x",
33
33
  "eslint-plugin-import": "^2.32.0",
34
34
  "eslint-plugin-jsx-a11y": "^6.10.2",
35
35
  "eslint-plugin-react": "^7.37.5",
36
- "eslint-plugin-react-hooks": "^7.0.1",
37
- "eslint-plugin-storybook": "^10.3.3",
38
- "globals": "^17.4.0"
36
+ "eslint-plugin-react-hooks": "^7.1.1",
37
+ "globals": "^17.6.0"
39
38
  },
40
39
  "peerDependencies": {
41
- "eslint": "^9.x.x"
40
+ "eslint": "^9.x.x",
41
+ "eslint-plugin-storybook": "^10.x.x"
42
+ },
43
+ "peerDependenciesMeta": {
44
+ "eslint-plugin-storybook": {
45
+ "optional": true
46
+ }
42
47
  }
43
48
  }
package/storybook.js ADDED
@@ -0,0 +1,37 @@
1
+ import { mainRule as baseMainRule } from 'eslint-config-entva-base';
2
+ import storybook from 'eslint-plugin-storybook';
3
+ import importPlugin from 'eslint-plugin-import';
4
+
5
+ const baseDevDeps = baseMainRule.rules['import/no-extraneous-dependencies'][1].devDependencies;
6
+
7
+ export const storybookRules = [
8
+ ...storybook.configs['flat/recommended'],
9
+ {
10
+ files: ['**/*.stories.*'],
11
+ rules: {
12
+ 'react-hooks/rules-of-hooks': 'off',
13
+ },
14
+ },
15
+ {
16
+ plugins: {
17
+ import: importPlugin,
18
+ },
19
+ rules: {
20
+ 'import/no-extraneous-dependencies': [
21
+ 'error',
22
+ {
23
+ devDependencies: [
24
+ ...baseDevDeps,
25
+ '**/eslint.*',
26
+ '**/vitest.*',
27
+ '**/*.stories.*',
28
+ '**/.storybook/**',
29
+ ],
30
+ optionalDependencies: false,
31
+ },
32
+ ],
33
+ },
34
+ },
35
+ ];
36
+
37
+ export default storybookRules;