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

Apply same ESLint rules to TypeScript files as well #2347

Open
silvenon opened this issue Oct 15, 2020 · 5 comments
Open

Apply same ESLint rules to TypeScript files as well #2347

silvenon opened this issue Oct 15, 2020 · 5 comments
Assignees

Comments

@silvenon
Copy link
Contributor

silvenon commented Oct 15, 2020

Currently our ESLint config for JavaScript (Flow) and TypeScript are strictly separated, but when we start adding TypeScript files at some point in the future, we want to have the same ESLint support as we did for Flow files. We should extract the common parts of the configuration and eslintJS.js and eslintTS.js should strictly contain config related to Flow and TypeScript respectively, while everything else should be in eslintCommon.js that both would extend.

@yencolon
Copy link

Hi, I think I can help you with this!

@silvenon
Copy link
Contributor Author

That would be very much appreciated! Let me know if you need any help 😉 The configs have most likely diverged significantly, so when in doubt, prefer the rules that are in eslintJS.js.

@yencolon
Copy link

Of course, assign this to me 👍

@yencolon
Copy link

Hi @silvenon, I'm currently working on this, but I am a little bit confused, the issue description says that there's 'a lot of repetition' in both files, but I don't see it. Maybe I did not get the main idea. Can you help me?

@silvenon
Copy link
Contributor Author

That's true, it's kinda standalone currently, but try applying to it everything that isn't specifically Flow-related so we see what happens. When we start adding TypeScript files at some point in the future, we want to have the same ESLint support as we did for Flow files.

@silvenon silvenon changed the title Make the ESLint config more DRY Apply same ESLint rules to TypeScript files as well Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants