-
Notifications
You must be signed in to change notification settings - Fork 59
Conversation
src/javascript/jsdoc.ts
Outdated
return {description, tags: parseCustomTags(d.tags)}; | ||
} | ||
|
||
const namedTags = new Set([ |
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.
namedTags
isn't a great name for this.
tagsWithNames
and a comment explaining the format expected for these tags?
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.
done
src/polymer/behavior-scanner.ts
Outdated
}`, | ||
severity: Severity.WARNING, | ||
sourceRange: this.document.sourceRangeForNode(node)! | ||
}); | ||
continue; | ||
continue; |
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.
hm, I think we should fiddle with this a bit until clang-format doesn't mangle it so
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.
trying, and I'll add a format commit
src/polymer/polymer-element.ts
Outdated
sourceRange: scannedMixinReference.sourceRange!, | ||
}); | ||
continue; | ||
} else if (mixins.size > 1) { | ||
element.warnings.push({ | ||
message: `@mixes reference, multiple mixins found ${mixinId}`, | ||
message: `@appliesMixin reference, multiple mixins found ${mixinId}`, |
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.
wording nit: multiple mixins found with name ${mixinId}
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.
done
src/polymer/polymer-element.ts
Outdated
sourceRange: scannedMixinReference.sourceRange!, | ||
}); | ||
continue; | ||
} | ||
const mixin = mixins.values().next().value; | ||
if (!(mixin instanceof PolymerElementMixin)) { | ||
element.warnings.push({ | ||
message: `@mixes reference to a non-Mixin ${mixinId}`, | ||
message: `@appliesMixin reference to a non-Mixin ${mixinId}`, |
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.
non-Polymer mixin?
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.
done
@@ -133,6 +132,7 @@ export class Polymer2ElementScanner implements JavaScriptScanner { | |||
const className = element.clazz.namespacedName; | |||
let tagName: string|undefined = undefined; | |||
// TODO(rictic): support `@customElements explicit-tag-name` from jsdoc | |||
// TODO(justinfagnani): do this in this PR? |
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.
recommend against doing this now, as this whole thing is getting a big rewrite in #625
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.
ack
jsdoc.getTag(parsedJsdoc, 'pseudoElement', 'name') || undefined; | ||
if (pseudoTag) { | ||
const pseudoTag = jsdoc.getTag(parsedJsdoc, 'pseudoElement'); | ||
console.log('pseudoTag', pseudoTag); |
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.
console.log
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.
done
@rictic PTAL |
Looks good, but travis is failing on Other PRs aren't failing so I don't think this is an upstream thing |
9f97e5b
to
46fe7cd
Compare
@rictic Rebased and push -f'ed, but now I need to rebase again :( |
46fe7cd
to
42909d1
Compare
42909d1
to
bca1800
Compare
Adds support for
@customElement
,@polymer
,@mixinFunction
,@mixinClass
, and@appliesMixin
.Removes the EditorService which got test times down to ~2s.
Refactors some JSDoc handling code to remove our custom Annotation/Tag interfaces in favor of just using Doctrine.
I first removed support for the legacy annotations, then added them back in another commit so it can be easily reverted when we remove support. The commit that adds them back duplicates tests for easy removal too.
It's probably easier to review this one commit-by-commit with the middle commit being the mst significant.