From 1f824c897ac3bebeb9fc4e1083d183b5bee75ac7 Mon Sep 17 00:00:00 2001 From: Ville Immonen Date: Thu, 22 Sep 2016 15:58:23 +0300 Subject: [PATCH] Update eslint-plugin-react and enable new rules (#696) * Update eslint-plugin-react and enable new rules New rules: * `react/no-danger-with-children` (yannickcr/eslint-plugin-react#710) * `react/no-find-dom-node` (yannickcr/eslint-plugin-react#678) * `react/style-prop-object` (yannickcr/eslint-plugin-react#715) * Remove react/no-find-dom-node for now --- package.json | 2 +- packages/eslint-config-react-app/index.js | 2 ++ packages/eslint-config-react-app/package.json | 2 +- packages/react-scripts/package.json | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d4180851a97..13869c3f4c6 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "eslint-plugin-flowtype": "2.18.1", "eslint-plugin-import": "1.12.0", "eslint-plugin-jsx-a11y": "2.2.2", - "eslint-plugin-react": "5.2.2", + "eslint-plugin-react": "6.3.0", "lerna": "2.0.0-beta.28" } } diff --git a/packages/eslint-config-react-app/index.js b/packages/eslint-config-react-app/index.js index 81ad2f3d448..c0cfc0ae437 100644 --- a/packages/eslint-config-react-app/index.js +++ b/packages/eslint-config-react-app/index.js @@ -189,11 +189,13 @@ module.exports = { }], 'react/jsx-uses-react': 'warn', 'react/jsx-uses-vars': 'warn', + 'react/no-danger-with-children': 'warn', 'react/no-deprecated': 'warn', 'react/no-direct-mutation-state': 'warn', 'react/no-is-mounted': 'warn', 'react/react-in-jsx-scope': 'warn', 'react/require-render-return': 'warn', + 'react/style-prop-object': 'warn', // https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules 'jsx-a11y/aria-role': 'warn', diff --git a/packages/eslint-config-react-app/package.json b/packages/eslint-config-react-app/package.json index 948ee24dfee..a27d071d5b4 100644 --- a/packages/eslint-config-react-app/package.json +++ b/packages/eslint-config-react-app/package.json @@ -16,6 +16,6 @@ "eslint-plugin-flowtype": "2.18.1", "eslint-plugin-import": "1.12.0", "eslint-plugin-jsx-a11y": "2.2.2", - "eslint-plugin-react": "5.2.2" + "eslint-plugin-react": "6.3.0" } } diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index b6c9c12c4f6..4cb38e12cf4 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -46,7 +46,7 @@ "eslint-plugin-flowtype": "2.18.1", "eslint-plugin-import": "1.12.0", "eslint-plugin-jsx-a11y": "2.2.2", - "eslint-plugin-react": "5.2.2", + "eslint-plugin-react": "6.3.0", "extract-text-webpack-plugin": "1.0.1", "file-loader": "0.9.0", "filesize": "3.3.0",