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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript: Enable ES6 by Default #337

Merged
merged 1 commit into from Dec 10, 2015

Conversation

felixrieseberg
Copy link
Contributor

  • This tiny commit enables ES6 support for JavaScript files by default, ensuring that VS Code supports popular JavaScript frameworks and modules out of the box.
  • Tests pass, behaviour otherwise unchanged.

Closes #318
馃殺 @joaomoreno @poteto @wycats

@msftclas
Copy link

Hi @felixrieseberg, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Felix Rieseberg). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@joaomoreno
Copy link
Member

Damn gotta fix that build. @jrieken is the guy to review this.

@jrieken
Copy link
Member

jrieken commented Nov 20, 2015

As much as I would like this change to be merged and as correct as it will, I still have to reject. An attempt to explain:

Our current JavaScript implementation is based on a slightly out-dated version of TypeScript and a lot of code I am not so proud of - we basically rewrite JavaScript to TypeScript. It was the right thing to do back when we started but in the mean time TypeScript catches up and very soon we will replace our custom JavaScript language service with the TypeScript solution. And as long as TypeScript sets the default to ES5 we shouldn't do anything different. Changing the default and then, by using TypeScript, changing it back won't get applause.

Tho having said that. This is where TypeScript sets the default ;-)

@felixrieseberg
Copy link
Contributor Author

@jrieken: Thanks for the explanation. I'm not married to any particular implementation, but I'm worried that having to create solution files for simple JavaScript doesn't exactly advertise Code as a great JavaScript editor.

Are you opposed to the user scenario of editing ES6 without further configuration? Since the issue is closed too, it seems like you'd rather have people use another editor. Leaving it open, even if the issue is upstream, would at least signal that we're aware that having to read documentation just to edit a simple *.js file with a let in it is a bad user experience.

@jrieken
Copy link
Member

jrieken commented Nov 20, 2015

@felixrieseberg Closing for now means we will reopen as soon as we have the chance to do provide a long term fix.

@poteto
Copy link

poteto commented Nov 20, 2015

I agree with @felixrieseberg, closing the issue (#318, not the PR) sends a signal to other people with less context that Code will never support ES6 by default.

@felixfbecker
Copy link
Contributor

I think a jsconfig.json is just so weird. Why compilerOptions when I'm not compiling anything (already said this in #408). VS Code should have first class support for (modern) JS. If the internal implementation is ugly, at least set it to ES6 until it's improved.

@admmasters
Copy link

Also agree that ES6 should be default.

@arlair
Copy link

arlair commented Nov 24, 2015

ES6 should be the default. I normally can't be bothered creating a file to get syntax highlighting and close VS Code and go use a different editor.

@zbandhan
Copy link

Definitely ES6 should be the default in my opinion

@egamma egamma mentioned this pull request Dec 2, 2015
34 tasks
@jrieken jrieken reopened this Dec 9, 2015
@msftclas
Copy link

msftclas commented Dec 9, 2015

Hi @felixrieseberg, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Felix Rieseberg). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@jrieken
Copy link
Member

jrieken commented Dec 9, 2015

Discussed with with TS team and they will make sure Latest becomes the default when project salsa is real (microsoft/TypeScript#6017, microsoft/TypeScript#4789)

@jrieken
Copy link
Member

jrieken commented Dec 9, 2015

@felixrieseberg I know it has been a while and there been discussion but I wonder if you willing to continue the work? Simply rebase with master and instead of ES6 we want to use Latest?

@felixrieseberg
Copy link
Contributor Author

Thanks, I'm very happy about this - I'll rebase and update. Should be in in about three hours (once I'm back in front of a notebook). Thanks a lot 馃殌!

@jrieken
Copy link
Member

jrieken commented Dec 9, 2015

Thanks. No hurries. End of week is good for me.

@joaomoreno
Copy link
Member

鉂わ笍

- This tiny commit enables ES6 support for JavaScript files by default, ensuring that VS Code supports popular JavaScript frameworks and modules out of the box.
- Tests pass, behaviour otherwise unchanged.

Closes microsoft#318
@felixrieseberg
Copy link
Contributor Author

@jrieken: This should now be good to go 馃嵒

@jrieken
Copy link
Member

jrieken commented Dec 10, 2015

Cheers 馃嵒

jrieken added a commit that referenced this pull request Dec 10, 2015
JavaScript: Enable ES6 by Default
@jrieken jrieken merged commit 64d077c into microsoft:master Dec 10, 2015
@SteveALee
Copy link

Nice! Thanks all

@egamma egamma mentioned this pull request Jan 6, 2016
59 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should ES6 be the JavaScript Default?
10 participants