From a75190a6b01443b9a3d92842abfbb262750bb974 Mon Sep 17 00:00:00 2001 From: Brandon Mills Date: Mon, 15 Aug 2016 11:27:00 -0400 Subject: [PATCH] Disable react/no-danger-with-children Waiting on a fix for [yannickcr/eslint-plugin-react#767](https://github.com/yannickcr/eslint-plugin-react/issues/767) --- react.js | 2 +- tests/react/react.jsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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}!

); }