facebook

Angular IDE does not use project local TSLint version

  1. CodeMix & Angular IDE
  2.  > 
  3. Webclipse 1.x Help

Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #554176 Reply

    Anthony
    Participant

    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?

    #555096 Reply

    support-swapna
    Moderator

    Anthony,

    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.

    –Swapna
    MyEclipse Support

    #555112 Reply

    Anthony
    Participant

    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.
    #555371 Reply

    support-swapna
    Moderator

    Anthony,

    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.

    –Swapna
    MyEclipse Support

    #560583 Reply

    Fedor Losev
    Participant

    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)
    or
    (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?

    #560968 Reply

    support-swapna
    Moderator

    Fedor,

    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.

    –Swapna
    MyEclipse Support

    #586004 Reply

    Anthony
    Participant

    Swapna,

    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.

    #586831 Reply

    Fedor Losev
    Participant

    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 lint works correctly with the same node_modules).

    I did reproduce it more or less consistently, consider for example

    x? = true;

    tslint 5.8.0
    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 5 years, 10 months ago by Fedor Losev.
Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Angular IDE does not use project local TSLint version

You must be logged in to post in the forum log in