eslint-plugin-executable-stories-jest 2.1.5 → 2.1.7

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,12 @@ export default [...jestExecutableStories.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/it` callback (framework-native tests) | recommended |
40
+ | Rule | Description | Config |
41
+ | ------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------- |
42
+ | `require-init-before-steps` | Step and doc calls must follow `story.init()` 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
44
 
45
- These rules apply only when the file uses legacy patterns (e.g. top-level steps or `doc.story()`). If you use describe/it + `story.init()` + `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.
45
+ Prefer describe/it + `story.init()` + `story.given`/`story.when`/`story.then`. Top-level step helpers remain exported for compatibility.
46
46
 
47
47
  ## Configs
48
48
 
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "eslint-plugin-executable-stories-jest",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "type": "module",
5
- "description": "ESLint rules for executable-stories-jest: step context, doc.story in test/it",
5
+ "description": "ESLint rules for executable-stories-jest: story.init and legacy story context guards",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
@@ -17,8 +17,7 @@
17
17
  "files": [
18
18
  "dist",
19
19
  "skills",
20
- "README.md",
21
- "bin"
20
+ "README.md"
22
21
  ],
23
22
  "repository": {
24
23
  "type": "git",
@@ -43,17 +42,14 @@
43
42
  "@types/node": "^25.6.0",
44
43
  "eslint": "^10.0.1",
45
44
  "tsup": "^8.5.1",
46
- "typescript": "^6.0.2",
47
- "vitest": "^4.1.4",
45
+ "typescript": "^6.0.3",
46
+ "vitest": "^4.1.5",
48
47
  "eslint-config-executable-stories": "0.2.0",
49
- "executable-stories-vitest": "8.1.5"
48
+ "executable-stories-vitest": "8.2.0"
50
49
  },
51
50
  "engines": {
52
51
  "node": ">=22"
53
52
  },
54
- "bin": {
55
- "intent": "./bin/intent.js"
56
- },
57
53
  "scripts": {
58
54
  "build": "tsup",
59
55
  "type-check": "node -e \"const fs=require('fs');const {execSync}=require('child_process');const p=require('path').resolve(process.cwd(),'../executable-stories-jest/package.json');if(!fs.existsSync(p)){console.log('Skipping type-check: executable-stories-jest not in workspace');process.exit(0);}execSync('pnpm --filter executable-stories-jest run build && tsc --noEmit',{stdio:'inherit'});\"",
package/bin/intent.js DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- await import('@tanstack/intent/intent-library')