Skip to content

chore: fix typescript types and migration api service#148

Closed
Malte Janz (MalteJanz) wants to merge 2 commits intotrunkfrom
chore/fix-typescript-types-and-migration-api-service
Closed

chore: fix typescript types and migration api service#148
Malte Janz (MalteJanz) wants to merge 2 commits intotrunkfrom
chore/fix-typescript-types-and-migration-api-service

Conversation

@MalteJanz
Copy link
Copy Markdown
Contributor

Looks like our Typescript setup in our plugin is a little broken right now.

I tried to clean up some wrong types a little bit, but ideally I would also like to:

  • remove all @ts-ignore comments in swag-migration.api.service.ts
  • somehow import the ApiService type from the core, without importing code into our bundle. So we get proper type information for all the methods / fields of the base class
  • make sure TSC / Eslint checks types with the composer run lint:admin command as well as in our CI

@MalteJanz Malte Janz (MalteJanz) self-assigned this Mar 2, 2026
@MalteJanz Malte Janz (MalteJanz) changed the title Chore/fix typescript types and migration api service chore: fix typescript types and migration api service Mar 2, 2026
Comment on lines +59 to +60
// todo: remove me, this is just to test our typescript linting
export const aNumber: string = 42;
Copy link
Copy Markdown
Contributor Author

@MalteJanz Malte Janz (MalteJanz) Mar 2, 2026

Choose a reason for hiding this comment

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

Lars Kemper (@larskemper) maybe you can help me investigate what's going on when you are back 🙈 .

I already tried to look at other tsconfig.json files of our other plugins but so far didn't find a proper config that only checks our plugin files, but still allows importing type from the core 🤔

The highlighting in the IDE (PHPStorm) seems to work fine for the most part.

I'm a bit confused right now 🤯

Copy link
Copy Markdown
Member

@larskemper Lars Kemper (larskemper) Mar 3, 2026

Choose a reason for hiding this comment

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

yep, exactly my problem doing this in the first place 😅 . Will take a look

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

feel free to take over / commit to this PR. Unfortunately I'm in meetings all day, otherwise I would have suggested to take a look together 🙈

Copy link
Copy Markdown
Member

@larskemper Lars Kemper (larskemper) Mar 3, 2026

Choose a reason for hiding this comment

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

also not really an idea, but i guess we could do something like this: https://github.com/shopware/SwagMigrationAssistant/pull/149/changes#diff-24da125432db6a98cab560db54b6abf35a172a6023048c271ccce5774cceb6f1R8

at least catches the type issues in our code

@larskemper
Copy link
Copy Markdown
Member

covered by #149

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