allegro / typescript-strict-plugin

Typescript plugin that allows turning on strict mode in specific files or directories.
MIT License
332 stars 29 forks source link

IDEs Fail to Display Strictness Issues with Typescript version 5.4.x #73

Closed gingerr closed 4 months ago

gingerr commented 4 months ago

Greetings! 👋

We're currently in the process of upgrading our Angular project, which uses Betterer in combination with your exceptional plugin which allows us to gradually enforce stricter codebase parameters over time.

However, we've encountered a problem during our upgrade from Angular v15 to v17 and Typescript to its latest version, typescript@5.4.5. The issue arises with IDEs (WebStorm, IntelliJ IDEA Ultimate, VS Code) failing to display strictness issues in files which are strict.

After downgrading Typescript version by version in an attempt to pinpoint the problem, it seems the issue dissipates with version typescript@5.3.3.

To reproduce this issue, I've created a minimal Angular application located here. This application uses:

I initiated a new project using the Angular CLI, installed your current plugin, and configured it via tsconfig.json (disabling strictness and adding the plugin). In app.component, I inserted a strictness error. This error is not reported with typescript@5.4.x, yet is correctly identified with typescript@5.3.3. The snippet of code in question is as follows:

  /**
   * with typescript version higher than 5.3.3 this reports no strictness error, but it should.
   * if we downgrade typescript to 5.3.3, a strictness error will be shown here.
   */
  strictnessError(): string {
    return undefined;
  }

I noticed an issue with typescript@5.4 was reported and fixed last week as per this issue, but it seems there might still be a lingering problem.

Thanks in advance for your assistance! Mariusz

km-tr commented 4 months ago

I am also awake. Errors are no longer displayed in the typescript@5.4.3 environment.

KostkaBrukowa commented 4 months ago

I've released 2.4.2-beta.1 version. You can take a look and see if it helps

KostkaBrukowa commented 4 months ago

Released with 2.4.3 version. Closing the issue. If the issue persists please reopen

gingerr commented 3 months ago

Ive upgraded both your plugin and typescript to the latest version in the demo minimal application and our Angular project. Works perfectly, thank you! 🥇