Skip to content

fix(eslint): handle various templates#994

Draft
sacrosanctic wants to merge 14 commits intosveltejs:mainfrom
sacrosanctic:shaky-barnacle
Draft

fix(eslint): handle various templates#994
sacrosanctic wants to merge 14 commits intosveltejs:mainfrom
sacrosanctic:shaky-barnacle

Conversation

@sacrosanctic
Copy link
Contributor

@sacrosanctic sacrosanctic commented Mar 18, 2026

I spotted the problem when looking at https://github.com/hyunbinseo/svelte-kit-templates/blob/b200ae76d7bb2c61e6e695c4d90912666d39256c/javascript/eslint.config.js. I had to test eslint by hand.

We should add a test, could someone lend me hand?

That repo was quite helpful, maybe we can expand on the templates we take snapshots for?

  • add test
  • missing type

@changeset-bot
Copy link

changeset-bot bot commented Mar 18, 2026

⚠️ No Changeset found

Latest commit: 132cf17

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@svelte-docs-bot
Copy link

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 18, 2026

Open in StackBlitz

npx https://pkg.pr.new/svelte-migrate@994
npx https://pkg.pr.new/sv@994
npx https://pkg.pr.new/@sveltejs/sv-utils@994

commit: 132cf17

Copy link
Member

@manuel3108 manuel3108 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which problem exactly are you trying to solve in this file? https://github.com/hyunbinseo/svelte-kit-templates/blob/b200ae76d7bb2c61e6e695c4d90912666d39256c/javascript/eslint.config.js I don't think im following currently.

Don't mind the comments below, it's just so that we don't forget about them.

el.object.object.type === 'Identifier' &&
el.object.object.name === svelteImportName
);
// i dont know the type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

);
};

// i dont know the type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

@sacrosanctic
Copy link
Contributor Author

Which problem exactly are you trying to solve in this file?

@manuel3108

prettier and svelte.configs.prettier are supposed to be right after svelte.configs.recommended.

The original only partially supported the following cases, [], defineConfig(), and defineConfig([]). It now also handles svelte.configs.recommended whether it is spread or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants