JS.TS.COMMA.SPACING

Enforces consistent spacing before and after commas

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

Copy
{
  // 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).

The content on this page is adapted from the ESLint User Guide. Copyright © OpenJS Foundation and other contributors, www.openjsf.org. All rights reserved. https://eslint.org/docs/rules/