Skip to content

Conversation

@lumirlumir
Copy link
Member

@lumirlumir lumirlumir commented Dec 14, 2025

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain:

What changes did you make? (Give an overview)

In this PR, I've enabled strict mode for the type tests.

Currently, the type tests don't set strict: true, and the current test setup doesn't match the strict mode described in TypeScript's tsconfig documentation.

Ref: https://www.typescriptlang.org/tsconfig/#strict

Also, the rewrite, css, json, and markdown plugins have already enabled strict mode for their type tests, so I've enabled strict mode here as well for more accurate type checking and consistency.

Additionally, I've updated typescript to the latest version, 5.9.3.

Is there anything you'd like reviewers to focus on?

N/A

@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Dec 14, 2025
@eslint-github-bot eslint-github-bot bot added the chore This change is not user-facing label Dec 14, 2025
@netlify
Copy link

netlify bot commented Dec 14, 2025

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit 4d3fb06
🔍 Latest deploy log https://app.netlify.com/projects/docs-eslint/deploys/693fcdfb6fb6780008fd8bdc

@lumirlumir lumirlumir marked this pull request as ready for review December 14, 2025 14:51
@lumirlumir lumirlumir requested a review from a team as a code owner December 14, 2025 14:51
Copilot AI review requested due to automatic review settings December 14, 2025 14:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to enable strict mode in TypeScript type tests for consistency with other ESLint plugin projects and updates TypeScript to version 5.9.3.

  • Adds strict: true to the tsconfig.json for type tests
  • Updates TypeScript version from 5.3.3 to 5.9.3 in the root package.json
  • Updates TypeScript version from 5.7.2 to 5.9.3 in eslint-config-eslint package.json

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/lib/types/tsconfig.json Adds strict: true compiler option to enable strict type checking
packages/eslint-config-eslint/package.json Downgrades TypeScript dev dependency from 5.7.2 to 5.9.3
package.json Updates TypeScript dev dependency from 5.3.3 to 5.9.3

Comment on lines 5 to 9
"noImplicitAny": true,
"noImplicitThis": true,
"strict": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With strict: true enabled, the explicit flags noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes are redundant as they are already included in the strict flag. Consider removing these redundant flags for cleaner configuration, or if keeping them for documentation purposes, add a comment explaining why they're explicitly listed.

Suggested change
"noImplicitAny": true,
"noImplicitThis": true,
"strict": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strict": true,

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default strict mode setup may change with the major update, so I think it’s fine to leave it as-is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it’s fine to remove the other settings in this case. From what I understand, strict mode has only ever enabled new strict options even in minor releases (for example, strictFunctionTypes in TypeScript 2.6), and has never disabled any.

If you're genuinely concerned that strict may change over time and that this could be problematic for some project, it's better to avoid using it and instead enable the individual options directly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed your first suggestion and updated it in this commit: 49b3a01

@fasttime fasttime moved this from Needs Triage to Triaging in Triage Dec 14, 2025
@fasttime fasttime moved this from Triaging to Implementing in Triage Dec 14, 2025
@lumirlumir lumirlumir requested a review from fasttime December 15, 2025 09:01
@fasttime fasttime added the accepted There is consensus among the team that this change meets the criteria for inclusion label Dec 16, 2025
Copy link
Member

@fasttime fasttime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@fasttime fasttime merged commit ba71baa into main Dec 16, 2025
37 checks passed
@fasttime fasttime deleted the chore-turn-on-strict-mode-in-type-test branch December 16, 2025 07:45
@github-project-automation github-project-automation bot moved this from Implementing to Complete in Triage Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted There is consensus among the team that this change meets the criteria for inclusion chore This change is not user-facing

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

3 participants