diff --git a/react.js b/react.js index 4a0ecd8..a5c095f 100644 --- a/react.js +++ b/react.js @@ -45,7 +45,7 @@ module.exports = { "react/jsx-wrap-multilines": "error", "react/no-danger": "error", - "react/no-danger-with-children": "error", + "react/no-danger-with-children": "off", // https://github.com/yannickcr/eslint-plugin-react/issues/767 "react/no-deprecated": "error", "react/no-did-mount-set-state": "error", "react/no-did-update-set-state": "error", diff --git a/tests/react/react.jsx b/tests/react/react.jsx index f2c34b8..3ee63ae 100644 --- a/tests/react/react.jsx +++ b/tests/react/react.jsx @@ -3,8 +3,10 @@ import React from 'react'; // eslint-disable-line import/no-extraneous-dependenc export default class Foo extends React.Component { render() { + const { name, ...props } = this.props; + return ( -

Hello, ${this.props.name}!

+

Hello, {name}!

); }