-
Notifications
You must be signed in to change notification settings - Fork 885
completed-docs: Added option to check get and set accessors. #3497
Conversation
To the consumer it doesn't matter if it's an accessor or a "real" property. That's an implementation detail. |
…s" option is enabled.
Not sure why the "testNext" configuration is failing. The "trailing-comma" rule has failing tests, but my changes have nothing to do with that. 😕 |
@reduckted it's a bug in typescript@next, see #3494 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
Please add a test with accessors in an object literal. There should be no docs required?
@ajafff Ah, good catch. Accessors in object literals were expected to have documentation comments. I've made the rule skip over them now. Properties on object literals didn't require documentation. I'm not too familiar with the entire TypeScript syntax tree, but I'm guessing properties in object literals and properties in classes don't use the same |
That's correct. But |
thanks @reduckted I'll open a follow-up PR to exclude method declarations in object literals |
PR checklist
Overview of change:
The
"properties"
for thecompleted-docs
rule now checksGetAccessor
andSetAccessor
node types.CHANGELOG.md entry:
[enhancement]
"properties"
option forcompleted-docs
rule now checks getter and setter accessors.