Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Property inheritance from extended class #2197

Closed
Shahor opened this issue Feb 10, 2017 · 2 comments
Closed

Property inheritance from extended class #2197

Shahor opened this issue Feb 10, 2017 · 2 comments
Labels

Comments

@Shahor
Copy link

Shahor commented Feb 10, 2017

Bug Report

  • TSLint version: 0.19.1
  • TypeScript version: 2.1.5
  • Running TSLint via: nodejs

The problem :

Using : Angular2

I have class A and class B extends A
In B.component.html I use a var story that is defined in class A.
The linter doesn't like this (see result below)

TypeScript code being linted

with tslint.json configuration:

{
    "rulesDirectory": [
        "node_modules/codelyzer",
        "node_modules/tslint-eslint-rules/dist/rules"
    ],
    "rules": {
        "class-name": true,
        "comment-format": [
            true,
            "check-space"
        ],
        "curly": true,
        "eofline": true,
        "forin": true,
        "indent": [
            true,
            "spaces"
        ],
        "ter-indent": [
            true,
            4
        ],
        "label-position": true,
        "max-line-length": [
            true,
            140
        ],
        "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-eval": true,
        "no-shadowed-variable": true,
        "no-string-literal": false,
        "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"
        ],
        "quotemark": [
            true,
            "single"
        ],
        "radix": true,
        "semicolon": [
            true,
            "never"
        ],
        "triple-equals": [
            true,
            "allow-null-check"
        ],
        "typedef-whitespace": [
            true,
            {
                "call-signature": "nospace",
                "index-signature": "nospace",
                "parameter": "nospace",
                "property-declaration": "nospace",
                "variable-declaration": "nospace"
            }
        ],
        "variable-name": false,
        "whitespace": [
            true,
            "check-branch",
            "check-decl",
            "check-operator",
            "check-separator",
            "check-type"
        ],
        "directive-selector": [
            true,
            "attribute",
            "cms",
            "camelCase"
        ],
        "component-selector": [
            true,
            "element",
            "cms",
            "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
    }
}

Actual behavior

src/app/story/titles-and-settings/titles-and-settings.component.html[12, 22]: The method "story" that you're trying to access does not exist in the class declaration.

Expected behavior

Linter knows about the inherited property "story" from the parent class.

@ajafff
Copy link
Contributor

ajafff commented Feb 10, 2017

You're in the wrong repository.
The issue you're searching for is over there: mgechev/codelyzer#191

@Shahor
Copy link
Author

Shahor commented Feb 10, 2017

@ajafff Thank you sir, sorry for putting this in the wrong place :(
I'm closing this one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants