3 Eslint language server extension for [coc.nvim](https://github.com/neoclide/coc.nvim).
5 Forked from [vscode-eslint](https://github.com/Microsoft/vscode-eslint).
9 In your vim/neovim run the following command:
12 :CocInstall coc-eslint
17 - Lint `javascript` files using eslint.
18 - Provide `codeActions` for fixing lint issues.
19 - Provide eslint commands:
20 - `eslint.createConfig` create eslint config file.
21 - `eslint.executeAutofix` fix all fixable issues of current buffer.
23 ## Configuration options
25 **Notice** these configuration settings allow you to configure the behaviour of the coc-eslint extension.
27 - `eslint.enable`: enable/disable ESLint. This is enabled by default.
28 - `eslint.quiet` - ignore warnings.
29 - `eslint.packageManager`: controls the package manager to be used to resolve the ESLint library. This has only an influence if the ESLint library is resolved globally. Valid values are `"npm"` or `"yarn"`.
30 - `eslint.options`: options to configure how ESLint is started using the [ESLint CLI Engine API](http://eslint.org/docs/developer-guide/nodejs-api#cliengine). Defaults to an empty option bag.
31 An example to point to a custom `.eslintrc.json` file is:
34 "eslint.options": {"configFile": "C:/mydirectory/.eslintrc.json"}
37 - `eslint.run` - run the linter `onSave` or `onType`. The Default is `onType`.
38 - `eslint.autoFixOnSave` - enables auto fix on save.
39 - `eslint.nodePath` - use this setting if an installed ESLint package can't be detected. For example `/myGlobalNodePackages/node_modules`.
40 - `eslint.filetypes` - an array of language identifiers specifying the files to be validated.
41 - `eslint.codeAction.disableRuleComment` - object with properties:
42 - `enable` - show disable lint rule in the quick fix menu. `true` by default.
43 - `location` - choose to either add the `eslint-disable` comment on the `separateLine` or `sameLine`. `separateLine` is the default.
46 {"enable": true, "location": "sameLine"}
48 - `eslint.codeAction.showDocumentation` - object with properties:
49 - `enable` - show open lint rule documentation web page in the quick fix menu. `true` by default.
53 The extension supports automatic fixing of warnings to the extent that it is supported by eslint.
54 For warnings which support an auto-fix. You can apply the quick fix by either:
56 - Set `eslint.autoFixOnSave` to `true` and save your file (recommended).
57 - Trigger `<Plug>(coc-codeaction)` with mapped keys, and select a fix action in the input list.
58 - Run command `:CocCommand eslint.executeAutofix`.
59 - Trigger command `eslint.executeAutofix` from `:Denite coc-command`.