-
-
Notifications
You must be signed in to change notification settings - Fork 209
Typescript Support #505
Comments
I think we should make it an option. Now that ESLint has glob-based configuration, it would allow for projects to have fine-grained control of when they want to enable TypeScript support or not. |
Please can we put this in on pause for now? I am working with Andy to align on AST structure (we are still finding issues in both projects) and it would be confusing to have two different ways to use ESLint with TypeScript whilst we figure that out IMHO |
Happy to chat further on it on babel slack group if it would be useful! |
sure we can do that, it was more that we should start testing it out ourselves (don't need to broadcast) |
@JamesHenry Thanks for the update :) |
@hzoo Sure, thanks, I guess there is no harm in getting the ball rolling and the important note is just that the AST is definitely still subject to change |
Yeah, babel-eslint is standalone so we can update when it happens (no plugins, etc) |
Ok after babel/babylon#658 we can make a better error message |
I think we should also wait for eslint/eslint#8755 to land, so that we can use a real API for TypeScript scope/visitor keys. |
Went to set this up today and realized this tiny bit is missing. Would it make sense to land a PR to add: {
"parser": "babel-eslint",
"parserOptions": {
"typescript": true
}
} That replaces |
If you want to use ESLint to lint TypeScript right now, you can use https://github.com/eslint/typescript-eslint-parser. It's still in development, but it's stable enough that I've been using it at work without issue. |
Both eslint/eslint#8755 and babel/babylon#658 have been merged :) |
Hi everyone. Short question: Is there already an option for this or does the TypeScript support currently depends on #573, so it picks up your correctly configured Babel config? Thanks. |
@JamesHenry How are we feeling about this now? Is it possible to move forward here? |
I don't use Flow in my app, it's possible to fork and replace flow with typescript? |
@JamesHenry friendly ping! |
this is how we are doing in our codebase at @entria https://medium.com/entria/incremental-migration-to-typescript-on-a-flowtype-codebase-515f6490d92d we use does this sound reasonable? |
I opened a PR for this. That PR adds a feature that we can customize babel parser plugins. That is, we can enable the PR link: #692 |
It would be great if I can use this parser to lint my ts files. |
Hi guys, just wondering what the current state of ts support is for |
Any updated status on this? |
Babel compile well the |
Does anyone have more info about the current state of this? Maybe @hzoo can help? |
Closing this as a dupe of #663. |
@kaicataldo Why you close this issue? By issue id #663 is dupe of this. And you forget about the label. |
@kaicataldo IMO #663 is a duplicate of this one, not the other way around. |
https://github.com/babel/babylon/releases/tag/v7.0.0-beta.16 landed the typescript plugin, so we can already update babel-eslint to support it? Just gotta add it to the list of plugins + any fixes (update to beta.17)
May have to have an option though since can't have run both flow and ts.
means modifying https://github.com/babel/babel-eslint/blob/master/index.js#L396
The text was updated successfully, but these errors were encountered: