Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 528 Bytes

classbody-starts-with-newline.md

File metadata and controls

37 lines (29 loc) · 528 Bytes

Prohibits an empty line at the beggining of a class body

For clarity, there should be a new line as the immediate line after any class definition.

Rule Details

The following pattern is considered a warning:

export class SomeClass {
	constructor() {
		super()
	}
}

The following patterns are not considered warnings:

export class SomeClass {
	/**
	 * This is the constructor for `SomeClass`
	 */
	constructor() {
		super()
	}
}
export class SomeClass {

	constructor() {
		super()
	}
}