flymake-eslint icon indicating copy to clipboard operation
flymake-eslint copied to clipboard

Use directory containing package.json as default-directory

Open DamienCassou opened this issue 7 months ago • 0 comments

(project-root (project-current)) only works if the user has properly configured project (to consider "package.json" as a project-vc-extra-root-markers) or if the project has a simple configuration (i.e., the .git/ and the package.json are in the same directory).

This patch searches for the first directory containing package.json. The presence of this file is a good sign of being a JS project's root, independently of the Git repository or the project configuration.

DamienCassou avatar Jul 03 '24 20:07 DamienCassou