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
@babel/eslint-* v8 #10752
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thoughts on this current list? I'd love to evaluate the additional options proposed in the issues above for @babel/eslint-parser in particular. |
I'm not sure this should be a high priority for the v8 release: babel/babel-eslint#786. While it would be nice to support this, this feels like an edge case that, if we do support, might open up another can of worms. Thoughts? |
Also wanted to note that we should probably wait for estree/estree#204 to be finalized before updating the ESLint packages so that we don't duplicate any work. |
Remove unnecessary rules from the plugin: babel/eslint-plugin-babel#188 |
@kaicataldo Thanks for bringing our attention to this issue. (and for all your work on this package!) It's nice to see that this package is still being actively maintained, albeit in a new repository. Under I'd be willing to make a PR with the same 2 line change to this repo, but (as always?) the tricky bit would be adding the tests. This will be a bit harder in this repo since the structure of the tests has changed considerably, and I'm not really sure where such tests would belong since there don't seem to be any other tests related to the configuration logic. If we'd be open to a simpler route, we could even forgo the tests (shocking/terrible I know!) but then again there are no other tests for cases where the contents of the config file change, and really all that adding support for I'm fairly busy with work so I don't have much more time to devote to this, but if we can decide on a happy compromise , I'd be happy to open a new PR. I can add tests as well if necessary if you can offer guidance on how to do so without too much work. |
The package |
@GitGangGuy We haven't published the new |
@kaicataldo Maybe we can add a note in the READMEs? |
Hi, any estimated date when is the new version available with fixed |
@sKopheK The current plan is to release these packages with Babel v8. |
Keeping a tab on this till it is released. |
I'm a little perplexed by the statement "folks should just use typescript-eslint". For projects using babel to enable non-standard language features inside TypeScript files, I don't think it's possible to use For context, I came here via babel/babel-eslint#832 (which looks to be fixed by #9529), so I'm very eager to see that fix in a non-beta release! 🙂 |
This is correct. We've historically struggled to maintain compatibility with ESLint for plain old JavaScript, so it's hard to prioritize supporting TypeScript in
I'd be curious how many people actually run a double compilation step like this, since it seems like you would lose some benefit of type-checking (unless the Babel transform adds the types to the compiled output?). |
It took me some time to understand what you meant by this. The main benefit of TypeScript is static typing (ie. type-checks are performed by static analysis tools, like eslint), so losing type information shouldn't matter at runtime. However, it matters hugely during static analysis. TSC can't parse Babel-specific syntax, Babel can't natively parse TypeScript syntax, and
Because of this drawback, probably not many. This approach isn't without benefits, however: It retains all of the platform-agnostic benefits of using Babel, and it also eases the process of migrating to TypeScript in projects already using Babel. However, the number of folks currently using this approach doesn't say anything about how many would like to. I'd imagine the entire JavaScript community would want Babel and TypeScript to be more compatible! As far as I can tell, this drawback is the only remaining barrier. By the way, I'm relatively new to TypeScript, so please correct me if any of the above is wrong, or if I've overlooked something! |
I was referring to using static analysis tools rather than at runtime. What I'm curious about is if Babel transforms also include the type transforms so that |
I think the answer to your question is that Babel transforms don't include type transforms, at least as of Babel v7.10.0. The Babel docs for
|
This has now been released! |
@mattlubner Would you be willing to make a new issue so we can discuss how we can better support TypeScript in |
Very cool! I tried in vain to find the release. Can you share a link please? |
Should be part of the v7.11.0 release. |
Ahh! Given the title of this issue I was looking for a v8 release! |
Ah, yeah - sorry for the confusion! We originally intended to release this with v8, but we didn't want to hold it up until v8 is ready. |
Making an issue here to track the work that needs to be done for the new @babel/eslint-* packages for the v8 release.
@babel/eslint-parser
(taken from https://github.com/babel/babel-eslint/milestone/1):add support for preset & plugins in babelOptionsWe can add this in a later minor version if need be.11.0.0-beta.0 - Private class methods no-undef errorThis is not an issue specific tobabel-eslint
since the error is being thrown by@babel-core
and the example code doesn't compile either.11.0.0-beta.0 - Private Instance Methods - Parsing error: params is not iterable - Dupe of Could not traverse ClassPrivateMethod when estree plugin enabled #9506@babel-core: parse should parse only #1091411.0.0-beta.0 - Typescript interface/type no-undef errorI don't think we should consider this a blocker for v8, since TS support is currently fairly limited. I think it makes sense to focus on making TS support more robust in the future, though I'm still of the mind that folks should just usetypescript-eslint
.Doesn't work with custom parser throughI don't think we should consider this a blocker for v8.parserOverride
@babel/eslint-plugin
Template string failing with Cannot read property 'range' of null #10904Ensure@babel/eslint-parser: update scope analysis for ClassPrivateProperty #10913ClassPrivateProperty
works correctly withno-unused-vars
andno-undef
.Can we create a shared config that enables the parser and corresponding rules automatically?I no longer think this is a good idea because ESLint doesn't provide any runtime hooks to see what the user has configured. Turning off incompatible rules works, but we can't enable the corresponding rule in our plugin.Audit current rules to see if they need to exist.@babel/eslint-plugin: remove deprecated rules #10975 @babel/eslint-plugin: Update rules/tests to use @babel/eslint-parser #10977Remove deprecated rules?@babel/eslint-plugin: remove deprecated rules #10975semi: never
not working withdo
expressions babel-eslint#814@babel/parser
RegExpLiteral
is not converted toLiteral
in an edge casePlease feel free to edit this comment or discuss below.
The text was updated successfully, but these errors were encountered: