Skip to content
This repository was archived by the owner on Mar 7, 2019. It is now read-only.

Commit 6721fd4

Browse files
Enable array-bracket-newline
1 parent 4e2b98d commit 6721fd4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

coding-styles/fixable.js

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
module.exports = {
1717

1818
rules: {
19+
// enforce line breaks after opening and before closing array brackets
20+
// Requires consistent usage of linebreaks for each pair of brackets. It reports an error if one
21+
// bracket in the pair has a linebreak inside it and the other bracket does not.
22+
'array-bracket-newline': ['warn', 'consistent'],
23+
1924
// Require braces in arrow function body
2025
// This rule can enforce the use of braces around arrow function body.
2126
'arrow-body-style': ['warn', 'as-needed'],

unused.js

-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ module.exports = {
1414
// Unused, too restrictive
1515
'array-element-newline': 0,
1616

17-
// enforce line breaks after opening and before closing array brackets
18-
// Unused, does not enforce newlines after each array element, resulting in weird-looking code
19-
'array-bracket-newline': 0,
20-
2117
// Treat var as Block Scoped
2218
// Unused in favour of `no-var` rule. Front-end could have some interest in this rule.
2319
'block-scoped-var': 0,

0 commit comments

Comments
 (0)