Skip to content

feat(eslint-config-fluid): Enable new TypeScript rules as warnings#25508

Merged
Josmithr merged 6 commits intomicrosoft:mainfrom
Josmithr:eslint-config-fluid/enable-new-rules-as-warnings
Sep 23, 2025
Merged

feat(eslint-config-fluid): Enable new TypeScript rules as warnings#25508
Josmithr merged 6 commits intomicrosoft:mainfrom
Josmithr:eslint-config-fluid/enable-new-rules-as-warnings

Conversation

@Josmithr
Copy link
Copy Markdown
Contributor

@typescript-eslint/eslint-plugin has deprecated and disabled the following rules:

They are replaced by the following new rules, which are now configured as errors in this library:

This PR pre-emptively updates our configs to set these new rules as warnings. In the next major version bump, the old rules will be removed and these new rules will be promoted to errors.

@Josmithr Josmithr requested review from a team, alexvy86 and Copilot September 22, 2025 18:11
Copy link
Copy Markdown
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 adds three new TypeScript ESLint rules as warnings to prepare for a future major version update where deprecated rules will be removed. The new rules replace deprecated ones that are being phased out by the TypeScript ESLint plugin.

  • Adds no-empty-object-type, no-unsafe-function-type, and no-wrapper-object-types rules as warnings
  • Updates all ESLint configuration variants to include the new rules
  • Positions the new rules in a temporary section for promotion to errors in version 7.0.0

Reviewed Changes

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

Show a summary per file
File Description
base.js Adds the three new TypeScript ESLint rules as warnings in a temporary section
default.json Updates the default configuration with the new warning rules
minimal.json Updates the minimal configuration with the new warning rules
react.json Updates the React configuration with the new warning rules
recommended.json Updates the recommended configuration with the new warning rules
strict.json Updates the strict configuration with the new warning rules
strict-biome.json Updates the strict-biome configuration with the new warning rules
test.json Updates the test configuration with the new warning rules

@github-actions github-actions bot added area: build Build related issues base: main PRs targeted against main branch labels Sep 22, 2025
@alexvy86
Copy link
Copy Markdown
Contributor

I'm confused. The new rules weren't showing up at all in the printed configs before this change... so they were not being applied as errors yet? Is this making them warnings before we do the dep updates that bring those new rules in? (I know there's been several PRs around this, I couldn't keep track of their statuses).

@Josmithr
Copy link
Copy Markdown
Contributor Author

I'm confused. The new rules weren't showing up at all in the printed configs before this change... so they were not being applied as errors yet? Is this making them warnings before we do the dep updates that bring those new rules in? (I know there's been several PRs around this, I couldn't keep track of their statuses).

The rules are defined as of the current dep version we have on typescript-eslint. But they are not added to the "recommended" config we extend. They are added to the recommended config in the next major version of the dep.

To aid in making the new rules a bit more discoverable, I've promoted them to warnings. They will be promoted to errors in the next major version of this library (and the deprecated rules from the typescript-eslint library will be removed).

@github-actions
Copy link
Copy Markdown
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  235713 links
    1720 destination URLs
    1953 URLs ignored
       0 warnings
       0 errors


@Josmithr Josmithr merged commit 12f22ec into microsoft:main Sep 23, 2025
34 checks passed
@Josmithr Josmithr deleted the eslint-config-fluid/enable-new-rules-as-warnings branch September 23, 2025 17:32
anthony-murphy-agent pushed a commit to anthony-murphy-agent/FluidFramework that referenced this pull request Jan 14, 2026
…icrosoft#25508)

`@typescript-eslint/eslint-plugin` has deprecated and disabled the
following rules:

- [ban-types](https://typescript-eslint.io/rules/ban-types/)
-
[no-empty-interface](https://typescript-eslint.io/rules/no-empty-interface/)

They are replaced by the following new rules, which are now configured
as errors in this library:

-
[no-empty-object-type](https://typescript-eslint.io/rules/no-empty-object-type/)
-
[no-unsafe-function-type](https://typescript-eslint.io/rules/no-unsafe-function-type/)
-
[no-wrapper-object-types](https://typescript-eslint.io/rules/no-wrapper-object-types/)

This PR pre-emptively updates our configs to set these new rules as
warnings. In the next major version bump, the old rules will be removed
and these new rules will be promoted to errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build related issues base: main PRs targeted against main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants