jsx-eslint / eslint-plugin-react

React-specific linting rules for ESLint
MIT License
8.86k stars 2.75k forks source link

Quick question: does `settings.version` default to "detect" yet? #3758

Closed JstnMcBrd closed 1 month ago

JstnMcBrd commented 1 month ago

In the README, it says that sometime in the future, version will default to detect instead of latest.

{
  "settings": {
    "react": {
      // ...
      "version": "detect", // React version. "detect" automatically picks the version you have installed.
                           // You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
                           // It will default to "latest" and warn if missing, and to "detect" in the future
      // ...
    },
    // ...
}

That would be a very useful change! But I don't know how long ago this part of the README was written. Have you already made this update? If not, are you still planning on it?

ljharb commented 1 month ago

Nope, if the change was made the readme would be updated.

This change can’t happen until a semver-major, and i almost never do those. Also, the recommended way to use this plugin is via the Airbnb config which already sets it to detect.

JstnMcBrd commented 1 month ago

I can't find anything in the readme about an airbnb config. Where is it recommended?

ljharb commented 1 month ago

It's not written in the readme, that's true :-) but i recommend it.