feat: externalize ngWalker to support custom lint rules#658
feat: externalize ngWalker to support custom lint rules#658mgechev merged 2 commits intomgechev:masterfrom
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.
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.
Better not export referenceCollectorVisitor.
| export * from './templates/referenceCollectorVisitor'; | ||
| export * from './templates/templateParser'; | ||
|
|
||
| export * from './styles/basicCssAstVisitor'; |
There was a problem hiding this comment.
Can we keep only the basicCssAstVisitor exported?
src/angular/index.ts
Outdated
| export * from './config'; | ||
| export * from './expressionTypes'; | ||
| export * from './metadata'; | ||
| export * from './metadataReader'; |
src/angular/index.ts
Outdated
| export * from './metadataReader'; | ||
| export * from './ngWalker'; | ||
| export * from './ngWalkerFactoryUtils'; | ||
| export * from './sourceMappingVisitor'; No newline at end of file |
There was a problem hiding this comment.
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