Fix lint-staged not working by upgrading husky

Squashed commit of the following:

commit c79173551c96db363bb6d83475e74856d8d7b61e
Author: Jonny Barnes <jonny@jonnybarnes.uk>
Date:   Thu Dec 7 16:38:43 2017 +0000

    Add husky entry to package.json

commit af0f5e6dbc6a223390dac884ea1f51e539691b8f
Author: Jonny Barnes <jonny@jonnybarnes.uk>
Date:   Thu Dec 7 16:37:42 2017 +0000

    Remove pre-commit hook from the scripts entry

commit e85794fbc3ab1bf4b10e2fd418417de116e58848
Author: Jonny Barnes <jonny@jonnybarnes.uk>
Date:   Thu Dec 7 16:36:51 2017 +0000

    Update npm packages

commit 3d8271767c161b4ebc0c13a9ffd2165160be76eb
Author: Jonny Barnes <jonny@jonnybarnes.uk>
Date:   Thu Dec 7 16:27:21 2017 +0000

    Make it correct again, forgot a reset earlier

commit 5d47c75a892c85e2af2b1fc1669e251262b165e6
Author: Jonny Barnes <jonny@jonnybarnes.uk>
Date:   Thu Dec 7 16:25:55 2017 +0000

    Try different lint-staged file idewntifiers

commit 4b72da03bc28007b1192bf04c6cbfdcb9e6a550f
Author: Jonny Barnes <jonny@jonnybarnes.uk>
Date:   Thu Dec 7 16:06:28 2017 +0000

    Add a lint-staged script

commit 35509858841a6648bbd8659cd75d89210cd0fbe9
Author: Jonny Barnes <jonny@jonnybarnes.uk>
Date:   Thu Dec 7 16:03:22 2017 +0000

    Add an error to a sass file

commit a54305b751643c12fc134a4498d96110851943cc
Author: Jonny Barnes <jonny@jonnybarnes.uk>
Date:   Thu Dec 7 16:02:58 2017 +0000

    Trying to fix lint-staged
This commit is contained in:
Jonny Barnes 2017-12-07 16:39:06 +00:00
parent a639edf9ae
commit d409098efb
2 changed files with 118 additions and 21 deletions

View file

@ -27,9 +27,10 @@
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"husky": "^0.14.3",
"husky": "^0.15.0-beta.15",
"lint-staged": "^6.0.0",
"postcss-cli": "^4.1.1",
"postcss-sass": "^0.2.0",
"pre-commit": "^1.1.3",
"source-list-map": "^2.0.0",
"stylelint": "^8.3.1",
@ -47,17 +48,21 @@
"make:css": "npm run lint:sass && npm run sass && npm run postcss",
"make:js": "npm run lint:es6 && npm run webpack && npm run uglifyjs",
"postcss": "postcss public/assets/css/app.css --use autoprefixer --autoprefixer.browsers \"> 5%\" --replace --map",
"precommit": "lint-staged",
"sass": "sassc --style compressed --sourcemap resources/assets/sass/app.scss public/assets/css/app.css",
"uglifyjs": "scripts/uglifyjs",
"webpack": "webpack --progress --colors"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"resources/assets/es6/*.js": [
"./resources/assets/es6/*.js": [
"eslint --fix",
"git add"
],
"resources/assets/sass/**/*.scss": [
"*.scss": [
"stylelint --syntax=scss --fix",
"git add"
]