Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds plugin hooks for file validation #490

Merged
merged 2 commits into from
Jan 25, 2022
Merged

Conversation

TwitchBronBron
Copy link
Member

@TwitchBronBron TwitchBronBron commented Jan 24, 2022

  • Adds beforeFileValidate plugin hook. While currently the afterFileParse event happens at roughly the same time, adding this new hook makes it more approachable to extension authors (i.e. they don't have to read the docs), and also guards against issues that may occur if we add events between afterFileParse and beforeFileValidate in the future. It also makes things more clear when doing pre-validate work, then doing post-validate cleanup.
  • Adds onFileValidate plugin hook which is how where plugins should hook in when contributing their own file validations.

Since the v1 plugin system event parameters use a single event object (instead of 1...n parameters), all newly added plugin events in master will also follow that style to minimize impacts of plugins migrating to v1.

@TwitchBronBron TwitchBronBron merged commit 5e6dedc into master Jan 25, 2022
@TwitchBronBron TwitchBronBron deleted the validation-events branch January 25, 2022 15:59
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.

None yet

3 participants