Repository: yannickcr/eslint-plugin-react (js)

Issue:
no-deprecated - React.addons.TestUtils doesn't create a warning
When using `React.addons.TestUtils` a warning should be thrown, since the addons entry point is deprecated as of **15.5.0** (as per the [official documentation](https://reactjs.org/docs/addons.html))

The error that should be thrown is:
**React.addons.TestUtils is deprecated since React 15.5.0, use ReactDOM.TestUtils instead.**


Pull request description:
Adding a warning for React.addons.TestUtils.
This pull request fixes #1644.

Patch:
diff --git a/lib/rules/no-deprecated.js b/lib/rules/no-deprecated.js
index 78ae1c81..6e8c88e2 100644
--- a/lib/rules/no-deprecated.js
+++ b/lib/rules/no-deprecated.js
@@ -69,6 +69,7 @@ module.exports = {
       deprecated['Perf.getMeasurementsSummaryMap'] = ['15.0.0', 'Perf.getWasted'];
       // 15.5.0
       deprecated[`${pragma}.createClass`] = ['15.5.0', 'the npm module create-react-class'];
+      deprecated[`${pragma}.addons.TestUtils`] = ['15.5.0', 'ReactDOM.TestUtils'];
       deprecated[`${pragma}.PropTypes`] = ['15.5.0', 'the npm module prop-types'];
       // 15.6.0
       deprecated[`${pragma}.DOM`] = ['15.6.0', 'the npm module react-dom-factories'];


Test patch:
diff --git a/tests/lib/rules/no-deprecated.js b/tests/lib/rules/no-deprecated.js
index a360c752..9ddcd6b9 100644
--- a/tests/lib/rules/no-deprecated.js
+++ b/tests/lib/rules/no-deprecated.js
@@ -68,6 +68,11 @@ ruleTester.run('no-deprecated', rule, {
     errors: [{
       message: 'this.transferPropsTo is deprecated since React 0.12.0, use spread operator ({...}) instead'
     }]
+  }, {
+    code: 'React.addons.TestUtils',
+    errors: [{
+      message: 'React.addons.TestUtils is deprecated since React 15.5.0, use ReactDOM.TestUtils instead'
+    }]
   }, {
     code: 'React.addons.classSet()',
     errors: [{