An approach to technical debt #1761
Replies: 2 comments 3 replies
-
Sure thing, @benjaminpjones and @maurelio1234 have been working on those kinds of things a fair amount, so they might have some comments, but what you describe is the general direction we're all heading, so welcome, and we look forward to some PRs to help us get things in tip top shape! |
Beta Was this translation helpful? Give feedback.
-
Rock on, these all sound like good ideas! I really relate to fixing tech debt to onboard to a new codebase :)
Yes haha, I think @shinuito might have some comments? I know he is currently working on/has recently migrated rest api docs to swagger.
BTW if you have any ideas on how to organize stuff, feel free to change existing definitions. That directory is pretty new and I've just been adding things organically. I think it can probably be structured more intuitively. |
Beta Was this translation helpful? Give feedback.
-
Hello! I know I just came out of the blue, and don't have many contributions yet. Please don't take this as a personal criticism! All projects accrue technical debt over time, and I actually love fixing it. I've also found that one of the best ways to really get to know a new codebase is to start with small technical debt: this usually ends up touching quite a few pieces of the application, and requires a deep understanding of how things fit together to go smoothly. In respect to that (and in respect to ya'll maintainers, so you can continue adding new features), I'd like to propose this blueprint for my contributions:
Phase One: Non-invasive Eslint Flags
Work through the backlog of disabled eslint flags that can be fixed without major refactoring. This is pretty much all of them except
ban-types
,explicit-module-boundary-types
, andno-explicit-any
. The order in which they're done doesn't really matter, but for easy reference:As a part of this, I propose adding an explicit exception for
no-misleading-character-class
forlib/misc.ts#449
as it seems like that unicode filter is pretty important, and I'm not familiar enough with working w/ unicode text manipulation to fix it yet :) this is a pretty important one to keep around and enable, though, as it can detect certain kinds of obfuscated malicious code.This is a good first pass to get me familiar with the codebase.
Phase Two: Complete Typescript Migration
This is a multi-step plan to work towards re-enabling the
ban-types
,no-explicit-any
, andexplicit-module-boundary-types
eslint flags.src/models
. Some of the API schema is missing from apiary, unfortunately. One of the most important field attributes that I couldn't glean from apiary on the endpoints that are documented, is which are nullable. Do you need help fleshing out the api docs?fetch
/request
/etc. This sets the stage for working through types that cannot be inferred. For example,get("tournaments/%%/rounds", tournament_id) as Promise<TournamentRounds[]>
on L274 ofsrc/views/Tournament/Tournament.tsx
would cascade through the rest of the component and resolve quite a few of the eslint errors.no-explicit-any
errorsexplicit-module-boundary-types
What do you think? OGS is super cool, and overall this is a really interesting codebase. I'd love to help enable the main contributors to iterate faster on new features by backfilling some of this stuff.
Beta Was this translation helpful? Give feedback.
All reactions