Use nearest package.json/node_modules to locate local eslint
See original GitHub issueMy project consists of a web app with a package.json
and a server side implemented in another language.
There’s a top level dummy package.json
for deployment reasons, and a package.json
in webapp/
, which is used for every (dev)dependency of the web app, including eslint
.
The plugin works as expected when opening the webapp/
folder, but complains that I should install eslint in my workspace when opening the root project folder.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:9
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Configuration Files - ESLint - Pluggable JavaScript Linter
The first way to use configuration files is via .eslintrc.* and package.json files. ESLint automatically looks for them in the directory of the...
Read more >node.js - ESLint error in version 8.8.0 - Stack Overflow
ESLint : 8.8.0 Error [ERR_REQUIRE_ESM]: Must use import to load ES ... ES module file as it is a .js file whose nearest...
Read more >eslint-plugin-import - npm
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import ...
Read more >ESLint | WebStorm Documentation - JetBrains
With automatic configuration, WebStorm uses the ESLint package from the project node_modules folder and the .eslintrc.
Read more >Configuring Jest
Node.js core modules, like fs , are not mocked by default. ... Jest will run .mjs and .js files with nearest package.json 's...
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
This is addressed in the upcoming 1.1.0 release of ESLint.
@ChuckPierce vscode does pick up the local eslint. The problem is that it only looks in the root of the project, but not in the nearest folder like atom does. This means that if my JS project is a child of a larger non-js (or non-eslint) project, then vscode doesn’t even run eslint.