ITADN

Enable usage with `@nuxt/eslint`

#78Closedfelixgabler 创建于 2024-05-08
enhancement
F
felixgablercommented
### Clear and concise description of the problem With the latest version of `@nuxt/eslint`, it would be great if we could also use this config inside the new `withNuxt` in `eslint.config.mjs`. Basically, the idea would be to enable replacing `antfu()` with `sxzz()` in [this example](https://eslint.nuxt.com/packages/module#custom-config-presets). When I do this now, it throws the following tsc error: ``` Argument of type 'FlatESLintConfigItem[]' is not assignable to parameter of type 'ResolvableFlatConfig'. Type 'FlatESLintConfigItem[]' is not assignable to type 'FlatConfig<RulesRecord>[]'. Type 'FlatESLintConfigItem' is not assignable to type 'FlatConfig<RulesRecord>'. Types of property 'languageOptions' are incompatible. ``` ### Suggested solution Make sure `languageOptions` types are compatible between the two packages. This might just involve updating `eslint-define-config` (#49) since it is there that the `Globals` type mismatches. ### Alternative _No response_ ### Additional context _No response_ ### Validations - [X] Follow our [Code of Conduct](https://github.com/sxzz/.github/blob/main/CODE_OF_CONDUCT.md) - [X] Read the [Contributing Guide](https://github.com/sxzz/contribute). - [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
关闭于 2024-06-14 2 条评论