-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning: React version not specified in eslint-plugin-react settings. #1955
Comments
(linking to your comment here: #1857 (comment)) |
Just because there's a default doesn't mean you shouldn't always be providing an explicit value. Repeating #1857 (comment):
|
Yes, it's true. For the moment, I use this workaround: |
+1 for supporting |
Yeah please I don't want to update this config each time a new react comes out |
You have to update your package.json every time that happens; I’m not sure also updating eslintrc is much harder. |
Yeaaah... I don't have it in a package.json, I have it in the eslint config shared for the team, and each time I would have to upgrade deps, update by hand, publish a new version of the tool. Most importantly, I upgrade my dependencies using |
We also use a shared eslint config and this would make it quite annoying every upgrade. If "latest" isn't supported, everyone's just gonna use "999.999.999" instead, which could lead to issues in the future if this plugin assumes that property contains their actual React version |
Well, I use I'm using |
Comment removed and new issue created: #1963 |
@bhardy that seems like a different issue; if you have the settings object with a react version you shouldn't get a warning at all. |
@ljharb would you like me to create a new issue? |
@bhardy yes please :-) |
This is the best behavior so people have seamless upgrades to new React majors. This is probably a terrible default and warning from the ESLint plugin, and we need to wait for jsx-eslint/eslint-plugin-react#1955 before changing this hardcoded behavior. Closes facebook#5034
This is the best behavior so people have seamless upgrades to new React majors. This is probably a terrible default warning from the ESLint plugin, and we need to wait for jsx-eslint/eslint-plugin-react#1955 before changing this hardcoded behavior. Closes facebook#5034
I tried |
@mohsinulhaq it would be more explicit than relying on React never hitting v999 |
but there is no downside of using |
The downside would be a lack of explicit configuration with respect to which React version you’re using, i suppose. |
This is the best behavior so people have seamless upgrades to new React majors. This is probably a terrible default warning from the ESLint plugin, and we need to wait for jsx-eslint/eslint-plugin-react#1955 before changing this hardcoded behavior. Closes facebook#5034
I think this is an important bug. There are editor plugins that rely on exit code and stdout of As a formatter, |
@anilanar Even when the version is filled the warning appears with |
|
Fix the warning of React version not speicifed in eslint-plugin-react settings. See also: - jsx-eslint/eslint-plugin-react#1955
Fix the warning of React version not speicifed in eslint-plugin-react settings. See also: - jsx-eslint/eslint-plugin-react#1955
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Simply need to write exact version of react you re using .. |
@daryazata it supports "detect", so you shouldn't have to do that. |
For people using .yml instead of ...
settings:
react:
version: "detect" |
@juliehchung try running eslint on the command line. if it works, then the problem is in your editor; if not, then please file a new issue, ideally with a repro repo. |
Do you mind elaborating what you mean by this? The same warning still pops up when running eslint via the cli, but it will still run without errors. |
I mean running If the same warning pops up, then I'd love a new issue with a repro repo :-) |
Submitted here #3438 |
- eslint-import-resolver-typescript - eslint-plugin-flowtype - eslint-plugin-import 2. stop eslint from nagging react version not specified jsx-eslint/eslint-plugin-react#1955 (comment) 3. remove redundant eslint config and rules 4. use popular recommended setting for easier config management and modern practices
- eslint-import-resolver-typescript - eslint-plugin-flowtype - eslint-plugin-import 2. stop eslint from nagging react version not specified jsx-eslint/eslint-plugin-react#1955 (comment) 3. remove redundant eslint config and rules 4. use popular recommended setting for easier config management and modern practices
This is the best behavior so people have seamless upgrades to new React majors. This is probably a terrible default warning from the ESLint plugin, and we need to wait for jsx-eslint/eslint-plugin-react#1955 before changing this hardcoded behavior. Closes facebook#5034
This is the best behavior so people have seamless upgrades to new React majors. This is probably a terrible default warning from the ESLint plugin, and we need to wait for jsx-eslint/eslint-plugin-react#1955 before changing this hardcoded behavior. Closes #5034
Hello,
Since I've updated this plugin, i've got a message like
Warning: React version not specified in eslint-plugin-react settings.
.This is true, I didn't specify the version of react, and this happens due to 8738e59#diff-4e51c5c91adee02670adaca34f7fd7fdR17
However, when I read the doc, I've got this:
"version": "15.0", // React version, default to the latest React stable release
It's said "by default, it uses the latest version of react".
So why displaying a warning if there's a default and this is what I want? as I keep my react often upgraded.
The text was updated successfully, but these errors were encountered: