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
  • #7339
Closed
Open
Issue created Jul 08, 2019 by Administrator@rootContributor

Cannot use `.eslintignore` for generated files

Created by: danielkcz

Describe the bug

When running yarn start, the ESLint errors are shown from files I have ignored with .eslintignore and the app won't start.

Did you try recovering your dependencies?

Reproducible in a fresh new project.

Which terms did you search for in User Guide?

eslintignore (yielded https://github.com/facebook/create-react-app/issues/6871)

Environment

  System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Binaries:
    Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.17763.1.0
    Internet Explorer: 11.0.17763.1
  npmPackages:
    react: ^16.8.6 => 16.8.6
    react-dom: ^16.8.6 => 16.8.6
    react-scripts: 3.0.1 => 3.0.1
  npmGlobalPackages:
    create-react-app: Not Found

Expected behavior

To ignore specified files from ESLint checks and start the app. Talking here mostly about generated files which we cannot just modify with the comment to disable eslint. The best course of action is to just ignore these.

Quite an exhaustive issue https://github.com/facebook/create-react-app/issues/6871 talks about customizing ESLint config, but not much of the mention of utilizing .eslintignore which isn't exactly huge customization and shouldn't be prohibited like that.

I can use a workaround with cra-override, but I don't want to disable a conflicting rule for a whole project when the only a bunch of generated files is affected.

Actual behavior

image

I have VSCode properly working with ESLint in the project. The specified file is correctly ignored there.

Reproducible demo

https://github.com/FredyC/cra-eslint-ignore

Assignee
Assign to
Time tracking