Although I had configured Prettier and ESLint, I still need to add this rule in .eslintrc to have single quotes and no semicolon.
'prettier/prettier': ['error', { singleQuote: true, semi: false }],
If I remove this part { singleQuote: true, semi: false }, the editor will yell when I use single quotes or no semicolon.
{ singleQuote: true, semi: false }
This is my .prettierrc:
module.exports = { semi: false, trailingComma: 'es5', singleQuote: true, printWidth: 100, tabWidth: 2, }
This is my .eslintrc extends:
extends: [ 'airbnb', 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended', 'prettier/@typescript-eslint', 'plugin:prettier/recommended', ],
According to this article prettier.io/docs/en/integrating-wi..., those 2 above should be enough.
Do you know why?
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Although I had configured Prettier and ESLint, I still need to add this rule in .eslintrc to have single quotes and no semicolon.
If I remove this part
{ singleQuote: true, semi: false }
, the editor will yell when I use single quotes or no semicolon.This is my .prettierrc:
This is my .eslintrc extends:
According to this article prettier.io/docs/en/integrating-wi..., those 2 above should be enough.
Do you know why?