Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[quotes] False positive requiring backticks in types #756

Closed
BBosman opened this issue Jul 24, 2019 · 1 comment · Fixed by #762
Closed

[quotes] False positive requiring backticks in types #756

BBosman opened this issue Jul 24, 2019 · 1 comment · Fixed by #762
Labels
enhancement: new base rule extension New base rule extension required to handle a TS specific case good first issue Good for newcomers package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@BBosman
Copy link
Contributor

BBosman commented Jul 24, 2019

Repro

{
  "rules": {
    "quotes": ["error", "backtick", { "avoidEscape": true }]
  }
}
class MockObserver {
  public hasSubscribers: IBindingTargetObserver['hasSubscribers'];
}

Expected Result
No rule violations as those can't be backticks.

Actual Result
Violation of quotes.

Additional Info

Actually changing them to backticks gives a compiler error.

public hasSubscribers: IBindingTargetObserver[`hasSubscribers`];

Error: ']' expected

Versions

package version
@typescript-eslint/eslint-plugin 1.12.0
@typescript-eslint/parser 1.12.0
TypeScript 3.5.3
ESLint 5.16.0
node 10.15.0
npm 6.10.2
@BBosman BBosman added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Jul 24, 2019
@bradzacher bradzacher added enhancement: new base rule extension New base rule extension required to handle a TS specific case good first issue Good for newcomers and removed triage Waiting for maintainers to take a look labels Jul 24, 2019
@bradzacher
Copy link
Member

See additional request for quotes rule in: #757

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: new base rule extension New base rule extension required to handle a TS specific case good first issue Good for newcomers package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants