-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Update eslint-plugin-react and enable new rules #696
Conversation
New rules: * `react/no-danger-with-children` (jsx-eslint/eslint-plugin-react#710) * `react/no-find-dom-node` (jsx-eslint/eslint-plugin-react#678) * `react/style-prop-object` (jsx-eslint/eslint-plugin-react#715)
I also considered the new no-unused-prop-types rule, but wasn't sure if it would be a good fit here. Any thoughts on it @gaearon? |
I think no-find-dom-node is a bit too early for this kit right now. It's okay for more mature setups but I'm worried beginners will copy and paste examples from StackOveflow and be confused by this warning. I'm open to adding it in a year or so. |
Alright, I removed |
Exactly. (I'd appreciate if somebody did that.) |
Is Travis acting up? |
Uh, it installs |
e2e script should use current versions of all packages, not ones from npm. Can we make it do that? Maybe need to run lerna bootstrap or whatever? |
I’m going to trust that this works but we need to figure out the e2e fix for this. |
* Update eslint-plugin-react and enable new rules New rules: * `react/no-danger-with-children` (jsx-eslint/eslint-plugin-react#710) * `react/no-find-dom-node` (jsx-eslint/eslint-plugin-react#678) * `react/style-prop-object` (jsx-eslint/eslint-plugin-react#715) * Remove react/no-find-dom-node for now
Some new rules had been added that are a good fit for this project. All of these are either already runtime warnings in React (no-danger-with-children, style-prop-object) or React features that are going to be deprecated in the future (no-find-dom-node). The new rules:
react/no-danger-with-children
(Rule proposal: prevent both children and dangerouslySetInnerHTML at the same time jsx-eslint/eslint-plugin-react#710)react/no-find-dom-node
(Rule proposal: warn against using findDOMNode() jsx-eslint/eslint-plugin-react#678)react/style-prop-object
(Rule proposal: ensure style prop on DOM element tags is an object jsx-eslint/eslint-plugin-react#715)