Skip to content

Commit 6f2ff13

Browse files
authored
Allow class fields with no blank lines between (#85)
1 parent b17659e commit 6f2ff13

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

index.js

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,24 @@ module.exports = {
374374
],
375375
'lines-between-class-members': [
376376
'error',
377-
'always',
378377
{
379-
// Workaround to allow class fields to not have lines between them.
380-
// TODO: Get ESLint to add an option to ignore class fields.
381-
exceptAfterSingleLine: true,
378+
enforce: [
379+
{
380+
blankLine: 'always',
381+
prev: '*',
382+
next: 'method',
383+
},
384+
{
385+
blankLine: 'always',
386+
prev: 'method',
387+
next: 'field',
388+
},
389+
{
390+
blankLine: 'never',
391+
prev: 'field',
392+
next: 'field',
393+
},
394+
],
382395
},
383396
],
384397
'logical-assignment-operators': [

0 commit comments

Comments
 (0)