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
  • #972
Closed
Open
Issue created Oct 27, 2016 by Administrator@rootContributor

Global variables in html file cause spurious eslint messages because eslint globals can not be configured

Created by: jhorneman

For reasons I have load a JavaScript file in CRA's index.html which defines a global variable.

CRA's eslint settings have "no-undef" set to error. Any use of the above-mentioned global variable will result in a compile error in the browser, preventing me from working.

Manually editing CRA's eslint settings to have "no-undef" be a warning is only a partial solution: I still get warnings in the console.

Manually editing the globals in CRA's eslint settings solves the problem, but is obviously not very elegant.

Ideally the development server would pick up on a .eslintrc file in the root of the project. (I've tried this, and it didn't work.)

Assignee
Assign to
Time tracking