Skip to content

EXTEND_ESLINT not working #9007

Closed
Closed
@Josema

Description

@Josema

Describe the bug

I'm trying to disable a eslint rule using the config of the oficial docs.

Which terms did you search for in User Guide?

https://create-react-app.dev/docs/setting-up-your-editor/#experimental-extending-the-eslint-config

Environment

  current version of create-react-app: 3.4.1
  running from /home/enzo/.npm/_npx/4039/lib/node_modules/create-react-app
  System:
    OS: Linux 4.4 Ubuntu 18.04.3 LTS (Bionic Beaver)
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 10.15.1 - ~/.nvm/versions/node/v10.15.1/bin/node
    Yarn: Not Found
    npm: 6.11.2 - ~/.nvm/versions/node/v10.15.1/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    react: 16.12.0 => 16.12.0
    react-dom: 16.12.0 => 16.12.0
    react-scripts: 3.0.1 => 3.0.1
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

.env

EXTEND_ESLINT=true

package.json

...
    "eslintConfig": {
        "extends": [
            "react-app"
        ],
        "rules": {
            "no-template-curly-in-string": "off",
            "no-unused-vars": "off"
        }
    }

npm run dev

Expected behavior

Not showing errors. Everything works as expected when running npm run lint

Actual behavior

Compiled with warnings.

./src/index.js
  Line 1:17:  'useState' is defined but never used  no-unused-vars        

./src/locale/translations.js
  Line 4:5:   Unexpected template string expression  no-template-curly-in-string
  Line 6:13:  Unexpected template string expression  no-template-curly-in-string

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions