eslint-plugin-traceability 1.0.3 → 1.0.5
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/.github/workflows/ci-cd.yml +41 -35
- package/.husky/pre-commit +1 -1
- package/.husky/pre-push +1 -1
- package/.prettierignore +5 -1
- package/.releaserc.json +15 -0
- package/.voder/history.md +138 -264
- package/.voder/implementation-progress.md +110 -112
- package/.voder/last-action.md +62 -204
- package/.voder/plan.md +10 -10
- package/.voder/progress-chart.png +0 -0
- package/.voder/progress-log-areas.csv +4 -0
- package/.voder/progress-log.csv +4 -0
- package/CHANGELOG.md +20 -1
- package/CONTRIBUTING.md +15 -13
- package/README.md +2 -2
- package/cli-integration.js +61 -115
- package/docs/cli-integration.md +3 -1
- package/docs/conventional-commits-guide.md +185 -0
- package/docs/decisions/004-automated-version-bumping-for-ci-cd.md +3 -1
- package/docs/decisions/005-github-actions-validation-tooling.accepted.md +144 -0
- package/docs/decisions/006-semantic-release-for-automated-publishing.accepted.md +227 -0
- package/eslint.config.js +4 -4
- package/package.json +7 -2
- package/tests/{basic.test.ts → plugin-setup.test.ts} +1 -1
- package/user-docs/migration-guide.md +71 -0
- package/lib/index.d.ts +0 -26
- package/lib/index.js +0 -11
- package/lib/src/index.d.ts +0 -80
- package/lib/src/index.js +0 -58
- package/lib/src/maintenance/batch.d.ts +0 -16
- package/lib/src/maintenance/batch.js +0 -28
- package/lib/src/maintenance/detect.d.ts +0 -6
- package/lib/src/maintenance/detect.js +0 -69
- package/lib/src/maintenance/index.d.ts +0 -14
- package/lib/src/maintenance/index.js +0 -22
- package/lib/src/maintenance/report.d.ts +0 -7
- package/lib/src/maintenance/report.js +0 -17
- package/lib/src/maintenance/update.d.ts +0 -6
- package/lib/src/maintenance/update.js +0 -67
- package/lib/src/maintenance/utils.d.ts +0 -6
- package/lib/src/maintenance/utils.js +0 -64
- package/lib/src/rules/require-branch-annotation.d.ts +0 -7
- package/lib/src/rules/require-branch-annotation.js +0 -111
- package/lib/src/rules/require-req-annotation.d.ts +0 -7
- package/lib/src/rules/require-req-annotation.js +0 -38
- package/lib/src/rules/require-story-annotation.d.ts +0 -7
- package/lib/src/rules/require-story-annotation.js +0 -50
- package/lib/src/rules/valid-annotation-format.d.ts +0 -10
- package/lib/src/rules/valid-annotation-format.js +0 -60
- package/lib/src/rules/valid-req-reference.d.ts +0 -3
- package/lib/src/rules/valid-req-reference.js +0 -104
- package/lib/src/rules/valid-story-reference.d.ts +0 -3
- package/lib/src/rules/valid-story-reference.js +0 -168
- package/lib/tests/basic.test.d.ts +0 -1
- package/lib/tests/basic.test.js +0 -51
- package/lib/tests/fixtures/stale/example.d.ts +0 -0
- package/lib/tests/fixtures/stale/example.js +0 -3
- package/lib/tests/fixtures/update/example.d.ts +0 -0
- package/lib/tests/fixtures/update/example.js +0 -3
- package/lib/tests/fixtures/valid-annotations/example.d.ts +0 -0
- package/lib/tests/fixtures/valid-annotations/example.js +0 -3
- package/lib/tests/index.test.d.ts +0 -1
- package/lib/tests/index.test.js +0 -72
- package/lib/tests/integration/file-validation.test.d.ts +0 -1
- package/lib/tests/integration/file-validation.test.js +0 -71
- package/lib/tests/integration/plugin-validation.test.d.ts +0 -1
- package/lib/tests/integration/plugin-validation.test.js +0 -83
- package/lib/tests/maintenance/batch.test.d.ts +0 -1
- package/lib/tests/maintenance/batch.test.js +0 -79
- package/lib/tests/maintenance/detect-isolated.test.d.ts +0 -1
- package/lib/tests/maintenance/detect-isolated.test.js +0 -95
- package/lib/tests/maintenance/detect.test.d.ts +0 -1
- package/lib/tests/maintenance/detect.test.js +0 -23
- package/lib/tests/maintenance/report.test.d.ts +0 -1
- package/lib/tests/maintenance/report.test.js +0 -67
- package/lib/tests/maintenance/update-isolated.test.d.ts +0 -1
- package/lib/tests/maintenance/update-isolated.test.js +0 -66
- package/lib/tests/maintenance/update.test.d.ts +0 -1
- package/lib/tests/maintenance/update.test.js +0 -26
- package/lib/tests/rules/require-branch-annotation.test.d.ts +0 -1
- package/lib/tests/rules/require-branch-annotation.test.js +0 -253
- package/lib/tests/rules/require-req-annotation.test.d.ts +0 -1
- package/lib/tests/rules/require-req-annotation.test.js +0 -41
- package/lib/tests/rules/require-story-annotation.test.d.ts +0 -1
- package/lib/tests/rules/require-story-annotation.test.js +0 -36
- package/lib/tests/rules/valid-annotation-format.test.d.ts +0 -1
- package/lib/tests/rules/valid-annotation-format.test.js +0 -58
- package/lib/tests/rules/valid-req-reference.test.d.ts +0 -1
- package/lib/tests/rules/valid-req-reference.test.js +0 -87
- package/lib/tests/rules/valid-story-reference.test.d.ts +0 -1
- package/lib/tests/rules/valid-story-reference.test.js +0 -69
- package/tests/integration/file-validation.test.ts +0 -78
- package/tests/integration/plugin-validation.test.ts +0 -84
- /package/tests/{index.test.ts → plugin-default-export-and-configs.test.ts} +0 -0
|
@@ -3,6 +3,8 @@ name: CI/CD Pipeline
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
6
8
|
|
|
7
9
|
jobs:
|
|
8
10
|
quality-checks:
|
|
@@ -14,8 +16,10 @@ jobs:
|
|
|
14
16
|
steps:
|
|
15
17
|
- name: Checkout code
|
|
16
18
|
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
17
21
|
|
|
18
|
-
- name: Setup Node.js
|
|
22
|
+
- name: Setup Node.js
|
|
19
23
|
uses: actions/setup-node@v4
|
|
20
24
|
with:
|
|
21
25
|
node-version: ${{ matrix['node-version'] }}
|
|
@@ -27,6 +31,13 @@ jobs:
|
|
|
27
31
|
- name: Build project
|
|
28
32
|
run: npm run build
|
|
29
33
|
|
|
34
|
+
- name: Upload build artifacts
|
|
35
|
+
if: ${{ matrix['node-version'] == '20.x' }}
|
|
36
|
+
uses: actions/upload-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: build-artifact
|
|
39
|
+
path: lib/
|
|
40
|
+
|
|
30
41
|
- name: Run type checking
|
|
31
42
|
run: npm run type-check
|
|
32
43
|
|
|
@@ -39,55 +50,50 @@ jobs:
|
|
|
39
50
|
- name: Run tests with coverage
|
|
40
51
|
run: npm run test
|
|
41
52
|
|
|
42
|
-
- name: Run CLI Integration Tests
|
|
43
|
-
run: node cli-integration.js
|
|
44
|
-
|
|
45
53
|
- name: Check code formatting
|
|
46
54
|
run: npm run format:check
|
|
47
55
|
|
|
48
56
|
- name: Run security audit
|
|
49
57
|
run: npm audit --audit-level=high
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
deploy:
|
|
60
|
+
if: ${{ github.event_name == 'push' }}
|
|
61
|
+
name: Release
|
|
54
62
|
runs-on: ubuntu-latest
|
|
55
|
-
|
|
63
|
+
needs: quality-checks
|
|
64
|
+
permissions:
|
|
65
|
+
contents: write
|
|
66
|
+
issues: write
|
|
67
|
+
pull-requests: write
|
|
68
|
+
id-token: write
|
|
69
|
+
env:
|
|
70
|
+
HUSKY: 0
|
|
56
71
|
steps:
|
|
57
72
|
- name: Checkout code
|
|
58
73
|
uses: actions/checkout@v4
|
|
74
|
+
with:
|
|
75
|
+
fetch-depth: 0
|
|
59
76
|
|
|
60
|
-
- name: Setup Node.js
|
|
77
|
+
- name: Setup Node.js
|
|
61
78
|
uses: actions/setup-node@v4
|
|
62
79
|
with:
|
|
63
|
-
node-version: '
|
|
64
|
-
registry-url: 'https://registry.npmjs.org/'
|
|
65
|
-
always-auth: true
|
|
80
|
+
node-version: '22.x'
|
|
66
81
|
|
|
67
82
|
- name: Install dependencies
|
|
68
83
|
run: npm ci
|
|
69
84
|
|
|
70
|
-
- name:
|
|
71
|
-
run:
|
|
72
|
-
|
|
73
|
-
- name: Configure npm for publish
|
|
74
|
-
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
|
|
75
|
-
env:
|
|
76
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
77
|
-
|
|
78
|
-
- name: Publish package to npm
|
|
79
|
-
run: npm publish --access public
|
|
85
|
+
- name: Release with semantic-release
|
|
86
|
+
run: npx semantic-release
|
|
80
87
|
env:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
run: node cli-integration.js
|
|
88
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
89
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
90
|
+
|
|
91
|
+
- name: Smoke test published package
|
|
92
|
+
run: |
|
|
93
|
+
echo "Smoke testing eslint-plugin-traceability"
|
|
94
|
+
workdir=$(mktemp -d)
|
|
95
|
+
cd "$workdir"
|
|
96
|
+
npm init -y > /dev/null
|
|
97
|
+
npm install eslint-plugin-traceability > /dev/null
|
|
98
|
+
echo '{"plugins":["traceability"],"rules":{}}' > .eslintrc.json
|
|
99
|
+
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 && node node_modules/actionlint/actionlint.cjs .github/workflows/*.yml
|
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
|
|
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
package/.releaserc.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"branches": ["main"],
|
|
3
|
+
"plugins": [
|
|
4
|
+
"@semantic-release/commit-analyzer",
|
|
5
|
+
"@semantic-release/release-notes-generator",
|
|
6
|
+
[
|
|
7
|
+
"@semantic-release/changelog",
|
|
8
|
+
{
|
|
9
|
+
"changelogFile": "CHANGELOG.md"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"@semantic-release/npm",
|
|
13
|
+
"@semantic-release/github"
|
|
14
|
+
]
|
|
15
|
+
}
|