-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: refactor to use validateObject #37028
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These require(…)
calls should probably all be multiline:
Most of these represent a change in behavior where an array was previously permitted but now it is not. I don't think that's a problem, but pointing it out in case others think we should be cautious about that and maybe rate this as semver-major. |
I saw a PR review comment about newlines in desructured assignments, and this would be the rule to enforce these kinds of nits. Start by just enabling the rule. We can incrementally adjust it to be more strict. Refs: https://eslint.org/docs/rules/object-curly-newline Refs: nodejs#37028 (review)
5964a61
to
d777cbc
Compare
I saw a PR review comment about newlines in desructured assignments, and this would be the rule to enforce these kinds of nits. Start by just enabling the rule. We can incrementally adjust it to be more strict. Refs: https://eslint.org/docs/rules/object-curly-newline Refs: nodejs#37028 (review)
I saw a PR review comment about newlines in desructured assignments, and this would be the rule to enforce these kinds of nits. Start by just enabling the rule. We can incrementally adjust it to be more strict. Refs: https://eslint.org/docs/rules/object-curly-newline Refs: nodejs#37028 (review)
I saw a PR review comment about newlines in desructured assignments, and this would be the rule to enforce these kinds of nits. Start by just enabling the rule. We can incrementally adjust it to be more strict. Refs: https://eslint.org/docs/rules/object-curly-newline Refs: nodejs#37028 (review) PR-URL: nodejs#37040 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
14eca5f
to
3686855
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: nodejs#37028 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
3686855
to
029d1fd
Compare
Landed in 029d1fd |
(options === null || typeof options !== 'object')) { | ||
throw new ERR_INVALID_ARG_TYPE('options', 'Object', options); | ||
} else if (options !== undefined) { | ||
validateObject(options, 'options'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this change broke cheerio
through the workerpool
module: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/2604/nodes=fedora-last-latest-x64/testReport/junit/(root)/citgm/cheerio_v1_0_0_rc_5/
It would probably be nice to open a PR to fix that module. It seems to have been working by accident until now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in josdejong/workerpool#230.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably also do #37047.
I saw a PR review comment about newlines in desructured assignments, and this would be the rule to enforce these kinds of nits. Start by just enabling the rule. We can incrementally adjust it to be more strict. Refs: https://eslint.org/docs/rules/object-curly-newline Refs: #37028 (review) PR-URL: #37040 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #37028 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
The |
Ooof. The fix is in Unfortunately, |
I saw a PR review comment about newlines in desructured assignments, and this would be the rule to enforce these kinds of nits. Start by just enabling the rule. We can incrementally adjust it to be more strict. Refs: https://eslint.org/docs/rules/object-curly-newline Refs: #37028 (review) PR-URL: #37040 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
I saw a PR review comment about newlines in desructured assignments, and this would be the rule to enforce these kinds of nits. Start by just enabling the rule. We can incrementally adjust it to be more strict. Refs: https://eslint.org/docs/rules/object-curly-newline Refs: #37028 (review) PR-URL: #37040 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
I saw a PR review comment about newlines in desructured assignments, and this would be the rule to enforce these kinds of nits. Start by just enabling the rule. We can incrementally adjust it to be more strict. Refs: https://eslint.org/docs/rules/object-curly-newline Refs: #37028 (review) PR-URL: #37040 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
I saw a PR review comment about newlines in desructured assignments, and this would be the rule to enforce these kinds of nits. Start by just enabling the rule. We can incrementally adjust it to be more strict. Refs: https://eslint.org/docs/rules/object-curly-newline Refs: #37028 (review) PR-URL: #37040 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
No description provided.