Skip to content

Conflicts between ESLint and Prettier #46

Description

@butovsky

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions