"@typescript-eslint/prefer-ts-expect-error": "error" } } 选项 该规则无需配置额外选项。 正例 // @ts-expect-error: with description export const str: string = 1; /** * Explaining comment * * @ts-expect-error: with description */ export const multiLine: number = 'value'; /** @...
prefer-ts-expect-error 使用@ts-expect-error而不是@ts-ignore。 为什么:@ts-ignore与@ts-expect-error二者的区别主要在于,前者是 ignore,是直接放弃了下一行的类型检查而无论下一行是否真的有错误,后者则是期望下一行确实存在一个错误,并且会在下一行实际不存在错误时抛出一个错误。 这一类干涉代码检查指令的使...
prefer-ts-expect-error 使用@ts-expect-error而不是@ts-ignore。 为什么:@ts-ignore与@ts-expect-error二者的区别主要在于,前者是 ignore,是直接放弃了下一行的类型检查而无论下一行是否真的有错误,后者则是期望下一行确实存在一个错误,并且会在下一行实际不存在错误时抛出一个错误。 这一类干涉代码检查指令的使...
prefer-ts-expect-error 使用@ts-expect-error 而不是 @ts-ignore。 为什么:@ts-ignore 与 @ts-expect-error 二者的区别主要在于,前者是 ignore,是直接放弃了下一行的类型检查而无论下一行是否真的有错误,后者则是期望下一行确实存在一个错误,并且会在下一行实际不存在错误时抛出一个错误。 这一类干涉代码检查...
@typescript-eslint/no-unused-vars @typescript-eslint/no-use-before-define @typescript-eslint/no-useless-constructor @typescript-eslint/prefer-as-const @typescript-eslint/prefer-enum-initializers @typescript-eslint/prefer-for-of @typescript-eslint/prefer-function-type @typescript-es...
typescript/prefer-literal-enum-member 🍀 https://typescript-eslint.io/rules/prefer-literal-enum-member typescript/prefer-namespace-keyword 🍀 https://typescript-eslint.io/rules/prefer-namespace-keyword typescript/prefer-ts-expect-error 🍀 https://typescript-eslint.io/rules/prefer-ts-expect...
eslint-plugin:deprecate prefer-ts-expect-error in favor of ban-ts-comment (#9081) 🩹 Fixes ast-spec:addEmptyStatementtoStatement(#8892) eslint-plugin:[consistent-type-assertions] prevent syntax errors on arrow functions (#8826) typescript-estree:truncate number of files printed by the maximum...
eslint-plugin: disable no-class-assign rule in eslint-recommended config (#10250) eslint-plugin: [prefer-nullish-coalescing] add option ignoreBooleanCoercion (#9924) eslint-plugin: [only-throw-error] add allow option (#10221) 🩹 Fixes deps: update dependency @eslint-community/regexpp to ...
"@typescript-eslint/no-unused-vars": ["error"], "react/jsx-filename-extension": [2, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }] } ESLint throwing no-unused-vars for reactjs data, ESLint throwing no-unused-vars for reactjs data component. Ask Question Asked 4 years...
eslint-plugin: [require-await] add support for "await using" (#7866) (855abea)Featureseslint-plugin: [ban-ts-comments] suggest ts-expect-error over ts-ignore (#7849) (5e73a48)You can read about our versioning strategy and releases on our website.6.9.1 (2023-10-30)Bug...