Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klimashkin/8e75dd8974d90669c4dfb99ef2f6ad60 to your computer and use it in GitHub Desktop.
Save klimashkin/8e75dd8974d90669c4dfb99ef2f6ad60 to your computer and use it in GitHub Desktop.
'padding-line-between-statements': [2,
// Always require blank lines after directive (like 'use-strict'), except between directives
{blankLine: 'always', prev: 'directive', next: '*'},
{blankLine: 'any', prev: 'directive', next: 'directive'},
// Always require blank lines after import, except between imports
{blankLine: 'always', prev: 'import', next: '*'},
{blankLine: 'any', prev: 'import', next: 'import'},
// Always require blank lines before and after every sequence of variable declarations and export
{blankLine: 'always', prev: '*', next: ['const', 'let', 'var', 'export']},
{blankLine: 'always', prev: ['const', 'let', 'var', 'export'], next: '*'},
{blankLine: 'any', prev: ['const', 'let', 'var', 'export'], next: ['const', 'let', 'var', 'export']},
// Always require blank lines before and after class declaration, if, do/while, switch, try
{blankLine: 'always', prev: '*', next: ['if', 'class', 'for', 'do', 'while', 'switch', 'try']},
{blankLine: 'always', prev: ['if', 'class', 'for', 'do', 'while', 'switch', 'try'], next: '*'},
// Always require blank lines before return statements
{blankLine: 'always', prev: '*', next: 'return'},
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment