mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-02 16:29:30 +08:00
32 lines
821 B
Text
32 lines
821 B
Text
---
|
|
description: 'Enforce consistent brace style for blocks.'
|
|
---
|
|
|
|
> 🛑 This file is source code, not the primary documentation location! 🛑
|
|
>
|
|
> See **https://typescript-eslint.io/rules/brace-style** for documentation.
|
|
|
|
## Rule Details
|
|
|
|
This rule extends the base [`eslint/brace-style`](https://eslint.org/docs/rules/brace-style) rule.
|
|
It adds support for `enum`, `interface`, `namespace` and `module` declarations.
|
|
|
|
## How to Use
|
|
|
|
```jsonc
|
|
{
|
|
// note you must disable the base rule as it can report incorrect errors
|
|
"brace-style": "off",
|
|
"@typescript-eslint/brace-style": ["error"]
|
|
}
|
|
```
|
|
|
|
## Options
|
|
|
|
See [`eslint/brace-style` options](https://eslint.org/docs/rules/brace-style#options).
|
|
|
|
<sup>
|
|
|
|
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/brace-style.md)
|
|
|
|
</sup>
|