Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.25 KB

lines-around-comment.md

File metadata and controls

37 lines (24 loc) · 1.25 KB

lines-around-comment

Requires empty lines around comments.

Rule Details

This rule extends the base eslint/lines-around-comment rule. It adds support for TypeScript syntax.

See the ESLint documentation for more details on the comma-dangle rule.

Rule Changes

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

In addition to the options supported by the lines-around-comment rule in ESLint core, the rule adds the following options:

Options

  • allowInterfaceStart: true doesn't require a blank line after the interface body block start
  • allowInterfaceEnd: true doesn't require a blank line before the interface body block end
  • allowTypeStart: true doesn't require a blank line after the type literal block start
  • allowTypeEnd: true doesn't require a blank line after the type literal block end

See the other options allowed

Taken with ❤️ from ESLint core