Skip to content

react-scripts build ignores ESLint overrides #8683

Closed
@osdiab

Description

@osdiab

Bringing back #8266 as something that I'm experiencing now.

Describe the bug

I made a lint rule that applies everywhere but want to exclude it for a directory. ESLint supports the overrides option to achieve this but react-scripts build ignores that and applies the rule anyway with EXTEND_ESLINT=true option

Did you try recovering your dependencies?

irrelevant

Which terms did you search for in User Guide?

extend eslint overrides lint

Environment

Environment Info:

  System:
    OS: macOS 10.15.3
    CPU: (4) x64 Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz
  Binaries:
    Node: 12.14.1 - ~/.nvm/versions/node/v12.14.1/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v12.14.1/bin/npm
  Browsers:
    Chrome: 80.0.3987.149
    Firefox: 74.0
    Safari: 13.0.5
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

  1. Make a CRA app
  2. add EXTEND_ESLINT=true to your invocation of react-scripts
  3. Make an ESLint file with a rule, and an override for that rule in with the overrides property
  4. Make a file that breaks the rule but should be overridden
  5. run react-scripts dev or react-scripts build and see that CRA complains anyway

Expected behavior

It respects the rule

Actual behavior

It doesn't

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions