-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Prettier + TSLint + ESLint #7
Comments
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. |
Sure thing. Will be sending one. 👍 |
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. Wanted to know your thoughts. thanks |
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. |
2019年官方推荐是用eslint而不是tslint了吧...https://dev.to/robertcoopercode/using-eslint-and-prettier-in-a-typescript-project-53jb |
thanks @jingkeke - that section does need an update. |
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.The text was updated successfully, but these errors were encountered: