-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Use eslint types for exported configs #789
Conversation
This allows svelte configs to pass typescript-eslint type checking
🦋 Changeset detectedLatest commit: 09efac1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@KuSh Thank you for the update! Can you add the changeset? I think this can be recognize as fix. |
Done ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## [email protected] ### Minor Changes - [#802](#802) [`be64d36`](be64d36) Thanks [@ota-meshi](https://github.com/ota-meshi)! - fix: broken indentation of if condition in `svelte/indent` rule ### Patch Changes - [#789](#789) [`0bc17df`](0bc17df) Thanks [@KuSh](https://github.com/KuSh)! - chore: Use eslint types for exported configs - [#805](#805) [`6e4d3ed`](6e4d3ed) Thanks [@baseballyama](https://github.com/baseballyama)! - fix: update `svelte-eslint-parser` to fix nested `{#snippet}` - [#800](#800) [`580f44f`](580f44f) Thanks [@ota-meshi](https://github.com/ota-meshi)! - feat: add name to flat configs. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Hi there, on 2.43.0, and with It looks like this is because the generated file declare const _default: {
meta: typeof processor.meta;
configs: {
base: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord, import("eslint").Linter.RulesRecord>;
recommended: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord, import("eslint").Linter.RulesRecord>;
prettier: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord, import("eslint").Linter.RulesRecord>;
all: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord, import("eslint").Linter.RulesRecord>;
'flat/base': import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord>[];
'flat/recommended': import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord>[];
'flat/prettier': import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord>[];
'flat/all': import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord>[];
};
... You can see that TypeScript considers these types invalid:
|
@jtbandes I don't have any problem with latest versions of both eslint and eslint-plugin-svelte (even if type definitions could be simplified) |
This allows svelte configs to pass typescript-eslint type checking
Actually when migrating a project to eslint 9 I get typescript 2345 error
Using const to define rule levels fixe the problem