Geany do not see errors, and can not point to error strings, then I check html file with eslint
Here eslint command: eslint -f compact "%f" --global DemoApp,Telegram Then I check JS in html file (use html plugin in eslint), the output is black, and Geany can not point to error string, then I click on error. ![изображение](https://github.com/geany/geany/assets/27207859/46fae632-ae1d-46af-aa32-df8f1...)
Then I check mjs Javascript with the same command - all work fine ![изображение](https://github.com/geany/geany/assets/27207859/0dfa2f5f-df9b-4dc2-b9c9-bae2d...)
I was check in command line, for find difference, but all output is the same.
Here after html file check: ``` eslint -f compact "./index.html" --global DemoApp,Telegram /home/slava/projects-geany/TgWebAppStudy/index.html: line 489, col 8, Error - 'options' is defined but never used. (no-unused-vars) /home/slava/projects-geany/TgWebAppStudy/index.html: line 513, col 17, Error - 'el' is defined but never used. (no-unused-vars) /home/slava/projects-geany/TgWebAppStudy/index.html: line 717, col 85, Error - 'stream' is defined but never used. (no-unused-vars) /home/slava/projects-geany/TgWebAppStudy/index.html: line 728, col 85, Error - 'stream' is defined but never used. (no-unused-vars) /home/slava/projects-geany/TgWebAppStudy/index.html: line 740, col 84, Error - 'stream' is defined but never used. (no-unused-vars) /home/slava/projects-geany/TgWebAppStudy/index.html: line 770, col 4, Error - Unreachable code. (no-unreachable) /home/slava/projects-geany/TgWebAppStudy/index.html: line 785, col 23, Error - 'error' is defined but never used. (no-unused-vars) /home/slava/projects-geany/TgWebAppStudy/index.html: line 791, col 8, Error - 'DemoAppMenu' is assigned a value but never used. (no-unused-vars) /home/slava/projects-geany/TgWebAppStudy/index.html: line 799, col 8, Error - 'DemoAppInitData' is assigned a value but never used. (no-unused-vars) /home/slava/projects-geany/TgWebAppStudy/index.html: line 828, col 16, Error - Empty block statement. (no-empty) /home/slava/projects-geany/TgWebAppStudy/index.html: line 872, col 79, Error - 'e' is defined but never used. (no-unused-vars)
11 problems
``` Here After mjs file check ``` eslint -f compact "./main.mjs" --global DemoApp,Telegram /home/slava/projects-geany/chainliqbot1/engine/main.mjs: line 261, col 10, Error - 'showFilterResult' is defined but never used. (no-unused-vars) /home/slava/projects-geany/chainliqbot1/engine/main.mjs: line 261, col 82, Error - 'transaction' is defined but never used. (no-unused-vars) /home/slava/projects-geany/chainliqbot1/engine/main.mjs: line 313, col 10, Error - 'decolog' is defined but never used. (no-unused-vars) /home/slava/projects-geany/chainliqbot1/engine/main.mjs: line 337, col 10, Error - 'logNewBlock' is defined but never used. (no-unused-vars) /home/slava/projects-geany/chainliqbot1/engine/main.mjs: line 344, col 10, Error - 'decoChainCheck' is defined but never used. (no-unused-vars) /home/slava/projects-geany/chainliqbot1/engine/main.mjs: line 407, col 5, Error - 'gp' is assigned a value but never used. (no-unused-vars)
6 problems ```
Also I check exit code of eslint after mjs file check and html file check - it is 1 always.
I do not find any differences, but geany work fine for mjs, and have problem with html.
Also I check html by tidy - all fine. Problem only with eslint.
Please help, who can !
HTML and Javascript are different filetypes, there is no reason a command that has its errors recognised in one would work in another.
Also I check html by tidy - all fine. Problem only with eslint.
The error messages from tidy have a different format to eslint. Since `tidy` is the default HTML command Geany has been taught how to parse its error format for HTML.
But eslint has a different format.
But Javascript has an error regex specified to recognise error lines and extract file:line for its default command `jslint`and it luckily matches eslint format.
So copy the last line from `Tools->Configuration Files->Filetype Configuration->Scripting Languages->Javascript` (the `error_regex` line) to `Tools->Configuration Files->Filetype Configuration->Markup Languages->filetypes.html` save and restart Geany (might work with just `Tools->Reload configuration` I forget, you could try it first).
I try with # and without (see screen) but nothing help. Geany do not see errors from eslint, and see it from tidy. Anyway thank you for help. I will be try to find solution with this config files ![изображение](https://github.com/geany/geany/assets/27207859/41f83dac-02b9-44d1-815e-bae9f...) ![изображение](https://github.com/geany/geany/assets/27207859/6b32de1e-52ff-435f-9a01-20d77...)
The comments indicate that this is probably the first time you have edited the filetypes files, so I guess you set the eslint command in your local user build commands. Did you set it as a filetype command or a filetype independent command?
If you set eslint in the GUI, maybe better to set the error regex there as well, paste the regex into the error regex entry under the group you put the eslint in.
Thank you very match ! This work !!! ![изображение](https://github.com/geany/geany/assets/27207859/b546f265-8dd8-4d7f-9313-31309...)
Closed #3739 as completed.
github-comments@lists.geany.org