Urara-Blog/node_modules/.pnpm-store/v3/files/4b/196fd693a68c7006f612fe1f1908d00fcdcee3a5a0cac013ec28f0b9419acbc701e41df743d255ad43ea19ae052fb649494e28b926ea26041942d073a05580
2022-08-14 01:14:53 +08:00

32 lines
829 B
Text

---
description: 'Enforce consistent spacing before and after commas.'
---
> 🛑 This file is source code, not the primary documentation location! 🛑
>
> See **https://typescript-eslint.io/rules/comma-spacing** for documentation.
## Rule Details
This rule extends the base [`eslint/comma-spacing`](https://eslint.org/docs/rules/comma-spacing) rule.
It adds support for trailing comma in a types parameters list.
## How to Use
```jsonc
{
// note you must disable the base rule as it can report incorrect errors
"comma-spacing": "off",
"@typescript-eslint/comma-spacing": ["error"]
}
```
## Options
See [`eslint/comma-spacing` options](https://eslint.org/docs/rules/comma-spacing#options).
<sup>
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/comma-spacing.md)
</sup>