Closed
Description
I have been playing around with this idea for some time. Why? I miss some of the plugins and functionality of eslint in typescript (ay11, import, airbnb, unicorn with some other plugins and configs.)
Here's my gist with settings: https://gist.github.com/azdanov/7e74ed6ce41536b08277f4121a4f5218
And a working repo:
https://github.com/azdanov/tslint-eslint-crats
What is important:
typescript-eslint-parser
- main reason why this works.import/resolver
- helps with import statements.overrides
- make sure to run the typescript parser only on.ts
and.tsx
files.tslint.json
- modified for using prettier autofix.
Issues:
eslint --fix
not working.- https://github.com/eslint/typescript-eslint-parser#known-issues
Activity
tsiq-swyx commentedon Jun 2, 2018
wow... ok i would say that this is not a common usecase, but i understand why you want the eslint plugins. want to PR in a section under the Prettier + TSLint section? i dont use eslint so i can't really help unfortunately.
azdanov commentedon Jun 2, 2018
Sure thing. Will be sending one. 👍
gyandeeps commentedon Jun 3, 2018
I had always used eslint in my projects. But recently when i started using typescript and i ended up not using any lint tool but use typescript in strict mode.
Here is my thought: https://dev.to/gyandeeps/coding-with-typescript-prettier-and---1m1
Wanted to know your thoughts. thanks
tsiq-swyx commentedon Jun 3, 2018
yeah prettier + tslint is good for most people. but @azdanov has valid reasons to add in eslint plugins for his needs. happy to include it in this cheatsheet for people who may not know it is possible.
jingkeke commentedon Apr 7, 2019
2019年官方推荐是用eslint而不是tslint了吧...https://dev.to/robertcoopercode/using-eslint-and-prettier-in-a-typescript-project-53jb
swyxio commentedon Apr 8, 2019
thanks @jingkeke - that section does need an update.