GitXplorerGitXplorer
M

eslint.nvim

public
37 stars
1 forks
1 issues

Commits

List of commits on branch main.
Unverified
05d7e86ea01dc03e6fcc7d5b39530d34ebdef477

feat: exit eslint_d when nvim exists

MMunifTanjim committed 6 months ago
Unverified
aed47e2f9169df3c89240af5fd0bff0b60960d88

feat: add compatibility w/ latest eslint_d

MMunifTanjim committed 6 months ago
Unverified
158f2289907d377018752fcfe0d61b746dc11767

feat: make options optional for setup

MMunifTanjim committed 2 years ago
Unverified
f391cbf9078066b3f372a69b59f4d5ca1507507d

docs: update defaults for code_actions.apply_on_save.types

MMunifTanjim committed 2 years ago
Unverified
7ca793fe1b292418a8b72f1a18b15ab25e1db339

feat: code_actions.apply_on_save everything by default

MMunifTanjim committed 2 years ago
Unverified
5e9ca2592ffb45ac89d698a63a496d35ecfba7c3

fix: code_actions.apply_on_save with eslint_d

MMunifTanjim committed 2 years ago

README

The README file for this repository.

eslint.nvim

ESLint plugin for Neovim's built-in LSP client.

Requirements

Installation

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'

Setup

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`
  },
})

Acknowledgements

License

Licensed under the MIT License. Check the LICENSE file for details.