Summary
Follow-up to PR #788, this phase addresses simple, safe ESLint fixes that don't change any runtime behavior or APIs.
Part of #783 - TypeScript ESLint Technical Debt resolution.
Errors to Fix (27 total)
1. Unused ESLint Directives (4 errors)
File: package/utils/debug.ts
Remove unused // eslint-disable-next-line no-console comments on lines 21, 27, 32, 38.
These directives are no longer needed since the rule is not triggering.
Impact: None - cleanup only
2. Explicit any Types (4 errors)
Files:
package/utils/getStyleRule.ts (lines 9, 15)
package/utils/helpers.ts (line 67)
package/utils/requireOrError.ts (line 9)
Replace any with unknown or proper types where the value type is not guaranteed.
Impact: Internal only - improves type safety
3. Redundant Type Constituents (19 errors)
File: package/types.ts
Lines with issues: 66, 74, 88, 91, 92, 96, 98, 104, 105
File: package/webpackDevServerConfig.ts
Lines with issues: 28, 32, 45, 50
Issue: Type unions like "all" | "auto" | string where string makes the specific strings redundant.
Examples:
// Current (redundant):
type Allowedhost = "all" | "auto" | string
// Fix option 1 (remove specific strings):
type Allowedhost = string
// Fix option 2 (remove string, make precise):
type Allowedhost = "all" | "auto"
Decision needed: Which approach to take? Option 2 is more type-safe but may be breaking if consumers pass arbitrary strings.
Impact: Type definitions become more precise. May reveal type errors in consuming code if we go with option 2.
Success Criteria
Related Issues
Summary
Follow-up to PR #788, this phase addresses simple, safe ESLint fixes that don't change any runtime behavior or APIs.
Part of #783 - TypeScript ESLint Technical Debt resolution.
Errors to Fix (27 total)
1. Unused ESLint Directives (4 errors)
File:
package/utils/debug.tsRemove unused
// eslint-disable-next-line no-consolecomments on lines 21, 27, 32, 38.These directives are no longer needed since the rule is not triggering.
Impact: None - cleanup only
2. Explicit
anyTypes (4 errors)Files:
package/utils/getStyleRule.ts(lines 9, 15)package/utils/helpers.ts(line 67)package/utils/requireOrError.ts(line 9)Replace
anywithunknownor proper types where the value type is not guaranteed.Impact: Internal only - improves type safety
3. Redundant Type Constituents (19 errors)
File:
package/types.tsLines with issues: 66, 74, 88, 91, 92, 96, 98, 104, 105
File:
package/webpackDevServerConfig.tsLines with issues: 28, 32, 45, 50
Issue: Type unions like
"all" | "auto" | stringwherestringmakes the specific strings redundant.Examples:
Decision needed: Which approach to take? Option 2 is more type-safe but may be breaking if consumers pass arbitrary strings.
Impact: Type definitions become more precise. May reveal type errors in consuming code if we go with option 2.
Success Criteria
Related Issues