-
Notifications
You must be signed in to change notification settings - Fork 235
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
feat: externalize ngWalker to support custom lint rules #658
Conversation
Thanks for the quick PR! My idea was to externalize the content of the |
Hi @mgechev, Thank you for your input. I only needed NgWalker for my use case, but I think it makes sense to export the angular directory contents, there's so much goodness, everyone could use to build rules. |
ae211a8
to
1b30481
Compare
@piyukore06 would you check why the build is failing? |
Yea I am trying but couldn't find anything.. locally the command runs without any problems. |
src/angular/index.ts
Outdated
@@ -0,0 +1,21 @@ | |||
export * from './templates/basicTemplateAstVisitor'; | |||
export * from './templates/jitReflector'; |
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.
I don't think we should export the jitReflector
as part of the public API.
src/angular/index.ts
Outdated
export * from './templates/basicTemplateAstVisitor'; | ||
export * from './templates/jitReflector'; | ||
export * from './templates/recursiveAngularExpressionVisitor'; | ||
export * from './templates/referenceCollectorVisitor'; |
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.
Better not export referenceCollectorVisitor
.
src/angular/index.ts
Outdated
export * from './templates/referenceCollectorVisitor'; | ||
export * from './templates/templateParser'; | ||
|
||
export * from './styles/basicCssAstVisitor'; |
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.
Can we keep only the basicCssAstVisitor
exported?
src/angular/index.ts
Outdated
export * from './config'; | ||
export * from './expressionTypes'; | ||
export * from './metadata'; | ||
export * from './metadataReader'; |
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.
Can we skip the metadataReader
?
src/angular/index.ts
Outdated
export * from './metadataReader'; | ||
export * from './ngWalker'; | ||
export * from './ngWalkerFactoryUtils'; | ||
export * from './sourceMappingVisitor'; |
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.
My guess is that the error comes from the missing newline.
@piyukore06 if TypeScript won't complain, I'd suggest exporting only the base visitors without any extra internal APIs. This way, we'd be able to make changes in them without introducing issues for consumers of codelyzer. |
a12f3a7
to
e5b16a8
Compare
@mgechev thank you for your comments! They lead me to a better understanding of, where to look and what should be exported. |
relates to #657