From c6cad0fa7161f88104bdb4e52971e72cb033a6ba Mon Sep 17 00:00:00 2001 From: Joe Lencioni Date: Mon, 18 Jul 2016 11:25:49 -0700 Subject: [PATCH] Remove deprecated jsx-sort-prop-types rule This has been deprecated for a while. We have decided to remove it entirely for 6.0.0 (#686). Fixes #549. --- lib/rules/jsx-sort-prop-types.js | 45 -------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 lib/rules/jsx-sort-prop-types.js diff --git a/lib/rules/jsx-sort-prop-types.js b/lib/rules/jsx-sort-prop-types.js deleted file mode 100644 index 549654ad59..0000000000 --- a/lib/rules/jsx-sort-prop-types.js +++ /dev/null @@ -1,45 +0,0 @@ -/** - * @fileoverview Enforce propTypes declarations alphabetical sorting - * @deprecated - */ -'use strict'; - -// ------------------------------------------------------------------------------ -// Rule Definition -// ------------------------------------------------------------------------------ - -var util = require('util'); -var sortPropTypes = require('./sort-prop-types'); -var isWarnedForDeprecation = false; - -module.exports = function(context) { - return util._extend(sortPropTypes(context), { - Program: function() { - if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) { - return; - } - - /* eslint-disable no-console */ - console.log('The react/jsx-sort-prop-types rule is deprecated. Please ' + - 'use the react/sort-prop-types rule instead.'); - /* eslint-enable no-console */ - isWarnedForDeprecation = true; - } - }); -}; - -module.exports.schema = [{ - type: 'object', - properties: { - requiredFirst: { - type: 'boolean' - }, - callbacksLast: { - type: 'boolean' - }, - ignoreCase: { - type: 'boolean' - } - }, - additionalProperties: false -}];