Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #1834
Closed
Open
Issue created Mar 15, 2017 by Administrator@rootContributor

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:

  1. npm ls react-scripts (if you haven’t ejected): 0.9.0
  2. node -v: v7.7.1
  3. npm -v: 4.4.1

Then, specify:

  1. Operating system: Linux, Deepin
  2. 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

Assignee
Assign to
Time tracking