[Question] Proper way to set path to eslint config file
fffed opened this issue · 3 comments
First. many thanks for a such cool extension and awesome plugin.
I could not manage to make coc-eslint
to take config from a directory outside of my current project. I tried to set overrideConfigFile
for eslint.options
"eslint.options": {
"overrideConfigFile": "/home/user/dir1/dir2/eslint.config.js"
},
and eslint.lintTask.options
:
"eslint.lintTask.options": ["-c /home/user/dir1/dir2/eslint.config.js"],
but no success - I've got No ESLint configuration found in /home/user/dir3/dir4/src.
.
Is there any way to accomplish this?
I use eslint v7.30.0.
Try coc-eslint@1.5.0, "eslint.options"
should be supported now.
eslint.options
: options to configure how ESLint is started using the ESLint CLI Engine API. Defaults to an empty option bag.
An example to point to a custom.eslintrc.json
file is:{ "eslint.options": { "configFile": "C:/mydirectory/.eslintrc.json" } }
eslint.options
: options to configure how ESLint is started using the ESLint CLI Engine API. Defaults to an empty option bag.
An example to point to a custom.eslintrc.json
file is:
json { "eslint.options": { "configFile": "C:/mydirectory/.eslintrc.json" } }
thank you for sharing this 🙏.
i stumbled upon this issue today. is it possible for COC to pick env vars ie. HOME
i use the same coc settings file across various machines most notably macos uses /Users
whereas most if not all GNU+Linux distros use /home
and not to mention i have different USER
(usernames) across different systems.
i tried $HOME
and ~
in my coc settings file without any luck.