Just a simple wrapper around Prettier & Standard with auto-fix enabled.
- Simplify
package.jsonuse - Filter non-
jsfile extensions fromstandard, thinksjsonisjs
npm i -D prettier-standard-cliprettier 'styles/*.{json,js}'standard 'src/*.js'prettier-standard 'src/**/*.{css,json,js}'
{
"devDependencies": {
"lint-staged":"*",
"husky":"*",
"prettier-standard-cli":"*"
},
"scripts": {
"precommit":"lint-staged",
"lint": "prettier-standard 'src/**/*.{css,json,js}'",
},
"lint-staged": {
"src/**/*.{css,json,js}": [
"prettier-standard",
"git add"
]
}
}{
"devDependencies": {
"lint-staged":"*",
"husky":"*",
"prettier":"*",
"standard":"*"
},
"scripts": {
"precommit":"lint-staged",
"lint": "prettier --write --loglevel warn 'src/**/*.{css,json,js}' && standard --fix 'src/**/*.js'",
},
"lint-staged": {
"src/**/*.{css,json}": [
"prettier --write",
"git add"
],
"src/**/*.js": [
"prettier --write",
"standard --fix",
"git add"
]
}
}This project is licensed under the MIT License - see the LICENSE file for details
- sheerun/prettier-standard for the insperation
