-
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
tools: enable additional lint rules #5357
Conversation
Enable additional likely-uncontroversial lint rules: * `comma-dangle` set to prohibit dangling commas on objects and arrays that are defined on a single line. Multi-line definitions can use or omit a trailing comma. * `no-unused-labels` Prohibits defining a label that is not used. * `no-path-concat` Prohibits string-concatenation using i`__dirname` and `__filename`. Use `path.join()`, `path.resolve()`, or template strings instead. * `no-new-symbol` disallow use of `new` operator with `Symbol` object. Violating this rule would result in a `TypeError` at runtime.`
LGTM. New CI: https://ci.nodejs.org/job/node-test-pull-request/1725/ |
I had to look up
But things like this are still OK:
I can't find the previous discussion about dangling commas, if you know where it was would you mind @-mentioning anyone that objected to disallowing dangling commas (my recollection of that discussion) to give them a chance to weigh in here @Trott? LGTM |
@rvagg Sure! Although the objection was to the default Should be non-controversial, I think, but just in case, as requested by @rvagg, @-mentioning previous objectors: @Fishrock123 @bnoordhuis Previous discussion is here: #5091 |
I'm ok with |
Enable additional likely-uncontroversial lint rules: * `comma-dangle` set to prohibit dangling commas on objects and arrays that are defined on a single line. Multi-line definitions can use or omit a trailing comma. * `no-unused-labels` Prohibits defining a label that is not used. * `no-path-concat` Prohibits string-concatenation using i`__dirname` and `__filename`. Use `path.join()`, `path.resolve()`, or template strings instead. * `no-new-symbol` disallow use of `new` operator with `Symbol` object. Violating this rule would result in a `TypeError` at runtime.` PR-URL: nodejs#5357 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Landed in 9534f6d |
Enable additional likely-uncontroversial lint rules: * `comma-dangle` set to prohibit dangling commas on objects and arrays that are defined on a single line. Multi-line definitions can use or omit a trailing comma. * `no-unused-labels` Prohibits defining a label that is not used. * `no-path-concat` Prohibits string-concatenation using i`__dirname` and `__filename`. Use `path.join()`, `path.resolve()`, or template strings instead. * `no-new-symbol` disallow use of `new` operator with `Symbol` object. Violating this rule would result in a `TypeError` at runtime.` PR-URL: #5357 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Enable additional likely-uncontroversial lint rules: * `comma-dangle` set to prohibit dangling commas on objects and arrays that are defined on a single line. Multi-line definitions can use or omit a trailing comma. * `no-unused-labels` Prohibits defining a label that is not used. * `no-path-concat` Prohibits string-concatenation using i`__dirname` and `__filename`. Use `path.join()`, `path.resolve()`, or template strings instead. * `no-new-symbol` disallow use of `new` operator with `Symbol` object. Violating this rule would result in a `TypeError` at runtime.` PR-URL: #5357 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Enable additional likely-uncontroversial lint rules: * `comma-dangle` set to prohibit dangling commas on objects and arrays that are defined on a single line. Multi-line definitions can use or omit a trailing comma. * `no-unused-labels` Prohibits defining a label that is not used. * `no-path-concat` Prohibits string-concatenation using i`__dirname` and `__filename`. Use `path.join()`, `path.resolve()`, or template strings instead. * `no-new-symbol` disallow use of `new` operator with `Symbol` object. Violating this rule would result in a `TypeError` at runtime.` PR-URL: #5357 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Enable additional likely-uncontroversial lint rules: * `comma-dangle` set to prohibit dangling commas on objects and arrays that are defined on a single line. Multi-line definitions can use or omit a trailing comma. * `no-unused-labels` Prohibits defining a label that is not used. * `no-path-concat` Prohibits string-concatenation using i`__dirname` and `__filename`. Use `path.join()`, `path.resolve()`, or template strings instead. * `no-new-symbol` disallow use of `new` operator with `Symbol` object. Violating this rule would result in a `TypeError` at runtime.` PR-URL: #5357 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Enable additional likely-uncontroversial lint rules:
comma-dangle
set to prohibit dangling commas on objects and arraysthat are defined on a single line. Multi-line definitions can use or
omit a trailing comma.
no-unused-labels
Prohibits defining a label that is not used.no-path-concat
Prohibits string-concatenation using__dirname
and__filename
. Usepath.join()
,path.resolve()
, or template stringsinstead.
no-new-symbol
disallow use ofnew
operator withSymbol
object.Violating this rule would result in a
TypeError
at runtime.