Skip to content
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

Errors when linting Angular 5 project. #28

Closed
dgsmith2 opened this issue May 2, 2018 · 2 comments
Closed

Errors when linting Angular 5 project. #28

dgsmith2 opened this issue May 2, 2018 · 2 comments

Comments

@dgsmith2
Copy link

dgsmith2 commented May 2, 2018

When I added rxjs-tslint@^0.1.1 to my Angular 5 project I started getting strange errors. Both VSC and IDEA reported things such as name collisions on import statements. Manually running ng lint resulted in a series of type errors, such as the following, that ultimately lead to JS running out of heap memory.

TypeError: Cannot read property 'kind' of undefined
    at isLabelable (/app/node_modules/tslint/lib/rules/labelPositionRule.js:57:18)
    at cb (/app/node_modules/tslint/lib/rules/labelPositionRule.js:50:52)
    at visitNodes (/app/node_modules/typescript/lib/typescript.js:12699:30)
    at Object.forEachChild (/app/node_modules/typescript/lib/typescript.js:12884:24)
    at cb (/app/node_modules/tslint/lib/rules/labelPositionRule.js:53:19)
    at visitNode (/app/node_modules/typescript/lib/typescript.js:12690:24)
    at Object.forEachChild (/app/node_modules/typescript/lib/typescript.js:12882:21)
    at cb (/app/node_modules/tslint/lib/rules/labelPositionRule.js:53:19)
    at visitNodes (/app/node_modules/typescript/lib/typescript.js:12699:30)
    at Object.forEachChild (/app/node_modules/typescript/lib/typescript.js:12875:24)

I think it has to do with rxjs-tslint depending on "typescript": "~2.8.1" and Angular 5 depending on "typescript": "2.6.x". Folks who encountered this error in other situations ended up altering the version of Typescript they used.

The only solution I could come up with was to remove my dependency on rxjs-tslint. Am I missing an alternative?

@dgsmith2
Copy link
Author

dgsmith2 commented May 2, 2018

I guess this "issue" ends up being more of a "heads up" because the README has you install rxjs-tslint globally--not meant to be a devDependency.

@mgechev
Copy link
Collaborator

mgechev commented May 2, 2018

Yes, correct. Please, use the global executable otherwise there could be mismatched dependencies.

@mgechev mgechev closed this as completed May 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants