Migrate monorepo from TSLint to ESLint#1352
Conversation
|
Sounds good! Let's go 🕺 Thanks for taking care of this 👍 |
|
Hello @LoicPoullain, thanks for the approval. I made below changes. Below you will find the list of affected files. I hope you review and help improve these changes. 🚀 Finishing the TSLint to ESLint migration (Final Clean Sweep)This PR wraps up the monorepo's move to ESLint. I've gone through and cleared out the remaining errors so we can finally reach 0 lint errors and get this merged. 📋 How I approached the final fixesInstead of just swapping the tools, I wanted to make sure the codebase actually got a bit of an upgrade in the process. Here’s what I did:
🛠 Summary of Changes
🔍 Detailed Code Changes & File Mapping1. Security: no-prototype-builtinsRefactored direct Sample Change- return option.hasOwnProperty('url');
+ return Object.prototype.hasOwnProperty.call(option, 'url');Click to view 5 affected files2. Async: Floating Promises & Await CleanupAdded Sample Change- rejects(() => setAuthCookie(response, 'xxxx'), { ... });
+ void rejects(() => setAuthCookie(response, 'xxxx'), { ... });
- setImmediate(async () => { ... });
+ setImmediate(() => { void (async () => { ... })(); });Click to view 15 affected files
3. Type Safety: restrict-template-expressionsUsed Sample Change- message: `The file "${sizeLimitReached}" is too large.`
+ message: `The file "${String(sizeLimitReached)}" is too large.`Click to view 13 affected files
4. Chore: Modernizing SuppressionsUpdated Sample Change- // @ts-ignore
+ // @ts-expect-errorClick to view 4 affected files✅ VerificationI ran a full |
So, should Eslint version in the project should be upgrade to v10? Important points to remember:
|
|
Sorry for the interleaved commits that were introduced previously and they were incomplete as well. My strategy as of now:
I think this should plan should be good enough and more changes would be added as needed later. And again sorry for wasting your time on the embarrassing changes done previously. |
f60b42a to
ecd8246
Compare
|
Hi @deepanshu44 , just a quick message to let you know that I haven't forgotten your PR. I'm really busy right now. I'll watch it next week ;) |
PR: Replace TSLint with ESLint (Issue #1264) — Draft/WIP
Status: Initial Phase
This PR marks the start of the migration. The following changes have been implemented as a baseline, but further
direction is requested. Please verify if the current architectural approach is correct before we proceed with the final "clean sweep" of the monorepo. (If this issue still has a priority, I can continue working on it and get it done now.)
What has been done so far:
Verification Needed:
code
both rules are part of
foal/packages/cli/templates/app/.eslintrc.js
Line 12 in 0c943e5
Next Steps (Pending Approval):