Skip to content

no-use-before-define has no effect when extending eslint-config-react-app #10479

Answered by JLRishe
JLRishe asked this question in Q&A
Discussion options

You must be logged in to vote

Looks like I've figured it out.

It seems I was overriding the severity of the rule, but not the options, which were set to { "functions": false, "variables": false, "classes": false }, basically rendering the rule ineffective no matter what the severity is.

Specifying the options explicitly yields the desired behavior:

"no-use-before-define": ["error", { "functions": true, "variables": true }]

Looks like this also works for reverting back to the eslint default options:

"no-use-before-define": ["error", {}]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JLRishe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant