Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve format:write script #78

Open
andriilive opened this issue Dec 28, 2023 · 0 comments
Open

Improve format:write script #78

andriilive opened this issue Dec 28, 2023 · 0 comments

Comments

@andriilive
Copy link

Current format:write script command code violates DRY principles 😿

An example of duplicated prettier command code from package.json:

"format": "prettier \"**/*.{css,js,json,jsx,ts,tsx}\"",
"format:write": "prettier --write \"**/*.{css,js,json,jsx,ts,tsx}\""

Improved script 👉🏻 #76

Common example

"format": "prettier \"**/*.{css,js,json,jsx,ts,tsx}\"",
"format:write": "npm run format -- --write"

Prettier with --cache

"format": "prettier --cache \"**/*.{css,js,json,jsx,ts,tsx}\"",
"format:write": "npm run format -- --write"
@andriilive andriilive changed the title package.json: Improve format:write script Improve format:write script Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant