eslint ignores variables named `status`
Created by: sidoshi
Can you reproduce the problem with latest npm?
yes. npm version: 4.1.1
Description
Linter ignores status variable name when checking for unused vars.
Not sure if this is a bug or expected behaviour.
Expected behavior
It should probably warn when I have not declared a variable named status and have this line of code:
console.log(status)
Actual behavior
Even though I have not declared any variable named status,
using it does not show any warning or errors.
it shows no-undef error on all other variables names like statuss as expected
Environment
Run these commands in the project folder and fill in their results:
-
npm ls react-scripts(if you haven’t ejected): 0.9.0 -
node -v: v7.7.1 -
npm -v: 4.4.1
Then, specify:
- Operating system: Linux, Deepin
- Browser and version: any
Reproducible Demo
create a new app with:
create-react-app test-app
In index.js type: console.log(status)
It won't show any error that status is not defined but changing the variable name to statuss would show error as expected