February 12, 2018 at 3:50 pm #554176
I am trying to set a project-specific TSLint version for my project since the “embedded” one in Angular IDE is not recent enough for new rules.
When I run ‘ng lint’, I have no issues. Everything is fine and I have no lint issues.
However, Angular IDE is not recognizing the newer rules in my TSLint version (5.9.1).
In my project properties, I have the following options set under the “TypeScript” category:
Enable TSLint validation if tslint.json is present (checked)
TSLint version: Project Local (5.9.1)
However, when I hover over a new rule, I see (for example):
Implementation of rule “newline-per-chained-call” cannot be found. Try running ‘npm install’, upgrading TSLint (currently running with embedded TSLint 5.6.0) and/or ensuring that you have all necessary custom rules installed. If TSLint was recently upgraded, you may have old rules configured which need to be cleaned up.
So Angular seems to be using the embedded TSLint version despite my settings.
Is Angular IDE not capable of using TSLint versions newer than what’s embedded, or am I missing something else?February 13, 2018 at 10:26 am #555096
Sorry that you are seeing this issue. I tried to replicate the problem at my end but I see the validation error for the new rule only when I set the TSLint to a different version other than Project Local 5.9.1. Project Local 5.9.1 setting works for me.
Can you please clarify if you have rebuild the project after setting the TSLint version to Project Local 5.9.1? If the rebuild does not work, then please restart the IDE, rebuild the project and check if it works.
If none of the suggestions work, then please share with us the package.json and the tslint.json of the project to help us investigate further.
Apologies for inconvenience caused. Please let us know how it works for you.
MyEclipse SupportFebruary 13, 2018 at 10:46 am #555112
Thanks for your quick reply.
I have tried combinations of rebuilding the project, restarting the IDE, turning off linting, and changing the linting version back and forth, all without success.
I’ve attached the requested files as .txt files.
Attachments:You must be logged in to view attached files.February 14, 2018 at 4:52 am #555371
Thank you for the files. We could replicate the problem at our end but not consistently. While we continue to investigate it, can you please import the project to a new workspace and check if you still see the problem?
We just released CI 11. If you have not yet updated to CI 11, then please go to Help > Check for Updates and update.
Please let us know how it works for you.
MyEclipse SupportMarch 6, 2018 at 4:39 pm #560583
I can confirm I have a similar issue which is replicated consistently with CI 11.
When there is “tslint”: “5.8.0” we have no lint errors with ng lint.
After switching to “tslint”: “^5.9.1”, we got a bunch of whitespace errors from ng lint. But no errors in WebClipse!
Apparently, it uses tslint version different from project version (as specified in Project / Typescript / TSLint / Project Local 5.9.1). Any error of malformed tslint.json or unrecognized rule speaks by itself:
… (currently running with embedded TSLint 5.6.0) …
… (Using embedded TSLint 5.6.0)
In addition, even switching back to 5.8, it behaves now differently for the case https://www.genuitec.com/forums/topic/ide-does-not-show-tslint-errors/, previously the ng lint had error but UI did nothing about it and showed no warning (which it did show if there is no syntax crash). Now it displays warnings even when local ng lint fails with SyntaxError, proving it runs outdated, completely different version of TSLint that does not fail on this rule error.
Not clear where it takes this “embedded TSLint 5.6.0” from, where webclipse stores this embedded installation?March 8, 2018 at 8:35 am #560968
Sorry that you are seeing this problem. We are looking into it.
If possible, can you please check if importing the project to a new workspace helps fix the problem?
Apologies for inconvenience caused.
MyEclipse SupportMay 14, 2018 at 7:47 am #586004
I am not sure why, but at some point this issue fixed itself. It did not occur when we updated our project’s dependent packages. It may have happened when Angular IDE was updated.
I was otherwise unable to manually fix the issue, so I just “dealt with it” until I realized the issue was gone a couple of weeks ago. Sorry for those viewing the thread as this isn’t very helpful.May 18, 2018 at 3:27 pm #586831
Nothing did solve the problem, new workspace, etc. until I completely deleted node_modules and did npm install from scratch.
Not sure what and where is cached by Webclipse, but it seems like a bug (since
ng lintworks correctly with the same node_modules).
I did reproduce it more or less consistently, consider for example
x? = true;
ng lint and webclipse no warnings
tslint 5.10.0 has this bug https://github.com/palantir/tslint/issues/3916
after installing 5.10.0: ng lint shows warning but webclipse shows no warning
delete node_modules, npm install: both ng lint and webclipse show warning
change back to 5.8.0, npm install: ng lint shows no warning, webclipse shows warning
delete node_modules, npm install: ng lint and webclipse show no warning
But after such cycle it started to pick the change without deleting node_modules after the IDE restart or after refresh+clean (refresh alone never helps despite that it runs some build; sometimes clean without restart helps sometimes changes picked only after full restart, not sure what is the pattern).
- This reply was modified 2 days, 12 hours ago by Fedor Losev.
You must be logged in to reply to this topic.