You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/rules/padding-line-between-statements.md
+6-5
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,9 @@ function foo() {
20
20
21
21
## Rule Details
22
22
23
-
This rule does nothing if no configuration.
23
+
This rule does nothing if no configurations are provided.
24
24
25
-
A configuration is an object which has 3 properties; `blankLine`, `prev` and `next`. For example, `{ blankLine: "always", prev: "var", next: "return" }` means "it requires one or more blank lines between a variable declaration and a `return` statement."
25
+
A configuration is an object which has 3 properties; `blankLine`, `prev` and `next`. For example, `{ blankLine: "always", prev: "var", next: "return" }` means "one or more blank lines are required between a variable declaration and a `return` statement."
26
26
You can supply any number of configurations. If a statement pair matches multiple configurations, the last matched configuration will be used.
27
27
28
28
```json
@@ -46,11 +46,11 @@ You can supply any number of configurations. If a statement pair matches multipl
46
46
-`STATEMENT_TYPE` is one of the following, or an array of the following.
47
47
-`"*"` is wildcard. This matches any statements.
48
48
-`"block"` is lonely blocks.
49
-
-`"block-like"` is block like statements. This matches statements that the last token is the closing brace of blocks; e.g. `{ }`, `if (a) { }`, and `while (a) { }`.
49
+
-`"block-like"` is block like statements. This matches statements that the last token is the closing brace of blocks; e.g. `{ }`, `if (a) { }`, and `while (a) { }`. Also matches immediately invoked function expression statements.
50
50
-`"break"` is `break` statements.
51
51
-`"case"` is `case` labels.
52
-
-`"cjs-export"` is `export` statements of CommonJS; e.g. `module.exports = 0`, `module.exports.foo = 1`, and `exports.foo = 2`. This is the special cases of assignment.
53
-
-`"cjs-import"` is `import` statements of CommonJS; e.g. `const foo = require("foo")`. This is the special cases of variable declarations.
52
+
-`"cjs-export"` is `export` statements of CommonJS; e.g. `module.exports = 0`, `module.exports.foo = 1`, and `exports.foo = 2`. This is a special case of assignment.
53
+
-`"cjs-import"` is `import` statements of CommonJS; e.g. `const foo = require("foo")`. This is a special case of variable declarations.
54
54
-`"class"` is `class` declarations.
55
55
-`"const"` is `const` variable declarations.
56
56
-`"continue"` is `continue` statements.
@@ -64,6 +64,7 @@ You can supply any number of configurations. If a statement pair matches multipl
64
64
-`"for"` is `for` loop families. This matches all statements that the first token is `for` keyword.
65
65
-`"function"` is function declarations.
66
66
-`"if"` is `if` statements.
67
+
-`"iife"` is immediately invoked function expression statements. This matches calls on a function expression, optionally prefixed with a unary operator.
67
68
-`"import"` is `import` declarations.
68
69
-`"let"` is `let` variable declarations.
69
70
-`"multiline-block-like"` is block like statements. This is the same as `block-like` type, but only if the block is multiline.
0 commit comments