Skip to main content
Back to Extensions Directory
coc.nvim fallback icon

Eslint extension for coc.nvim

Installation CommandVim prompt
:CocInstall coc-eslint
GitHub owner
Neoclide
Version
v3.1.2
npm package
coc-eslint
Requirements
coc ^0.0.82
License
MIT
Repository
GitHub
npm latest published 2026-08-21Registry checked 2026-08-23Registry summary

Published Package Summary

coc-eslint

Eslint language server extension for coc.nvim.

Forked from vscode-eslint.

Install

In your vim/neovim run the following command:

:CocInstall coc-eslint

eslint and a config file must be available, for example:

npm install eslint --global

Example config file, in the root of the project: eslint.config.mjs:

export default [
	{
		rules: {
			"prefer-const": "error",
			"no-undef": "error"
		}
	}
];

Important notice

  • This extension may not work with files just created, save the file and execute :CocCommand eslint.restart on that case.
  • The eslint config file should inside your workspace folder for project lint to work :h coc-workspace-folders.
  • Configuration eslint.probe is ignored when eslint.validate exists, configure eslint.validate for your project is recommended.
  • eslint.autoFixOnSave is deprecated, use :CocCommand eslint.migrateSettings for migrate to new configuration by use editor.codeActionsOnSave configuration.
  • eslint.useFlatConfig default to true and can't be turned off, consider migrate your old configuration to use flat config instead.

Features

  • Lint javascript files using eslint.
  • Provide codeActions for fixing lint issues.
  • Provide eslint commands:
    • eslint.lintProject Lint current project and set errors & warnings to vim's quickfix list.
    • eslint.executeAutofix Fix all auto-fixable Problems
    • eslint.createConfig Create ESLint configuration
    • eslint.showOutputChannel Show Output Channel
    • eslint.migrateSettings Migrate Settings
    • eslint.restart Restart ESLint Server
    • eslint.revalidate Revalidate all open files

Differences with vscode-eslint

  • Option eslint.lintTask.enable not exists, use :CocCommand eslint.lintProject to run eslint for current project.

Auto-fixing

The extension supports automatic fixing of warnings to the extent that it is supported by eslint. For warnings which support an auto-fix. You can apply the quick fix by either:

  • Configure editor.codeActionsOnSave with property "source.fixAll.eslint": true.
  • Set eslint.autoFixOnSave to true and save your file
  • Trigger <Plug>(coc-codeaction) with mapped keys, and select a fix action in the input list.
  • Run command :CocCommand eslint.executeAutofix.
  • Trigger command eslint.executeAutofix from :CocCommand.

Supporting

ESLint dependency

coc-eslint loads the ESLint library from the current workspace when possible; it does not bundle ESLint or project-specific ESLint plugins and configurations. Install eslint, its plugins, and shared configurations in the workspace that contains the files being linted. If no workspace installation can be resolved, the extension falls back to the global package location for the configured eslint.packageManager. You can also set eslint.nodePath to the directory that contains a resolvable ESLint installation.

License

MIT

Read the complete README
  • Eslint extension for coc.nvim
Activation Events
  • *
Developer Resources

Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.

Open Developer Guide

Version History

Published with coc-eslint@3.1.2 as history.md.

Open source file

3.1.2

  • fix release.yml (994c937)
  • not use npm whoami (b86f40d)
  • improve npmignore (65d1a70)

3.1

  • Added ESLint 10 flat-config support and related compatibility warnings.
  • Added bulk suppressions diagnostics for ESLint ≥10.1.
  • Added probing support for more languages and ESLint plugins.
  • Added eslint.useRealpaths for improved symlink/path resolution.
  • Added eslint.codeActionsOnSave.options.
  • Added eslint.lintTask.command for custom project lint commands.
  • Fixed code actions being applied to the wrong rule, document, or version.
  • Fixed duplicate listeners and status bars after ESLint restarts.
  • Improved global ESLint lookup, including pnpm failure handling.
  • Fixed eslint.lintProject quickfix population using JSON output.
  • Improved nested workspace, monorepo, and flat-config resolution.
  • Added an automated release workflow; nothing has been pushed or published yet.

3.0.13

  • Remove configuration eslint.fixOnSaveTimeout
  • Add commands eslint.migrateSettings, eslint.revalidate
  • Add configurations:
    • eslint.problems.shortenToSingleLine
    • eslint.migration.2_x
    • eslint.ignoreUntitled
    • eslint.useFlatConfig
    • eslint.timeBudget.onValidation
    • eslint.timeBudget.onFixes
  • Flat config is used by default, you may need to configure eslint.config.js in your home folder to make it works for all of your files.