You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Config located in eslint-config-airbnb/rules/react.js consists of following lines:
react: {
pragma: 'React',
version: '16.0'
},
in the settings section, setting explicitely the react version.
Meanwhile, in the new release of eslint-plugin-react (v 7.12.0), the jsx-fragments rule was introduced which enforces <> syntax instead of <React.Fragment>. However, for this rule to work you need to have a React version set to at least 16.2. As an effect, airbnb settings causes my config to throw error even though I have a correct react version but I don't have it set in settings section of my eslintrc (because defaults are provided by eslint-plugin-react).
Solution to that would be to use the detect option for version which was also introduced in 7.12.0 of eslint-plugin-react.
The text was updated successfully, but these errors were encountered:
That is certainly something we are likely to change in a future version of this config. However, the current situation is that you should always be explicitly specifying your React version in your config; so for now, you can explicitly specify “detect” if you wish.
Config located in
eslint-config-airbnb/rules/react.js
consists of following lines:in the
settings
section, setting explicitely the react version.Meanwhile, in the new release of
eslint-plugin-react
(v7.12.0
), thejsx-fragments
rule was introduced which enforces<>
syntax instead of<React.Fragment>
. However, for this rule to work you need to have a React version set to at least16.2
. As an effect, airbnb settings causes my config to throw error even though I have a correct react version but I don't have it set insettings
section of myeslintrc
(because defaults are provided byeslint-plugin-react
).Solution to that would be to use the
detect
option forversion
which was also introduced in7.12.0
ofeslint-plugin-react
.The text was updated successfully, but these errors were encountered: