Open andriilive opened 6 months ago
Current format:write script command code violates DRY principles 😿
format:write
An example of duplicated prettier command code from package.json:
prettier
package.json
"format": "prettier \"**/*.{css,js,json,jsx,ts,tsx}\"", "format:write": "prettier --write \"**/*.{css,js,json,jsx,ts,tsx}\""
"format": "prettier \"**/*.{css,js,json,jsx,ts,tsx}\"", "format:write": "npm run format -- --write"
--cache
"format": "prettier --cache \"**/*.{css,js,json,jsx,ts,tsx}\"", "format:write": "npm run format -- --write"
Current
format:write
script command code violates DRY principles 😿An example of duplicated
prettier
command code frompackage.json
:Improved script 👉🏻 https://github.com/steven-tey/precedent/pull/76
Common example
Prettier with
--cache