Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bug(website): Acquired types are shown in the editor but not reflected in linting #11120

Closed
@kirkwaiblinger

Description

@kirkwaiblinger

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Relevant Package

website

Playground Link

https://typescript-eslint.io/play/#ts=5.8.2&fileType=.tsx&code=JYWwDg9gTgLgBAbzgEwKYGcDGVgCNUA0cw8AvnAGZQQhwDkAdhGgFwwYx0DcAUD2lhz4AFHQCGcduk5FhASjgBeAHyIecYjFFj0ATwaYAFtSYBXdHSI79mOPKWqE6jXEwQG6CABtUAOi8QAOaiFBAQdHK8GqSRPDFcQA&eslintrc=N4KABGBECmAeAu0B2ATAzpAXGA2pADgDYCuA5gJZKYAC8AnvtGgMYBO5%2B8AtE4ZfAHo08ds271GXZgAtozANbQUkALoAacFFbFCTLGFAQIkWgyZsO3XvwFIA9lwBmhOwEN4lUl3ys7AW3I0PWxIAHdXViRITQBfEBigA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eFYDAruuGAL4g9A&tokens=false

Repro Code

import { describe, it } from 'node:test';

describe('a test', () => {
  it('asynchronous', async () => {
    console.log('foo');
  });
});

ESLint Config

{
  "extends": ["plugin:@typescript-eslint/strict-type-checked"],
  "rules": {
    "@typescript-eslint/no-floating-promises": "warn"
  }
}

tsconfig

{
  "compilerOptions": {
    "strict": true
  }
}

Expected Result

I expect a no-floating-promises error on the test() call

Actual Result

There were two "Unsafe call of a(n) error type typed value" errors instead - as if the Automatic Type Acquisition didn't acquire the types at all for the linter.

Additional Info

No response

Versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingwebsite: playground

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions