eslint_d.js
eslint_d.js copied to clipboard
Cant find eslint_d.js
Sublime eslint formatter always used eslint instead of eslint_d after I upgrade eslint to latest. Below is my config. Any idea?
"local_eslint_path": {
"windows": "node_modules/eslint_d/bin/eslint_d.js"
},
// The location of the globally installed eslint package to use as a fallback
"eslint_path": {
"windows": "%APPDATA%/npm/node_modules/eslint/bin/eslint",
},
Are you using https://github.com/roadhump/SublimeLinter-contrib-eslint_d? The readme there also has some guidance for configuring Sublime correctly.
No, this is outdated. Previous version of eslint and sublimelinter seems to work,
If it’s outdated, it should probably be removed from the readme.
Can you specify which versions of Sublime and eslint used to work and which ones are breaking? Also, which OS and node versions are you using?
sublime linter eslint_d is not searchable in sublime package control.
windows 10
node: v12.13.1
eslint: v6.8.0
Sublime: 3.2.2 build 3211
Working on:
node: v8.9.1
eslint: v5.3.0
Sublime: 3.2.2 build 3211
I guess you already tried eslint_d stop
and made sure the process is gone?
I guess you already tried
eslint_d stop
and made sure the process is gone?
Yes, eslint_d is not running.
try to restart eslint_d doesnt seem to work as well.
@brendonco This is my configuration for SublimeLinter-eslint. I spent a lot of time getting this. I hope it will help you.
// https://github.com/SublimeLinter/SublimeLinter-eslint
"eslint":
{
"disable": false,
"args": [
"--config",
"${packages}/User/.eslintrc.json",
"--cache"
],
"executable": ["node", "${packages}/User/node_lib/node_modules/eslint_d/bin/eslint_d.js"],
"excludes": [],
"lint_mode": "background",
"syntax": ["javascript"],
"styles": [
{
"codes": [""]
}],
"disable_if_not_dependency": false
},
@brendonco Does the config provided by @Mar-Ser solve your issue? Should be put this in the readme?
@mantoni @Mar-Ser almost there.
Here's my config:
"eslint": {
"disable": false,
"args": [
"--config",
"${project_path}/.eslintrc",
"--cache"
],
"executable": ["node", "${project_path}/node_modules/eslint_d/bin/eslint_d.js"],
"excludes": [],
"lint_mode": "background",
"syntax": ["javascript"],
"styles": [
{
"codes": [""]
}],
"disable_if_not_dependency": false
},
got an error:
SublimeLinter: #1 eslint index.js ERROR:
========================================
JSON Decode error: We expected JSON from 'eslint', but instead got this:
Error: Failed to load plugin 'jest' declared in '--config': Cannot find module 'eslint-plugin-jest'
@mantoni It can be solved with --resolve-plugins-relative-to
. But right now you can't use it, because eslint_d doesn't know it. I open PR #121 to fix that.
But it looks like you don't need this option. Perhaps you forgot to install plugins for eslint. It must be installed in the same folder where installed eslint and eslin_d. In your case, it is project_path
.