| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Woo! Linting!
Sorry, something went wrong.
|
Shouldn't the linting be explicitly limited to lib/internal/errors.js to reduce the chance of it accidentally matching something else that starts with a capital 'E'? |
Sorry, something went wrong.
|
I haven't maintained that code - but are we sure the overhead of maintaining a plugin is worth it? It sounds like a lot more overhead than having non-alphabetized errors. |
Sorry, something went wrong.
There was a problem hiding this comment.
eslint FTW 🥇
Sorry, something went wrong.
There was a problem hiding this comment.
Per @mscdex's comment It might be best to replace this with a:
/* esline-enable alphabetize-errors */in lib/internal/errors.js
Sorry, something went wrong.
It's been a pain, especially conflict-wise. Also AFAIK this plugin could later be applied to validate that the codes in lib/internal/errors.js and in doc/api/errors.md are in sync. |
Sorry, something went wrong.
Yep, this is something that I want to work on later on. |
Sorry, something went wrong.
There was a problem hiding this comment.
This should be eslint-enable, not esline.
Sorry, something went wrong.
To make sure errors in lib/internal/errors.js (are defined via `E`) will stay in alphabetical order going forward.
|
Good catch, updated 👍 |
Sorry, something went wrong.
There was a problem hiding this comment.
Still LGTM
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
PR-URL: #15083 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
To make sure errors in lib/internal/errors.js (are defined via `E`) will stay in alphabetical order going forward. PR-URL: #15083 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
Using a comment to enable a custom lint rule on a single file. Very clever. I salute you. 🎉 |
Sorry, something went wrong.
PR-URL: nodejs/node#15083 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
To make sure errors in lib/internal/errors.js (are defined via `E`) will stay in alphabetical order going forward. PR-URL: nodejs/node#15083 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
This will need to be backported to v8.x I attempted to use the lint rule to find out of order error codes, but unfortunately on the 8.x branch the lint rule wasn't doing anything, same with master. I opened an issue |
Sorry, something went wrong.
To make sure errors in lib/internal/errors.js (are defined via `E`) will stay in alphabetical order going forward. PR-URL: #15083 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
ping re backport |
Sorry, something went wrong.
|
If I'm not mistaken, this is dependent on multiple semver-majors and might be considered a 9.x-and-above only? Like, any existing error moved to the new error system is going to be semver-major... |
Sorry, something went wrong.
|
Actually, never mind, I have a backport-ish coming shortly. |
Sorry, something went wrong.
To make sure errors in lib/internal/errors.js (are defined via `E`) will stay in alphabetical order going forward. PR-URL: nodejs#15083 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
@MylesBorins Current v8.x-staging has the lint rule properly enabled and it is flagging two errors (that are duplicates) as being out of order. So this doesn't really need to be backported after all I don't think. But you'll probably want to find where that error was introduced and fix it so that there aren't a bunch of broken commits, yeah? |
Sorry, something went wrong.
|
First bad commit is 3b6c00a. (make lint-js fails.) |
Sorry, something went wrong.
|
I'll fix that with a backport of #15578 |
Sorry, something went wrong.
|
thanks all... I'll rebase it in before the first bad commit so we don't have broken stuff in the tree. Can you please include that information in the PR |
Sorry, something went wrong.
|
Thanks @refack and @MylesBorins. Sounds like there's nothing more for me to do here, but if I'm wrong, let me know. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Includes a new ESLint rule to make sure the list doesn't become un-alphabetized again :)
Checklist
Affected core subsystem(s)
errors, tools