Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for other TSLint config formats like tslint.yaml #1342

Closed
JulioJu opened this issue Feb 9, 2018 · 2 comments
Closed

Add support for other TSLint config formats like tslint.yaml #1342

JulioJu opened this issue Feb 9, 2018 · 2 comments

Comments

@JulioJu
Copy link
Contributor

JulioJu commented Feb 9, 2018

1.Create a TypeScrit project with a package.json, tsconfig.json and a tslint.yaml and without file tslint.json.

If our behaviour is to use tslint.yaml, there is actually no simple customisations. It's annoying for those who use not tslint.json, and only yaml files.

If we replace tslint.json by tslint.yaml at the line 60 of ale_linters/typescript/tslint.vim, it resolves the problems. We could load simply the file tslint.yaml if it's in an ancestor directory !

:let g:ale_typescript_tslint_config_path = 'tslint.yaml' isn't very useful in the case, because it looking for the exact path were the tslint config file is located.

Maybe it could be cool to add a new variable. It could be named ale_typescript_tslint_config_name "

g:ale_typescript_tslint_config_name       *g:ale_typescript_tslint_config_name*
                                          *b:ale_typescript_tslint_config_name*
  Type: |String|
  Default: `'tslint.json'`

ALE will first discover the ${ale_typescript_tslint_conig_name} path in an ancestor directory.

So maybe we must change the line 60 of ale_linters/typescript/tslint.vim by this variable.

@JulioJu JulioJu changed the title tslint.yaml isn't loaded in yaml format tslint.yaml isn't loaded properly Feb 9, 2018
@JulioJu JulioJu changed the title tslint.yaml isn't loaded properly tslint.yaml isn't easy loaded Feb 9, 2018
@w0rp w0rp changed the title tslint.yaml isn't easy loaded Add support for other TSLint config formats like tslint.yaml Feb 13, 2018
@w0rp
Copy link
Member

w0rp commented Feb 13, 2018

The linter and fixer only look for tslint.json at the moment. The code needs to be updated to look for other config filenames. Handling this would be issue if this issue was resolved: palantir/tslint#1590

@w0rp
Copy link
Member

w0rp commented Aug 18, 2019

I'll close this and other TSLint issues I find, as TSLint is deprecated. I recommend switching to ESLint. palantir/tslint#4534

@w0rp w0rp closed this as completed Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants