-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't working
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.
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
n/atsconfig
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 |
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't working