-
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
Status: TriageThis issue needs to be triaged.This issue needs to be triaged.Type: IdeaMarks an idea, which might be accepted and implemented.Marks an idea, which might be accepted and implemented.
Description
Suggestion
See tseslint.config()
is deprecated:
https://typescript-eslint.io/packages/typescript-eslint/#config-deprecated
It is recommended to setup plugins with defineConfig
of eslint
.
Trying to setup this plugin the recommended way results in:
Type 'EslintPluginFunctional' is not assignable to type 'Plugin'.
Types of property 'configs' are incompatible.
Type 'SharedConfigs & Readonly<{ all: Config; lite: Config; recommended: Config; strict: Config; off: Config; disableTypeChecked: Config; ... 7 more ...; stylistic: Config; }>' is not assignable to type 'Record<string, ConfigObject | LegacyConfigObject<RulesConfig, RulesConfig> | ConfigObject[]> | undefined'.ts(2322)
What I did (extraction from eslint.config.js
):
// @ts-check
import functionalPlugin from 'eslint-plugin-functional';
import { defineConfig } from 'eslint/config';
import typescriptEslint from 'typescript-eslint';
export default defineConfig(
// register all of the plugins upfront
{
plugins: {
['@typescript-eslint']: typescriptEslint.plugin,
// @ts-expect-error not compatible to use defineConfig
['functional']: functionalPlugin,
},
},
// many more configuration ...
);
paulcyr and nakanoasaservice
Metadata
Metadata
Assignees
Labels
Status: TriageThis issue needs to be triaged.This issue needs to be triaged.Type: IdeaMarks an idea, which might be accepted and implemented.Marks an idea, which might be accepted and implemented.