Skip to content

EXTEND_ESLINT not working #9007

Closed
Closed

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.

Activity

  1. Josema commented on May 14, 2020

    @Josema
    Author

    Still showing the errors when npm run dev or npm run build.

  2. Josema commented on May 14, 2020

    @Josema
    Author
  3. Josema commented on May 15, 2020

    @Josema
    Author

    Thank you @yucigou for taking the time to solve it :) It works as expected.

  4. locked and limited conversation to collaborators on May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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