-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
ESLint #168
ESLint #168
Conversation
And they don't again, after a force-push with 0 changes. 🤣 |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@typescript-eslint/eslint-plugin@5.62.0, npm/@typescript-eslint/parser@5.62.0, npm/eslint-plugin-node@11.1.0 |
This comment was marked as outdated.
This comment was marked as outdated.
Also, this is going to conflict with #147. Do you want me to see how much I can port from that PR? |
@lishaduck That sounds good to me. I'm not sure what to do about that PR at the moment (I'm also not sure as to the state I left it in to be honest). But feel free to postpone that porting to after this gets merged, we can sort the conflicts later 🤷♂️ |
Ok! ESLint v9 doesn't support Node 16, so we're still on 8. PS: I know you don't like expiring todos (and I agree with your logic!), but I think these are fine, given how they work. |
Follow ups:
Also:
|
Moving this back to WIP. |
Sure. Let's focus on getting it merged again if that's alright with you (and do unrelated work to that in a separate PR).
Sure, go ahead.
I'd say not, I find that promises = await Promise.all([
someFunction(data).then(doSomething),
someOtherPromise,
...
]); which can be useful if you want to do more things in parallel. Or just
Yes, it does a bit more, though I don't remember what it did. To be honest, I don't think we need to add too many ESLint rules and other tools (but feel free to suggest them!), I mostly want to help avoid regressions, and get some more guarantees here and there so that this project is maintainable and bug-free. So far (surprisingly), the migration to TS has not caught any noticeable bugs, so the investment has been quite poor. Not that we shouldn't continue (especially if it's a bit fun for some people 😄). The XO rules can definitely wait I'd say (although, I'm not sure what has now been disabled). |
Yeah. I just want to fix tests and the lints I realized weren't getting applied right.
👍
Yeah. I tried turning it on but ran into that, so I wasn't sure.
Essentially, it applies the plugins, so migrating to the config turned off a lot of important rules, like
It's a lot of fun :)
Unicorn was off, but I've almost finished reenabling it. N needs to get on. We don't use AVA, so that can remain off. |
Ooooh. Unicorn found a unicode bug! |
Make Jest run less often. Before now, Jest would run on every change. Also, ESLint now fails on warnings.
See (jfmengels#163)[jfmengels#163 (comment)] Co-authored-by: Jeroen Engels <jfm.engels@gmail.com>
🤞 I think I'm done. P.S: Sorry for the diff 🙃 |
Thank you for all the changes @lishaduck. I hope it will help make the project more maintainable I'm happy to merge as-is (or rather "rebase fast-forward" the branch manually outside of GitHub, to avoid you needing to rebase the other PRs) and delay the remaining feedback for another PR, would you prefer that? |
Eh, I don't mind rebasing, but if you'd prefer that I don't really care. |
I'll let you make the remaining changes then 👍 |
`eslint-plugin-n` is the maintained version of `eslint-plugin-node`.
It doesn't hurt.
Now that we only support Node 14.18 and later, we can use `node:`.
I just realized that I'd reverted the bump to Node 14.18. As I've gotten stuff dependent on 14.18 merged, I'm bumping it again. Oops. At least it's only a single minor. This also allows `node:` to stay.
XO removed it a while back, but it now supports ESLint 8.
This replaces `util.promisify` with `fs.promises` for all asynchronous operations. This also switches from `node:fs` to `graceful-fs` for all synchronous operations.
When possible, we now use async/await rather than callbacks. While a slight performance hit is likely incurred, the code is much more consistent. More Promise-based apis are available now than used to be the case.
Replace some jarring .then() chains with `async`/`await`.
Well, technically, it's @eslint-community/eslint-plugin-eslint-comments. Same difference. And hey, it caught something!
I hadn't previously realized that they didn't drop Node 16 until v7.
The plugin requires a newer version of Node to run on ESLint v8. Also, I ran `npm pkg fix`. It didn't find anything. In conclusion, I sorted the package.json file via `npx sort-package-json`.
This makes try/catch more predictable.
I figured this was a hangover.
prettier/prettier is already removed. Unicorn renamed these rules a long time ago.
`*` is an "explicit any!"
Continue making sure the code works everwhere.
Maybe ESM someday, but for now...
Turbo kills them otherwise, which is often fine, but breaks `test-run`.
This is very much a WIP.
I'm working on modernizing the linting configuration now that node 10&12 are dropped.
I have a few stylistic questions, but first I want to get tests passing.