eslint-plugin-header icon indicating copy to clipboard operation
eslint-plugin-header copied to clipboard

matching fails unless content begins with space

Open jason-ha opened this issue 4 years ago • 0 comments

Using rule: 'header/header': [2, 'line', 'my header comment.'] with file:

// my header comment.
console.log(1);

reports incorrect header. Changing rule to: 'header/header': [2, 'line', ' my header comment.'] will not report error and unblocks use.

In both rule cases --fix will produce:

// my header comment.
console.log(1);

if error is detected. (Added line per issue #24 Autofix adds new line has been removed.)

In my setup, I am using eslint 6.8.0.

jason-ha avatar Jun 03 '20 08:06 jason-ha