JS.TS.KEYWORD.SPACING

Enforce consistent spacing before and after keywords

Rule Details

This rule extends the base eslint/keyword-spacing (https://eslint.org/docs/rules/keyword-spacing) rule. This version adds support for generic type parameters on function calls.

How to Use

Copy
{
  // note you must disable the base rule as it can report incorrect errors
  "keyword-spacing": "off",
  "@typescript-eslint/keyword-spacing": ["error"]
}

Options

See eslint/keyword-spacing options (https://eslint.org/docs/rules/keyword-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/