Skip to content

Commit

Permalink
Add lint staged
Browse files Browse the repository at this point in the history
  • Loading branch information
bobisjan committed Feb 8, 2020
1 parent ff4a216 commit e8a5e8d
Show file tree
Hide file tree
Showing 6 changed files with 293 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
4 changes: 4 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
'**/*.js': ['yarn eslint --cache --fix', 'git add'],
'**/*.hbs': ['yarn ember-template-lint'],
};
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

0 comments on commit e8a5e8d

Please sign in to comment.