Skip to content

Instantly share code, notes, and snippets.

@Arfey
Last active September 9, 2017 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Arfey/989e4a239460cbf95ba61ec32f14314f to your computer and use it in GitHub Desktop.
Save Arfey/989e4a239460cbf95ba61ec32f14314f to your computer and use it in GitHub Desktop.
example.json
{
"lint-staged": {
"*.{js,jsx}": [
"eslint --fix",
"git add"
],
"*.{json,graphql}": [
"prettier --write",
"git add"
],
"*.{css,less,scss,sss}": [
"stylelint --fix",
"git add"
],
"*": [
"cat"
]
},
"scripts": {
"precommit": "lint-staged",
"lint-js": "eslint --ignore-path .gitignore --ignore-pattern \"!**/.*\" .",
"lint-css": "stylelint \"src/**/*.{css,less,scss,sss}\"",
"lint": "yarn run lint-js && yarn run lint-css",
"fix-js": "yarn run lint-js -- --fix",
"fix-css": "yarn run lint-css -- --fix",
"fix": "yarn run fix-js && yarn run fix-css",
"test": "jest",
"test-watch": "yarn run test -- --watch --notify",
"test-cover": "yarn run test -- --coverage",
"coverage": "yarn run test-cover && opn coverage/lcov-report/index.html"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment