-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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 prettier formatting for www #29768
Add prettier formatting for www #29768
Conversation
c884366
to
c82b6d6
Compare
@@ -0,0 +1,10 @@ | |||
{ |
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 is necessary because prettier is otherwise using the default config in .editorconfig
that will format with an indent size of 4 json files.
.mypy_cache/ | ||
templates/**/*.html | ||
dist/ | ||
*.md |
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.
Don't prettier format yaml and md. Those are handled by other dedicated pre-commit hook.
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.
Looking good! Let's update the contributing documentation too.
8a18ac3
to
8d549ef
Compare
8d549ef
to
40dfa42
Compare
(Kicking this to 2.6, a ton of churn for no functional differences) |
Issue:
Formatting with eslint is too permissive. 2 different formatting style can be considered 'valid' for eslint but quite different in practice. Also formatting with eslint is not the most common so switching for prettier might be helpful. (most front-end dev have their IDE already working with prettier)
Solution:
This introduce an opinionated formatter to have better consistency in our front-end code base.
eslint
configstylelint
config