| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
|
Do you know if there is (or should be) a predefined rule that enforces that either all or no cases belonging to a switch statement are wrapped in code blocks? I don't know if that would be a good idea, these braces for the sake of scopes in case have just always been bothering me :) |
Sorry, something went wrong.
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.) |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, not sure how I feel about the additional inconsistencies between cases (aesthetically).
Sorry, something went wrong.
Sorry, something went wrong.
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 :)
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
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 <0x19951125@gmail.com> 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 <0x19951125@gmail.com> 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 |
Sorry, something went wrong.
PR-URL: nodejs#41385 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Ricky Zhou <0x19951125@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #41385 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Ricky Zhou <0x19951125@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #41385 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Ricky Zhou <0x19951125@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #41385 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Tierney Cyren <hello@bnb.im> Reviewed-By: Ricky Zhou <0x19951125@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
| Back | FazBrowse Home | New Git URL |
Don't leak identifiers into other case declarations. This is an ESLint recommended rule. My goal/hope is to be able to enable eslint:recommended at some point and have far fewer individual rules specified in .eslintrc.js.