Skip to content

[WTF-2641]: Format generated types#182

Merged
weirdwater merged 5 commits into
masterfrom
wtf-2641-release-style-error
Jun 23, 2026
Merged

[WTF-2641]: Format generated types#182
weirdwater merged 5 commits into
masterfrom
wtf-2641-release-style-error

Conversation

@weirdwater

@weirdwater weirdwater commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Checklist

  • Contains unit tests ❌
  • Contains breaking changes ❌
  • Did you update version and changelog? ✅
  • PR title properly formatted ([XX-000]: description)? ✅

This PR contains

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Other (describe)

What is the purpose of this PR?

Avoid linting errors when running the release command. As a side-effect, the generated types will now respect the widget's prettier config.

Relevant changes

Before writing the generated types to the definition file, the type generator now runs prettier to format the source.

What should be covered while testing?

Widget with many client types

Prerequisites

  • A widget (new or existing)

Steps

  1. Modify the widget xml to include properties of these types:
  • Expression Property
  • Action Property
  • Attribute Property
  • List Datasource
  • Linked ActionProperty
  • Linked AttributeProperty
  • Association Property with ReferenceSet
  • File Property
  • Image Property
  • Icon Property
  • Selection Property (Multi and Single)
  1. Run npx @mendix/pluggable-widgets-tools build
  2. Run npx @mendix/pluggable-widgets-tools lint

Result

  • With this version of PWT: Step 3 should run without errors
  • With earlier version of PWT: Step 3 will report formatting errors on the typings file

Widget with custom prettier rules

Prerequisites

  • A widget (new or existing)

Steps

  1. Edit the widget's prettier.config.js, add the following settings:
{
    semi: false,
    singleQuote: true
}
  1. Run npx @mendix/pluggable-widgets-tools build
  2. Run npx @mendix/pluggable-widgets-tools lint

Result

  • With this version of PWT: Step 3 should run without errors
  • With earlier version of PWT: Step 3 will report formatting errors on the typings file

Comment thread packages/pluggable-widgets-tools/src/utils/formatting.ts Outdated
@weirdwater weirdwater force-pushed the wtf-2641-release-style-error branch 2 times, most recently from 57914c7 to 0e434aa Compare June 18, 2026 12:15
@weirdwater weirdwater mentioned this pull request Jun 22, 2026
1 task
Comment thread packages/pluggable-widgets-tools/src/utils/formatting.ts Outdated
@weirdwater weirdwater force-pushed the wtf-2641-release-style-error branch from 3686503 to d5de776 Compare June 23, 2026 13:51
@weirdwater weirdwater enabled auto-merge June 23, 2026 13:56
@weirdwater weirdwater force-pushed the wtf-2641-release-style-error branch from d5de776 to 7aae11b Compare June 23, 2026 14:07
@weirdwater weirdwater merged commit c644783 into master Jun 23, 2026
5 checks passed
@weirdwater weirdwater deleted the wtf-2641-release-style-error branch June 23, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants