eslint-plugin-executable-stories-vitest 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
@@ -1,6 +1,6 @@
1
1
  # eslint-plugin-executable-stories-vitest
2
2
 
3
- ESLint rules for [executable-stories-vitest](https://github.com/jagreehal/executable-stories). Use with Vitest to catch common mistakes: steps outside story context, `doc.story(title)` outside a test callback, or `doc.story("Title")` without the required `task` argument.
3
+ ESLint rules for [executable-stories-vitest](https://github.com/jagreehal/executable-stories). Use with Vitest to catch common mistakes when writing story tests. Current Vitest usage is `story.init(task)` plus `story.given` / `story.when` / `story.then`.
4
4
 
5
5
  ## Install
6
6
 
@@ -37,11 +37,11 @@ export default [...vitestExecutableStories.configs.recommended];
37
37
 
38
38
  ## Rules
39
39
 
40
- | Rule | Description | Config |
41
- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | ----------- |
42
- | `require-story-context-for-steps` | Step functions (`given`, `when`, `then`, etc.) must be called inside a `story()` or `doc.story()` callback. | recommended |
43
- | `require-test-context-for-doc-story` | `doc.story(title)` must be called inside a `test`/`it` callback when using the native pattern (without a story callback). | recommended |
44
- | `require-task-for-doc-story` | In Vitest, `doc.story(title, task)` requires the task argument. Use `it('...', ({ task }) => { doc.story('Title', task); ... })`. | recommended |
40
+ | Rule | Description | Config |
41
+ | ----------------------------------------- | -------------------------------------------------------------------------------------------- | ----------- |
42
+ | `require-task-for-story-init` | `story.init(task)` must receive the Vitest `task` argument from the test callback. | recommended |
43
+ | `require-test-context-for-story-init` | `story.init(...)` must be called inside a `test`/`it` callback. | recommended |
44
+ | `require-init-before-steps` | Step and doc calls on `story` must follow `story.init(...)` in the same test. | recommended |
45
45
 
46
46
  ## Configs
47
47
 
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "eslint-plugin-executable-stories-vitest",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "type": "module",
5
- "description": "ESLint rules for executable-stories-vitest: step context, doc.story in test/it, require task for doc.story(title)",
5
+ "description": "ESLint rules for executable-stories-vitest: story.init(task) 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-vitest/package.json');if(!fs.existsSync(p)){console.log('Skipping type-check: executable-stories-vitest not in workspace');process.exit(0);}execSync('pnpm --filter executable-stories-vitest 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')