Skip to content

Commit

Permalink
build: add husky to lint code & cmt msg (#4993)
Browse files Browse the repository at this point in the history
Use husky to automatically lint code and commit messages locally upon git push (pre-push hook).
  • Loading branch information
ilhan007 authored Apr 4, 2022
1 parent 0a82d2d commit bc30cd7
Show file tree
Hide file tree
Showing 5 changed files with 634 additions and 38 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn husky:pre-push
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {extends: ['@commitlint/config-conventional']}
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,21 @@
"unlink-all": "wsrun unlink",
"hash": "wsrun --exclude-missing hash",
"copy-css": "copy-and-watch \"packages/base/dist/css/**/*\" packages/main/dist/resources/css/base/ && copy-and-watch \"packages/theming/dist/css/**/*\" packages/main/dist/resources/css/theming/ && copy-and-watch \"packages/main/dist/css/**/*\" packages/main/dist/resources/css/main/ && copy-and-watch \"packages/base/dist/css/**/*\" packages/fiori/dist/resources/css/base/ && copy-and-watch \"packages/theming/dist/css/**/*\" packages/fiori/dist/resources/css/theming/ && copy-and-watch \"packages/main/dist/css/**/*\" packages/fiori/dist/resources/css/main/",
"prerelease": "node ./.github/actions/pre-release.js"
"prerelease": "node ./.github/actions/pre-release.js",
"prepare": "husky install",
"husky:commit-msg": "commitlint -e",
"husky:lint": "yarn lint",
"husky:pre-push": "npm-run-all --sequential husky:commit-msg husky:lint"
},
"devDependencies": {
"@commitlint/cli": "^16.2.3",
"@commitlint/config-conventional": "^16.2.1",
"command-line-args": "^5.1.1",
"copy-and-watch": "^0.1.5",
"cross-env": "^7.0.3",
"glob": "^7.2.0",
"glob-promise": "^4.1.0",
"husky": "^7.0.4",
"npm-run-all": "^4.1.3",
"nps": "^5.10.0",
"wsrun": "^5.2.4"
Expand Down
1 change: 0 additions & 1 deletion packages/main/test/specs/Select.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ describe("Select general interaction", () => {
"The aria-label is correctly set internally.");
assert.strictEqual(await select2.getAttribute("aria-expanded"), "false",
"The aria-expanded is false by default.");

assert.strictEqual(await select2.getAttribute("aria-roledescription"), EXPECTER_ARIA_ROLEDESCRIPTION,
"The aria-roledescription is correct.");
});
Expand Down
Loading

0 comments on commit bc30cd7

Please sign in to comment.