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

tools: enable ES2016 support in ESLint #9218

Merged
merged 1 commit into from
Oct 24, 2016
Merged

Conversation

targos
Copy link
Member

@targos targos commented Oct 21, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

tools

Description of change

This allows to use the exponentiation operator.

Ref: #9208 (comment)

@targos targos added the tools Issues and PRs related to the tools directory. label Oct 21, 2016
Copy link
Contributor

@not-an-aardvark not-an-aardvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@thefourtheye thefourtheye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consider performance implications of the new features before allowing us to use this?

@targos
Copy link
Member Author

targos commented Oct 21, 2016

@thefourtheye you're right. Though I would be surprised if V8 didn't just convert this operator to a Math.pow call.
/cc @nodejs/v8

@thefourtheye
Copy link
Contributor

@targos Looks like, in ** case, it is internally translated to Math.pow call only, if I am not wrong. https://codereview.chromium.org/1678303002/diff/320001/src/parsing/parser.cc?context=10&column_width=80&tab_spaces=8

@targos
Copy link
Member Author

targos commented Oct 24, 2016

@targos
Copy link
Member Author

targos commented Oct 24, 2016

@thefourtheye LGTY ?

@thefourtheye
Copy link
Contributor

@targos What about the other features in es2016? Do we have any rough idea if they will also be performing at par with their es2015 equivalents? Because once we allow them in the linter it means that we officially allow es2016 in our codebase.

@targos
Copy link
Member Author

targos commented Oct 24, 2016

The exponentiation operator is the only new syntax of ES2016. This change doesn't add support for other features.

@@ -1,6 +1,8 @@
env:
node: true
es6: true
parserOptions:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: what about adding a blank line before this one?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. I'll do it on merge

@targos
Copy link
Member Author

targos commented Oct 24, 2016

Maybe I can change the commit message to tools: enable ES2016 syntax support in ESLint to make it clearer.

This allows us to use the exponentiation operator.

PR-URL: nodejs#9218
Ref: nodejs#9208 (comment)
Reviewed-By: Teddy Katz <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@targos
Copy link
Member Author

targos commented Oct 24, 2016

Landed in 6031d8e

@targos targos closed this Oct 24, 2016
@targos targos deleted the eslint-es2016 branch October 24, 2016 12:06
@targos targos merged commit 6031d8e into nodejs:master Oct 24, 2016
jasnell pushed a commit that referenced this pull request Oct 24, 2016
This allows us to use the exponentiation operator.

PR-URL: #9218
Ref: #9208 (comment)
Reviewed-By: Teddy Katz <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 17, 2016
This allows us to use the exponentiation operator.

PR-URL: #9218
Ref: #9208 (comment)
Reviewed-By: Teddy Katz <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 19, 2016
This allows us to use the exponentiation operator.

PR-URL: #9218
Ref: #9208 (comment)
Reviewed-By: Teddy Katz <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants