Sublime Forum

SublimeLinter SublimeLinter-eslint not working

#1

Hello all. This is my first post here. I hope I am not breaking any rules by asking this question here and also on StackOverflow. If I am, please let me know and I will take it down, but I am really up against it


This morning on restart I had no choice except to reinstall Windows 11 and lose all my applications. I worked all day and restored almost everything. However I cannot get the tool which I use the most (eslint|SublimeLInter| SublimeLinter-eslint) working. My dev environment is SublimeText and Nodejs.

My steps so far have been these:

  • npm -g install eslint
  • Package Control : Install Package SublimeLLinter v.4.28.2
  • Package Control : Install Package SublimeLInter-eslint v.4.59

There were no errors in the console.
I have an eslint.config.cjs at the root of all my projects.
I restarted SublimeText after the installation of the packages.
When I open any .js file I get no Lint menu item anywhere. This was working perfectly before the crash.

I rely on this tool for everything.I tried a few tweaks to the settings files unsuccessfully

node is in my path.
eslint is in my path.
Running eslint from the from the command line works fine
There is just no integration into SublimeText

I am not sure whether this pertains but when I click Preferences => Browse Packages. I don’t see folders there for either SublimeLInter or SublimeLinter-eslint. I tried unzipping SublimeLInter directly into that folder from the repository, but that had no effect.

I am really stuck here, Any help would be greatly appreciated.

0 Likes

#2

What version of Sublime Text?

Did you really mean?:
Package Control : Install Package SublimeLLinter v.4.28.2

or

Did you actually install?:
SublimeLinter v.4.28.2

0 Likes

#3

No sorry, When you choose a menu item in PackageControl it includes that info. I just included the version number in case anyone knew of a particular regression bug in that version or something

Thanks.

0 Likes

#4
  1. You still have not indicated what version of Sublime text you are using.

  2. I can find no package labeled SublimeLLinter v.4.28.2. I do find SublimeLinter, note only one L not the LL you show.

  3. From here:
    https://github.com/SublimeLinter/SublimeLinter-eslint?tab=readme-ov-file
    Under Examples section have you tried the manual setup to point at eslint?

“linters”: {
“eslint”: {
“selector”: “source.ts, source.js - meta.attribute-with-value”
}
}

0 Likes

#5

Somehow my reply was not sent earlier. I will try this suggestion and get back . Thanks so much

0 Likes

#6

Thanks for all your help.
As often happens, the smallest errors are the ones that take days to find. It turns out that I assumed that, because I didn’t see the context menu ‘Lint This View’ (which I had been using for years), I assumed that something was wrong with my install. I just followed the steps above and checked the Command Palette (which I hadn’t done before) and everything is perfect - EXCEPT - there is no context menu. I installed PackageResourceViewer, opened SublimeText Context.sublime-menu and found this

[
    {
        "caption": "Lint This View",
        "command": "sublime_linter_lint"
    },
    {
        "caption": "Linter Quick Action",
        "command": "sublime_linter_quick_actions",
        "args": { "prefer_panel": true }
    }
]

It would seem that that would show a context menu as before but it doesn’t. I can hit Ctrl K,I and then Ctrl K,A and it works but it is much slower especially to one who is fat-fingered :slight_smile: Any ideas?

0 Likes

#7

As far as I remember, the context menu items are hidden if the configured linter runs in “background”/automatic mode which eslint does by default.

0 Likes