Skip to content

Commit

Permalink
Update name of rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy Sutton committed Apr 30, 2017
1 parent e05f47a commit d4b6709
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enforce all defaultProps have a corresponding non-required PropType (no-invalid-default-props)
# Enforce all defaultProps have a corresponding non-required PropType (default-props-match-prop-types)

This rule aims to ensure that any `defaultProp` has a non-required `PropType` declaration.

Expand Down Expand Up @@ -154,7 +154,7 @@ NotAComponent.propTypes = {

```js
...
"no-invalid-default-props": [<enabled>, { "allowRequiredDefaults": <boolean> }]
"default-props-match-prop-types": [<enabled>, { "allowRequiredDefaults": <boolean> }]
...
```

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var allRules = {
'jsx-no-bind': require('./lib/rules/jsx-no-bind'),
'jsx-no-undef': require('./lib/rules/jsx-no-undef'),
'no-unknown-property': require('./lib/rules/no-unknown-property'),
'no-invalid-default-props': require('./lib/rules/no-invalid-default-props'),
'default-props-match-prop-types': require('./lib/rules/default-props-match-prop-types'),
'jsx-curly-spacing': require('./lib/rules/jsx-curly-spacing'),
'jsx-equals-spacing': require('./lib/rules/jsx-equals-spacing'),
'jsx-sort-props': require('./lib/rules/jsx-sort-props'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var annotations = require('../util/annotations');
module.exports = {
meta: {
docs: {
description: 'Enforce all defaultProps are defined and not required in propTypes.',
description: 'Enforce all defaultProps are defined and not "required" in propTypes.',
category: 'Best Practices'
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Requirements
// ------------------------------------------------------------------------------

var rule = require('../../../lib/rules/no-invalid-default-props');
var rule = require('../../../lib/rules/default-props-match-prop-types');
var RuleTester = require('eslint').RuleTester;
var assign = require('object.assign');

Expand All @@ -29,7 +29,7 @@ var ruleTester = new RuleTester({parserOptions: parserOptions});
// Tests
// ------------------------------------------------------------------------------

ruleTester.run('no-invalid-default-props', rule, {
ruleTester.run('default-props-match-prop-types', rule, {

valid: [
//
Expand Down

0 comments on commit d4b6709

Please sign in to comment.