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
  • #10502
Closed
Open
Issue created Feb 04, 2021 by Administrator@rootContributor

Extending `react-app` eslint config in non-typescript app

Created by: thisismydesign

Describe the bug

I'm trying the DISABLE_ESLINT_PLUGIN flag added to react-scripts in v4.0.2. In .eslintrc.js:

  extends: [
    "react-app",
  ]

This gives me

$ eslint .

Oops! Something went wrong! :(

ESLint: 7.19.0

Error: Failed to load parser '@typescript-eslint/parser' declared in '.eslintrc.js » eslint-config-react-app#overrides[0]': Cannot find module 'typescript'

I'm on a non-typescript project. Do I still have to configure it as if it was a typescript project if I want to use the react-app ruleset? This is what the readme of https://www.npmjs.com/package/eslint-config-react-app indicates as well, but it would be great to be able to use it without all of these dependencies. Especially when using create-react-app.

Environment

Environment Info:

  current version of create-react-app: 4.0.2
  running from /root/.npm/_npx/13859/lib/node_modules/create-react-app

  System:
    OS: Linux 4.19 Ubuntu 18.04.1 LTS (Bionic Beaver)
    CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
  Binaries:
    Node: 14.10.0 - ~/.nvm/versions/node/v14.10.0/bin/node
    Yarn: 1.22.5 - ~/.nvm/versions/node/v14.10.0/bin/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v14.10.0/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    react: ^16.13.1 => 16.13.1 
    react-dom: ^16.13.1 => 16.13.1 
    react-scripts: 4.0.2 => 4.0.2 
  npmGlobalPackages:
    create-react-app: Not Found
Assignee
Assign to
Time tracking