Move eslint dep to peerDeps or remove it
See original GitHub issueHey, Putting eslint to the dependencies can cause issues (like for me, I’m trying to use eslint 4.9.0 but prettier-eslint interferes)
"prettier-eslint": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/prettier-eslint/-/prettier-eslint-8.2.0.tgz",
"integrity": "sha512-OSx/0ULxWuIjeMO6KJoMVIDc7/Kj9a0wxUDzaGJTNiZXlNRq2bCl5jya8p42OQCVJzp1HnnQyGrWb+6/5+jbJQ==",
"dev": true,
"requires": {
"common-tags": "1.4.0",
"dlv": "1.1.0",
"eslint": "4.8.0",
"indent-string": "3.2.0",
"lodash.merge": "4.6.0",
"loglevel-colored-level-prefix": "1.0.0",
"prettier": "1.7.3",
"pretty-format": "20.0.3",
"require-relative": "0.8.7",
"typescript": "2.5.3",
"typescript-eslint-parser": "7.0.0"
},
"dependencies": {
"indent-string": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
"integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
"dev": true
},
"lodash.merge": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.0.tgz",
"integrity": "sha1-aYhLoUSsM/5plzemCG3v+t0PicU=",
"dev": true
}
}
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Should I duplicate "peerDependencies" in "dependencies ...
No assume that I forked the @typescript-eslint/eslint-plugin and want all ERR! messages mentioned in question disappear.
Read more >A Guide to ESLint | Laurie on Tech
For example, ESLint has a rule called import/no-extraneous-dependencies . The goal of this rule is to catch situations in which you've imported ...
Read more >Reduce maintenance effort with shared ESLint and Prettier ...
The Prettier package demonstrates moving adjustments of the default setup into a shared library (in our case, we change the default double ...
Read more >Shareable Configs - ESLint - Pluggable JavaScript Linter
... your dependency on ESLint in package.json using the peerDependencies field. ... shareable config, you can specify these packages as dependencies .
Read more >eslint-config-react-app-with-peer-deps - npm package | Snyk
eslint -config-react-app-with-peer-deps. v5.2.1. ESLint configuration used by Create React App, including its peer dependencies, but als ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@zimme i will give it a shot: i just migrated a bunch of projects into a monorepo. one of these projects happens to be a
create-react-app
which comes with its own version ofeslint
. configuring anything at this point in CRA would require me to eject (or turn off the preflight check).now when i wanted to move up all my dev dependencies from my projects that are used multiple times across the monorepo, i can’t bring up
prettier-eslint
, because it will also install a newer version of eslint in my rootnode_modules
and interfere with the CRA project.tldr: moving
eslint
to peer dependencies could help working with mono repos (which i feel are increasingly receiving attention currently) but state no real disadvantages, besides of that devs need to haveeslint
declared explicitly in theirpackage.json
(which is also good practice imho and stimulates the understanding of devs who don’t understand theirpackage.json
yet).yes, there’s issues with CRA