Skip to content

Commit f22f51b

Browse files
authored
feat: adjust padding rule for const and let (#29)
1 parent 305b112 commit f22f51b

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@blitz/eslint-plugin",
3-
"version": "0.1.3",
3+
"version": "0.1.4",
44
"license": "MIT",
55
"description": "An ESLint config to enforce a consistent code styles across StackBlitz projects",
66
"keywords": [

src/configs/javascript.ts

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,43 @@ export const jsRules: FlatConfig.Config['rules'] = {
5050
},
5151
{
5252
blankLine: 'any',
53-
prev: ['const', 'let'],
54-
next: ['const', 'let'],
53+
prev: ['const'],
54+
next: ['const'],
55+
},
56+
{
57+
blankLine: 'any',
58+
prev: ['let'],
59+
next: ['let'],
60+
},
61+
{
62+
blankLine: 'always',
63+
prev: ['let'],
64+
next: ['const'],
65+
},
66+
{
67+
blankLine: 'always',
68+
prev: ['const'],
69+
next: ['let'],
70+
},
71+
{
72+
blankLine: 'always',
73+
prev: ['singleline-const'],
74+
next: ['multiline-const'],
75+
},
76+
{
77+
blankLine: 'always',
78+
prev: ['multiline-const'],
79+
next: ['singleline-const'],
80+
},
81+
{
82+
blankLine: 'always',
83+
prev: ['singleline-let'],
84+
next: ['multiline-let'],
85+
},
86+
{
87+
blankLine: 'always',
88+
prev: ['multiline-let'],
89+
next: ['singleline-let'],
5590
},
5691
{
5792
blankLine: 'any',

0 commit comments

Comments
 (0)