Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MunifTanjim/eslint.nvim
ESLint plugin for Neovim's built-in LSP client.
https://github.com/MunifTanjim/eslint.nvim
eslint neovim neovim-lsp neovim-plugin
Last synced: about 2 months ago
JSON representation
ESLint plugin for Neovim's built-in LSP client.
- Host: GitHub
- URL: https://github.com/MunifTanjim/eslint.nvim
- Owner: MunifTanjim
- License: mit
- Created: 2021-07-04T10:25:45.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-01T07:33:18.000Z (about 2 months ago)
- Last Synced: 2024-08-01T08:51:15.569Z (about 2 months ago)
- Topics: eslint, neovim, neovim-lsp, neovim-plugin
- Language: Lua
- Homepage:
- Size: 41 KB
- Stars: 35
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint.nvim
ESLint plugin for Neovim's built-in LSP client.
## Requirements
- [Neovim 0.5.0](https://github.com/neovim/neovim/releases/tag/v0.5.0)
- [`neovim/nvim-lspconfig`](https://github.com/neovim/nvim-lspconfig)
- [`jose-elias-alvarez/null-ls`](https://github.com/jose-elias-alvarez/null-ls.nvim)## Installation
Install the plugins with your preferred plugin manager. For example, with [`vim-plug`](https://github.com/junegunn/vim-plug):
```vim
Plug 'neovim/nvim-lspconfig'
Plug 'jose-elias-alvarez/null-ls.nvim'
Plug 'MunifTanjim/eslint.nvim'
```## Setup
`eslint.nvim` needs to be initialized with the `require("eslint").setup()` function.
For example:
```lua
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`
},
})
```## Acknowledgements
- [`jose-elias-alvarez/nvim-lsp-ts-utils`](https://github.com/jose-elias-alvarez/nvim-lsp-ts-utils)
most of the stuffs are extracted from this plugin.## License
Licensed under the MIT License. Check the [LICENSE](./LICENSE) file for details.