Skip to content

Conversation

@RaminMammadzada
Copy link

@RaminMammadzada RaminMammadzada commented Feb 27, 2021

In .eslintrc.json file when "prettier/react" is included, it gives an error below:
ESLint: 7.20.0 Error: Cannot read config file: ...../node_modules/eslint-config-prettier/react.js

As it is noted in Version 8.0.0 (2021-02-21) of eslint-config-prettier, there is not need to write the specific library extend name for prettier.

So, instead of this;

"extends": [
    "eslint:recommended",
    "plugin:import/errors",
    "plugin:react/recommended",
    "plugin:jsx-a11y/recommended",
    "prettier",
    "prettier/react"
  ]

we must write like that;

"extends": [
    "eslint:recommended",
    "plugin:import/errors",
    "plugin:react/recommended",
    "plugin:jsx-a11y/recommended",
    "prettier"
  ]

Referance:
https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant