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

lib: enable dot-notation eslint rule #18007

Closed

Conversation

@apapirovski
Copy link
Member

commented Jan 5, 2018

There are currently only two instances of property access using square brackets (foo['bar']) within the lib folder. Fix those and enable an eslint rule to prefer dot notation (foo.bar).

Eventually this could be enabled across the project but currently this would cause too much churn (152 instances would need to be changed, mostly within test).

Refs: https://eslint.org/docs/rules/dot-notation

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

lib

@apapirovski

This comment has been minimized.

Copy link
Member Author

commented Jan 5, 2018

@addaleax addaleax added lib / src tools and removed inspector module labels Jan 5, 2018

@eugeneo

eugeneo approved these changes Jan 5, 2018

@jasnell

jasnell approved these changes Jan 5, 2018

@Trott

Trott approved these changes Jan 5, 2018

@lpinca

lpinca approved these changes Jan 5, 2018

@cjihrig

cjihrig approved these changes Jan 5, 2018

@silverwind
Copy link
Contributor

left a comment

LGTM, but I wouldn't mind if you do it for test too here.

@apapirovski

This comment has been minimized.

Copy link
Member Author

commented Jan 9, 2018

Landed in f3f3f88

@apapirovski apapirovski closed this Jan 9, 2018

@apapirovski apapirovski deleted the apapirovski:patch-eslint-dot-notation branch Jan 9, 2018

apapirovski added a commit that referenced this pull request Jan 9, 2018

lib: enable dot-notation eslint rule
PR-URL: #18007
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jon Moss <me@jonathanmoss.me>

MylesBorins added a commit that referenced this pull request Jan 10, 2018

lib: enable dot-notation eslint rule
PR-URL: #18007
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jon Moss <me@jonathanmoss.me>

@MylesBorins MylesBorins referenced this pull request Jan 10, 2018

Merged

v9.4.0 proposal #18069

MylesBorins added a commit that referenced this pull request Jan 10, 2018

lib: enable dot-notation eslint rule
PR-URL: #18007
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jon Moss <me@jonathanmoss.me>

MylesBorins added a commit that referenced this pull request Jan 10, 2018

lib: enable dot-notation eslint rule
PR-URL: #18007
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jon Moss <me@jonathanmoss.me>

@TimothyGu TimothyGu removed the author ready label Jan 13, 2018

@MylesBorins

This comment has been minimized.

Copy link
Member

commented Jan 24, 2018

Should this land on LTS? it will need a manualy backport to both v8.x and v6.x

edit: got it to land on both release lines

msoechting added a commit to hpicgs/node that referenced this pull request Feb 5, 2018

lib: enable dot-notation eslint rule
PR-URL: nodejs#18007
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jon Moss <me@jonathanmoss.me>

msoechting added a commit to hpicgs/node that referenced this pull request Feb 7, 2018

lib: enable dot-notation eslint rule
PR-URL: nodejs#18007
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jon Moss <me@jonathanmoss.me>

MylesBorins added a commit that referenced this pull request Feb 27, 2018

lib: enable dot-notation eslint rule
PR-URL: #18007
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jon Moss <me@jonathanmoss.me>

MylesBorins added a commit that referenced this pull request Feb 27, 2018

lib: enable dot-notation eslint rule
PR-URL: #18007
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Jon Moss <me@jonathanmoss.me>

This was referenced Feb 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.