Comments (6)
So it turns out, now that npm installs things as flat as possible - ie the package will be in $projectRoot/node_modules/eslint-plugin-html
, most configs will "just work" with plugins and configs installed.
This is not guaranteed though. A great solution from @kentcdodds is to use bundleDependencies
https://twitter.com/kentcdodds/status/1605938112701419520
from eslint-config-wesbos.
The other option here, is in npm 8+, peerDeps are installed in node_modules, but flat. So I could just remove the peerDep install step entirely and go on with life.
https://twitter.com/remcohaszing/status/1605948345834508289
npm 7 was last shipped with Node.js 16.7.0, so probably a bit early for this
Also yarn 1, doesnt do this either.
from eslint-config-wesbos.
The bundleDependencies
solution does not work because it puts the plugins in node_modules/eslint-config-wesbos/node_modules/*
ESLint requires plugins to be resolved from the root as proejct/node_modules/plugin-name
. This is not true for parsers, like this;
Another option is to use the new Eslint config files:
https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new
from eslint-config-wesbos.
SCrapping everything. The new eslint config worked great, but I'm not ready to release that to the wild and it's experimental.
Turns out Im not the only purpose with this issue - many people one twitter said to just install and require('@rushstack/eslint-patch/modern-module-resolution');
at the top of your eslint file.
That fixes everything - I can now deploy a single install command. Will publish in january
from eslint-config-wesbos.
fixed in 3.2.0
from eslint-config-wesbos.
The command to remove peerDeps:
npm uninstall eslint-config-airbnb-typescript eslint-config-prettier eslint-plugin-html eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks @typescript-eslint/eslint-plugin @typescript-eslint/parser
from eslint-config-wesbos.
Related Issues (20)
- no-use-before-define HOT 1
- Command returns ERR undefined with new updates dependencies HOT 3
- eslint not running with npm run lint HOT 6
- ERR undefined on Next.js HOT 2
- npm install fails on new Gatsby v4 HOT 2
- Deprecated dependencies HOT 1
- Parsing error: Cannot find module '@babel/preset-react' HOT 1
- Update readme.md for WSL HOT 1
- Switch instructions to using "prettier" config in package.json
- Add { "allowShortCircuit": true, "allowTernary": true } HOT 2
- prefer-arrow-callback
- @typescript-eslint/no-unused-expressions
- /*eslint no-unused-vars: ["error", { "destructuredArrayIgnorePattern": "^_" }]*/
- allow importing of `.js` files that resolve to `.ts` on filesystem
- VS Code: ESLint extension no longer supports `eslint.alwaysShowStatus` HOT 1
- stop double quote error
- @typescript-eslint/comma-dangle in .eslintrc.js HOT 1
- es lint command not found HOT 9
- Conflicting plug ins? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-config-wesbos.