Allow linting rule to inject validations #22
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If we would like to lint a source
index.js
, it means that we require users ofninjutsu-build
to put avalidations
step on any build edge that usedindex.js
as an input.After a recent change to
@ninjutsu-build/core
we can return anInput<string>
object from linting rules that have a built-invalidations
step for all consumers of this value.This means that users do not need to remember to put a
validations
property on all users ofindex.js
, instead they can passindex.js
through the linting rule and then pass the returned value into any dependent rules.This should make everything simpler and reduce mistakes and the burden of knowledge for users.