Consider turning on stricter typescript options
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 234
- Forks
- 92
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 6
Description
Is your feature request related to a problem? Please describe.
We keep committing unused variables, unused imports, etc. It's not great for code quality over time.
{
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
"noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
"noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
}
Describe the solution you'd like
I would like to consider some of the stricter TS compiler options and implement them. I would also like this to not prevent fast prototyping. If you press F5 and have unused variables, that should be totally fine (?)
It's a fine line to navigate because that also means that you might only fail in CI and not locally.....
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TypeScript configuration and the CI and F5 workflows referenced in the issue. Review the listed strict compiler options, including noUnusedLocals and noUnusedParameters, and determine which can be enabled without preventing fast prototyping. Done means the selected options and their local-versus-CI behavior are agreed and implemented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100