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

chore(v2): fix ignore paths and Prettier commands in themes #3865

Merged
merged 3 commits into from
Dec 3, 2020

Conversation

Simek
Copy link
Contributor

@Simek Simek commented Dec 2, 2020

Motivation

It looks like after latest addition of lib-next and some other changes Prettier started to format unnecessary files.

Screenshot 2020-12-02 133719

This PR rewrites the .prettierignore path into more universal format and adds --ignore-path flag to the Prettier command in themes, so the ignores defined in .prettierignore are respected.

Have you read the Contributing Guidelines on pull requests?

Yes.

Test Plan

Local run of:

  • yarn prettier
  • yarn --cwd ./packages/docusaurus-theme-bootstrap build
  • yarn lint

Related PRs

No.

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 2, 2020
@netlify
Copy link

netlify bot commented Dec 2, 2020

Deploy preview for docusaurus-2 ready!

Built without sensitive environment variables with commit 22b8a4e

https://deploy-preview-3865--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Dec 2, 2020

Size Change: +18 B (0%)

Total Size: 157 kB

ℹ️ View Unchanged
Filename Size Change
website/build/blog/2017/12/14/introducing-docusaurus/index.html 20.7 kB -2 B (0%)
website/build/docs/introduction/index.html 180 B 0 B
website/build/index.html 5.84 kB 0 B
website/build/main.********.js 113 kB +20 B (0%)
website/build/styles.********.css 17.5 kB 0 B

compressed-size-action

.prettierignore Outdated
packages/docusaurus/lib/
packages/docusaurus-init/lib/
packages/docusaurus-plugin-client-redirects/lib/
packages/docusaurus-*/lib/
Copy link
Collaborator

@slorber slorber Dec 2, 2020

Choose a reason for hiding this comment

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

I think it won't work for the v1 package? (uncompiled nodejs code)

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For this is responsible .gitignore, which do not include v1 lib. I can update .gitignore too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, you mean the change should NOT exclude the files from v1 lib, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2020-12-02 205904

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/facebook/docusaurus/pull/3865/files#diff-a0fdacd2ade87c5238dde44378f574f7e123e669acdf8b740878b14b33b20275R15

This line in ignores deals with that, so Prettier and other tools will ignore all docusuaurs-*/libs but not the docusuaurs-1.x/lib.

@github-actions
Copy link

github-actions bot commented Dec 2, 2020

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 91
🟢 Accessibility 99
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-3865--docusaurus-2.netlify.app/classic/

@Simek Simek changed the title chore(v2): fix Prettier ignore paths and commands in themes chore(v2): fix ignore paths and Prettier commands in themes Dec 3, 2020
@slorber slorber added the pr: maintenance This PR does not produce any behavior differences to end users when upgrading. label Dec 3, 2020
@slorber slorber merged commit f37987f into facebook:master Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: maintenance This PR does not produce any behavior differences to end users when upgrading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants