Skip to content

Commit f5d3c31

Browse files
committed
fix: trim source before lint
1 parent f541e9d commit f5d3c31

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lib/lint/file.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,14 @@ export class LintFile {
441441
: true,
442442
} );
443443

444+
// trim
445+
// important for javascript sheband
446+
if ( editorConfig ) {
447+
if ( editorConfig.trim ) {
448+
this.#data = this.#data.trim();
449+
}
450+
}
451+
444452
var res;
445453

446454
// markdown

0 commit comments

Comments
 (0)