Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(commitlint): integrate commitlint and lint #1362

Merged
merged 1 commit into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commitlint --from HEAD~10 is enough.

"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