Skip to content

Commit 96c2030

Browse files
committed
Disable lint rule concerning lines around comments
While inserting a newline before a comment is preferred in many cases, this is not always the case. Here, we disable to allow some discretion in determining what makes the most sense in terms of readability, clarity, and terseness.
1 parent 35642e0 commit 96c2030

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

etc/eslint/rules/style.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ rules[ 'line-comment-position' ] = 'off';
497497
rules[ 'linebreak-style' ] = [ 'error', 'unix' ];
498498

499499
/**
500-
* Specify empty lines around comments.
500+
* Prefer empty lines before comments. NOTE: disable to allow some discretion in terms of readability, clarity, and terseness.
501501
*
502502
* @name lines-around-comment
503503
* @memberof rules
@@ -517,7 +517,7 @@ rules[ 'linebreak-style' ] = [ 'error', 'unix' ];
517517
* // Line comment:
518518
* var y = 10;
519519
*/
520-
rules[ 'lines-around-comment' ] = [ 'warn', {
520+
rules[ 'lines-around-comment' ] = [ 'off', {
521521
'beforeBlockComment': true,
522522
'afterBlockComment': false,
523523
'beforeLineComment': true,

0 commit comments

Comments
 (0)