Node.js linters (eslint, stylelint, etc) run binary from relative node_modules that depend on the working directory. But not always working directory has node_modules, in the case of monorepo it can be some sub-folder.
The lint run command already has cwd option, but doesn't pass it to cmd command.
The fix is passing opts to linter cmd to properly calculate the path to node_modules if it's not in working directory.
Node.js linters (eslint, stylelint, etc) run binary from relative
node_modules
that depend on the working directory. But not always working directory hasnode_modules
, in the case of monorepo it can be some sub-folder.The lint run command already has
cwd
option, but doesn't pass it tocmd
command. The fix is passing opts to lintercmd
to properly calculate the path tonode_modules
if it's not in working directory.