Skip to content

Regression: explicit "allow-in-func" causes validation error #780

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

Closed
brianreavis opened this issue Aug 20, 2016 · 5 comments
Closed

Regression: explicit "allow-in-func" causes validation error #780

brianreavis opened this issue Aug 20, 2016 · 5 comments

Comments

@brianreavis
Copy link

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: 10c6f23

@lencioni
Copy link
Collaborator

lencioni commented Aug 20, 2016

Thanks for the report!

It was likely 376dc53 (#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.

@brianreavis
Copy link
Author

Ah, oops... sorry for the duplicate. Thanks @lencioni!

@causztic
Copy link

causztic commented Sep 1, 2016

Thanks for this!

@alburritos
Copy link

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.

@ljharb
Copy link
Member

ljharb commented Mar 4, 2017

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants