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

[core] Align prettier tooling with main repository #24

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

oliviertassinari
Copy link
Member

The only difference left is the print width, as detailed in #6, which would be better to handle in a follow-up pull request, to make this one easier to review.

Regarding Lodash, we might want to ignore the prettier update coming from it, until we remove it from the source: #7.

@dtassone
Copy link
Member

Prettier currently run with lint that's why there is no individual script
you do a yarn lint it applies linting and prettier

Also we exclude /lib as it contains vendor libraries so lint there

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Jun 18, 2020

you do a yarn lint it applies linting and prettier

I wasn't aware that this was possible. It seems to be documented in https://prettier.io/docs/en/integrating-with-linters.html#use-eslint-to-run-prettier. Cool, I have learned something.

Going back to my previous point on sync all the tooling between https://github.com/mui-org/material-ui, https://github.com/mui-org/material-ui-x, and https://github.com/mui-org/material-ui-pickers. In our case, I think that core's approach has the benefit of:

  • Formating markdown and JSON formats (you can see the JSON diffs in this pull request).
  • Only formating the files that changed since your last iteration (compared to the baseline git branch). As the codebase will grow, eslint will be too slow to run after each pull request in the local env, to format it before running the CI. Try doing that on the core repository to experience the issue (takes 1m+ time yarn lint).

@oliviertassinari oliviertassinari force-pushed the run-prettier branch 3 times, most recently from a7b2a23 to b03823c Compare June 22, 2020 10:11
@oliviertassinari
Copy link
Member Author

oliviertassinari commented Jun 22, 2020

Ok, this time, we should be good. I have manually listed the lib folders so it gives us an extra incentive to progressively remove them.

@oliviertassinari
Copy link
Member Author

@dtassone I have updated prettier to lint the JSON and Markdown at the same time.

@oliviertassinari oliviertassinari merged commit d4ad680 into master Jun 25, 2020
@oliviertassinari oliviertassinari deleted the run-prettier branch June 25, 2020 13:22
@oliviertassinari oliviertassinari added the component: data grid This is the name of the generic UI component, not the React module! label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants