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

Missing transformations for Stage 3 syntax #42

Closed
MatteBailey opened this issue Nov 9, 2018 · 6 comments
Closed

Missing transformations for Stage 3 syntax #42

MatteBailey opened this issue Nov 9, 2018 · 6 comments

Comments

@MatteBailey
Copy link
Contributor

The README states that this preset contains transformation for all stage 3 syntax, but I noticed that @babel/plugin-proposal-class-properties, for example, is not included here. Is this intentional, or has it just not been added yet?

Sorry for the second issue in one day, and thanks!

@MatteBailey MatteBailey changed the title Missing transformations for State 3 syntax Missing transformations for Stage 3 syntax Nov 9, 2018
@ljharb
Copy link
Collaborator

ljharb commented Nov 9, 2018

This is intentional; we also use our shared eslint config, which uses eslint's default parser, which only supports stage 4 syntax.

When we support class fields in our style guide, we'll also support it here.

@ljharb ljharb closed this as completed Nov 9, 2018
@MatteBailey
Copy link
Contributor Author

That makes sense. This was the line that confused me:

Currently contains transforms for all standard syntax that is stage 4 (ES2018) or stage 3, except for the following:

Is "standard syntax" the key part there, and why class fields are not supported? From reading that, it's not very clear to me what stage 3 features I can expect to be available.

@ljharb
Copy link
Collaborator

ljharb commented Nov 9, 2018

Fair point! Happy to accept a PR that clarifies the language :-) (we clearly haven't kept this list up to date, since class fields reached stage 3 a few months ago)

@MatteBailey
Copy link
Contributor Author

I could probably make a PR! Question though: does this preset actually include any stage 3 transformations at this point? Looking through the source, I don't see any.

@ljharb
Copy link
Collaborator

ljharb commented Nov 9, 2018

Not any more - it used to, but they got promoted to stage 4. I'd probably word it like, all stage 3+ syntax is eligible, but it also has to be permitted by our JS style guide.

@MatteBailey
Copy link
Contributor Author

Addressed in #43.

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

2 participants