6e4e2180c2fa4ef81c7c4227b135c4c8f8338c03
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-eslint / Readme.md
1 # coc-eslint
2
3 Eslint language server extension for [coc.nvim](https://github.com/neoclide/coc.nvim).
4
5 Forked from [vscode-eslint](https://github.com/Microsoft/vscode-eslint).
6
7 ## Install
8
9 In your vim/neovim run the following command:
10
11 ```sh
12 :CocInstall coc-eslint
13 ```
14
15 ## Features
16
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.
22
23 ## Configuration options
24
25 **Notice** these configuration settings allow you to configure the behaviour of the coc-eslint extension.
26
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:
32   ```json
33   {
34     "eslint.options": {"configFile": "C:/mydirectory/.eslintrc.json"}
35   }
36   ```
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.
44     Example:
45   ```json
46   {"enable": true, "location": "sameLine"}
47   ```
48 - `eslint.codeAction.showDocumentation` - object with properties:
49   - `enable` - show open lint rule documentation web page in the quick fix menu. `true` by default.
50
51 ## Auto-fixing
52
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:
55
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`.
60
61 ## License
62
63 MIT
64