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

[brace-style] 1tbs not enforced with interfaces #804

Closed
delventhalz opened this issue Aug 5, 2019 · 0 comments · Fixed by #810
Closed

[brace-style] 1tbs not enforced with interfaces #804

delventhalz opened this issue Aug 5, 2019 · 0 comments · Fixed by #810
Labels
enhancement: new base rule extension New base rule extension required to handle a TS specific case has pr there is a PR raised to close this package: parser Issues related to @typescript-eslint/parser

Comments

@delventhalz
Copy link

delventhalz commented Aug 5, 2019

What code were you trying to parse?

With the following rule in .eslintrc.json:

{
  "rules": {
    "brace-style": ["error", "1tbs"]
  }
}

This code is correctly flagged as violating 1tbs:

class Foo
{
  bar:
  {
    baz: string
  } }

However, when recreating the same violation with an interface, there will be no lint error:

interface Foo
{
  bar:
  {
    baz: string
  } }

What did you expect to happen?
Both the class and interface to be flagged by ESLint.

What actually happened?
The interface is not flagged.

Versions

package version
@typescript-eslint/parser 1.13.0
TypeScript 3.4.5
ESLint 6.0.1
node 8.11.4
npm 6.5.0
@delventhalz delventhalz added package: parser Issues related to @typescript-eslint/parser triage Waiting for maintainers to take a look labels Aug 5, 2019
@bradzacher bradzacher added enhancement: new base rule extension New base rule extension required to handle a TS specific case and removed triage Waiting for maintainers to take a look labels Aug 5, 2019
@bradzacher bradzacher added the has pr there is a PR raised to close this label Aug 6, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2020
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 has pr there is a PR raised to close this package: parser Issues related to @typescript-eslint/parser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants