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

AG-11598 - Add prettier #7980

Merged
merged 6 commits into from
May 20, 2024
Merged

AG-11598 - Add prettier #7980

merged 6 commits into from
May 20, 2024

Conversation

taktran
Copy link
Member

@taktran taktran commented May 17, 2024

Allow prettier to run on all the files (ignoring most of the repo that has not been formatted yet)

nx format:check --all
# Runs without error

Or for specific projects

nx format:check --projects [projects]

# eg,
nx format:check --projects ag-grid-docs

To auto fix prettier issues (may need to remove from .prettierignore if the file/folder is in there)

nx format:write --all
nx format:write --projects ag-grid-docs

Also formats on save in VS Code (respecting the .pretterignore file)

Changes

  • Format ag-grid-docs + some root files
  • Add .prettierignore file to ignore most of the repo, so prettier can run on the root level
  • Move .prettierrc from ag-grid-docs to the root level
  • Add .git-blame-ignore-revs to ignore prettier fixes in git blame - see how to exclude commits in blame
  • Add format on save for VS Code (does not apply to folders in .prettierignore)

Future work

  • Prettier-fy all files - can remove from .prettierignore as we go

@taktran taktran merged commit 369f62f into latest May 20, 2024
@taktran taktran deleted the AG-11598-prettier branch May 20, 2024 09:24
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.

None yet

1 participant