mirror of
https://github.com/nostalgic-css/NES.css.git
synced 2025-08-30 09:20:02 +02:00
ci: add commitlint
Add `commitlint` to enforce proper formatting for all commit messages #13
This commit is contained in:
@@ -94,6 +94,21 @@ jobs:
|
|||||||
paths:
|
paths:
|
||||||
- css
|
- css
|
||||||
|
|
||||||
|
lint:
|
||||||
|
<<: *defaults
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: .
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Lint styles
|
||||||
|
command: npx stylelint -- --fix
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Lint commit messages
|
||||||
|
command: npx semantic-commitlint -- --ci
|
||||||
|
|
||||||
# test:
|
# test:
|
||||||
# <<: *defaults
|
# <<: *defaults
|
||||||
|
|
||||||
@@ -157,6 +172,9 @@ workflows:
|
|||||||
# - coverage:
|
# - coverage:
|
||||||
# requires:
|
# requires:
|
||||||
# - install-dependencies
|
# - install-dependencies
|
||||||
|
- lint:
|
||||||
|
requires:
|
||||||
|
- install-dependencies
|
||||||
- build:
|
- build:
|
||||||
requires:
|
requires:
|
||||||
- install-dependencies
|
- install-dependencies
|
||||||
@@ -169,6 +187,7 @@ workflows:
|
|||||||
requires:
|
requires:
|
||||||
# - test
|
# - test
|
||||||
- build
|
- build
|
||||||
|
- lint
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only: master
|
only: master
|
||||||
|
3268
package-lock.json
generated
3268
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
@@ -14,7 +14,11 @@
|
|||||||
"storybook": "start-storybook -p 6006",
|
"storybook": "start-storybook -p 6006",
|
||||||
"build:storybook": "build-storybook",
|
"build:storybook": "build-storybook",
|
||||||
"deploy": "npm run build",
|
"deploy": "npm run build",
|
||||||
"semantic-release": "semantic-release"
|
"semantic-commitlint": "semantic-commitlint",
|
||||||
|
"semantic-release": "semantic-release",
|
||||||
|
"commit": "git-cz",
|
||||||
|
"commit:retry": "git-cz --retry",
|
||||||
|
"commitmsg": "commitlint -e"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -48,6 +52,7 @@
|
|||||||
"postcss-cli": "^6.0.0",
|
"postcss-cli": "^6.0.0",
|
||||||
"prettier": "^1.15.2",
|
"prettier": "^1.15.2",
|
||||||
"rimraf": "^2.6.2",
|
"rimraf": "^2.6.2",
|
||||||
|
"semantic-commitlint": "^1.3.2",
|
||||||
"semantic-release": "^15.12.3",
|
"semantic-release": "^15.12.3",
|
||||||
"stylelint": "^9.5.0",
|
"stylelint": "^9.5.0",
|
||||||
"stylelint-config-prettier": "^4.0.0",
|
"stylelint-config-prettier": "^4.0.0",
|
||||||
@@ -61,7 +66,9 @@
|
|||||||
],
|
],
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"pre-commit": "lint-staged"
|
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
|
||||||
|
"pre-commit": "lint-staged",
|
||||||
|
"prepare-commit-msg": "npm run semantic-commitlint -- -h"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
@@ -78,6 +85,11 @@
|
|||||||
"prettier": {
|
"prettier": {
|
||||||
"printWidth": 100
|
"printWidth": 100
|
||||||
},
|
},
|
||||||
|
"release": {
|
||||||
|
"verifyRelease": [
|
||||||
|
"semantic-commitlint"
|
||||||
|
]
|
||||||
|
},
|
||||||
"stylelint": {
|
"stylelint": {
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"stylelint-scss",
|
"stylelint-scss",
|
||||||
|
Reference in New Issue
Block a user