FFFF Introduce Prettier to format JavaScript and CSS files by jdufresne · Pull Request #1338 · django-commons/django-debug-toolbar · GitHub
Skip to content

Introduce Prettier to format JavaScript and CSS files - #1338

Closed
jdufresne wants to merge 1 commit into
django-commons:masterfrom
jdufresne:prettier
Closed

Introduce Prettier to format JavaScript and CSS files#1338
jdufresne wants to merge 1 commit into
django-commons:masterfrom
jdufresne:prettier

Conversation

@jdufresne

Copy link
Copy Markdown
Contributor

Prettier is an opinionated formatting tool for JavaScript and CSS.
Similar to how Black is for Python, Prettier automates all formatting
decisions for JS and CSS files, thus eliminating differences in
preferences. Contributors can use "make style" just like before to
restyle files.

@tim-schilling tim-schilling left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this!

@tim-schilling tim-schilling left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't notice that Travis broke on the style test. Sorry for the extra email.

@jdufresne

Copy link
Copy Markdown
Contributor Author

I'm a bit confused why this fails on Travis. I do not get the same error when running locally. Any ideas?

@tim-schilling

Copy link
Copy Markdown
Member

Hmm, the additional logging was eaten somewhere. I can't reproduce this locally with node 12.16.2 that Travis claims to use.

@jdufresne

Copy link
Copy Markdown
Contributor Author

Ah ok. This is failing because Travis runs an old version of node.js, but prettier requires 10+. I'll see what our options are here.

@jdufresne

Copy link
Copy Markdown
Contributor Author

I have updated the Travis dist to bionic, green again 🙂 .

@tim-schilling

tim-schilling commented Sep 26, 2020 via email

Copy link
Copy Markdown
Member

@matthiask

Copy link
Copy Markdown
Member

Thanks, this is awesome! I didn't merge this yet because of all the pull requests in flight. Let's merge this when things have calmed down a bit :-)

Prettier is an opinionated formatting tool for JavaScript and CSS.
Similar to how Black is for Python, Prettier automates all formatting
decisions for JS and CSS files, thus eliminating differences in
preferences. Contributors can use "make style" just like before to
restyle files.
@matthiask

Copy link
Copy Markdown
Member

I've cherry-picked this change and re-run prettier on the current code in master. The code change is still attributed to you @jdufresne (as it should be) Thanks!

@matthiask matthiask closed this Oct 2, 2020
@jdufresne
jdufresne deleted the prettier branch October 2, 2020 09:52
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

Successfully merging this pull request may close these issues.

3 participants