Last active
April 9, 2019 21:29
-
-
Save progapandist/0c28831364c560d982b8bbed48226c96 to your computer and use it in GitHub Desktop.
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
{ | |
"name": "evil_chat", | |
"private": true, | |
"dependencies": { | |
"@rails/webpacker": "^3.2.0", | |
"coffeescript": "1.12.7", | |
"normalize.css": "^7.0.0" | |
}, | |
"scripts": { | |
"lint-staged": "$(yarn bin)/lint-staged" | |
}, | |
"lint-staged": { | |
"config/webpack/**/*.js": [ | |
"prettier --write", | |
"eslint", | |
"git add" | |
], | |
"frontend/**/*.js": [ | |
"prettier --write", | |
"eslint", | |
"git add" | |
], | |
"frontend/**/*.css": [ | |
"prettier --write", | |
"stylelint --fix", | |
"git add" | |
] | |
}, | |
"pre-commit": [ | |
"lint-staged" | |
], | |
"devDependencies": { | |
"webpack-dev-server": "^2.9.7", | |
"babel-eslint": "^8.0.1", | |
"eslint": "^4.8.0", | |
"eslint-config-airbnb-base": "^12.0.1", | |
"eslint-config-prettier": "^2.6.0", | |
"eslint-import-resolver-webpack": "^0.8.3", | |
"eslint-plugin-import": "^2.7.0", | |
"eslint-plugin-prettier": "^2.3.1", | |
"lint-staged": "^4.2.3", | |
"pre-commit": "^1.2.2", | |
"prettier": "^1.7.3", | |
"stylelint": "^8.1.1", | |
"stylelint-config-standard": "^17.0.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. I think it's better to use:
"lint-staged": {...}
.package.json
is a file only for dependencies and not for package configurations in my opinion.yarn [run] lint-staged
(It’s also possible to leave out the run in this command, each script can be executed with its name) instead of the"$(yarn bin)/lint-staged"
Can try to use overcommit for the front-end and back-end code, though stylelint support is still not supposed to be done.