tools,benchmark,lib,test: enable no-case-declarations lint rule#41385
tools,benchmark,lib,test: enable no-case-declarations lint rule#41385Trott merged 1 commit intonodejs:masterfrom
Conversation
|
Review requested:
|
This comment has been minimized.
This comment has been minimized.
|
Do you know if there is (or should be) a predefined rule that enforces that either all or no cases belonging to a |
I'm unaware of anything like that in ESLint core. There might be a third-party module available, and it shouldn't be too hard to write one ourselves. (I'd be -0 on doing that because it's extra maintenance for IMO little benefit. But if you or someone else feels strongly about it, I wouldn't try to persuade you to not do it.) |
This comment has been minimized.
This comment has been minimized.
tniessen
left a comment
There was a problem hiding this comment.
LGTM, not sure how I feel about the additional inconsistencies between cases (aesthetically).
bnb
left a comment
There was a problem hiding this comment.
+1. Also agree with the eventual goal of eslint recommended and happy to see work to get us closer to that :)
Commit Queue failed- Loading data for nodejs/node/pull/41385 ✔ Done loading data for nodejs/node/pull/41385 ----------------------------------- PR info ------------------------------------ Title tools,benchmark,lib,test: enable no-case-declarations lint rule (#41385) Author Rich Trott (@Trott) Branch Trott:no-case-declaration -> nodejs:master Labels Commits 1 - tools,benchmark,lib,test: enable no-case-declarations lint rule Committers 1 - Rich Trott PR-URL: https://github.com/nodejs/node/pull/41385 Reviewed-By: Michaël Zasso Reviewed-By: Antoine du Hamel Reviewed-By: Tobias Nießen Reviewed-By: Tierney Cyren Reviewed-By: Ricky Zhou <[email protected]> Reviewed-By: Colin Ihrig ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/41385 Reviewed-By: Michaël Zasso Reviewed-By: Antoine du Hamel Reviewed-By: Tobias Nießen Reviewed-By: Tierney Cyren Reviewed-By: Ricky Zhou <[email protected]> Reviewed-By: Colin Ihrig -------------------------------------------------------------------------------- ℹ This PR was created on Mon, 03 Jan 2022 04:26:25 GMT ✔ Approvals: 6 ✔ - Michaël Zasso (@targos) (TSC): https://github.com/nodejs/node/pull/41385#pullrequestreview-842509110 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/41385#pullrequestreview-842568613 ✔ - Tobias Nießen (@tniessen) (TSC): https://github.com/nodejs/node/pull/41385#pullrequestreview-842952082 ✔ - Tierney Cyren (@bnb): https://github.com/nodejs/node/pull/41385#pullrequestreview-842990323 ✔ - Ricky Zhou (@rickyes): https://github.com/nodejs/node/pull/41385#pullrequestreview-843192744 ✔ - Colin Ihrig (@cjihrig) (TSC): https://github.com/nodejs/node/pull/41385#pullrequestreview-843588295 ✖ GitHub CI is still running ℹ Last Full PR CI on 2022-01-05T14:09:03Z: https://ci.nodejs.org/job/node-test-pull-request/41763/ - Querying data for job/node-test-pull-request/41763/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/1659016743 |
PR-URL: nodejs#41385 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Ricky Zhou <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
2115a8e to
55ceaec
Compare
|
Landed in 55ceaec |
PR-URL: #41385 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Ricky Zhou <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: #41385 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Ricky Zhou <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: nodejs#41385 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Ricky Zhou <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
PR-URL: #41385 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Ricky Zhou <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Don't leak identifiers into other
casedeclarations. This is an ESLint recommended rule. My goal/hope is to be able to enableeslint:recommendedat some point and have far fewer individual rules specified in.eslintrc.js.