Skip to content

Commit 7e17d6b

Browse files
fix: more newlines (#49)
1 parent 5b4d4d1 commit 7e17d6b

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

configs/stylistic.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ const recommendedConfig = {
6868
prev: ["import"],
6969
next: ["import"],
7070
},
71+
// Require newline after directives
72+
{ blankLine: "always", prev: ["directive"], next: "*" },
73+
],
74+
"@stylistic/lines-around-comment": [
75+
"error",
76+
{
77+
beforeBlockComment: false,
78+
afterBlockComment: false,
79+
beforeLineComment: false,
80+
afterLineComment: false,
81+
afterHashbangComment: true,
82+
},
7183
],
7284
},
7385
};

validation/directive.cjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
MIT License http://www.opensource.org/licenses/mit-license.php
3+
Author Tobias Koppers @sokra
4+
*/
5+
"use strict"; // eslint-disable-next-line @stylistic/padding-line-between-statements
6+
const test = 1;
7+
8+
Number(test);

validation/hashbang.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!foo
2+
3+
const day = "great";
4+
5+
String(day);

0 commit comments

Comments
 (0)