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

autofix: member-access #3158

Closed
runeabrahams1 opened this issue Aug 24, 2017 · 1 comment · Fixed by #3162
Closed

autofix: member-access #3158

runeabrahams1 opened this issue Aug 24, 2017 · 1 comment · Fixed by #3162

Comments

@runeabrahams1
Copy link

Bug Report

  • TSLint version: 5.6.0
  • TypeScript version: 2.3.4
  • Running TSLint via: CLI

TypeScript code being linted

@Input() set variable(varaible: boolean) { ... };

with tslint.json configuration:

        "member-access": [
            true,
            "check-accessor"
        ],

Actual behavior

The autofixer adds "public" before the @input.
ex: public @input() set variable(variable: boolean) { ... };

Expected behavior

It should be added after the @input()
ex: @input() public set variable(variable: boolean) { ... };

This is probably an issue for other decorators as well, but haven't tested that.

@ajafff
Copy link
Contributor

ajafff commented Aug 24, 2017

This is probably an issue for other decorators as well

It is. Fixing this case fixes it for all other decorators as well

ajafff added a commit that referenced this issue Aug 24, 2017
[bugfix] `member-access` autofix now correcly inserts `public` keyword after decorators
Fixes: #3158
HyphnKnight pushed a commit to HyphnKnight/tslint that referenced this issue Apr 9, 2018
[bugfix] `member-access` autofix now correcly inserts `public` keyword after decorators
Fixes: palantir#3158
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants