Ale: Check TypeScript files with eslint

Created on 20 Jun 2017  路  4Comments  路  Source: dense-analysis/ale

I'm trying to use this, which works fine in my project when using eslint from the command line, but I can't get ale to use eslint for typescript.

I've tried:

let g:ale_linters = {
\   'typescript': ['eslint', 'tsserver', 'typecheck'],
\}
let g:ale_linter_aliases = {'js': 'ts'}
let g:ale_linter_aliases = {'ts': 'js'}

and

let g:ale_typescript_tslint_executable = 'eslint'

I imagine eslint needs to be added as one of the available linters for typescript.

new tool

Most helpful comment

Now eslint is supported for checking and fixing TypeScript code. The TypeScript parser plugin will be required for most projects, and whenever a parsing error is hit, it gives you a hint about using it. eslint for TypeScript uses the JavaScript settings, and the documentation mentions this.

All 4 comments

I plan on making eslint run for TypeScript files by default. I reckon typescript-eslint-parser is good enough now.

Now eslint is supported for checking and fixing TypeScript code. The TypeScript parser plugin will be required for most projects, and whenever a parsing error is hit, it gives you a hint about using it. eslint for TypeScript uses the JavaScript settings, and the documentation mentions this.

@w0rp It's cool that you added eslint TypeScript support, but I have no idea how to make it work. All I get is the cryptic error message "Parsing error (You may need configure typescript-eslint-parser)". It doesn't tell me how to configure it, or where, or _what_ I need to configure. All it tells me is that stuff is broken.

See the instructions for the parser here: https://github.com/eslint/typescript-eslint-parser

It's among the first results in Google.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chauncey-garrett picture chauncey-garrett  路  3Comments

kronos29296 picture kronos29296  路  4Comments

trevordmiller picture trevordmiller  路  4Comments

trevordmiller picture trevordmiller  路  3Comments

alexlafroscia picture alexlafroscia  路  4Comments