Before You File a Bug Report Please Confirm You Have Done The Following...
Relevant Package
utils
Playground Link
No response
Repro Code
import { RuleCreator } from "@typescript-eslint/utils/eslint-utils";
RuleCreator.withoutDocs({
meta: {
messages: {},
schema: [],
type: 'problem',
},
defaultOptions: [],
create() { return {}; }
});
ESLint Config
tsconfig
Expected Result
I expect there to be no type error
Actual Result
type error because name is now required
Argument of type '{ meta: { messages: {}; schema: never[]; type: "problem"; }; defaultOptions: []; create(context: Readonly<RuleContext<never, []>>): {}; }' is not assignable to parameter of type 'Readonly<RuleWithMeta<[], never, unknown>>'.
Property 'name' is missing in type '{ meta: { messages: {}; schema: never[]; type: "problem"; }; defaultOptions: []; create(context: Readonly<RuleContext<never, []>>): {}; }' but required in type 'Readonly<RuleWithMeta<[], never, unknown>>'.ts(2345)
RuleCreator.d.ts(12, 5): 'name' is declared here.
Additional Info
name used to be optional but was made required in #11616 (breaking)
cc @y-hsgw
Versions
| package |
version |
@typescript-eslint/utils |
8.45.0 |
Before You File a Bug Report Please Confirm You Have Done The Following...
Relevant Package
utils
Playground Link
No response
Repro Code
ESLint Config
tsconfig
Expected Result
I expect there to be no type error
Actual Result
type error because
nameis now requiredAdditional Info
nameused to be optional but was made required in #11616 (breaking)cc @y-hsgw
Versions
@typescript-eslint/utils8.45.0