@vp-tw/eslint-config 0.1.1 → 0.1.3
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/dist/configs/storybook.js +1 -1
- package/dist/eslint-typegen.d.ts +25 -15
- package/dist/esm/configs/storybook.mjs +1 -1
- package/dist/esm/eslint-typegen.d.ts +25 -15
- package/package.json +19 -14
|
@@ -9,7 +9,7 @@ var _esToolkit = require("es-toolkit");
|
|
|
9
9
|
var _mergeConfig = require("../utils/mergeConfig");
|
|
10
10
|
var _renameRules = require("../utils/renameRules");
|
|
11
11
|
const storybook = async options => {
|
|
12
|
-
await (0, _eslintConfig.ensurePackages)(["eslint-plugin-storybook"]);
|
|
12
|
+
await (0, _eslintConfig.ensurePackages)(["eslint-plugin-storybook", "storybook"]);
|
|
13
13
|
const storybookPlugin = await (0, _eslintConfig.interopDefault)(Promise.resolve().then(() => require("eslint-plugin-storybook")));
|
|
14
14
|
const inheritingConfigs = storybookPlugin.configs["flat/csf-strict"];
|
|
15
15
|
const originalSetupConfig = inheritingConfigs[0];
|
package/dist/eslint-typegen.d.ts
CHANGED
|
@@ -43,6 +43,11 @@ export interface RuleOptions {
|
|
|
43
43
|
* @see https://tanstack.com/query/latest/docs/eslint/infinite-query-property-order
|
|
44
44
|
*/
|
|
45
45
|
'@tanstack/query/infinite-query-property-order'?: Linter.RuleEntry<[]>
|
|
46
|
+
/**
|
|
47
|
+
* Ensure correct order of inference-sensitive properties in useMutation()
|
|
48
|
+
* @see https://tanstack.com/query/latest/docs/eslint/mutation-property-order
|
|
49
|
+
*/
|
|
50
|
+
'@tanstack/query/mutation-property-order'?: Linter.RuleEntry<[]>
|
|
46
51
|
/**
|
|
47
52
|
* Disallows rest destructuring in queries
|
|
48
53
|
* @see https://tanstack.com/query/latest/docs/eslint/no-rest-destructuring
|
|
@@ -73,77 +78,82 @@ export interface RuleOptions {
|
|
|
73
78
|
'react-compiler/react-compiler'?: Linter.RuleEntry<ReactCompilerReactCompiler>
|
|
74
79
|
/**
|
|
75
80
|
* Interactions should be awaited
|
|
76
|
-
* @see https://github.com/storybookjs/
|
|
81
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/await-interactions.md
|
|
77
82
|
*/
|
|
78
83
|
'storybook/await-interactions'?: Linter.RuleEntry<[]>
|
|
79
84
|
/**
|
|
80
85
|
* Pass a context when invoking play function of another story
|
|
81
|
-
* @see https://github.com/storybookjs/
|
|
86
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/context-in-play-function.md
|
|
82
87
|
*/
|
|
83
88
|
'storybook/context-in-play-function'?: Linter.RuleEntry<[]>
|
|
84
89
|
/**
|
|
85
90
|
* The component property should be set
|
|
86
|
-
* @see https://github.com/storybookjs/
|
|
91
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/csf-component.md
|
|
87
92
|
*/
|
|
88
93
|
'storybook/csf-component'?: Linter.RuleEntry<[]>
|
|
89
94
|
/**
|
|
90
95
|
* Story files should have a default export
|
|
91
|
-
* @see https://github.com/storybookjs/
|
|
96
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/default-exports.md
|
|
92
97
|
*/
|
|
93
98
|
'storybook/default-exports'?: Linter.RuleEntry<[]>
|
|
94
99
|
/**
|
|
95
100
|
* Deprecated hierarchy separator in title property
|
|
96
|
-
* @see https://github.com/storybookjs/
|
|
101
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/hierarchy-separator.md
|
|
97
102
|
*/
|
|
98
103
|
'storybook/hierarchy-separator'?: Linter.RuleEntry<[]>
|
|
99
104
|
/**
|
|
100
105
|
* Meta should only have inline properties
|
|
101
|
-
* @see https://github.com/storybookjs/
|
|
106
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/meta-inline-properties.md
|
|
102
107
|
*/
|
|
103
108
|
'storybook/meta-inline-properties'?: Linter.RuleEntry<StorybookMetaInlineProperties>
|
|
104
109
|
/**
|
|
105
110
|
* Meta should use `satisfies Meta`
|
|
106
|
-
* @see https://github.com/storybookjs/
|
|
111
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/meta-satisfies-type.md
|
|
107
112
|
*/
|
|
108
113
|
'storybook/meta-satisfies-type'?: Linter.RuleEntry<[]>
|
|
109
114
|
/**
|
|
110
115
|
* A story should not have a redundant name property
|
|
111
|
-
* @see https://github.com/storybookjs/
|
|
116
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/no-redundant-story-name.md
|
|
112
117
|
*/
|
|
113
118
|
'storybook/no-redundant-story-name'?: Linter.RuleEntry<[]>
|
|
119
|
+
/**
|
|
120
|
+
* Do not import renderer packages directly in stories
|
|
121
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/no-renderer-packages.md
|
|
122
|
+
*/
|
|
123
|
+
'storybook/no-renderer-packages'?: Linter.RuleEntry<[]>
|
|
114
124
|
/**
|
|
115
125
|
* storiesOf is deprecated and should not be used
|
|
116
|
-
* @see https://github.com/storybookjs/
|
|
126
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/no-stories-of.md
|
|
117
127
|
*/
|
|
118
128
|
'storybook/no-stories-of'?: Linter.RuleEntry<[]>
|
|
119
129
|
/**
|
|
120
130
|
* Do not define a title in meta
|
|
121
|
-
* @see https://github.com/storybookjs/
|
|
131
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/no-title-property-in-meta.md
|
|
122
132
|
*/
|
|
123
133
|
'storybook/no-title-property-in-meta'?: Linter.RuleEntry<[]>
|
|
124
134
|
/**
|
|
125
135
|
* This rule identifies storybook addons that are invalid because they are either not installed or contain a typo in their name.
|
|
126
|
-
* @see https://github.com/storybookjs/
|
|
136
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/no-uninstalled-addons.md
|
|
127
137
|
*/
|
|
128
138
|
'storybook/no-uninstalled-addons'?: Linter.RuleEntry<StorybookNoUninstalledAddons>
|
|
129
139
|
/**
|
|
130
140
|
* Stories should use PascalCase
|
|
131
|
-
* @see https://github.com/storybookjs/
|
|
141
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/prefer-pascal-case.md
|
|
132
142
|
*/
|
|
133
143
|
'storybook/prefer-pascal-case'?: Linter.RuleEntry<[]>
|
|
134
144
|
/**
|
|
135
145
|
* A story file must contain at least one story export
|
|
136
|
-
* @see https://github.com/storybookjs/
|
|
146
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/story-exports.md
|
|
137
147
|
*/
|
|
138
148
|
'storybook/story-exports'?: Linter.RuleEntry<[]>
|
|
139
149
|
/**
|
|
140
150
|
* Use expect from `@storybook/test`, `storybook/test` or `@storybook/jest`
|
|
141
|
-
* @see https://github.com/storybookjs/
|
|
151
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/use-storybook-expect.md
|
|
142
152
|
*/
|
|
143
153
|
'storybook/use-storybook-expect'?: Linter.RuleEntry<[]>
|
|
144
154
|
/**
|
|
145
155
|
* Do not use testing-library directly on stories
|
|
146
|
-
* @see https://github.com/storybookjs/
|
|
156
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/use-storybook-testing-library.md
|
|
147
157
|
*/
|
|
148
158
|
'storybook/use-storybook-testing-library'?: Linter.RuleEntry<[]>
|
|
149
159
|
}
|
|
@@ -3,7 +3,7 @@ import { pick } from "es-toolkit";
|
|
|
3
3
|
import { mergeConfig } from "../utils/mergeConfig.mjs";
|
|
4
4
|
import { renameRules } from "../utils/renameRules.mjs";
|
|
5
5
|
const storybook = async (options) => {
|
|
6
|
-
await ensurePackages(["eslint-plugin-storybook"]);
|
|
6
|
+
await ensurePackages(["eslint-plugin-storybook", "storybook"]);
|
|
7
7
|
const storybookPlugin = await interopDefault(
|
|
8
8
|
import("eslint-plugin-storybook")
|
|
9
9
|
);
|
|
@@ -43,6 +43,11 @@ export interface RuleOptions {
|
|
|
43
43
|
* @see https://tanstack.com/query/latest/docs/eslint/infinite-query-property-order
|
|
44
44
|
*/
|
|
45
45
|
'@tanstack/query/infinite-query-property-order'?: Linter.RuleEntry<[]>
|
|
46
|
+
/**
|
|
47
|
+
* Ensure correct order of inference-sensitive properties in useMutation()
|
|
48
|
+
* @see https://tanstack.com/query/latest/docs/eslint/mutation-property-order
|
|
49
|
+
*/
|
|
50
|
+
'@tanstack/query/mutation-property-order'?: Linter.RuleEntry<[]>
|
|
46
51
|
/**
|
|
47
52
|
* Disallows rest destructuring in queries
|
|
48
53
|
* @see https://tanstack.com/query/latest/docs/eslint/no-rest-destructuring
|
|
@@ -73,77 +78,82 @@ export interface RuleOptions {
|
|
|
73
78
|
'react-compiler/react-compiler'?: Linter.RuleEntry<ReactCompilerReactCompiler>
|
|
74
79
|
/**
|
|
75
80
|
* Interactions should be awaited
|
|
76
|
-
* @see https://github.com/storybookjs/
|
|
81
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/await-interactions.md
|
|
77
82
|
*/
|
|
78
83
|
'storybook/await-interactions'?: Linter.RuleEntry<[]>
|
|
79
84
|
/**
|
|
80
85
|
* Pass a context when invoking play function of another story
|
|
81
|
-
* @see https://github.com/storybookjs/
|
|
86
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/context-in-play-function.md
|
|
82
87
|
*/
|
|
83
88
|
'storybook/context-in-play-function'?: Linter.RuleEntry<[]>
|
|
84
89
|
/**
|
|
85
90
|
* The component property should be set
|
|
86
|
-
* @see https://github.com/storybookjs/
|
|
91
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/csf-component.md
|
|
87
92
|
*/
|
|
88
93
|
'storybook/csf-component'?: Linter.RuleEntry<[]>
|
|
89
94
|
/**
|
|
90
95
|
* Story files should have a default export
|
|
91
|
-
* @see https://github.com/storybookjs/
|
|
96
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/default-exports.md
|
|
92
97
|
*/
|
|
93
98
|
'storybook/default-exports'?: Linter.RuleEntry<[]>
|
|
94
99
|
/**
|
|
95
100
|
* Deprecated hierarchy separator in title property
|
|
96
|
-
* @see https://github.com/storybookjs/
|
|
101
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/hierarchy-separator.md
|
|
97
102
|
*/
|
|
98
103
|
'storybook/hierarchy-separator'?: Linter.RuleEntry<[]>
|
|
99
104
|
/**
|
|
100
105
|
* Meta should only have inline properties
|
|
101
|
-
* @see https://github.com/storybookjs/
|
|
106
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/meta-inline-properties.md
|
|
102
107
|
*/
|
|
103
108
|
'storybook/meta-inline-properties'?: Linter.RuleEntry<StorybookMetaInlineProperties>
|
|
104
109
|
/**
|
|
105
110
|
* Meta should use `satisfies Meta`
|
|
106
|
-
* @see https://github.com/storybookjs/
|
|
111
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/meta-satisfies-type.md
|
|
107
112
|
*/
|
|
108
113
|
'storybook/meta-satisfies-type'?: Linter.RuleEntry<[]>
|
|
109
114
|
/**
|
|
110
115
|
* A story should not have a redundant name property
|
|
111
|
-
* @see https://github.com/storybookjs/
|
|
116
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/no-redundant-story-name.md
|
|
112
117
|
*/
|
|
113
118
|
'storybook/no-redundant-story-name'?: Linter.RuleEntry<[]>
|
|
119
|
+
/**
|
|
120
|
+
* Do not import renderer packages directly in stories
|
|
121
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/no-renderer-packages.md
|
|
122
|
+
*/
|
|
123
|
+
'storybook/no-renderer-packages'?: Linter.RuleEntry<[]>
|
|
114
124
|
/**
|
|
115
125
|
* storiesOf is deprecated and should not be used
|
|
116
|
-
* @see https://github.com/storybookjs/
|
|
126
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/no-stories-of.md
|
|
117
127
|
*/
|
|
118
128
|
'storybook/no-stories-of'?: Linter.RuleEntry<[]>
|
|
119
129
|
/**
|
|
120
130
|
* Do not define a title in meta
|
|
121
|
-
* @see https://github.com/storybookjs/
|
|
131
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/no-title-property-in-meta.md
|
|
122
132
|
*/
|
|
123
133
|
'storybook/no-title-property-in-meta'?: Linter.RuleEntry<[]>
|
|
124
134
|
/**
|
|
125
135
|
* This rule identifies storybook addons that are invalid because they are either not installed or contain a typo in their name.
|
|
126
|
-
* @see https://github.com/storybookjs/
|
|
136
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/no-uninstalled-addons.md
|
|
127
137
|
*/
|
|
128
138
|
'storybook/no-uninstalled-addons'?: Linter.RuleEntry<StorybookNoUninstalledAddons>
|
|
129
139
|
/**
|
|
130
140
|
* Stories should use PascalCase
|
|
131
|
-
* @see https://github.com/storybookjs/
|
|
141
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/prefer-pascal-case.md
|
|
132
142
|
*/
|
|
133
143
|
'storybook/prefer-pascal-case'?: Linter.RuleEntry<[]>
|
|
134
144
|
/**
|
|
135
145
|
* A story file must contain at least one story export
|
|
136
|
-
* @see https://github.com/storybookjs/
|
|
146
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/story-exports.md
|
|
137
147
|
*/
|
|
138
148
|
'storybook/story-exports'?: Linter.RuleEntry<[]>
|
|
139
149
|
/**
|
|
140
150
|
* Use expect from `@storybook/test`, `storybook/test` or `@storybook/jest`
|
|
141
|
-
* @see https://github.com/storybookjs/
|
|
151
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/use-storybook-expect.md
|
|
142
152
|
*/
|
|
143
153
|
'storybook/use-storybook-expect'?: Linter.RuleEntry<[]>
|
|
144
154
|
/**
|
|
145
155
|
* Do not use testing-library directly on stories
|
|
146
|
-
* @see https://github.com/storybookjs/
|
|
156
|
+
* @see https://github.com/storybookjs/storybook/blob/next/code/lib/eslint-plugin/docs/rules/use-storybook-testing-library.md
|
|
147
157
|
*/
|
|
148
158
|
'storybook/use-storybook-testing-library'?: Linter.RuleEntry<[]>
|
|
149
159
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vp-tw/eslint-config",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "ViPro's ESLint configuration",
|
|
5
5
|
"homepage": "https://github.com/vdustr/eslint-config",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "ViPro",
|
|
8
8
|
"url": "https://vdustr.dev"
|
|
9
9
|
},
|
|
10
|
+
"type": "module",
|
|
10
11
|
"exports": {
|
|
11
12
|
".": {
|
|
12
13
|
"import": {
|
|
@@ -39,27 +40,28 @@
|
|
|
39
40
|
"dist"
|
|
40
41
|
],
|
|
41
42
|
"dependencies": {
|
|
42
|
-
"@mui/types": "^7.2
|
|
43
|
-
"es-toolkit": "^1.
|
|
44
|
-
"eslint-flat-config-utils": "^2.0
|
|
43
|
+
"@mui/types": "^7.4.2",
|
|
44
|
+
"es-toolkit": "^1.38.0",
|
|
45
|
+
"eslint-flat-config-utils": "^2.1.0",
|
|
45
46
|
"local-pkg": "^1.1.1"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
|
-
"eslint-typegen": "^2.
|
|
49
|
-
"unbuild": "^3.
|
|
49
|
+
"eslint-typegen": "^2.2.0",
|
|
50
|
+
"unbuild": "^3.5.0"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
|
-
"@antfu/eslint-config": "^4.13.
|
|
53
|
+
"@antfu/eslint-config": "^4.13.2",
|
|
53
54
|
"@emotion/eslint-plugin": "^11.12.0",
|
|
54
|
-
"@tanstack/eslint-plugin-query": "^5.
|
|
55
|
+
"@tanstack/eslint-plugin-query": "^5.78.0",
|
|
55
56
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
56
|
-
"eslint": "^9.
|
|
57
|
+
"eslint": "^9.28.0",
|
|
57
58
|
"eslint-config-prettier": "^10.1.5",
|
|
58
|
-
"eslint-plugin-mdx": "^3.4.
|
|
59
|
-
"eslint-plugin-package-json": "^0.
|
|
60
|
-
"eslint-plugin-react-compiler": "^19.1.0-rc.
|
|
61
|
-
"eslint-plugin-storybook": "^0.
|
|
62
|
-
"eslint-plugin-yml": "^1.18.0"
|
|
59
|
+
"eslint-plugin-mdx": "^3.4.2",
|
|
60
|
+
"eslint-plugin-package-json": "^0.33.0",
|
|
61
|
+
"eslint-plugin-react-compiler": "^19.1.0-rc.2",
|
|
62
|
+
"eslint-plugin-storybook": "^9.0.3",
|
|
63
|
+
"eslint-plugin-yml": "^1.18.0",
|
|
64
|
+
"storybook": "^9.0.3"
|
|
63
65
|
},
|
|
64
66
|
"peerDependenciesMeta": {
|
|
65
67
|
"@emotion/eslint-plugin": {
|
|
@@ -88,6 +90,9 @@
|
|
|
88
90
|
},
|
|
89
91
|
"eslint-plugin-yml": {
|
|
90
92
|
"optional": true
|
|
93
|
+
},
|
|
94
|
+
"storybook": {
|
|
95
|
+
"optional": true
|
|
91
96
|
}
|
|
92
97
|
},
|
|
93
98
|
"publishConfig": {
|