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

["typedef" > "variable-declaration"] conflicting in usage with ["no-inferrable-types": false] #1038

Closed
drywolf opened this issue Mar 16, 2016 · 1 comment

Comments

@drywolf
Copy link

drywolf commented Mar 16, 2016

Hi, I have the following tslint.json config:

    "no-inferrable-types": false,
    "typedef": [
        true,
        "call-signature",
        "parameter",
        "property-declaration",
        "variable-declaration",
        "member-variable-declaration"
    ],

When writing a variable with an inferrable type and no explicit type-definition, the typedef rule shows a problem, but the better behavior would be to allow this and recognize it as good code based on the above settings.

Here is a screenshot showing the problem with a very minimal example:

image

Is my thinking about this behavior right ? I might try and provide a PR if I can get some agreement that this should be the correct behavior in this case.

Thanks

@jkillian
Copy link
Contributor

Yes, this is an issue, thanks for the well-written report @drywolf! This is actually a duplicate though, check out #711 and feel free to discuss over there

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

No branches or pull requests

2 participants