Bug: [ban-ts-comment] false positive when @ts-nocheck is not at the beginning of the file #8753
Closed
4 tasks done
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=5.4.2&fileType=.ts&code=FBA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6AIwEMnb9layAewC2wxC3RRE0aIOiRwYAL4glQA&tsconfig=&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
// @ts-nocheck
should not be reported because valid TS pragmas should be placed at the beginning of the fileActual Result
// @ts-nocheck
and// @ts-check
are reported even if they are not valid TS pragmasAdditional Info
Follow up for #8416
The text was updated successfully, but these errors were encountered: