-
Notifications
You must be signed in to change notification settings - Fork 207
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
add format check to validate #65
base: main
Are you sure you want to change the base?
Conversation
src/scripts/validate.js
Outdated
@@ -18,6 +18,7 @@ const useDefaultScripts = typeof validateScripts !== 'string' | |||
const scripts = useDefaultScripts | |||
? { | |||
build: ifScript('build', 'npm run build --silent'), | |||
format: precommit ? null : ifScript('format', 'npm run format --list-different'), |
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.
This should be: npm run format -- --list-different
otherwise the --list-different
arg will be passed to npm.
Thanks!
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.
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.
Thanks!
Hmm... Do you know why that script is failing? If I try to run it locally on master I don't get a failure. It's odd that it doesn't log what files are causing the failure :-/ |
Not sure, can't access the debug logs either |
Not sure if this is needed? The eslint config is using eslint-plugin-prettier, which should report any formatting errors. |
Actually all that does is disable formatting rules which is what we want. I don't want ESLint errors for things prettier will fix automatically. It's super annoying to get red underlines for things I don't need to do anything about. |
1 similar comment
Actually all that does is disable formatting rules which is what we want. I don't want ESLint errors for things prettier will fix automatically. It's super annoying to get red underlines for things I don't need to do anything about. |
It is true that you wouldn't need this for Javascript if you added eslint-config-prettier and added the |
Agreed. I definitely want this 👍 |
Fixes #64
What:
Why:
How:
Checklist: