Skip to content

Instantly share code, notes, and snippets.

@greetclock
Last active July 13, 2022 07:51
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 greetclock/701439502256b9b02f17e9e1c35e493f to your computer and use it in GitHub Desktop.
Save greetclock/701439502256b9b02f17e9e1c35e493f to your computer and use it in GitHub Desktop.
// Full example
// https://github.com/greetclock/parts/blob/3eec90/package.json#L81-L89
{
"lint-staged": {
// JS and TS files go through ESLint first and then through prettier
"**/*.{js,ts}": [
"eslint --fix",
"prettier --write --ignore-unknown"
],
// other files in the project are unknown to ESLint, so we use prettier only.
// Most commonly it's JSON, CSS, HTML files
"**/*": [
"prettier --write --ignore-unknown"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment