Skip to content

[@typescript-eslint/padding-line-between-statements] False negative in namespace declaration block #3863

@josephzidell

Description

@josephzidell
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Repro

{
  "rules": {
    "@typescript-eslint/padding-line-between-statements": ["error", {
        {blankLine: 'always', prev: '*', next: ['interface', 'type']}
    }]
  }
}
declare namespace Types {
	type Foo = string;
	type Bar = string;
	interface FooBar {
		[key: string]: string;
	}
	interface BarBaz {
		[key: string]: string;
	}
}

Expected Result

Expected blank line before this statement.

Actual Result

No errors/warnings shown

Additional Info

Outside of a namespace declaration block, missing a blank line does report an error for each of these. But inside a namespace declaration block, no missing padding lines are reported as errors.

Versions

package version
@typescript-eslint/eslint-plugin 4.31.0
@typescript-eslint/parser 4.31.0
TypeScript 4.4.2
ESLint 7.32.0
node v14.16.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions