SublimeLinter: NodeLinter: Fallback to global linter no longer working since #1579

Since https://github.com/SublimeLinter/SublimeLinter/pull/1579 SublimeLinter fails to lint for me with a warning message about having eslint not installed in the project:

SublimeLinter: WARNING: Skipping 'eslint' for now which is listed as a devDependency in <dir> but not installed.  Forgot to 'npm install'?

My project intentionally not have a node_modules because it is synced from a remote system and I like avoid synching thousands of files. Could SublimeLinter fallback to a global linter binary defined in paths.<os> in case a local one is absent, like it did before https://github.com/SublimeLinter/SublimeLinter/pull/1579?

Here’s my config, /Users/silverwind/.npm-global/bin/eslint is present.

    "paths": {
        "osx": [
          "/Users/silverwind/.npm-global/bin",
        ],
    },

cc: @kaste

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20 (10 by maintainers)

Most upvoted comments

Can’t answer that one as I’ve never user Sublime’s projects feature and I’m not too keen on adding another dotfile to my projects for something that should be default behaviour, imho.

Yes, I’m aware of the drawbacks of using global eslint and I do replicate the plugins to the global installation for the purpose of editor linting. It’s not ideal, but works.

I have worked around by installing the modules locally, but would rather not have to do it for every remote project (I have a lot of them), so I’d strongly prefer if linting the global linter would at least be attempted, with a warning logged that results may not match the local installation and that users should npm install.