Skip to content

Commit

Permalink
Merge pull request #367 from zonkyio/lint-staged
Browse files Browse the repository at this point in the history
Add lint staged
  • Loading branch information
bobisjan authored Feb 8, 2020
2 parents ff4a216 + 7ff0cc4 commit 240a36b
Show file tree
Hide file tree
Showing 6 changed files with 294 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ module.exports = {
{
files: [
'.eslintrc.js',
'.huskyrc.js',
'.prettierrc.js',
'.release-it.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'lint-staged.config.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
Expand Down
5 changes: 5 additions & 0 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
hooks: {
'pre-commit': 'lint-staged',
},
};
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/.env*
/.eslintignore
/.eslintrc.js
/.huskyrc.js
/.prettierrc.js
/.gitignore
/.release-it.js
Expand All @@ -24,6 +25,7 @@
/CHANGELOG.md
/CONTRIBUTING.md
/ember-cli-build.js
/lint-staged.config.js
/testem.js
/coverage/
/tests/
Expand Down
5 changes: 5 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
'**/*.js': 'yarn eslint --cache --fix',
'**/*.hbs': 'yarn ember-template-lint',
'**/*.md': 'yarn prettier --write',
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@
"eslint-plugin-ember": "^7.7.2",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.2",
"husky": "^4.2.1",
"lerna-changelog": "^1.0.0",
"lint-staged": "^10.0.7",
"loader.js": "^4.7.0",
"mocha": "^7.0.1",
"nyc": "^15.0.0",
Expand Down
Loading

0 comments on commit 240a36b

Please sign in to comment.