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

Issue:
Rename some JSX-specific rules to include "jsx-" prefix
It seems that this naming convention hasn't been applied consistently. I think that it might be helpful to rename a few rules that are JSX-specific and not really React-specific:

- no-comment-textnodes -> jsx-no-comment-textnodes
- require-extension -> jsx-require-extension
- wrap-multilines -> jsx-wrap-multilines

and maybe

- self-closing-comp -> jsx-self-closing-comp


Pull request:
Rename some JSX-specific rules to include jsx- prefix
Fixes #668, addresses #686.

Patch:
diff --git a/README.md b/README.md
index 44bb84ab..9bf65866 100644
--- a/README.md
+++ b/README.md
@@ -81,7 +81,6 @@ Finally, enable all of the rules that you would like to use.  Use [our preset](#
 
 * [react/display-name](docs/rules/display-name.md): Prevent missing `displayName` in a React component definition
 * [react/forbid-prop-types](docs/rules/forbid-prop-types.md): Forbid certain propTypes
-* [react/no-comment-textnodes](docs/rules/no-comment-textnodes.md): Prevent comments from being inserted as text nodes
 * [react/no-danger](docs/rules/no-danger.md): Prevent usage of dangerous JSX properties
 * [react/no-deprecated](docs/rules/no-deprecated.md): Prevent usage of deprecated methods
 * [react/no-did-mount-set-state](docs/rules/no-did-mount-set-state.md): Prevent usage of `setState` in `componentDidMount`
@@ -98,13 +97,11 @@ Finally, enable all of the rules that you would like to use.  Use [our preset](#
 * [react/prefer-stateless-function](docs/rules/prefer-stateless-function.md): Enforce stateless React Components to be written as a pure function
 * [react/prop-types](docs/rules/prop-types.md): Prevent missing props validation in a React component definition
 * [react/react-in-jsx-scope](docs/rules/react-in-jsx-scope.md): Prevent missing `React` when using JSX
-* [react/require-extension](docs/rules/require-extension.md): Restrict file extensions that may be required
 * [react/require-optimization](docs/rules/require-optimization.md): Enforce React components to have a shouldComponentUpdate method
 * [react/require-render-return](docs/rules/require-render-return.md): Enforce ES5 or ES6 class for returning value in render function
 * [react/self-closing-comp](docs/rules/self-closing-comp.md): Prevent extra closing tags for components without children
 * [react/sort-comp](docs/rules/sort-comp.md): Enforce component methods order
 * [react/sort-prop-types](docs/rules/sort-prop-types.md): Enforce propTypes declarations alphabetical sorting
-* [react/wrap-multilines](docs/rules/wrap-multilines.md): Prevent missing parentheses around multilines JSX (fixable)
 
 ## JSX-specific rules
 
@@ -120,15 +117,18 @@ Finally, enable all of the rules that you would like to use.  Use [our preset](#
 * [react/jsx-key](docs/rules/jsx-key.md): Validate JSX has key prop when in array or iterator
 * [react/jsx-max-props-per-line](docs/rules/jsx-max-props-per-line.md): Limit maximum of props on a single line in JSX
 * [react/jsx-no-bind](docs/rules/jsx-no-bind.md): Prevent usage of `.bind()` and arrow functions in JSX props
+* [react/jsx-no-comment-textnodes](docs/rules/jsx-no-comment-textnodes.md): Prevent comments from being inserted as text nodes
 * [react/jsx-no-duplicate-props](docs/rules/jsx-no-duplicate-props.md): Prevent duplicate props in JSX
 * [react/jsx-no-literals](docs/rules/jsx-no-literals.md): Prevent usage of unwrapped JSX strings
 * [react/jsx-no-target-blank](docs/rules/jsx-no-target-blank.md): Prevent usage of unsafe `target='_blank'`
 * [react/jsx-no-undef](docs/rules/jsx-no-undef.md): Disallow undeclared variables in JSX
 * [react/jsx-pascal-case](docs/rules/jsx-pascal-case.md): Enforce PascalCase for user-defined JSX components
+* [react/jsx-require-extension](docs/rules/jsx-require-extension.md): Restrict file extensions that may be required
 * [react/jsx-sort-props](docs/rules/jsx-sort-props.md): Enforce props alphabetical sorting
 * [react/jsx-space-before-closing](docs/rules/jsx-space-before-closing.md): Validate spacing before closing bracket in JSX (fixable)
 * [react/jsx-uses-react](docs/rules/jsx-uses-react.md): Prevent React to be incorrectly marked as unused
 * [react/jsx-uses-vars](docs/rules/jsx-uses-vars.md): Prevent variables used in JSX to be incorrectly marked as unused
+* [react/jsx-wrap-multilines](docs/rules/jsx-wrap-multilines.md): Prevent missing parentheses around multilines JSX (fixable)
 
 ## React Native rules
 
@@ -149,18 +149,6 @@ To enable this configuration use the `extends` property in your `.eslintrc` conf
 }
 ```
 
-This plugin also exports an `all` configuration that includes every available rule.
-This pairs well with the `eslint:all` rule.
-
-```js
-{
-  "plugins": [
-    "react"
-  ],
-  "extends": ["eslint:all", "plugin:react/all"]
-}
-```
-
 See [ESLint documentation](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) for more information about extending configuration files.
 
 The rules enabled in this configuration are:
@@ -183,6 +171,18 @@ The rules enabled in this configuration are:
 
 **Note**: This configuration will also enable JSX in [parser options](http://eslint.org/docs/user-guide/configuring#specifying-parser-options).
 
+This plugin also exports an `all` configuration that includes every available rule.
+This pairs well with the `eslint:all` rule.
+
+```js
+{
+  "plugins": [
+    "react"
+  ],
+  "extends": ["eslint:all", "plugin:react/all"]
+}
+```
+
 # License
 
 ESLint-plugin-React is licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php).
diff --git a/docs/rules/no-comment-textnodes.md b/docs/rules/jsx-no-comment-textnodes.md
similarity index 94%
rename from docs/rules/no-comment-textnodes.md
rename to docs/rules/jsx-no-comment-textnodes.md
index 22e73b16..9dfd339c 100644
--- a/docs/rules/no-comment-textnodes.md
+++ b/docs/rules/jsx-no-comment-textnodes.md
@@ -1,4 +1,4 @@
-# Prevent comments from being inserted as text nodes (no-comment-textnodes)
+# Prevent comments from being inserted as text nodes (jsx-no-comment-textnodes)
 
 This rule prevents comment strings (e.g. beginning with `//` or `/*`) from being accidentally
 injected as a text node in JSX statements.
diff --git a/docs/rules/require-extension.md b/docs/rules/jsx-require-extension.md
similarity index 89%
rename from docs/rules/require-extension.md
rename to docs/rules/jsx-require-extension.md
index 1e91d6d2..00761375 100644
--- a/docs/rules/require-extension.md
+++ b/docs/rules/jsx-require-extension.md
@@ -1,4 +1,4 @@
-# Restrict file extensions that may be required (require-extension)
+# Restrict file extensions that may be required (jsx-require-extension)
 
 `require()` statements should generally not include a file extension as there is a well defined mechanism for resolving a module ID to a specific file. This rule inspects the module ID being required and creates a warning if the ID contains a '.jsx' file extension.
 
@@ -29,7 +29,7 @@ The set of forbidden extensions is configurable. By default '.jsx' is blocked. I
 
 ```js
 "rules": {
-  "react/require-extension": [1, { "extensions": [".js", ".jsx"] }],
+  "react/jsx-require-extension": [1, { "extensions": [".js", ".jsx"] }],
 }
 ```
 
diff --git a/docs/rules/wrap-multilines.md b/docs/rules/jsx-wrap-multilines.md
similarity index 93%
rename from docs/rules/wrap-multilines.md
rename to docs/rules/jsx-wrap-multilines.md
index b24e892b..3179f8cc 100644
--- a/docs/rules/wrap-multilines.md
+++ b/docs/rules/jsx-wrap-multilines.md
@@ -1,4 +1,4 @@
-# Prevent missing parentheses around multiline JSX (wrap-multilines)
+# Prevent missing parentheses around multiline JSX (jsx-wrap-multilines)
 
 Wrapping multiline JSX in parentheses can improve readability and/or convenience. It optionally takes a second parameter in the form of an object, containing places to apply the rule. By default, `"declaration"`, `"assignment"`, and `"return"` syntax is checked, but these can be explicitly disabled. Any syntax type missing in the object will follow the default behavior (become enabled).
 
diff --git a/index.js b/index.js
index 7f0ae1bb..a28494f7 100644
--- a/index.js
+++ b/index.js
@@ -6,8 +6,10 @@ var rules = {
   'prop-types': require('./lib/rules/prop-types'),
   'display-name': require('./lib/rules/display-name'),
   'wrap-multilines': require('./lib/rules/wrap-multilines'),
+  'jsx-wrap-multilines': require('./lib/rules/jsx-wrap-multilines'),
   'self-closing-comp': require('./lib/rules/self-closing-comp'),
   'no-comment-textnodes': require('./lib/rules/no-comment-textnodes'),
+  'jsx-no-comment-textnodes': require('./lib/rules/jsx-no-comment-textnodes'),
   'no-danger': require('./lib/rules/no-danger'),
   'no-set-state': require('./lib/rules/no-set-state'),
   'no-is-mounted': require('./lib/rules/no-is-mounted'),
@@ -29,6 +31,7 @@ var rules = {
   'jsx-boolean-value': require('./lib/rules/jsx-boolean-value'),
   'sort-comp': require('./lib/rules/sort-comp'),
   'require-extension': require('./lib/rules/require-extension'),
+  'jsx-require-extension': require('./lib/rules/jsx-require-extension'),
   'jsx-no-duplicate-props': require('./lib/rules/jsx-no-duplicate-props'),
   'jsx-max-props-per-line': require('./lib/rules/jsx-max-props-per-line'),
   'jsx-no-literals': require('./lib/rules/jsx-no-literals'),
diff --git a/lib/rules/jsx-no-comment-textnodes.js b/lib/rules/jsx-no-comment-textnodes.js
new file mode 100644
index 00000000..7c3cf71d
--- /dev/null
+++ b/lib/rules/jsx-no-comment-textnodes.js
@@ -0,0 +1,38 @@
+/**
+ * @fileoverview Comments inside children section of tag should be placed inside braces.
+ * @author Ben Vinegar
+ */
+'use strict';
+
+// ------------------------------------------------------------------------------
+// Rule Definition
+// ------------------------------------------------------------------------------
+
+module.exports = function(context) {
+  function reportLiteralNode(node) {
+    context.report(node, 'Comments inside children section of tag should be placed inside braces');
+  }
+
+  // --------------------------------------------------------------------------
+  // Public
+  // --------------------------------------------------------------------------
+
+  return {
+    Literal: function(node) {
+      if (/^\s*\/(\/|\*)/m.test(node.value)) {
+        // inside component, e.g. <div>literal</div>
+        if (node.parent.type !== 'JSXAttribute' &&
+            node.parent.type !== 'JSXExpressionContainer' &&
+            node.parent.type.indexOf('JSX') !== -1) {
+          reportLiteralNode(node);
+        }
+      }
+    }
+  };
+};
+
+module.exports.schema = [{
+  type: 'object',
+  properties: {},
+  additionalProperties: false
+}];
diff --git a/lib/rules/jsx-require-extension.js b/lib/rules/jsx-require-extension.js
new file mode 100644
index 00000000..dde310db
--- /dev/null
+++ b/lib/rules/jsx-require-extension.js
@@ -0,0 +1,88 @@
+/**
+ * @fileoverview Restrict file extensions that may be required
+ * @author Scott Andrews
+ */
+'use strict';
+
+var path = require('path');
+
+// ------------------------------------------------------------------------------
+// Constants
+// ------------------------------------------------------------------------------
+
+var DEFAULTS = {
+  extensions: ['.jsx']
+};
+
+var PKG_REGEX = /^[^\.]((?!\/).)*$/;
+
+// ------------------------------------------------------------------------------
+// Rule Definition
+// ------------------------------------------------------------------------------
+
+module.exports = function(context) {
+
+  function isPackage(id) {
+    return PKG_REGEX.test(id);
+  }
+
+  function isRequire(expression) {
+    return expression.callee.name === 'require';
+  }
+
+  function getId(expression) {
+    return expression.arguments[0] && expression.arguments[0].value;
+  }
+
+  function getExtension(id) {
+    return path.extname(id || '');
+  }
+
+  function getExtensionsConfig() {
+    return context.options[0] && context.options[0].extensions || DEFAULTS.extensions;
+  }
+
+  var forbiddenExtensions = getExtensionsConfig().reduce(function (extensions, extension) {
+    extensions[extension] = true;
+    return extensions;
+  }, Object.create(null));
+
+  function isForbiddenExtension(ext) {
+    return ext in forbiddenExtensions;
+  }
+
+  // --------------------------------------------------------------------------
+  // Public
+  // --------------------------------------------------------------------------
+
+  return {
+
+    CallExpression: function(node) {
+      if (isRequire(node)) {
+        var id = getId(node);
+        var ext = getExtension(id);
+        if (!isPackage(id) && isForbiddenExtension(ext)) {
+          context.report({
+            node: node,
+            message: 'Unable to require module with extension \'' + ext + '\''
+          });
+        }
+      }
+    }
+
+  };
+
+};
+
+module.exports.schema = [{
+  type: 'object',
+  properties: {
+    extensions: {
+      type: 'array',
+      items: {
+        type: 'string'
+      }
+    }
+  },
+  additionalProperties: false
+}];
diff --git a/lib/rules/jsx-wrap-multilines.js b/lib/rules/jsx-wrap-multilines.js
new file mode 100644
index 00000000..a28b9a73
--- /dev/null
+++ b/lib/rules/jsx-wrap-multilines.js
@@ -0,0 +1,103 @@
+/**
+ * @fileoverview Prevent missing parentheses around multilines JSX
+ * @author Yannick Croissant
+ */
+'use strict';
+
+// ------------------------------------------------------------------------------
+// Constants
+// ------------------------------------------------------------------------------
+
+var DEFAULTS = {
+  declaration: true,
+  assignment: true,
+  return: true
+};
+
+// ------------------------------------------------------------------------------
+// Rule Definition
+// ------------------------------------------------------------------------------
+
+module.exports = function(context) {
+
+  var sourceCode = context.getSourceCode();
+
+  function isParenthesised(node) {
+    var previousToken = sourceCode.getTokenBefore(node);
+    var nextToken = sourceCode.getTokenAfter(node);
+
+    return previousToken && nextToken &&
+      previousToken.value === '(' && previousToken.range[1] <= node.range[0] &&
+      nextToken.value === ')' && nextToken.range[0] >= node.range[1];
+  }
+
+  function isMultilines(node) {
+    return node.loc.start.line !== node.loc.end.line;
+  }
+
+  function check(node) {
+    if (!node || node.type !== 'JSXElement') {
+      return;
+    }
+
+    if (!isParenthesised(node) && isMultilines(node)) {
+      context.report({
+        node: node,
+        message: 'Missing parentheses around multilines JSX',
+        fix: function(fixer) {
+          return fixer.replaceText(node, '(' + sourceCode.getText(node) + ')');
+        }
+      });
+    }
+  }
+
+  function isEnabled(type) {
+    var userOptions = context.options[0] || {};
+    if (({}).hasOwnProperty.call(userOptions, type)) {
+      return userOptions[type];
+    }
+    return DEFAULTS[type];
+  }
+
+  // --------------------------------------------------------------------------
+  // Public
+  // --------------------------------------------------------------------------
+
+  return {
+
+    VariableDeclarator: function(node) {
+      if (isEnabled('declaration')) {
+        check(node.init);
+      }
+    },
+
+    AssignmentExpression: function(node) {
+      if (isEnabled('assignment')) {
+        check(node.right);
+      }
+    },
+
+    ReturnStatement: function(node) {
+      if (isEnabled('return')) {
+        check(node.argument);
+      }
+    }
+  };
+
+};
+
+module.exports.schema = [{
+  type: 'object',
+  properties: {
+    declaration: {
+      type: 'boolean'
+    },
+    assignment: {
+      type: 'boolean'
+    },
+    return: {
+      type: 'boolean'
+    }
+  },
+  additionalProperties: false
+}];
diff --git a/lib/rules/no-comment-textnodes.js b/lib/rules/no-comment-textnodes.js
index 7c3cf71d..954999e0 100644
--- a/lib/rules/no-comment-textnodes.js
+++ b/lib/rules/no-comment-textnodes.js
@@ -1,6 +1,7 @@
 /**
  * @fileoverview Comments inside children section of tag should be placed inside braces.
  * @author Ben Vinegar
+ * @deprecated
  */
 'use strict';
 
@@ -8,27 +9,24 @@
 // Rule Definition
 // ------------------------------------------------------------------------------
 
-module.exports = function(context) {
-  function reportLiteralNode(node) {
-    context.report(node, 'Comments inside children section of tag should be placed inside braces');
-  }
-
-  // --------------------------------------------------------------------------
-  // Public
-  // --------------------------------------------------------------------------
+var util = require('util');
+var jsxNoCommentTextnodes = require('./jsx-no-comment-textnodes');
+var isWarnedForDeprecation = false;
 
-  return {
-    Literal: function(node) {
-      if (/^\s*\/(\/|\*)/m.test(node.value)) {
-        // inside component, e.g. <div>literal</div>
-        if (node.parent.type !== 'JSXAttribute' &&
-            node.parent.type !== 'JSXExpressionContainer' &&
-            node.parent.type.indexOf('JSX') !== -1) {
-          reportLiteralNode(node);
-        }
+module.exports = function(context) {
+  return util._extend(jsxNoCommentTextnodes(context), {
+    Program: function() {
+      if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
+        return;
       }
+
+      /* eslint-disable no-console */
+      console.log('The react/no-comment-textnodes rule is deprecated. Please ' +
+                  'use the react/jsx-no-comment-textnodes rule instead.');
+      /* eslint-enable no-console */
+      isWarnedForDeprecation = true;
     }
-  };
+  });
 };
 
 module.exports.schema = [{
diff --git a/lib/rules/no-find-dom-node.js b/lib/rules/no-find-dom-node.js
index ecc5afc4..f619f551 100644
--- a/lib/rules/no-find-dom-node.js
+++ b/lib/rules/no-find-dom-node.js
@@ -18,24 +18,20 @@ module.exports = function(context) {
 
     CallExpression: function(node) {
       var callee = node.callee;
-      if (
-        callee.type !== 'MemberExpression' || (
-          callee.object.callee && callee.object.callee.name !== 'findDOMNode' &&
-          callee.property.name !== 'findDOMNode'
-        )
-      ) {
+
+      var isfindDOMNode =
+        (callee.object && callee.object.callee && callee.object.callee.name === 'findDOMNode') ||
+        (callee.property && callee.property.name === 'findDOMNode')
+      ;
+
+      if (!isfindDOMNode) {
         return;
       }
-      var ancestors = context.getAncestors(callee);
-      for (var i = 0, j = ancestors.length; i < j; i++) {
-        if (ancestors[i].type === 'Property' || ancestors[i].type === 'MethodDefinition') {
-          context.report({
-            node: callee,
-            message: 'Do not use findDOMNode'
-          });
-          break;
-        }
-      }
+
+      context.report({
+        node: callee,
+        message: 'Do not use findDOMNode'
+      });
     }
   };
 
diff --git a/lib/rules/require-extension.js b/lib/rules/require-extension.js
index dde310db..8e25c665 100644
--- a/lib/rules/require-extension.js
+++ b/lib/rules/require-extension.js
@@ -1,77 +1,32 @@
 /**
  * @fileoverview Restrict file extensions that may be required
  * @author Scott Andrews
+ * @deprecated
  */
 'use strict';
 
-var path = require('path');
-
-// ------------------------------------------------------------------------------
-// Constants
-// ------------------------------------------------------------------------------
-
-var DEFAULTS = {
-  extensions: ['.jsx']
-};
-
-var PKG_REGEX = /^[^\.]((?!\/).)*$/;
-
 // ------------------------------------------------------------------------------
 // Rule Definition
 // ------------------------------------------------------------------------------
 
-module.exports = function(context) {
-
-  function isPackage(id) {
-    return PKG_REGEX.test(id);
-  }
-
-  function isRequire(expression) {
-    return expression.callee.name === 'require';
-  }
-
-  function getId(expression) {
-    return expression.arguments[0] && expression.arguments[0].value;
-  }
+var util = require('util');
+var jsxRequireExtension = require('./jsx-require-extension');
+var isWarnedForDeprecation = false;
 
-  function getExtension(id) {
-    return path.extname(id || '');
-  }
-
-  function getExtensionsConfig() {
-    return context.options[0] && context.options[0].extensions || DEFAULTS.extensions;
-  }
-
-  var forbiddenExtensions = getExtensionsConfig().reduce(function (extensions, extension) {
-    extensions[extension] = true;
-    return extensions;
-  }, Object.create(null));
-
-  function isForbiddenExtension(ext) {
-    return ext in forbiddenExtensions;
-  }
-
-  // --------------------------------------------------------------------------
-  // Public
-  // --------------------------------------------------------------------------
-
-  return {
-
-    CallExpression: function(node) {
-      if (isRequire(node)) {
-        var id = getId(node);
-        var ext = getExtension(id);
-        if (!isPackage(id) && isForbiddenExtension(ext)) {
-          context.report({
-            node: node,
-            message: 'Unable to require module with extension \'' + ext + '\''
-          });
-        }
+module.exports = function(context) {
+  return util._extend(jsxRequireExtension(context), {
+    Program: function() {
+      if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
+        return;
       }
-    }
-
-  };
 
+      /* eslint-disable no-console */
+      console.log('The react/require-extension rule is deprecated. Please ' +
+                  'use the react/jsx-require-extension rule instead.');
+      /* eslint-enable no-console */
+      isWarnedForDeprecation = true;
+    }
+  });
 };
 
 module.exports.schema = [{
diff --git a/lib/rules/wrap-multilines.js b/lib/rules/wrap-multilines.js
index a28b9a73..f1266e2e 100644
--- a/lib/rules/wrap-multilines.js
+++ b/lib/rules/wrap-multilines.js
@@ -1,89 +1,32 @@
 /**
  * @fileoverview Prevent missing parentheses around multilines JSX
  * @author Yannick Croissant
+ * @deprecated
  */
 'use strict';
 
-// ------------------------------------------------------------------------------
-// Constants
-// ------------------------------------------------------------------------------
-
-var DEFAULTS = {
-  declaration: true,
-  assignment: true,
-  return: true
-};
-
 // ------------------------------------------------------------------------------
 // Rule Definition
 // ------------------------------------------------------------------------------
 
-module.exports = function(context) {
-
-  var sourceCode = context.getSourceCode();
+var util = require('util');
+var jsxWrapMultilines = require('./jsx-wrap-multilines');
+var isWarnedForDeprecation = false;
 
-  function isParenthesised(node) {
-    var previousToken = sourceCode.getTokenBefore(node);
-    var nextToken = sourceCode.getTokenAfter(node);
-
-    return previousToken && nextToken &&
-      previousToken.value === '(' && previousToken.range[1] <= node.range[0] &&
-      nextToken.value === ')' && nextToken.range[0] >= node.range[1];
-  }
-
-  function isMultilines(node) {
-    return node.loc.start.line !== node.loc.end.line;
-  }
-
-  function check(node) {
-    if (!node || node.type !== 'JSXElement') {
-      return;
-    }
-
-    if (!isParenthesised(node) && isMultilines(node)) {
-      context.report({
-        node: node,
-        message: 'Missing parentheses around multilines JSX',
-        fix: function(fixer) {
-          return fixer.replaceText(node, '(' + sourceCode.getText(node) + ')');
-        }
-      });
-    }
-  }
-
-  function isEnabled(type) {
-    var userOptions = context.options[0] || {};
-    if (({}).hasOwnProperty.call(userOptions, type)) {
-      return userOptions[type];
-    }
-    return DEFAULTS[type];
-  }
-
-  // --------------------------------------------------------------------------
-  // Public
-  // --------------------------------------------------------------------------
-
-  return {
-
-    VariableDeclarator: function(node) {
-      if (isEnabled('declaration')) {
-        check(node.init);
-      }
-    },
-
-    AssignmentExpression: function(node) {
-      if (isEnabled('assignment')) {
-        check(node.right);
+module.exports = function(context) {
+  return util._extend(jsxWrapMultilines(context), {
+    Program: function() {
+      if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
+        return;
       }
-    },
 
-    ReturnStatement: function(node) {
-      if (isEnabled('return')) {
-        check(node.argument);
-      }
+      /* eslint-disable no-console */
+      console.log('The react/wrap-multilines rule is deprecated. Please ' +
+                  'use the react/jsx-wrap-multilines rule instead.');
+      /* eslint-enable no-console */
+      isWarnedForDeprecation = true;
     }
-  };
-
+  });
 };
 
 module.exports.schema = [{


Test patch:
diff --git a/tests/lib/rules/no-comment-textnodes.js b/tests/lib/rules/jsx-no-comment-textnodes.js
similarity index 97%
rename from tests/lib/rules/no-comment-textnodes.js
rename to tests/lib/rules/jsx-no-comment-textnodes.js
index 2cb700fb..aa688c3b 100644
--- a/tests/lib/rules/no-comment-textnodes.js
+++ b/tests/lib/rules/jsx-no-comment-textnodes.js
@@ -8,7 +8,7 @@
 // Requirements
 // ------------------------------------------------------------------------------
 
-var rule = require('../../../lib/rules/no-comment-textnodes');
+var rule = require('../../../lib/rules/jsx-no-comment-textnodes');
 var RuleTester = require('eslint').RuleTester;
 
 // ------------------------------------------------------------------------------
@@ -16,7 +16,7 @@ var RuleTester = require('eslint').RuleTester;
 // ------------------------------------------------------------------------------
 
 var ruleTester = new RuleTester();
-ruleTester.run('jsx-needs-i18n', rule, {
+ruleTester.run('jsx-no-comment-textnodes', rule, {
 
   valid: [
     {
diff --git a/tests/lib/rules/require-extension.js b/tests/lib/rules/jsx-require-extension.js
similarity index 95%
rename from tests/lib/rules/require-extension.js
rename to tests/lib/rules/jsx-require-extension.js
index 8fb037c5..952a83a0 100644
--- a/tests/lib/rules/require-extension.js
+++ b/tests/lib/rules/jsx-require-extension.js
@@ -8,7 +8,7 @@
 // Requirements
 // ------------------------------------------------------------------------------
 
-var rule = require('../../../lib/rules/require-extension');
+var rule = require('../../../lib/rules/jsx-require-extension');
 var RuleTester = require('eslint').RuleTester;
 
 // ------------------------------------------------------------------------------
@@ -34,7 +34,7 @@ var REQUIRE_OBJECT = 'require({})';
 // ------------------------------------------------------------------------------
 
 var ruleTester = new RuleTester();
-ruleTester.run('require-extension', rule, {
+ruleTester.run('jsx-require-extension', rule, {
 
   valid: [
     {
diff --git a/tests/lib/rules/wrap-multilines.js b/tests/lib/rules/jsx-wrap-multilines.js
similarity index 97%
rename from tests/lib/rules/wrap-multilines.js
rename to tests/lib/rules/jsx-wrap-multilines.js
index e169ff73..8fe41fd7 100644
--- a/tests/lib/rules/wrap-multilines.js
+++ b/tests/lib/rules/jsx-wrap-multilines.js
@@ -8,7 +8,7 @@
 // Requirements
 // ------------------------------------------------------------------------------
 
-var rule = require('../../../lib/rules/wrap-multilines');
+var rule = require('../../../lib/rules/jsx-wrap-multilines');
 var RuleTester = require('eslint').RuleTester;
 
 var parserOptions = {
@@ -78,7 +78,7 @@ var ASSIGNMENT_NO_PAREN = '\
 // ------------------------------------------------------------------------------
 
 var ruleTester = new RuleTester();
-ruleTester.run('wrap-multilines', rule, {
+ruleTester.run('jsx-wrap-multilines', rule, {
 
   valid: [
     {
diff --git a/tests/lib/rules/no-find-dom-node.js b/tests/lib/rules/no-find-dom-node.js
index c167ac9b..3cecacf3 100644
--- a/tests/lib/rules/no-find-dom-node.js
+++ b/tests/lib/rules/no-find-dom-node.js
@@ -52,6 +52,18 @@ ruleTester.run('no-find-dom-node', rule, {
       '});'
     ].join('\n'),
     parserOptions: parserOptions
+  }, {
+    code: [
+      'var Hello = React.createClass({',
+      '  componentDidMount: function() {',
+      '    React.someFunc(this);',
+      '  },',
+      '  render: function() {',
+      '    return <div>Hello</div>;',
+      '  }',
+      '});'
+    ].join('\n'),
+    parserOptions: parserOptions
   }],
 
   invalid: [{