question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Existing eslint rule configuration fails starting in 3.1.0

See original GitHub issue

Describe the bug

After upgrading to 3.1.1 (and 3.1.0) it’s no longer possible to configure eslint rules that are part of the editor configuration. yarn start will fail with an error about an eslint rule it doesn’t know about.

Definition for rule 'graphql/template-strings' was not found  graphql/template-strings

This makes sense since starting with eslint@6 it will raise errors when attempting to configure unknown rules. However I do not expect existing projects to break because they’ve decided to setup editor only eslint configuration.

I guess eventually this could be solved with the experimental eslint extension, but that’s still experimental unfortunately and still seems to have issues of it’s own.

Did you try recovering your dependencies?

n.a.

Which terms did you search for in User Guide?

https://create-react-app.dev/docs/setting-up-your-editor https://create-react-app.dev/docs/troubleshooting

Environment

Environment Info:

  System:
    OS: macOS 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  Binaries:
    Node: 8.15.0 - ~/.asdf/shims/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.asdf/shims/npm
  Browsers:
    Chrome: Not Found
    Firefox: 68.0.2
    Safari: Not Found
  npmPackages:
    react: ^16.9.0 => 16.9.0
    react-dom: ^16.9.0 => 16.9.0
    react-scripts: 3.1.1 => 3.1.1
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

  1. npx create-react-app test-app
  2. cd test-app
  3. yarn add -D eslint-config-prettier
  4.  echo "module.exports = {
       extends: [
         'react-app',
         'prettier/prettier',
       ],
       plugins: ['prettier']
     }
     " > .eslintrc.js
    
  5. echo "/* eslint-disable prettier/prettier */" >> src/App.js
  6. yarn start

Expected behavior

The app to continue to be started. At least in the case of an already existing app with already existing editor configuration.

Actual behavior

Definition for rule 'prettier/prettier' was not found  prettier/prettier
image

Reproducible demo

https://github.com/klaaspieter/create-react-app-eslint-editor-configuration

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
micahstubbscommented, Oct 28, 2019

also experiencing this bug with my existing eslint config

1reaction
rovansteencommented, Oct 23, 2019

I was just pointing out that create-react-app just ignored custom eslint rules before. And as far as I know that should still be the case if EXTEND_ESLINT is set to false so if that is breaking your build that sounds like a bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Eslint error, configuration for rule "import/no-cycle" is invalid
I changed the node_modules/eslint-config-airbnb-base/rules/imports.js "∞" to an integer to continue debugging. Next run showed this error, ...
Read more >
Working with Rules - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
eslint - npm
Start using eslint in your project by running `npm i eslint`. ... In it, you'll see some rules configured like this: {. "rules":...
Read more >
eslint | Yarn - Package Manager
An existing formatter is removed. Part of the public API is removed or changed in an incompatible way. The public API includes: Rule...
Read more >
Available rules - eslint-plugin-vue
Rule ID Description vue/multi‑word‑component‑names require component names to be always multi‑word... vue/no‑arrow‑functions‑in‑watch disallow using arrow functions to define watcher... vue/no‑computed‑properties‑in‑data disallow accessing computed properties in data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found