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

refactor: configure prettier and eslint, run --write against src files #309

Merged
merged 1 commit into from
May 27, 2022

Conversation

tomjeatt
Copy link
Collaborator

@tomjeatt tomjeatt commented May 26, 2022

This PR adds prettier, and removes conflicting es-lint rules, e.g. the ones which related to formatting. I've also autofixed everything (which is why the PR is so huge!).

This follows the standard convention of prettier for formatting and eslint for code quality (I've left all of those eslint rules as they were).

There was already a prettier config in the project so I've used that. Other than that I don't want to move away from the defaults; Prettier is opinionated and that's what makes it easier to use, especially as the dev team grows.

We may want to add additional plugins (e.g. sort order) but they can be done as smaller tasks. Priority is to get the basics in now so we can get our PRs done faster.

@vercel
Copy link

vercel bot commented May 26, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
interbtc-ui-interlay ✅ Ready (Inspect) Visit Preview May 26, 2022 at 3:32PM (UTC)
interbtc-ui-kintsugi ✅ Ready (Inspect) Visit Preview May 26, 2022 at 3:32PM (UTC)
interbtc-ui-testnet ✅ Ready (Inspect) Visit Preview May 26, 2022 at 3:32PM (UTC)

@tomjeatt tomjeatt marked this pull request as draft May 26, 2022 15:38
Copy link
Contributor

@crypto-engineer crypto-engineer left a comment

Choose a reason for hiding this comment

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

LGTM

@crypto-engineer
Copy link
Contributor

@tomjeatt
One thing. The other day, I suggested integrating eslint-plugin-simple-import-sort. In my experience, it's worth having it since it helps maintain import order in a consistent way.
Actually, the other day, I discussed with @peterslany about this issue.

@tomjeatt
Copy link
Collaborator Author

@tomjeatt One thing. The other day, I suggested integrating eslint-plugin-simple-import-sort. In my experience, it's worth having it since it helps maintain import order in a consistent way. Actually, the other day, I discussed with @peterslany about this issue.

Hi Anton, yes totally agree (it's mentioned in the PR description) but want to get this one wrapped up today as it's been in the backlog for a while - adding the sort order plugin and then running fix should be very straightforward.

@tomjeatt tomjeatt marked this pull request as ready for review May 27, 2022 07:18
@tomjeatt tomjeatt merged commit e7453ee into master May 27, 2022
@tomjeatt tomjeatt deleted the tom/linting-prettier-config branch May 27, 2022 07:29
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

2 participants