Skip to content

tools: enable ES2016 support in ESLint - #9218

Merged
targos merged 1 commit into
nodejs:masterfrom
targos:eslint-es2016
Oct 24, 2016
Merged

tools: enable ES2016 support in ESLint#9218
targos merged 1 commit into
nodejs:masterfrom
targos:eslint-es2016

Conversation

@targos

Copy link
Copy Markdown
Member
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)

@targostargos added the tools Issues and PRs related to the tools directory. label Oct 21, 2016

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@thefourtheyethefourtheye left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
MemberAuthor

@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
Copy Markdown
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
Copy Markdown
MemberAuthor

@targos

Copy link
Copy Markdown
MemberAuthor

@thefourtheye LGTY ?

@thefourtheye

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

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

Comment thread.eslintrc Outdated

Copy link
Copy Markdown
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
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

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 <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@targos

Copy link
Copy Markdown
MemberAuthor

Landed in 6031d8e

@targostargos closed this Oct 24, 2016
@targos
targos deleted the eslint-es2016 branch October 24, 2016 12:06
@targos
targos merged commit 6031d8e into nodejs:masterOct 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 <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
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 <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
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 <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Nov 22, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

toolsIssues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@targos@thefourtheye@jasnell@lpinca@cjihrig@not-an-aardvark@MylesBorins