Closed
Description
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.
Playground Link
Repro Code
const a = 1
// @ts-nocheck - should not be reported
// TS error is not actually suppressed
const b: string = a
ESLint Config
module.exports = {
parser: "@typescript-eslint/parser",
rules: {
"@typescript-eslint/ban-ts-comment": "error"
}
};
tsconfig
Expected Result
// @ts-nocheck
should not be reported because valid TS pragmas should be placed at the beginning of the file
Actual Result
// @ts-nocheck
and // @ts-check
are reported even if they are not valid TS pragmas
Additional Info
Follow up for #8416