目录

@typescript-eslint/brace-style

Enforce a consistent brace style on code blocks.

Rule Configuration

// code-linter.json5
{
  "rules": {
    "@typescript-eslint/brace-style": "error"
  }
}

Options

For details, see @typescript-eslint/brace-style.

Example of Correct Code

function foo(): boolean {
  return true;
}

class C {
  static {
    foo();
  }

  public meth() {
    foo();
  }
}

export { C };

Example of Incorrect Code

function foo(): boolean 
{
  return true;
}

class C {
  static 
  {
    foo();
  }

  public meth() 
  {
    foo();
  }
}

export { C };

Rule Set

plugin:@typescript-eslint/all

For details about how to configure Code Linter check rules, see Code Linter.