ESLint plugin for Neovim's built-in LSP client.
Install the plugins with your preferred plugin manager. For example, with vim-plug
:
Plug 'neovim/nvim-lspconfig'
Plug 'jose-elias-alvarez/null-ls.nvim'
Plug 'MunifTanjim/eslint.nvim'
eslint.nvim
needs to be initialized with the require("eslint").setup()
function.
For example:
local null_ls = require("null-ls")
local eslint = require("eslint")
null_ls.setup()
eslint.setup({
bin = 'eslint', -- or `eslint_d`
code_actions = {
enable = true,
apply_on_save = {
enable = true,
types = { "directive", "problem", "suggestion", "layout" },
},
disable_rule_comment = {
enable = true,
location = "separate_line", -- or `same_line`
},
},
diagnostics = {
enable = true,
report_unused_disable_directives = false,
run_on = "type", -- or `save`
},
})
-
jose-elias-alvarez/nvim-lsp-ts-utils
most of the stuffs are extracted from this plugin.
Licensed under the MIT License. Check the LICENSE file for details.