Skip to content

Commit c4926fa

Browse files
committed
refactor: move package.json scripts to ci
1 parent 8b10dfc commit c4926fa

File tree

9 files changed

+10
-70
lines changed

9 files changed

+10
-70
lines changed

.github/workflows/editorconfig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
run: bun i
2727

2828
- name: Lint
29-
run: bun lint:editorconfig
29+
run: bun editorconfig-checker

.github/workflows/eslint.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: ESLint
22

33
on:
4-
workflow_run:
5-
workflows:
6-
- CodeQL
7-
types:
8-
- completed
94
pull_request:
105
branches:
116
- main
@@ -17,8 +12,6 @@ jobs:
1712
eslint:
1813
name: ESLint
1914

20-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
21-
2215
runs-on: ubuntu-latest
2316
timeout-minutes: 10
2417

@@ -33,4 +26,4 @@ jobs:
3326
run: bun i
3427

3528
- name: Lint
36-
run: bun lint:ts
29+
run: bun eslint src/**/*.ts

.github/workflows/prettier.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
run: bun i
2727

2828
- name: Lint
29-
run: bun lint:formatting
29+
run: bun prettier . --check

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
env:
4444
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
4545
# NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
46-
run: bun release
46+
run: bun semantic-release

.github/workflows/remark.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
run: bun i
3131

3232
- name: Lint
33-
run: bun lint:md
33+
run: bun remark . --quiet --frail

.github/workflows/spec.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: Spec
22

33
on:
4-
workflow_run:
5-
workflows:
6-
- ESLint
7-
types:
8-
- completed
94
pull_request:
105
branches:
116
- main
@@ -17,8 +12,6 @@ jobs:
1712
spec:
1813
name: Spec
1914

20-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
21-
2215
runs-on: ubuntu-latest
2316
timeout-minutes: 10
2417

@@ -33,4 +26,4 @@ jobs:
3326
run: bun i
3427

3528
- name: Specs
36-
run: bun spec
29+
run: bun test

README.md

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ This template includes ready-made solutions for integration with:
2929
- **GitHub**.
3030
- **Commitlint**.
3131
- **Conventional Commits**.
32-
- **Husky & Lint Staged**.
32+
- **Husky**.
33+
- **Lint Staged**.
3334
- **GitHub Actions**.
3435
- **Semantic Release**.
3536
- **Bun**.
@@ -127,44 +128,6 @@ This template includes ready-made solutions for integration with:
127128

128129
- `init`: Installs dependencies and **Husky**.
129130

130-
- `spec`: Runs **Bun** and the tests in the **specs/** folder.
131-
132-
> Also runs using the [`spec.yaml`](.github/workflows/spec.yaml) workflow.
133-
134-
- `spec:coverage`: Runs **Bun** with `--coverage` flag.
135-
136-
- `release`: Runs **Semantic Release**.
137-
138-
- `lint:editorconfig`: Runs **Editorconfig Checker** and
139-
checks all files in the project.
140-
141-
> Also runs with the [`editorconfig.yaml`](.github/workflows/editorconfig.yaml)
142-
> workflow.
143-
144-
- `lint:formatting`: Runs **Prettier** with the `--check` flag
145-
for all files.
146-
147-
> Runs with the [`prettier.yaml`](.github/workflows/prettier.yaml)
148-
>
149-
> Also run with a `pre-commit` hook.
150-
151-
- `lint:md`: Runs **Remark** with the `--quiet` flag and
152-
checks all **Markdown** files.
153-
154-
> Also runs with the [`remark.yaml`](.github/workflows/remark.yaml)
155-
> workflow.
156-
157-
- `lint:ts`: Runs **ESLint** with the flag `--fix`
158-
for all **TypeScript** files.
159-
160-
> Runs with the [`eslint.yaml`](.github/workflows/eslint.yaml)
161-
> workflow.
162-
>
163-
> Also run with a `pre-commit` hook.
164-
165-
- `prettify`: Runs **Prettier** with the `--write` flag
166-
for all files.
167-
168131
## Workflows
169132

170133
- [`auto-merge-dependabot-pull-request.yaml`](.github/workflows/auto-merge-dependabot-pull-request.yaml):

lint-staged.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export default {
2-
'**/*.md': 'remark --quiet --frail',
3-
'**/*': 'prettier --write',
2+
'*': 'prettier --write',
43
'src/**/*.ts': 'eslint --fix',
54
};

package.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,7 @@
3232
"index.js"
3333
],
3434
"scripts": {
35-
"init": "bun i && husky",
36-
"spec": "bun test",
37-
"spec:coverage": "bun test --coverage",
38-
"release": "semantic-release",
39-
"lint:editorconfig": "editorconfig-checker",
40-
"lint:formatting": "prettier . --check",
41-
"lint:md": "remark . --quiet --frail",
42-
"lint:ts": "eslint src/**/*.ts --fix",
43-
"prettify": "prettier . --write"
35+
"init": "bun i && husky"
4436
},
4537
"devDependencies": {
4638
"@archoleat/commitlint-define-config": "^1.0.9",

0 commit comments

Comments
 (0)