Skip to content

Commit

Permalink
feat(commitlint): integrate commitlint and lint (#1362)
Browse files Browse the repository at this point in the history
- add `npm run lint:commit`
- remove commitlint job on CI
  • Loading branch information
ybiquitous committed Sep 8, 2022
1 parent 4189410 commit 47a9596
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ jobs:

lint:
uses: ybiquitous/.github/.github/workflows/nodejs-lint-reusable.yml@main

commitlint:
uses: ybiquitous/.github/.github/workflows/nodejs-commitlint-reusable.yml@main
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@
"lint:md:fix": "remark . --output",
"lint:types": "tsc --noEmit",
"lint:types:watch": "npm run lint:types -- --watch",
"lint": "npm-run-all --print-label --parallel lint:*",
"lint:commit": "commitlint --from HEAD~10",
"lint": "npm-run-all --print-label --silent --parallel lint:*",
"prettier": "prettier --cache --ignore-path .gitignore .",
"lint:styles": "npm run prettier -- --check",
"lint:styles:fix": "npm run prettier -- --write",
"format": "npm-run-all --print-label --parallel lint:*:fix",
"format": "npm-run-all --print-label --silent --parallel lint:*:fix",
"clean": "git clean -dx --force --exclude=node_modules --exclude=.husky",
"prerelease": "git switch main && git pull && npm ci && npm run clean && npm test && npm run clean",
"release": "standard-version",
Expand Down
13 changes: 6 additions & 7 deletions test/__snapshots__/init.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ exports[`update "package.json" 1`] = `
},
"scripts": {
"clean": "git clean -dx --force --exclude=node_modules --exclude=.husky",
"format": "npm-run-all --print-label --parallel lint:*:fix",
"lint": "npm-run-all --print-label --parallel lint:*",
"format": "npm-run-all --print-label --silent --parallel lint:*:fix",
"lint": "npm-run-all --print-label --silent --parallel lint:*",
"lint:commit": "commitlint --from HEAD~10",
"lint:js": "eslint --cache --ext=js,jsx,cjs,mjs,ts,tsx .",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:md": "remark . --frail",
Expand Down Expand Up @@ -106,8 +107,9 @@ exports[`update "package.json" without fields 1`] = `
},
"scripts": {
"clean": "git clean -dx --force --exclude=node_modules --exclude=.husky",
"format": "npm-run-all --print-label --parallel lint:*:fix",
"lint": "npm-run-all --print-label --parallel lint:*",
"format": "npm-run-all --print-label --silent --parallel lint:*:fix",
"lint": "npm-run-all --print-label --silent --parallel lint:*",
"lint:commit": "commitlint --from HEAD~10",
"lint:js": "eslint --cache --ext=js,jsx,cjs,mjs,ts,tsx .",
"lint:js:fix": "npm run lint:js -- --fix",
"lint:md": "remark . --frail",
Expand Down Expand Up @@ -208,9 +210,6 @@ jobs:
lint:
uses: ybiquitous/.github/.github/workflows/nodejs-lint-reusable.yml@main
commitlint:
uses: ybiquitous/.github/.github/workflows/nodejs-commitlint-reusable.yml@main
"
`;

Expand Down

0 comments on commit 47a9596

Please sign in to comment.