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

Allow linting rule to inject validations #22

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

elliotgoodrich
Copy link
Owner

If we would like to lint a source index.js, it means that we require users of ninjutsu-build to put a validations step on any build edge that used index.js as an input.

After a recent change to @ninjutsu-build/core we can return an Input<string> object from linting rules that have a built-in validations step for all consumers of this value.

This means that users do not need to remember to put a validations property on all users of index.js, instead they can pass index.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.

If we would like to lint a source `index.js`, it means that we require
users of `ninjutsu-build` to put a `validations` step on any build edge
that used `index.js` as an input.

After a recent change to `@ninjutsu-build/core` we can return an
`Input<string>` object from linting rules that have a built-in
`validations` step for all consumers of this value.

This means that users do not need to remember to put a `validations`
property on all users of `index.js`, instead they can pass `index.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.
@elliotgoodrich elliotgoodrich changed the title Allow linting rule to inject validations in dependents Allow linting rule to inject validations Mar 21, 2024
@elliotgoodrich elliotgoodrich merged commit 510e836 into main Mar 21, 2024
9 checks passed
@elliotgoodrich elliotgoodrich deleted the improve-linting-rule branch March 21, 2024 19:06
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