2

Can't view page because of error message:

enter image description here

Negligible prettier errors are blocking the page itself, how do i disable this feature? Current setup:

.prettierrc

{
  "printWidth": 120,
  "trailingComma": "all",
  "tabWidth": 2,
  "semi": false,
  "singleQuote": true,
  "endOfLine": "auto"
}

.eslintrc.json

{
"parserOptions": {
  "ecmaVersion": 2018,
  "sourceType": "module",
  "ecmaFeatures": {
    "jsx": true
  }
},
"extends": [
  "airbnb-base",
  "plugin:prettier/recommended",
  "prettier/react"
],
"env": {
  "es6": true, 
  "browser": true
},
"plugins": [
  "prettier"
],
"rules": {
  "prettier/prettier": ["error", {
    "endOfLine": "auto"
  }]
}
}
castlenibill
  • 448
  • 1
  • 6
  • 14
  • May be you can try [this](https://stackoverflow.com/questions/58424718/how-can-i-disable-the-error-prettier-prettier-on-eslint), which will disable the prettier – kunquan Nov 28 '20 at 11:18

1 Answers1

0

I would sugggest you to configure your environment to formatOnSave, then your prettier errors would be fixed right away. you don't have to bother to remove some silly typing errors while maintaining your code quality. if you use vscode you can install eslint extension and configure at your .vscode workspace settings, or globally:

{
  "eslint.validate": [ "javascript", "html"],

  "eslint.options": {
    "extensions": [".js", "html"]
  },
  "editor.formatOnSave": true,
  "files.trimFinalNewlines": true,
  "files.trimTrailingWhitespace": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true,
  }
}
buzatto
  • 9,704
  • 5
  • 24
  • 33