Skip to content

Commit

Permalink
[Breaking] add rules to recommended configuration:
Browse files Browse the repository at this point in the history
 - `no-danger-with-children`: Fixes #748
 - `no-string-refs`: Fixes #749
 - `jsx-key`: Fixes #750
 - `jsx-no-comment-textnodes`: Fixes #751
 - `jsx-no-target-blank`: Fixes #752
 - `no-unescaped-entities`: Fixes #841
 - `no-children-prop`: Fixes #842
 -
  • Loading branch information
ljharb committed Apr 23, 2017
1 parent 444c096 commit c6c5e3b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 8 deletions.
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,23 @@ module.exports = {
},
rules: {
'react/display-name': 2,
'react/jsx-key': 2,
'react/jsx-no-comment-textnodes': 2,
'react/jsx-no-duplicate-props': 2,
'react/jsx-no-target-blank': 2,
'react/jsx-no-undef': 2,
'react/jsx-uses-react': 2,
'react/jsx-uses-vars': 2,
'react/no-children-prop': 2,
'react/no-danger-with-children': 2,
'react/no-deprecated': 2,
'react/no-direct-mutation-state': 2,
'react/no-find-dom-node': 2,
'react/no-is-mounted': 2,
'react/no-unknown-property': 2,
'react/no-render-return-value': 2,
'react/no-string-refs': 2,
'react/no-unescaped-entities': 2,
'react/no-unknown-property': 2,
'react/prop-types': 2,
'react/react-in-jsx-scope': 2,
'react/require-render-return': 2
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-key.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
docs: {
description: 'Report missing `key` props in iterators/collection literals',
category: 'Possible Errors',
recommended: false
recommended: true
},
schema: []
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-comment-textnodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
docs: {
description: 'Comments inside children section of tag should be placed inside braces',
category: 'Possible Errors',
recommended: false
recommended: true
},

schema: [{
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-no-target-blank.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
docs: {
description: 'Forbid target="_blank" attribute without rel="noopener noreferrer"',
category: 'Best Practices',
recommended: false
recommended: true
},
schema: []
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-children-prop.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
docs: {
description: 'Prevent passing of children as props.',
category: 'Best Practices',
recommended: false
recommended: true
},
schema: []
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-danger-with-children.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
docs: {
description: 'Report when a DOM element is using both children and dangerouslySetInnerHTML',
category: '',
recommended: false
recommended: true
},
schema: [] // no options
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-string-refs.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
docs: {
description: 'Prevent string definitions for references and prevent referencing this.refs',
category: 'Best Practices',
recommended: false
recommended: true
},
schema: []
},
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-unescaped-entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
docs: {
description: 'Detect unescaped HTML entities, which might represent malformed tags',
category: 'Possible Errors',
recommended: false
recommended: true
},
schema: [{
type: 'object',
Expand Down

0 comments on commit c6c5e3b

Please sign in to comment.