Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
"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",
"git add"
"frontend/**/*.js": [
"prettier --write",
"git add"
"frontend/**/*.css": [
"prettier --write",
"stylelint --fix",
"git add"
"pre-commit": [
"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"
Copy link

vill commented Dec 7, 2017

Hi. I think it's better to use:

  1. .lintstagedrc instead of the block "lint-staged": {...}. package.json is a file only for dependencies and not for package configurations in my opinion.
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment