Skip to main content

Enforce consistent spacing inside braces (object-curly-spacing)

Rule Details

This rule extends the base eslint/object-curly-spacing rule. It adds support for TypeScript's object types.

How to use

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

Options

See eslint/object-curly-spacing options.

Taken with โค๏ธ from ESLint core

Attributes

  • โœ… Recommended
  • ๐Ÿ”ง Fixable
  • ๐Ÿ’ญ Requires type information