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

Conflicts between ESLint and Prettier #46

Closed
butovsky opened this issue Sep 15, 2022 · 0 comments
Closed

Conflicts between ESLint and Prettier #46

butovsky opened this issue Sep 15, 2022 · 0 comments

Comments

@butovsky
Copy link

butovsky commented Sep 15, 2022

Current plugins in ESLint have the no-mixed-spaces-and-tabs rule. If this rule isn't followed in the code, the error is thrown.
image

However, even after fixing it manually, yarn prettier --write returns it to the previous state.
Thus, we are never able to lint the code locally and to send it then to the repo without any possible ESlint errors.

Possible workaround:

Override the rule. (not recommended, because there can be another conflicts in the future)

Wait until #44 is resolved and the consistent coding style is accepted. (may take too long)

  1. Remove Prettier entirely (can be replaced with some consistent styling after [DOCUMENTATION] Coding style guidelines for contributions #44, I've proposed Airbnb here);
  2. Create separate script like npm run lint:fix, which will invoke the ESlint with the argument --fix;
  3. Basic npm run lint will be used for the checks in pipelines - see [ENHANCEMENT] Implement Linting and automate Testing on Pull Request #43.

I guess this issue can be a great and non-painful way to start the whole linting enhancement.

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

No branches or pull requests

2 participants