SublimeLinter-eslint: ESlint does not find any errors.
Sorry if this has come up before, but I sifted through closed issues and did not find anything that quite matches.
I’ve installed the latest (at this time) version of SL and the ESlint plugin from Package Control on ST 3.2.2, Build 3211.
When I run ESlint from the command panel, I get the following output in the console with debug=True:
SublimeLinter: sublime_linter.py:345 Delay linting 'index.vue' for 0.0s
SublimeLinter: linter.py:1088 eslint: Checking lint mode 'background' vs lint reason 'on_load'. Ok.
SublimeLinter: SublimeLinter/SublimeLinter#1 linter.py:1105 eslint: linting 'index.vue'
SublimeLinter: SublimeLinter/SublimeLinter#1 node_linter.py:85 Searching executable for 'eslint' starting at '/home/faaiz/documents/websites/foo/pages'.
SublimeLinter: sublime_linter.py:593 Linting 'index.vue' took 0.00s
SublimeLinter: linter.py:1088 eslint: Checking lint mode 'background' vs lint reason 'on_user_request'. Ok.
SublimeLinter: sublime_linter.py:345 Delay linting 'index.vue' for 0.0s
SublimeLinter: linter.py:1088 eslint: Checking lint mode 'background' vs lint reason 'on_user_request'. Ok.
SublimeLinter: SublimeLinter/SublimeLinter#2 linter.py:1105 eslint: linting 'index.vue'
SublimeLinter: SublimeLinter/SublimeLinter#2 node_linter.py:85 Searching executable for 'eslint' starting at '/home/faaiz/documents/websites/foo/pages'.
SublimeLinter: sublime_linter.py:593 Linting 'index.vue' took 0.07s
In this case, it seems like the linter is working, however I do not see any errors either in the console or in the editor. Through the console, I can verify that background linting through SL is working as expected.
Curiously, it seems to be searching for the eslint executable within the folder of the current file open in ST. So in this case, /home/faaiz/documents/websites/foo/ is the project root, and it is looking in /home/faaiz/documents/websites/foo/pages/. The file being linted is /home/faaiz/documents/websites/foo/pages/index.vue.
No errors of any sort. ESlint works fine from the command line.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 15 (7 by maintainers)
Commits related to this issue
- Add logging reasons for potential failures Closes #300 — committed to Cobertos/SublimeLinter-eslint by Cobertos 3 years ago
I think you can try to set
selectormanually. You can also hack on the plugin and log where we abort and turn that into a PR (see: https://github.com/SublimeLinter/SublimeLinter-eslint/issues/300#issuecomment-704506799).Thank you @kaste.
For anyone else my initial reaction was “What is a selector?”. https://github.com/SublimeLinter/SublimeLinter-eslint#examples has some example selectors. I’ve a mix of all sorts so went with:
source.tsx, source.ts, source.jsx, source.js - meta.attribute-with-valueIt bails out at SublimeLinter/SublimeLinter@35a7afe/lint/base_linter/node_linter.py#L77 if you configured
executablemanually because we cannot find the “package.json” from the executable, only the other way around. As you already bailed out of the “automatic” (by setting executable), it seems reasonable to setselectormanually as well I think.Maybe you can avoid setting executable so we run
find_local_executable, or we find out whyfind_local_executablefails and if we can improve its algo.