Versions:
prettier-eslint version: 4.7.1node version: v10.5.0npm (or yarn) version: 6.4.1Have you followed the debugging tips?
Yes
Relevant code or config
{
"extends": ["prettier"],
"settings": {
"react": {
"pragma": "React",
"version": "16.5.2"
}
},
"rules": {
"multiline-comment-style": ["off"],
"no-warning-comments": ["off"],
"react/jsx-filename-extension": ["off"],
"react/jsx-first-prop-new-line": ["off"],
"react/jsx-max-props-per-line": ["off"],
"quotes": ["error", "single", { "avoidEscape": true }]
}
}
What I did:
I have configured my package.json scripts with a formatting script as shown below:
"format": "prettier-eslint.cmd --write \"src/**/*.js\" --log-level trace",
What happened:
When attempting to run the formatting script, I receive the following warning:
Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration.
Reproduction repository:
Unfortunately I cannot create this repository as my proxy disallows the ability to create public Git repositories, though I may be able to provide this later on.
Problem description:
After following the instructions provided in the warning (as shown in my .eslintrc.json above) and including the version of React which I am currently utilizing the warning still pops up. I have confirmed that this shoudl work by performing a trace which displays that the version _is_ being appropriately picked up by prettier-eslint:

Suggested solution:
Not sure, as I do not receive this error when simply performing an eslint on the files directly.
@cjones26 You are using a pretty old version (4.7.1), although I have the same issue here. Did you fixed your problem ?
Version used :
"devDependencies": {
"babel-eslint": "10.0.1",
"babel-preset-flow": "6.23.0",
"eslint": "5.6.1",
"eslint-config-google": "0.10.0",
"eslint-config-prettier": "3.1.0",
"eslint-plugin-flowtype": "2.50.3",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-jsx-a11y": "6.1.1",
"eslint-plugin-prettier": "3.0.0",
"eslint-plugin-react": "7.11.1",
"prettier": "1.14.3",
"prettier-eslint": "8.8.2",
"prettier-eslint-cli": "4.7.1",
"pretty-quick": "1.7.0"
}
@thetoine -- I have not yet been able to fix the problem, unfortunately.
Same issues here. I have set react version but prettier keep saying that it's not
"Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration."
I'm using latest version of "prettier-eslint-cli": "^4.7.1" and with that "prettier-eslint": "8.8.2""
I have the same issue and context.settings is an empty object here: https://github.com/yannickcr/eslint-plugin-react/blob/master/lib/util/version.js#L14
:tada: This issue has been resolved in version 9.0.0 :tada:
The release is available on:
npm package (@latest dist-tag)Your semantic-release bot :package::rocket:
Most helpful comment
Same issues here. I have set react version but prettier keep saying that it's not
"Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration."
I'm using latest version of "prettier-eslint-cli": "^4.7.1" and with that "prettier-eslint": "8.8.2""