Skip to content

Conversation

@l-trotta
Copy link
Contributor

@l-trotta l-trotta commented Jun 12, 2025

Adds linter rule for dictionary + fix rule-breaking type.
TaskId is currently a string | integer union, but I can find no evidence of it being a number anywhere.
sources:

the format is actually nodeId:taskId which is a string.
Closes #4510

@l-trotta l-trotta added the skip-backport This pull request should not be backported label Jun 12, 2025
@l-trotta
Copy link
Contributor Author

@flobernd @Anaethelion this is not breaking for java since string | integer unions are simplified to string, checking just in case it is breaking for your clients

Copy link
Member

@flobernd flobernd left a comment

Choose a reason for hiding this comment

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

LGTM!

export default {
rules: {
'single-key-dictionary-key-is-string': singleKeyDict,
'dictionary-key-is-string': Dict,
Copy link
Member

Choose a reason for hiding this comment

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

Nit: code style.

@l-trotta l-trotta merged commit 15e1dfb into main Jun 13, 2025
8 checks passed
@l-trotta l-trotta deleted the dict-string-lint branch June 13, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-backport This pull request should not be backported specification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[validation] Dictionary key type should resolve to string

4 participants