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.

Use nearest package.json/node_modules to locate local eslint

See original GitHub issue

My 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:closed
  • Created 8 years ago
  • Reactions:9
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dbaeumercommented, Nov 10, 2016

This is addressed in the upcoming 1.1.0 release of ESLint.

1reaction
kumarharshcommented, May 24, 2016

@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.

Read more comments on GitHub >

github_iconTop 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 >

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