Skip to content

Commit

Permalink
Add husky setup and first pre-commit hook
Browse files Browse the repository at this point in the history
This adds basic linting to yaml and json files.

Bug: T300893
  • Loading branch information
micgro42 committed Feb 7, 2022
1 parent 60bec52 commit 77f3f9d
Show file tree
Hide file tree
Showing 5 changed files with 1,714 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
9 changes: 9 additions & 0 deletions .prettierignore
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
7 changes: 7 additions & 0 deletions .prettierrc.js
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
};
Loading

0 comments on commit 77f3f9d

Please sign in to comment.