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 … Read more

How to make Prettier to ignore a block of code?

Sometimes multiple statements can be wrapped in a block with // prettier-ignore in front of it: // prettier-ignore { abcRouter(‘/api/abc’, server); xRouter (‘/api/x’, server); } Of course, that doesn’t make sense for block-level const declarations, but you wrote that was not your actual code and just an example. So that’s a solution that works in … Read more

Disable prettier for a single file

If you want a certain file in a repo to never be formatted by prettier, you can add it to a .prettierignore file: Disable Prettier for one file From the docs: To exclude files from formatting, create a .prettierignore file in the root of your project. .prettierignore uses gitignore syntax. Example: # Ignore artifacts: build … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)