-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add rule to detect redundant // @internal
comments
#342
Comments
For posterity: TypeScript simply omits any Node that has the substring I'll do some further investigation to see if there is the need for a rule to disallow |
It should also be an error to have |
Also explore adding errors for internal declarations that are used by other non-internal declarations. |
The complexity of this topic actually warrants more than one rule: #345 and #346 Regarding // emits nothing
export var
// @internal
a: any;
// emits 'var b: any'
export var
b: any,
// @internal
c: any;
// doesn't emit the heritage clause, also works for 'implements'
export class Foo
extends
// @internal
Object {} |
This rule should also detect // @internal
const foo = 1;
// @internal
export const bar = 1; expected: error on |
That last thing is actually quite hard to achieve now that declarations are implicitly added to the declaration file. So this needs the same logic as #346 |
This should probably not be enabled in a preset.
TBD: how should this work if
--stripInternal
is not enabled?The text was updated successfully, but these errors were encountered: