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,test: improve faulty assert usage detection #26569

Closed

Conversation

BridgeAR
Copy link
Member

@BridgeAR BridgeAR commented Mar 10, 2019

This improves our custom eslint rules to detect assertions with only
a single argument and fixes false negatives in case unary expressions are used.
Some rules were extended to also lint our docs and tools and the lib
rule was simplified to prohibit most assertion calls.

This should land after #26565 landed (the linter will fail currently).

Refs: #26565

// cc @nodejs/linting

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

This improves our custom eslint rules to detect assertions to detect
assertions with only a single argument and fixes false negatives in
case unary expressions are used.
Some rules were extended to also lint our docs and tools and the lib
rule was simplified to prohibit most assertion calls.
@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Mar 10, 2019
.eslintrc.js Outdated Show resolved Hide resolved
@Trott Trott added the blocked PRs that are blocked by other issues or PRs. label Mar 10, 2019
@Trott
Copy link
Member

Trott commented Mar 10, 2019

Added the blocked label which can be removed once #26565 lands.

@BridgeAR BridgeAR removed the blocked PRs that are blocked by other issues or PRs. label Mar 13, 2019
@BridgeAR
Copy link
Member Author

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 13, 2019
@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 13, 2019

Resumed CI https://ci.nodejs.org/job/node-test-pull-request/21499/ ✅ (besides ARM)

@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 13, 2019

BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 13, 2019
This improves our custom eslint rules to detect assertions to detect
assertions with only a single argument and fixes false negatives in
case unary expressions are used.
Some rules were extended to also lint our docs and tools and the lib
rule was simplified to prohibit most assertion calls.

PR-URL: nodejs#26569
Refs: nodejs#26565
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
@BridgeAR
Copy link
Member Author

Landed in 32853c0 🎉

@BridgeAR BridgeAR closed this Mar 13, 2019
BridgeAR added a commit that referenced this pull request Mar 14, 2019
This improves our custom eslint rules to detect assertions to detect
assertions with only a single argument and fixes false negatives in
case unary expressions are used.
Some rules were extended to also lint our docs and tools and the lib
rule was simplified to prohibit most assertion calls.

PR-URL: #26569
Refs: #26565
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 14, 2019
This improves our custom eslint rules to detect assertions to detect
assertions with only a single argument and fixes false negatives in
case unary expressions are used.
Some rules were extended to also lint our docs and tools and the lib
rule was simplified to prohibit most assertion calls.

PR-URL: nodejs#26569
Refs: nodejs#26565
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
BridgeAR added a commit that referenced this pull request Mar 14, 2019
This improves our custom eslint rules to detect assertions to detect
assertions with only a single argument and fixes false negatives in
case unary expressions are used.
Some rules were extended to also lint our docs and tools and the lib
rule was simplified to prohibit most assertion calls.

PR-URL: #26569
Refs: #26565
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
@BridgeAR BridgeAR deleted the improve-assertion-eslint-rules branch January 20, 2020 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants