Tthis extension is not maintained anymore, it can't work with latest coc.nvim.
Tslint language server extension for coc.nvim.
The tslint module is resolved from current file and then global modules of npm and yarn.
Note: this extension can't detect semantic issues, use coc-tslint-plugin instead.
In your vim/neovim run command:
:CocInstall coc-tslint- Lint
typescriptandjavascriptfiles using tslint. - Provide
codeActionsfor fix lint issues. - Provide tslint commands:
tslint.fixAllProblemsfix problems of current buffer.tslint.createConfigcreate tslint config file.tslint.lintProjectlint current project
Notice this configuration settings allow you to configure the behaviour of the vscode-tslint extension. To configure rules and tslint options you should use the tslint.json file.
tslint.enable- enable/disable tslint.tslint.jsEnable- enable/disable tslint for .js files, default isfalse.tslint.run- run the linteronSaveoronType, default isonType.tslint.rulesDirectory- an additional rules directory, for user-created rules.tslint.configFile- the configuration file that tslint should use instead of the defaulttslint.json.tslint.ignoreDefinitionFiles- control if TypeScript definition files should be ignored, default istrue.tslint.exclude- configure glob patterns of file paths to exclude from linting. The pattern is matched against the absolute path of the linted file.tslint.validateWithDefaultConfig- validate a file for which no custom tslint configuration was found. The default isfalse.tslint.nodePath- custom path to node modules directory, used to load tslint from a different location than the default of the current workspace or the global node modules directory.tslint.autoFixOnSave- turns auto fix on save on or off, or defines an array of rules (e.g. [no-var-keyword]) to auto fix on save. Note: Auto-fixing is only done when manually saving a file. It is not performed when the file is automatically saved based on thefiles.autoSavesetting. Executing a manual save on an already-saved document will trigger auto-fixing.tslint.alwaysShowStatus- always show theTSLintstatus bar item and not only when there are errors. The default isfalse.tslint.alwaysShowRuleFailuresAsWarnings- always show rule failures as warnings, ignoring the severity configuration in thetslint.jsonconfiguration.tslint.packageManager: use this package manager to locate thetslintandtypescriptmodules. Valid values are"npm"or"yarn". This setting is only consulted when the modules are installed globally.
The extension supports automatic fixing of warnings to the extent supported by tslint. For warnings which support an auto-fix. You can apply the quick fix by either:
- Trigger
<Plug>(coc-codeaction)with mapped keys, and select a fix action in input list. - use the command
Fix all auto-fixable problems.
When there are overlapping auto fixes a user will have to trigger Fix all auto-fixable problems more than once.
MIT