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

ci: add require formly documentation rule #1019

Merged
merged 5 commits into from
Feb 21, 2022
Merged

Conversation

MaxKless
Copy link
Collaborator

@MaxKless MaxKless commented Feb 17, 2022



## PR Type



[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[x] CI-related changes
[ ] Documentation content changes
[ ] Application / infrastructure changes
[ ] Other:

## What Is the Current Behavior?

Currently, no one is checking whether your formly artifacts are documented.

Issue Number: Closes #

## What Is the New Behavior?

Now, an eslint rule enforces (hopefully explanatory) comments before formly artifacts.

## Does this PR Introduce a Breaking Change?



[ ] Yes
[x] No

## Other Information

AB#74442

@MaxKless MaxKless requested a review from Eisie96 February 18, 2022 14:34
function hasPrecedingComment(node: TSESTree.ClassDeclaration) {
return (
context.getSourceCode().getCommentsBefore(node)?.length > 0 ||
context.getSourceCode().getCommentsBefore(node.decorators?.[0])?.length > 0
Copy link
Contributor

Choose a reason for hiding this comment

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

getCommentsBefore cannot be called with a falsy object. node.decorators?.[0] could be undefined.

@MaxKless MaxKless merged commit c9dd6aa into develop Feb 21, 2022
@MaxKless MaxKless deleted the ci/formly-eslint-rule branch February 21, 2022 16:53
@shauke shauke added this to the 2.1 milestone Feb 23, 2022
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.

3 participants