Closed JaceHensley closed 3 months ago
The behavior of LSP-eslint should be equivalent to what you see in VSCode. Unless we are maybe using slightly outdated version of the underlaying LSP server and we need to update it.
Do you have a project that could be used to test this issue?
For sure, here's a sample project that has auto fixes in VS Code but the error mentioned above in Sublime
https://github.com/JaceHensley/eslint-test
after checking out the repo just a yarn
at the root is needed
Thanks for the response!
Hello @JaceHensley.
I tried your example https://github.com/JaceHensley/eslint-test. The good thing is that it works on my side.
My LSP-eslint.sublime-settings file looks like:
// Settings in here override those in "LSP-eslint/LSP-eslint.sublime-settings"
{
"settings": {
"workingDirectories": [
{
"mode": "auto"
}
]
}
}
Without the workingDirectories
setting, I will get the "Parsing error: Cannot read file '/path/to/repo/package/tsconfig.eslint.json'. eslint"
, so my guess is that you just put the setting in the wrong place.
Fell free to reopen this if you still have any issues.
Had this same issue and your settings resolved it for me, thank you!
Ahhh I didn't have it nested in a "settings"
, thank you for rubber ducking with me!
I have a mono repo and each package has their own
.eslintrc.js
file with aparseOptions.project
set to a relative path. I get an error saying that the project cann't be read because no file exists at that path. But it's starting the path at the root of the monorepo rather than relative to the.eslintrc.js
. I have this"workingDirectories": [{ "mode": "auto" }]
set for my LSP-eslint setting.This setup works with VSCode's eslint package with the same
workingDirectories
setting.I'd be happy to dig into this more or provide more details, just lmk what's needed.
My monorepo is setup like this:
And the eslint file looks like this:
And I get an error saying
"Parsing error: Cannot read file '/path/to/repo/package/tsconfig.eslint.json'. eslint"