This repository has been archived by the owner on Aug 12, 2023. It is now read-only.
Eslint doesn't work with config option #806
-
This is likely not a problem with null-ls, but with eslint. However, maybe you have a solution on how to fix it on my side, or do some workaround in null-ls, because opening an issue in eslint is futile. Problem: # This works fine
eslint -c ~/.config/.eslintrc.json test.js
# This doesn't work. Notice the quotes. For some reason, eslint considers it a relative path
# and according to the error, it looks in /home/username/Documents/~/.config/.eslintrc.json
eslint -c "~/.config/.eslintrc.json" test.js In my null-ls I have the following, which doesn't work and results in the same path as the second example above. null_ls.builtins.diagnostics.eslint.with({
extra_args = { "-c", "~/.config/.eslintrc.json" },
prefer_local = "node_modules/.bin",
}), I am wondering if there is a way to get the expected result? |
Beta Was this translation helpful? Give feedback.
Answered by
jose-elias-alvarez
Apr 10, 2022
Replies: 1 comment 2 replies
-
Try using null_ls.builtins.diagnostics.eslint.with({
extra_args = { "-c", vim.fn.expand("~/.config/.eslintrc.json") },
prefer_local = "node_modules/.bin",
}), |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
sarmong
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try using
vim.fn.expand()
to expand~
into a full path: