Skip to content

Commit 30c5dc4

Browse files
committed
ci: separate build check from lint and check build pre-commit
1 parent 31eff0f commit 30c5dc4

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

.github/workflows/build.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ jobs:
2020
- name: Install project
2121
run: npm ci --ignore-scripts
2222
- name: Lint
23-
run: npm run lint-es
24-
- name: Check formatting
25-
run: npm run format:check
23+
run: npm run lint
2624
build:
2725
runs-on: ubuntu-latest
2826
timeout-minutes: 5

.lintstagedrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module.exports = {
22
'*.{ts,tsx,js,jsx,json}': [
33
'npm run format:file',
44
'npm run lint-es:file:fix',
5+
() => 'npm run build:check',
56
() => 'npm run test',
67
],
78
'*.{vue,css,less,scss,html,htm,md,markdown,yml,yaml}': [

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"dist/src/**/!(*.test).{js,d.ts}"
99
],
1010
"scripts": {
11-
"lint": "run-p format:check build:check lint-es",
11+
"lint": "run-p format:check lint-es",
1212
"lint:fix": "run-s format lint-es:fix",
1313
"lint-es": "eslint --ext .ts,.tsx,.js,.jsx,.json .",
1414
"lint-es:file": "eslint --ext .ts,.tsx,.js,.jsx,.json",

0 commit comments

Comments
 (0)