For the no-did-mount-set-state, no-did-update-set-state rules:
Configuration for rule "react/no-did-mount-set-state" is invalid:
Value "allow-in-func" must be an enum value.
Referenced from: .eslintrc
at validateRuleOptions (node_modules/eslint/lib/config/config-validator.js:115:15)
at /Users/node_modules/eslint/lib/config/config-validator.js:162:13
at Array.forEach (native)
at Object.validate (node_modules/eslint/lib/config/config-validator.js:161:35)
at load (node_modules/eslint/lib/config/config-file.js:522:19)
at node_modules/eslint/lib/config/config-file.js:391:36
at Array.reduceRight (native)
at applyExtends (node_modules/eslint/lib/config/config-file.js:362:28)
at Object.load (node_modules/eslint/lib/config/config-file.js:529:22)
at loadConfig (node_modules/eslint/lib/config.js:63:33)
The commit that breaks it: https://github.com/yannickcr/eslint-plugin-react/commit/10c6f23866b58dff5a7f8d16eb8b8a62cc997a66
Thanks for the report!
It was likely 376dc53656f78059fb405d9e30c2f402717f6882 (#702) that broke this for you. This option is the default as of 6.0.0 and was removed in favor of a disallow-in-func option, which you can see in the changelog: https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#600---2016-08-01
This has been discussed in #760 and #734.
Ah, oops... sorry for the duplicate. Thanks @lencioni!
Thanks for this!
What's the fix for this then? I have [2, "disallow-in-func"] and it's giving me a
Configuration for rule "react/no-did-mount-set-state" is invalid:
Value "allow-in-func" must be an enum value.
@alberth8 if that doesn't work, you may not have a new enough version of the plugin installed, or you may not have restarted Atom.
Most helpful comment
Thanks for the report!
It was likely 376dc53656f78059fb405d9e30c2f402717f6882 (#702) that broke this for you. This option is the default as of 6.0.0 and was removed in favor of a
disallow-in-funcoption, which you can see in the changelog: https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#600---2016-08-01This has been discussed in #760 and #734.