eslint-plugin-storybook 10.3.2 → 10.3.4
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/index.js +90 -90
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_drbd9k1gssl from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_drbd9k1gssl from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_drbd9k1gssl from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_drbd9k1gssl.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_drbd9k1gssl.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_drbd9k1gssl.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -75,30 +75,6 @@ var require_dist = __commonJS({
|
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
-
// src/configs/addon-interactions.ts
|
|
79
|
-
var addon_interactions_default = {
|
|
80
|
-
plugins: ["storybook"],
|
|
81
|
-
overrides: [
|
|
82
|
-
{
|
|
83
|
-
files: ["**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)", "**/*.story.@(ts|tsx|js|jsx|mjs|cjs)"],
|
|
84
|
-
rules: {
|
|
85
|
-
"react-hooks/rules-of-hooks": "off",
|
|
86
|
-
"import-x/no-anonymous-default-export": "off",
|
|
87
|
-
"storybook/await-interactions": "error",
|
|
88
|
-
"storybook/context-in-play-function": "error",
|
|
89
|
-
"storybook/use-storybook-expect": "error",
|
|
90
|
-
"storybook/use-storybook-testing-library": "error"
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
files: [".storybook/main.@(js|cjs|mjs|ts)"],
|
|
95
|
-
rules: {
|
|
96
|
-
"storybook/no-uninstalled-addons": "error"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
]
|
|
100
|
-
};
|
|
101
|
-
|
|
102
78
|
// src/configs/csf.ts
|
|
103
79
|
var csf_default = {
|
|
104
80
|
plugins: ["storybook"],
|
|
@@ -142,36 +118,59 @@ var csf_strict_default = {
|
|
|
142
118
|
]
|
|
143
119
|
};
|
|
144
120
|
|
|
145
|
-
// src/configs/
|
|
146
|
-
var
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
121
|
+
// src/configs/addon-interactions.ts
|
|
122
|
+
var addon_interactions_default = {
|
|
123
|
+
plugins: ["storybook"],
|
|
124
|
+
overrides: [
|
|
125
|
+
{
|
|
126
|
+
files: ["**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)", "**/*.story.@(ts|tsx|js|jsx|mjs|cjs)"],
|
|
127
|
+
rules: {
|
|
128
|
+
"react-hooks/rules-of-hooks": "off",
|
|
129
|
+
"import-x/no-anonymous-default-export": "off",
|
|
130
|
+
"storybook/await-interactions": "error",
|
|
131
|
+
"storybook/context-in-play-function": "error",
|
|
132
|
+
"storybook/use-storybook-expect": "error",
|
|
133
|
+
"storybook/use-storybook-testing-library": "error"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
files: [".storybook/main.@(js|cjs|mjs|ts)"],
|
|
138
|
+
rules: {
|
|
139
|
+
"storybook/no-uninstalled-addons": "error"
|
|
152
140
|
}
|
|
153
141
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
"
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
142
|
+
]
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
// src/configs/recommended.ts
|
|
146
|
+
var recommended_default = {
|
|
147
|
+
plugins: ["storybook"],
|
|
148
|
+
overrides: [
|
|
149
|
+
{
|
|
150
|
+
files: ["**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)", "**/*.story.@(ts|tsx|js|jsx|mjs|cjs)"],
|
|
151
|
+
rules: {
|
|
152
|
+
"react-hooks/rules-of-hooks": "off",
|
|
153
|
+
"import-x/no-anonymous-default-export": "off",
|
|
154
|
+
"storybook/await-interactions": "error",
|
|
155
|
+
"storybook/context-in-play-function": "error",
|
|
156
|
+
"storybook/default-exports": "error",
|
|
157
|
+
"storybook/hierarchy-separator": "warn",
|
|
158
|
+
"storybook/no-redundant-story-name": "warn",
|
|
159
|
+
"storybook/no-renderer-packages": "error",
|
|
160
|
+
"storybook/prefer-pascal-case": "warn",
|
|
161
|
+
"storybook/story-exports": "error",
|
|
162
|
+
"storybook/use-storybook-expect": "error",
|
|
163
|
+
"storybook/use-storybook-testing-library": "error"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
files: [".storybook/main.@(js|cjs|mjs|ts)"],
|
|
168
|
+
rules: {
|
|
169
|
+
"storybook/no-uninstalled-addons": "error"
|
|
170
|
+
}
|
|
172
171
|
}
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
]
|
|
173
|
+
};
|
|
175
174
|
|
|
176
175
|
// src/configs/flat/csf.ts
|
|
177
176
|
var csf_default2 = [
|
|
@@ -220,8 +219,39 @@ var csf_strict_default2 = [
|
|
|
220
219
|
}
|
|
221
220
|
];
|
|
222
221
|
|
|
222
|
+
// src/configs/flat/addon-interactions.ts
|
|
223
|
+
var addon_interactions_default2 = [
|
|
224
|
+
{
|
|
225
|
+
name: "storybook:addon-interactions:setup",
|
|
226
|
+
plugins: {
|
|
227
|
+
get storybook() {
|
|
228
|
+
return index_default;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: "storybook:addon-interactions:stories-rules",
|
|
234
|
+
files: ["**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)", "**/*.story.@(ts|tsx|js|jsx|mjs|cjs)"],
|
|
235
|
+
rules: {
|
|
236
|
+
"react-hooks/rules-of-hooks": "off",
|
|
237
|
+
"import-x/no-anonymous-default-export": "off",
|
|
238
|
+
"storybook/await-interactions": "error",
|
|
239
|
+
"storybook/context-in-play-function": "error",
|
|
240
|
+
"storybook/use-storybook-expect": "error",
|
|
241
|
+
"storybook/use-storybook-testing-library": "error"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: "storybook:addon-interactions:main-rules",
|
|
246
|
+
files: [".storybook/main.@(js|cjs|mjs|ts)"],
|
|
247
|
+
rules: {
|
|
248
|
+
"storybook/no-uninstalled-addons": "error"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
];
|
|
252
|
+
|
|
223
253
|
// src/configs/flat/recommended.ts
|
|
224
|
-
var
|
|
254
|
+
var recommended_default2 = [
|
|
225
255
|
{
|
|
226
256
|
name: "storybook:recommended:setup",
|
|
227
257
|
plugins: {
|
|
@@ -257,36 +287,6 @@ var recommended_default = [
|
|
|
257
287
|
}
|
|
258
288
|
];
|
|
259
289
|
|
|
260
|
-
// src/configs/recommended.ts
|
|
261
|
-
var recommended_default2 = {
|
|
262
|
-
plugins: ["storybook"],
|
|
263
|
-
overrides: [
|
|
264
|
-
{
|
|
265
|
-
files: ["**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)", "**/*.story.@(ts|tsx|js|jsx|mjs|cjs)"],
|
|
266
|
-
rules: {
|
|
267
|
-
"react-hooks/rules-of-hooks": "off",
|
|
268
|
-
"import-x/no-anonymous-default-export": "off",
|
|
269
|
-
"storybook/await-interactions": "error",
|
|
270
|
-
"storybook/context-in-play-function": "error",
|
|
271
|
-
"storybook/default-exports": "error",
|
|
272
|
-
"storybook/hierarchy-separator": "warn",
|
|
273
|
-
"storybook/no-redundant-story-name": "warn",
|
|
274
|
-
"storybook/no-renderer-packages": "error",
|
|
275
|
-
"storybook/prefer-pascal-case": "warn",
|
|
276
|
-
"storybook/story-exports": "error",
|
|
277
|
-
"storybook/use-storybook-expect": "error",
|
|
278
|
-
"storybook/use-storybook-testing-library": "error"
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
files: [".storybook/main.@(js|cjs|mjs|ts)"],
|
|
283
|
-
rules: {
|
|
284
|
-
"storybook/no-uninstalled-addons": "error"
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
]
|
|
288
|
-
};
|
|
289
|
-
|
|
290
290
|
// src/utils/ast.ts
|
|
291
291
|
import { AST_NODE_TYPES } from "@typescript-eslint/utils";
|
|
292
292
|
import { ASTUtils } from "@typescript-eslint/utils";
|
|
@@ -1418,12 +1418,12 @@ var configs = {
|
|
|
1418
1418
|
csf: csf_default,
|
|
1419
1419
|
"csf-strict": csf_strict_default,
|
|
1420
1420
|
"addon-interactions": addon_interactions_default,
|
|
1421
|
-
recommended:
|
|
1421
|
+
recommended: recommended_default,
|
|
1422
1422
|
// flat configs
|
|
1423
1423
|
"flat/csf": csf_default2,
|
|
1424
1424
|
"flat/csf-strict": csf_strict_default2,
|
|
1425
1425
|
"flat/addon-interactions": addon_interactions_default2,
|
|
1426
|
-
"flat/recommended":
|
|
1426
|
+
"flat/recommended": recommended_default2
|
|
1427
1427
|
}, rules = {
|
|
1428
1428
|
"await-interactions": await_interactions_default,
|
|
1429
1429
|
"context-in-play-function": context_in_play_function_default,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-storybook",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.4",
|
|
4
4
|
"description": "Storybook ESLint Plugin: Best practice rules for writing stories",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"eslint": ">=8",
|
|
66
|
-
"storybook": "^10.3.
|
|
66
|
+
"storybook": "^10.3.4"
|
|
67
67
|
},
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|