I am having trouble while using eslint and jshint and jsprettier in sublime text. I have installed the following packages in sublime text:
- jsPrettier
- SublimeLinter
- SublimeLinter-eslint
- SublimeLinter-jshint
- SublimeLinter-flake8
- AutoPEP8
I have installed eslint
and jshint
globally using npm
with -g flag.
and also installed flake8
using pip
But when I am opening a .js
file in sublime text I am getting the following error in my console:
SublimeLinter: WARNING: jshint cannot locate 'jshint'
Please refer to the readme of this plugin and our troubleshooting guide: http://www.sublimelinter.com/en/stable/troubleshooting.html
WARNING:SublimeLinter.plugin.jshint:jshint cannot locate 'jshint'
Please refer to the readme of this plugin and our troubleshooting guide: http://www.sublimelinter.com/en/stable/troubleshooting.htmlSublimeLinter: WARNING: eslint cannot locate 'eslint'
Please refer to the readme of this plugin and our troubleshooting guide: http://www.sublimelinter.com/en/stable/troubleshooting.html
WARNING:SublimeLinter.plugin.eslint:eslint cannot locate 'eslint'
Please refer to the readme of this plugin and our troubleshooting guide: http://www.sublimelinter.com/en/stable/troubleshooting.html
Package Control: Skipping automatic upgrade, last run at 2022-11-06 19:27:39, next run at 2022-11-06 20:27:39 or after
Also when I am running jsPrettier: Format Code
from the command palate. I am getting the following error:
[JsPrettier ERROR]: Ensure Prettier is installed and defined in your environment PATH variable. You can optionally specify a custom path in 'JsPrettier.sublime-settings' using the 'prettier_cli_path' setting
I have correctly installed prettier
globally using npm
.
The linter is working fine for python files. Also autopep8
is working fine.
here is my PATH
variable:
/home/aayush/.pyenv/shims:/home/aayush/.local/bin:/home/aayush/.miniconda3/condabin:/home/aayush/.nvm/versions/node/v19.0.0/bin:/home/aayush/.pyenv/bin:/home/aayush/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/aayush/.local/bin
I use nvm
for managing nodejs and pyenv
for python. I am easily able to access eslint
, jshint
, prettier
and flake8
from command line.
Please help me to fix this issue.