-
Notifications
You must be signed in to change notification settings - Fork 10
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
format #342
format #342
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Makes formatting faster by using the cache stored in `node_modules`
Treating formatting as a lint step makes it easier to understand the checks necessary to pass PR approval.
I am not sure how to get prettier one to pass given that is gone... |
@@ -15,8 +15,9 @@ | |||
"scripts": { | |||
"build": "remix vite:build", | |||
"dev": "remix vite:dev", | |||
"format": "prettier --write .", | |||
"format": "prettier --cache --write .", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you notice some performance issues without --cache
?
"lint": "eslint . .*js --max-warnings 0", | ||
"lint:format": "prettier --cache --check .", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way I like to set up projects in general is lint:*
scripts report you of violations and format:*
scripts auto-fix said violations (as much as possible). I didn't set up this repo, but it seems to be done somewhat similarly. So here lint:format
is a little contradicting to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Personally, I consider formatting to be a sibling to linting, not a sub-concern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, that makes sense. I also did not notice significant speed increase, so I will close this.
PR Checklist
status: accepting prs
Overview
First commit makes subsequent format command faster for local development.
I am happy to remove second commit, but I think it makes it more clear that you need to have proper formatting to pass linting. I also thinks it more clear that prettier is just a formatter, and there are others :)
🐢