ReactiveX / rxjs-tslint

TSLint rules targeting RxJS
MIT License
309 stars 41 forks source link

Cannot read property 'getText' of undefined #46

Closed LonelyGriffin closed 6 years ago

LonelyGriffin commented 6 years ago

Hi team! I had got some errors in rxjs-tslint when I added "rxjs-pipeable-operators-only" and "rxjs-no-static-observable-methods" rules in my project

image

tslint.json

{
  "extends": "tslint:recommended",
  "rulesDirectory": [
    "node_modules/rxjs-tslint"
  ],
  "rules": {
    "no-consecutive-blank-lines": [
      true,
      2
    ],
    "ordered-imports": false,
    "typedef-whitespace": {
      "options": [
        {
          "call-signature": "nospace",
          "index-signature": "nospace",
          "parameter": "nospace",
          "property-declaration": "nospace",
          "variable-declaration": "nospace"
        },
        {
          "call-signature": "nospace",
          "index-signature": "nospace",
          "parameter": "nospace",
          "property-declaration": "nospace",
          "variable-declaration": "nospace"
        }
      ]
    },
    "whitespace": {
      "options": [
        "check-branch",
        "check-decl",
        "check-operator",
        "check-separator",
        "check-typecast"
      ]
    },
    "max-classes-per-file": false,
    "trailing-comma": {
      "options": {
        "singleline": "never"
      }
    },
    "variable-name": {
      "options": [
        "ban-keywords",
        "allow-snake-case"
      ]
    },
    "member-ordering": false,
    "max-line-length": false,
    "object-literal-sort-keys": false,
    "only-arrow-functions": false,
    "space-before-function-paren": {
      "options": {
        "anonymous": "always",
        "asyncArrow": "always",
        "constructor": "never",
        "method": "never",
        "named": "never"
      }
    },
    "rxjs-collapse-imports": true,
    "rxjs-pipeable-operators-only": true,
    "rxjs-no-static-observable-methods": true,
    "rxjs-proper-imports": false
  }
}

Because of what might be the problem?

mgechev commented 6 years ago

Probably mismatch between typescript and tslint versions.

LonelyGriffin commented 6 years ago

Yes, thank you very much.