Skip to content

Commit

Permalink
Allow class fields with no blank lines between (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed May 6, 2024
1 parent b17659e commit 6f2ff13
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions index.js
Expand Up @@ -374,11 +374,24 @@ module.exports = {
],
'lines-between-class-members': [
'error',
'always',
{
// Workaround to allow class fields to not have lines between them.
// TODO: Get ESLint to add an option to ignore class fields.
exceptAfterSingleLine: true,
enforce: [
{
blankLine: 'always',
prev: '*',
next: 'method',
},
{
blankLine: 'always',
prev: 'method',
next: 'field',
},
{
blankLine: 'never',
prev: 'field',
next: 'field',
},
],
},
],
'logical-assignment-operators': [
Expand Down

0 comments on commit 6f2ff13

Please sign in to comment.