facebook

TSLint missing rules warning

  1. CodeMix & Angular IDE
  2.  > 
  3. Webclipse 1.x Help
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #523924 Reply

    andrei-ivanov
    Participant

    Hi,
    Eclipse shows me these errors:

    Implementation of rule “component-selector” cannot be found. Try running ‘npm install’, upgrading TSLint (currently running with project’s TSLint 5.2.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.
    Implementation of rule “directive-selector” cannot be found. Try running ‘npm install’, upgrading TSLint (currently running with project’s TSLint 5.2.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.
    Implementation of rule “no-input-rename” cannot be found. Try running ‘npm install’, upgrading TSLint (currently running with project’s TSLint 5.2.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.

    As far as I understand, these are actually supported, so I don’t understand why Eclipse shows them.
    I’ve even tried with TSLint 5.3.2, but then I get even more errors:

    Cannot load rule “component-selector”. Internal error while loading the rule with project’s TSLint 5.3.2: Cannot read property ‘prototype’ of undefined.
    Cannot load rule “directive-class-suffix”. Internal error while loading the rule with project’s TSLint 5.3.2: Cannot read property ‘prototype’ of undefined.
    Cannot load rule “directive-selector”. Internal error while loading the rule with project’s TSLint 5.3.2: Cannot find module ‘@angular/compiler’.
    Cannot load rule “invoke-injectable”. Internal error while loading the rule with project’s TSLint 5.3.2: Cannot read property ‘prototype’ of undefined.
    Cannot load rule “no-input-rename”. Internal error while loading the rule with project’s TSLint 5.3.2: Cannot find module ‘@angular/compiler’.
    Cannot load rule “no-output-rename”. Internal error while loading the rule with project’s TSLint 5.3.2: Cannot read property ‘prototype’ of undefined.

    package.json also has "codelyzer": "~3.0.1"

    Running ng lint --type-check says All files pass linting..

    tslint.json:

    
    {
      "rulesDirectory": [
        "node_modules/codelyzer"
      ],
      "rules": {
        "callable-types": true,
        "class-name": true,
        "comment-format": [
          true,
          "check-space"
        ],
        "curly": true,
        "eofline": false,
        "forin": true,
        "import-blacklist": [true, "rxjs"],
        "import-spacing": true,
        "indent": [
          false,
          "tabs"
        ],
        "interface-over-type-literal": true,
        "label-position": true,
        "max-line-length": [
          true,
          180
        ],
        "member-access": false,
        "member-ordering": [
          true,
          "static-before-instance",
          "variables-before-functions"
        ],
        "no-arg": true,
        "no-bitwise": true,
        "no-console": [
          true,
          "debug",
          "info",
          "time",
          "timeEnd",
          "trace"
        ],
        "no-construct": true,
        "no-debugger": true,
        "no-duplicate-variable": true,
        "no-empty": false,
        "no-empty-interface": true,
        "no-eval": true,
        "no-inferrable-types": [true, "ignore-params"],
        "no-shadowed-variable": true,
        "no-string-literal": false,
        "no-string-throw": true,
        "no-switch-case-fall-through": true,
        "no-trailing-whitespace": true,
        "no-unused-expression": true,
        "no-use-before-declare": true,
        "no-var-keyword": true,
        "object-literal-sort-keys": false,
        "one-line": [
          true,
          "check-open-brace",
          "check-catch",
          "check-else",
          "check-whitespace"
        ],
        "prefer-const": true,
        "quotemark": [
          true,
          "single"
        ],
        "radix": true,
        "semicolon": [
          "always"
        ],
        "triple-equals": [
          true,
          "allow-null-check"
        ],
        "typedef-whitespace": [
          true,
          {
            "call-signature": "nospace",
            "index-signature": "nospace",
            "parameter": "nospace",
            "property-declaration": "nospace",
            "variable-declaration": "nospace"
          }
        ],
        "typeof-compare": true,
        "unified-signatures": true,
        "variable-name": false,
        "whitespace": [
          true,
          "check-branch",
          "check-decl",
          "check-operator",
          "check-separator",
          "check-type"
        ],
    
        "directive-selector": [true, "attribute", "app", "camelCase"],
        "component-selector": [true, "element", "app", "kebab-case"],
        "use-input-property-decorator": true,
        "use-output-property-decorator": true,
        "use-host-property-decorator": true,
        "no-input-rename": true,
        "no-output-rename": true,
        "use-life-cycle-interface": true,
        "use-pipe-transform-interface": true,
        "component-class-suffix": true,
        "directive-class-suffix": true,
        "no-access-missing-member": true,
        "templates-use-public": true,
        "invoke-injectable": true
      }
    }
    
    #523949 Reply

    support-swapna
    Moderator

    Andrei,

    Thank you for the details. I have filed a bug for the dev team to investigate further.
    We will keep you posted when the fix is out.

    Apologies for inconvenience caused. Thank you once again for raising it.

    –Swapna
    MyEclipse Support

    #524353 Reply

    support-swapna
    Moderator

    Andrei,

    We could not replicate the issue reported by you at our end with TSLint 5.x.x and Codelyzer 3.0.1.
    Can you please run npm install on the project, refresh the project contents and check if the errors are still there? Also clean rebuild the project and check if it helps.

    If the above suggestions do not help, then please share with us the package.json for further investigation.

    Please let us know how it works for you.

    –Swapna
    MyEclipse Support

    #524364 Reply

    andrei-ivanov
    Participant

    I did a cleanup but it didn’t help 🙁

    rm -rf node_modules
    npm cache clean
    npm install

    This is my package.json:

    {
      "name": "cargo-tracker-web",
      "version": "0.0.0",
      "license": "MIT",
      "scripts": {
        "ng": "ng",
        "start": "ng serve",
        "build": "ng build",
        "test": "ng test",
        "lint": "ng lint",
        "e2e": "ng e2e"
      },
      "private": true,
      "dependencies": {
        "@angular/animations": "^4.1.0",
        "@angular/common": "^4.1.0",
        "@angular/compiler": "^4.1.0",
        "@angular/core": "^4.1.0",
        "@angular/forms": "^4.1.0",
        "@angular/http": "^4.1.0",
        "@angular/platform-browser": "^4.1.0",
        "@angular/platform-browser-dynamic": "^4.1.0",
        "@angular/router": "^4.1.0",
        "aws-sdk": "^2.55.0",
        "core-js": "^2.4.1",
        "font-awesome": "^4.7.0",
        "primeng": "^4.0.0",
        "rxjs": "^5.2.0",
        "zone.js": "^0.8.4"
      },
      "devDependencies": {
        "@angular/cli": "1.0.6",
        "@angular/compiler-cli": "^4.1.0",
        "@types/gapi": "0.0.32",
        "@types/gapi.auth2": "0.0.38",
        "@types/googlemaps": "^3.26.11",
        "@types/jasmine": "2.5.47",
        "@types/node": "^7.0.22",
        "angular-ide": "^0.9.23",
        "codelyzer": "~3.0.1",
        "jasmine-core": "~2.6.1",
        "jasmine-spec-reporter": "~4.1.0",
        "karma": "~1.7.0",
        "karma-chrome-launcher": "~2.1.1",
        "karma-cli": "~1.0.1",
        "karma-coverage-istanbul-reporter": "^1.2.1",
        "karma-jasmine": "~1.1.0",
        "karma-jasmine-html-reporter": "^0.2.2",
        "protractor": "~5.1.0",
        "ts-node": "~3.0.4",
        "tslint": "~5.3.2",
        "typescript": "~2.2.2"
      }
    }
    #524610 Reply

    support-piotr
    Participant

    Andrei,

    Thanks for details. I have just confirmed that your issue should be fixed in CI6. The release should be out within a day or two.

    Best regards,
    Piotr Tomiak

    #524612 Reply

    andrei-ivanov
    Participant

    Thank you too ?

    #524709 Reply

    Brian Fernandes
    Moderator

    Andrei,

    We’ve put out a prerelease of the 2017 CI 6 release, which addresses the TSLint 5.x issues you mention here. To get the pre-release build, please follow the instructions in this thread: https://www.genuitec.com/forums/topic/webclipse-angular-ide-prerelease-stream/

    Do let us know if your issue is fixed by the prerelease stream, so we can ensure the final 2017 CI 6 release correctly addresses your problems.

    #524732 Reply

    andrei-ivanov
    Participant

    Seems to work fine, no more TSLint errors 🙂

    I observe a new issue, I think false positives warnings:
    Unknown attribute ‘id’. and Unknown attribute ‘name’ for something like:

    <p-dropdown id="transport" name="transport" [options]="transports" [(ngModel)]="shipment.transport" placeholder="Select" [style]="{'width':'200px'}" filter="filter" required></p-dropdown>

    Also: Unknown attribute ‘pInputTextarea’ for
    <textarea pInputTextarea id="cargo" name="cargo" [(ngModel)]="shipment.cargo" required></textarea>

    See https://github.com/primefaces/primeng/search?utf8=%E2%9C%93&q=pInputTextarea&type=

    #524834 Reply

    andrei-ivanov
    Participant

    Another issue seems to be that with 2 small projects in the workspace, Eclipse now uses 5.3Gb of RAM and eats CPU like crazy without doing anything (I’ve enabled the display of sleeping and system operations in the progress view and all of those there are sleeping)

    Could be a memory leak.

    #524836 Reply

    support-piotr
    Participant

    Andrei,

    I am happy to hear that TSLint issue is fixed. As far as attribute validation issues – looks like there are some tweaks needed to get this right. Regarding large RAM and CPU consumption – did you open any large JavaScript file? Can you check which processes uses the most of the RAM? Is there any large “node” process? If so, can you find what is it’s command line?

    Best regards,
    Piotr Tomiak

    #524837 Reply

    andrei-ivanov
    Participant

    Hmm, I’ve already closed Eclipse, but it was the biggest process with 5.3Gb, followed by Firefox with 2Gb.
    I don’t think I’ve noticed any node process running.

    No large JS files opened either, most of them are 1-2 pages long.

    #524838 Reply

    support-piotr
    Participant

    Eclipse grows as large as you allow it to grow, what is your Xmx setting in eclipse.ini? The next time you see Eclipse eating up CPU for a longer time, please take a thread dump using jstack. It will allow me to determine the cause of the problem.

    #524845 Reply

    andrei-ivanov
    Participant

    Regarding memory usage, I’m not sure it should grow indefinitely, at least when I do a web app that does that it definitely is considered a memory leak ?
    Just eating up memory and not freeing at GC is not good.

    Weird part is that it has Xmx limit at 1024m.

    -vmargs
    -Declipse.p2.max.threads=10
    -Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
    -Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
    -Dosgi.requiredJavaVersion=1.8
    -XX:+UseG1GC
    -XX:+UseStringDeduplication
    -XstartOnFirstThread
    -Dorg.eclipse.swt.internal.carbon.smallFonts
    -Dosgi.requiredJavaVersion=1.8
    -Xms256m
    -Xmx1024m
    -Xdock:icon=../Resources/Eclipse.icns
    -XstartOnFirstThread
    -Dorg.eclipse.swt.internal.carbon.smallFonts

    I’ll use jstack next time 🙂

    #524848 Reply

    support-piotr
    Participant

    Yeah, the java process cannot go over 1.4GB in such a setup, and with G1GC enabled it will actually be freeing unused memory. I am wondering if you have seen cumulative memory consumption for all processes spawned by Eclipse. It is possible for child “node” processes, in which some of our services are running, to go ballistic. Please keep an eye for it and let me know if you happen to see it again. We have automated stress tests on our side which are supposed to catch high memory consumption and everything seems to be fine.

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: TSLint missing rules warning

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