Quramy / tsuquyomi

A Vim plugin for TypeScript
http://www.vim.org/scripts/script.php?script_id=5151
1.39k stars 72 forks source link

tslint.json support? #266

Closed DimiTech closed 4 years ago

DimiTech commented 5 years ago

The problem:

Hi, I want the tsuquyomi linter to read the linting rules from my tslint.json. Currently it ignores it.

My .vimrc tsuquyomi settings:

...
" Syntastic + tsuquyomi (TypeScript)
let g:tsuquyomi_disable_quickfix = 1
let g:syntastic_typescript_checkers = ['tsuquyomi']
...

My tslint.json file:

{
    "defaultSeverity": "error",
    "extends": [
      "tslint:recommended"
    ],
    "rules": {
+      "semicolon": [ true, "never" ],
      "no-console": {
        "severity": "warn"
      },
      "quotemark": [ true, "single", "avoid-escape" ]
    },
    "rulesDirectory": []
}

As you can see, tslint.json specifies that a linting error should be shown for semicolons.

File that I'm testing on - IGreeter.ts:

export default interface IGreeter {
-  greet(name: string): void;
}

The semicolon at the end of the greet... line should trigger tsuquyomi to show a Unnecessary semicolon linting error but it does not.

Here is what happens when I run tslint from the console:

$ tslint IGreeter.ts
ERROR: IGreeter.ts[2, 28]: Unnecessary semicolon

Is there anything I'm missing?

Thanks for all the hard work!

DimiTech commented 4 years ago

This issue is no longer relevant since tslint is being deprecated in favor of eslint.