Skip to content

Tooling: Use WebIDL2 parser when linting to identify dictionaries#831

Merged
anssiko merged 1 commit intowebmachinelearning:mainfrom
inexorabletash:lint-parse-widl
Mar 21, 2025
Merged

Tooling: Use WebIDL2 parser when linting to identify dictionaries#831
anssiko merged 1 commit intowebmachinelearning:mainfrom
inexorabletash:lint-parse-widl

Conversation

@inexorabletash
Copy link
Contributor

Dictionary types need special treatment in a lint rule verifying that realms are used correctly. This requires knowing which types are dictionaries vs. interfaces. This was previously hard-coded, which is a maintenance burden.

Improve this by pulling in the webidl2.js library and using it to parse (and validate!) the spec's WebIDL, which gives us a list of dictionary types.

Dictionary types need special treatment in a lint rule verifying that
realms are used correctly. This requires knowing which types are
dictionaries vs. interfaces. This was previously hard-coded, which is
a maintenance burden.

Improve this by pulling in the webidl2.js library and using it to
parse (and validate!) the spec's WebIDL, which gives us a list of
dictionary types.
@inexorabletash
Copy link
Contributor Author

@huningxin and/or @anssiko - could you review and merge if it looks good?

This will help with landing #830 - see this note

Copy link
Member

@anssiko anssiko left a comment

Choose a reason for hiding this comment

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

LGTM! I’ll merge so you get to put this into production with #830

@anssiko anssiko merged commit 5daf9d7 into webmachinelearning:main Mar 21, 2025
2 checks passed
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