Open irsooti opened 3 months ago
Latest commit: 3451c3ecb6df551f9fbf525b15b8d958e54f3983
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
@irsooti I tried your change but maybe it's because I use the eslint.config.ts
since ESLint 9.9.0.
eslint.config.ts:29:3 - error TS2345: Argument of type 'Config<RulesRecord>' is not assignable to parameter of type 'ConfigWithExtends'.
Types of property 'languageOptions' are incompatible.
Type 'import("path/node_modules/.pnpm/@types+eslint@9.6.0/node_modules/@types/eslint/index").Linter.LanguageOptions | undefined' is not assignable to type 'import("path/node_modules/.pnpm/@typescript-eslint+utils@8.0.1_eslint@9.9.0_jiti@1.21.6__typescript@5.5.4/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config").FlatConfig.LanguageOptions | undefined'.
Type 'import("path/node_modules/.pnpm/@types+eslint@9.6.0/node_modules/@types/eslint/index").Linter.LanguageOptions' is not assignable to type 'import("path/node_modules/.pnpm/@typescript-eslint+utils@8.0.1_eslint@9.9.0_jiti@1.21.6__typescript@5.5.4/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config").FlatConfig.LanguageOptions'.
Types of property 'globals' are incompatible.
Type 'Globals | undefined' is not assignable to type 'GlobalsConfig | undefined'.
Type 'Globals' is not assignable to type 'GlobalsConfig'.
'string' index signatures are incompatible.
Type 'GlobalConf' is not assignable to type 'GlobalVariableOption'.
Type '"readable"' is not assignable to type 'GlobalVariableOption'.
Edit:
It seems to work using Readonly<Linter.RulesRecord>
instead of Linter.Config
like used here
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/136deed9a5c0adaea7bc7674783bb52608673d05/types/eslint__js/index.d.ts#L5
Hello,
the type
FlatConfig
has been replaced withConfig
, according to the deprecation warning.I just changed the type with the suggested one.
Cheers!