Bug: Typescript error in default value for new rule schema #7412
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
package: utils
Issues related to the @typescript-eslint/utils package
Before You File a Bug Report Please Confirm You Have Done The Following...
Issue Description
In a new rule meta.schema an entry of, for example:
Gives an error for the default value of
[]
, where I expect it to be a valid valueThis is due to missing types for JSONSchema4Array and JSONSchema4Object in JSONSchema4Type.
Those types exist in json-schema: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/json-schema/index.d.ts#L30
PR with the fix:
#7406
Reproduction Repository Link
https://github.com/wespickett/typescript-eslint-ex1/tree/main
Repro Steps
npx tsc
Versions
@typescript-eslint/eslint-plugin
6.3.0
@typescript-eslint/parser
6.3.0
@typescript-eslint/scope-manager
6.3.0
@typescript-eslint/typescript-estree
6.3.0
@typescript-eslint/type-utils
6.3.0
@typescript-eslint/utils
6.3.0
TypeScript
5.1.6
ESLint
8.46.0
node
18.14.2
The text was updated successfully, but these errors were encountered: