-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add husky setup and first pre-commit hook
This adds basic linting to yaml and json files. Bug: T300893
- Loading branch information
Showing
5 changed files
with
1,714 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package-lock.json | ||
|
||
# Ignore all files covered by a wikimedia code style: | ||
*.js | ||
*.ts | ||
*.vue | ||
*.scss | ||
*.css | ||
*.less |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
This will be used for file-types to which Wikimedia linting does not apply, such as json or yaml | ||
*/ | ||
module.exports = { | ||
useTabs: true, // does not apply to yaml as that format cant use tabs | ||
tabWidth: 4, // applies defacto only to yaml | ||
}; |
Oops, something went wrong.