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: lint for spacing around unary operators #5063

Closed
wants to merge 2 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Feb 3, 2016

Enable space-unary-ops in .eslintrc. This prohibits things like:

i ++        // use `i++` instead
typeof(foo) // use `typeof foo` or `typeof (foo)` instead

Ref: #4772 (comment)

Enable `space-unary-ops` in `.eslintrc`. This prohibits things like:

    i ++        // use `i++` instead
    typeof(foo) // use `typeof foo` or `typeof (foo)` instead

Ref: nodejs#4772 (comment)
@Trott Trott added tools Issues and PRs related to the tools directory. lts-watch-v4.x labels Feb 3, 2016
@@ -81,6 +81,8 @@ rules:
space-after-keywords: 2
## no leading/trailing spaces in parens
space-in-parens: [2, "never"]
## no spaces with non-word unary operators, require for word unary operators
space-unary-ops: [2]
Copy link
Member

Choose a reason for hiding this comment

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

style: we don't use an array to just enable the rules

@cjihrig
Copy link
Contributor

cjihrig commented Feb 3, 2016

LGTM minus @targos's comment.

@Trott
Copy link
Member Author

Trott commented Feb 3, 2016

@targos Thanks! I've fixed that up now.

CI: https://ci.nodejs.org/job/node-test-pull-request/1529/

@Trott
Copy link
Member Author

Trott commented Feb 3, 2016

Known flaky tests failed and one buildbot failure. Trying CI again: https://ci.nodejs.org/job/node-test-pull-request/1530/

@Trott
Copy link
Member Author

Trott commented Feb 4, 2016

Three buildbot failures and one known flaky. Don't Stop Believing CI: https://ci.nodejs.org/job/node-test-pull-request/1538/

@jasnell
Copy link
Member

jasnell commented Feb 4, 2016

LGTM

2 similar comments
@targos
Copy link
Member

targos commented Feb 4, 2016

LGTM

@silverwind
Copy link
Contributor

LGTM

jasnell pushed a commit that referenced this pull request Feb 4, 2016
Enable `space-unary-ops` in `.eslintrc`. This prohibits things like:

    i ++        // use `i++` instead
    typeof(foo) // use `typeof foo` or `typeof (foo)` instead

Ref: #4772 (comment)
PR-URL: #5063
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

jasnell commented Feb 4, 2016

Landed in 7406cd3

@jasnell jasnell closed this Feb 4, 2016
rvagg pushed a commit that referenced this pull request Feb 8, 2016
Enable `space-unary-ops` in `.eslintrc`. This prohibits things like:

    i ++        // use `i++` instead
    typeof(foo) // use `typeof foo` or `typeof (foo)` instead

Ref: #4772 (comment)
PR-URL: #5063
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
rvagg pushed a commit that referenced this pull request Feb 9, 2016
Enable `space-unary-ops` in `.eslintrc`. This prohibits things like:

    i ++        // use `i++` instead
    typeof(foo) // use `typeof foo` or `typeof (foo)` instead

Ref: #4772 (comment)
PR-URL: #5063
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 18, 2016
Enable `space-unary-ops` in `.eslintrc`. This prohibits things like:

    i ++        // use `i++` instead
    typeof(foo) // use `typeof foo` or `typeof (foo)` instead

Ref: #4772 (comment)
PR-URL: #5063
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 18, 2016
Enable `space-unary-ops` in `.eslintrc`. This prohibits things like:

    i ++        // use `i++` instead
    typeof(foo) // use `typeof foo` or `typeof (foo)` instead

Ref: #4772 (comment)
PR-URL: #5063
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Feb 18, 2016
MylesBorins pushed a commit that referenced this pull request Mar 2, 2016
Enable `space-unary-ops` in `.eslintrc`. This prohibits things like:

    i ++        // use `i++` instead
    typeof(foo) // use `typeof foo` or `typeof (foo)` instead

Ref: #4772 (comment)
PR-URL: #5063
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
Enable `space-unary-ops` in `.eslintrc`. This prohibits things like:

    i ++        // use `i++` instead
    typeof(foo) // use `typeof foo` or `typeof (foo)` instead

Ref: nodejs#4772 (comment)
PR-URL: nodejs#5063
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott Trott deleted the unary-ops branch January 13, 2022 22:42
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.

6 participants