[COMPASS-6050] eslint: enforce rules for TODO comments Created: 23/Aug/22  Updated: 30/Nov/22  Resolved: 30/Nov/22

Status: Closed
Project: Compass
Component/s: Tech debt
Affects Version/s: None
Fix Version/s: No version

Type: Task Priority: Major - P3
Reporter: Le Roux Bodenstein Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to COMPASS-5064 Audit, ticket and remove all TODO com... Closed
Documentation Changes: Not Needed

 Description   

(This came out of Technical Alignment Sync)

At the time of writing we have 354 TODO comments across 179 files. Ideally we'd cut down on those.

To at least stop the proliferation of TODO comments that never get done we can have rules for new comments. Using something like https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/expiring-todo-comments.md  we can enforce that each TODO comment has a ticket number.

People seem to have concerns about expiring TODO comments blocking a release, so see if we can disallow expiring comments and enforce a ticket number.

When opening the Jira ticket we should also link back to the line of code that contains the TODO comment to help track it.

 

As part of the PR we'd probably have to ignore all the old comments somehow, so we can maybe find/replace them to TODO-OLD or something else that we can ignore. And then we can separately run through them and either remove or fix them up.


Generated at Wed Feb 07 22:41:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.