Create-react-app: Fixed version of ESLint in the react-scripts package causing issues

Created on 14 Apr 2019  路  4Comments  路  Source: facebook/create-react-app

Is this a bug report?

Yes.

Did you try recovering your dependencies?

Yes.

Which terms did you search for in User Guide?

Not relevant.

Environment

Not relevant.

Steps to Reproduce

See this issue.

Expected Behavior

This error should not be happening.

Actual Behavior

There is an error because of the fixed ESLint version in the react-scripts package.

image

Question

Why does react-scripts keeps fixed versions of packages such as eslint in the dependency manifest? Why not just specify the major version, like eslint-config-react-app does (5.x, for example)?

https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/package.json#L40

Notice how eslint-config-react-app sets its ESLint version:
https://github.com/facebook/create-react-app/blob/master/packages/eslint-config-react-app/package.json#L17

enhancement

Most helpful comment

The maintainers discussed this issue today and we've decided to relax the ESLint version requirement. cc @ianschmitz

All 4 comments

same problem

Same problem

I am having the same issue. And now I can't get eslint to work in VSCode (code-server). I followed the instructions where you remove node_modules, package-lock.json, yarn-lock.json and take out the reference to "eslint": "^5.16.0" out of the devDependencies of the package.json. But I left the references to eslink-plugins and eslink-config. Then I do a yarn or npm install.

Now I get the error in my output when VSCode tries to lint a file?

module.js:562
throw err;
^

Error: Cannot find module '/home/bitnami/testlint/-e'
at Function.Module._resolveFilename (module.js:560:15)
at Function.Module._load (module.js:487:25)
at Function.Module.runMain (module.js:726:10)
at startup (bootstrap_node.js:207:16)
at bootstrap_node.js:628:3

The maintainers discussed this issue today and we've decided to relax the ESLint version requirement. cc @ianschmitz

Was this page helpful?
0 / 5 - 0 ratings