Skip to content

Commit

Permalink
Rename rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgueni Naverniouk committed Aug 24, 2016
1 parent f083a13 commit d923dc6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Finally, enable all of the rules that you would like to use. Use [our preset](#
* [react/no-set-state](docs/rules/no-set-state.md): Prevent usage of `setState`
* [react/no-string-refs](docs/rules/no-string-refs.md): Prevent using string references in `ref` attribute.
* [react/no-unknown-property](docs/rules/no-unknown-property.md): Prevent usage of unknown DOM property (fixable)
* [react/no-unused-prop-types](docs/rules/no-unused-prop-types.md): Prevent definitions of unused prop types
* [react/prefer-es6-class](docs/rules/prefer-es6-class.md): Enforce ES5 or ES6 class for React Components
* [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
Expand All @@ -105,7 +106,6 @@ Finally, enable all of the rules that you would like to use. Use [our preset](#
* [react/self-closing-comp](docs/rules/self-closing-comp.md): Prevent extra closing tags for components without children (fixable)
* [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/unused-prop-types](docs/rules/unused-prop-types.md): Prevent definitions of unused prop types

## JSX-specific rules

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Prevent definitions of unused prop types (unused-prop-types)
# Prevent definitions of unused prop types (no-unused-prop-types)

Warns you if you have defined a prop type but it is never being used anywhere.

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var rules = {
'require-optimization': require('./lib/rules/require-optimization'),
'no-find-dom-node': require('./lib/rules/no-find-dom-node'),
'no-danger-with-children': require('./lib/rules/no-danger-with-children'),
'unused-prop-types': require('./lib/rules/unused-prop-types')
'no-unused-prop-types': require('./lib/rules/no-unused-prop-types')
};

var ruleNames = Object.keys(rules);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Requirements
// ------------------------------------------------------------------------------

var rule = require('../../../lib/rules/unused-prop-types');
var rule = require('../../../lib/rules/no-unused-prop-types');
var RuleTester = require('eslint').RuleTester;

var parserOptions = {
Expand All @@ -32,7 +32,7 @@ require('babel-eslint');
// ------------------------------------------------------------------------------

var ruleTester = new RuleTester();
ruleTester.run('unused-prop-types', rule, {
ruleTester.run('no-unused-prop-types', rule, {

valid: [
{
Expand Down Expand Up @@ -1978,7 +1978,7 @@ ruleTester.run('unused-prop-types', rule, {
}]
}/* , {
// Enable this when the following issue is fixed
// https://github.com/yannickcr/eslint-plugin-react/issues/296
// https://github.com/yannickcr/eslint-plugin-react/issues/296
code: [
'function Foo(props) {',
' const { bar: { nope } } = props;',
Expand Down

0 comments on commit d923dc6

Please sign in to comment.