eslint-plugin-traceability 1.0.3 → 1.0.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.
Files changed (33) hide show
  1. package/.github/workflows/ci-cd.yml +26 -28
  2. package/.husky/pre-commit +1 -1
  3. package/.husky/pre-push +1 -1
  4. package/.prettierignore +5 -1
  5. package/.voder/history.md +138 -264
  6. package/.voder/implementation-progress.md +110 -112
  7. package/.voder/last-action.md +62 -204
  8. package/.voder/plan.md +10 -10
  9. package/.voder/progress-chart.png +0 -0
  10. package/.voder/progress-log-areas.csv +4 -0
  11. package/.voder/progress-log.csv +4 -0
  12. package/CHANGELOG.md +12 -0
  13. package/README.md +2 -2
  14. package/cli-integration.js +61 -115
  15. package/docs/cli-integration.md +3 -1
  16. package/docs/decisions/005-github-actions-validation-tooling.accepted.md +144 -0
  17. package/eslint.config.js +4 -4
  18. package/lib/tests/{basic.test.js → plugin-setup.test.js} +1 -1
  19. package/package.json +1 -1
  20. package/tests/{basic.test.ts → plugin-setup.test.ts} +1 -1
  21. package/user-docs/migration-guide.md +71 -0
  22. package/lib/index.d.ts +0 -26
  23. package/lib/index.js +0 -11
  24. package/lib/tests/integration/file-validation.test.d.ts +0 -1
  25. package/lib/tests/integration/file-validation.test.js +0 -71
  26. package/lib/tests/integration/plugin-validation.test.d.ts +0 -1
  27. package/lib/tests/integration/plugin-validation.test.js +0 -83
  28. package/tests/integration/file-validation.test.ts +0 -78
  29. package/tests/integration/plugin-validation.test.ts +0 -84
  30. /package/lib/tests/{basic.test.d.ts → plugin-default-export-and-configs.test.d.ts} +0 -0
  31. /package/lib/tests/{index.test.js → plugin-default-export-and-configs.test.js} +0 -0
  32. /package/lib/tests/{index.test.d.ts → plugin-setup.test.d.ts} +0 -0
  33. /package/tests/{index.test.ts → plugin-default-export-and-configs.test.ts} +0 -0
@@ -15,7 +15,7 @@ jobs:
15
15
  - name: Checkout code
16
16
  uses: actions/checkout@v4
17
17
 
18
- - name: Setup Node.js ${{ matrix['node-version'] }}
18
+ - name: Setup Node.js
19
19
  uses: actions/setup-node@v4
20
20
  with:
21
21
  node-version: ${{ matrix['node-version'] }}
@@ -27,6 +27,13 @@ jobs:
27
27
  - name: Build project
28
28
  run: npm run build
29
29
 
30
+ - name: Upload build artifacts
31
+ if: ${{ matrix['node-version'] == '20.x' }}
32
+ uses: actions/upload-artifact@v4
33
+ with:
34
+ name: build-artifact
35
+ path: lib/
36
+
30
37
  - name: Run type checking
31
38
  run: npm run type-check
32
39
 
@@ -39,30 +46,26 @@ jobs:
39
46
  - name: Run tests with coverage
40
47
  run: npm run test
41
48
 
42
- - name: Run CLI Integration Tests
43
- run: node cli-integration.js
44
-
45
49
  - name: Check code formatting
46
50
  run: npm run format:check
47
51
 
48
52
  - name: Run security audit
49
53
  run: npm audit --audit-level=high
50
54
 
51
- publish:
52
- name: Publish Package
53
- needs: quality-checks
55
+ deploy:
56
+ name: Deploy to NPM
54
57
  runs-on: ubuntu-latest
55
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
58
+ needs: quality-checks
56
59
  steps:
57
60
  - name: Checkout code
58
61
  uses: actions/checkout@v4
59
62
 
60
- - name: Setup Node.js for publish
63
+ - name: Setup Node.js
61
64
  uses: actions/setup-node@v4
62
65
  with:
63
66
  node-version: '20.x'
64
- registry-url: 'https://registry.npmjs.org/'
65
- always-auth: true
67
+ cache: npm
68
+ registry-url: 'https://registry.npmjs.org'
66
69
 
67
70
  - name: Install dependencies
68
71
  run: npm ci
@@ -70,24 +73,19 @@ jobs:
70
73
  - name: Build project
71
74
  run: npm run build
72
75
 
73
- - name: Configure npm for publish
74
- run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
76
+ - name: Publish to npm
75
77
  env:
76
78
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
77
-
78
- - name: Publish package to npm
79
79
  run: npm publish --access public
80
- env:
81
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
82
80
 
83
- smoke-test:
84
- name: Post-Deployment Smoke Test
85
- needs: publish
86
- runs-on: ubuntu-latest
87
- steps:
88
- - name: Checkout code
89
- uses: actions/checkout@v4
90
- - name: Install dependencies
91
- run: npm ci
92
- - name: Smoke Test Published Package
93
- run: node cli-integration.js
81
+ - name: Pack plugin
82
+ run: npm pack
83
+
84
+ - name: Smoke Test Plugin Tarball
85
+ run: |
86
+ mkdir temp
87
+ cd temp
88
+ npm init -y
89
+ npm install ../eslint-plugin-traceability-*.tgz --no-save
90
+ echo '{"plugins":["traceability"],"rules":{}}' > .eslintrc.json
91
+ npx eslint --print-config .
package/.husky/pre-commit CHANGED
@@ -1 +1 @@
1
- npm run format && npm run lint -- --max-warnings=0
1
+ npm run format && npm run lint -- --max-warnings=0 && npm run type-check
package/.husky/pre-push CHANGED
@@ -1 +1 @@
1
- npm run build && npm run type-check && npm run lint -- --max-warnings=0 && npm run duplication && npm test && npm run format:check && npm audit --audit-level=high && node cli-integration.js
1
+ npm run build && npm run type-check && npm run lint -- --max-warnings=0 && npm run duplication && npm test && npm run format:check && npm audit --audit-level=high
package/.prettierignore CHANGED
@@ -20,4 +20,8 @@ coverage/
20
20
  CHANGELOG.md
21
21
  *.log
22
22
  package.json
23
- eslint.config.js
23
+ eslint.config.js
24
+
25
+ # Ignore CLI integration files
26
+ cli-integration.js
27
+ docs/cli-integration.md