Skip to content

Commit

Permalink
Allow declaring variables before use in a scope above (#2325)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed May 22, 2017
1 parent 0d1521a commit 42efedb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/eslint-config-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,14 @@ module.exports = {
ignoreRestSiblings: true,
},
],
'no-use-before-define': ['warn', 'nofunc'],
'no-use-before-define': [
'warn',
{
functions: false,
classes: false,
variables: false,
},
],
'no-useless-computed-key': 'warn',
'no-useless-concat': 'warn',
'no-useless-constructor': 'warn',
Expand Down

1 comment on commit 42efedb

@gaspard
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks in latest eslint with:

Module build failed: Error: node_modules/eslint-config-react-app/index.js:
	Configuration for rule "no-use-before-define" is invalid:
	Value "[object Object]" no (or more than one) schemas match.

Referenced from:
    at Array.forEach (native)
    at Array.reduceRight (native)

Please sign in to comment.