Skip to content

Commit

Permalink
Enable no-undef rule from jsx-control-statements
Browse files Browse the repository at this point in the history
Extending jsx-control-statements/recommended disables the vanilla eslint
no-undef rule. This commit enables a rule from jsx-control-statements
which replaces the eslint rule and adds support for variables defined in
control statements like <For>.

https://www.npmjs.com/package/eslint-plugin-jsx-control-statements#configuration-advanced
  • Loading branch information
westwood846 committed Dec 30, 2019
1 parent f214bb2 commit 6a9dc4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jsx-control-statements.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ module.exports = {
'jsx-control-statements/jsx-otherwise-once-last': 1,
'jsx-control-statements/jsx-use-if-tag': 1,
'jsx-control-statements/jsx-when-require-condition': 1,
'jsx-control-statements/jsx-jcs-no-undef': 0
'jsx-control-statements/jsx-jcs-no-undef': 2,
'react/jsx-no-undef': [2, { 'allowGlobals': true }],
},
extends: [
'plugin:jsx-control-statements/recommended',
Expand Down

0 comments on commit 6a9dc4d

Please sign in to comment.