Prettier and eslint indents not working together Prettier and eslint indents not working together typescript typescript

Prettier and eslint indents not working together


As per this Kai Cataldo's comment on this GitHub issue:

ESLint's indent rule and Prettier's indentation styles do not match - they're completely separate implementations and are two different approaches to solving the same problem ("how do we enforce consistent indentation in a project").

Therefore, when using prettier, you'd better disable eslint's indent rule. It's guaranteed that they will clash.


in eslintrc add indent: [2, 2, { SwitchCase: 1}]