Skip to content

[WTF-2641]: Format generated types#182

Open
weirdwater wants to merge 4 commits into
masterfrom
wtf-2641-release-style-error
Open

[WTF-2641]: Format generated types#182
weirdwater wants to merge 4 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

@weirdwater weirdwater requested a review from a team as a code owner June 10, 2026 15:41
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.

1 participant