Skip to content

Commit 21fd149

Browse files
Trottrvagg
authored andcommitted
tools: alphabetize eslint stylistic issues section
Rearrange the style rules in .eslintrc to be in alphabetical order. This has two benefits: It means the rules appear in the same order as they do in the ESLint documentation, easing cross-referencing. It also means that it is much easier to determine with visual inspection if a rule is set or not. #5135 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
1 parent 3b83d42 commit 21fd149

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

.eslintrc

+18-18
Original file line numberDiff line numberDiff line change
@@ -55,36 +55,36 @@ rules:
5555

5656
# Stylistic Issues
5757
# list: https://github.com/eslint/eslint/tree/master/docs/rules#stylistic-issues
58-
## use single quote, we can use double quote when escape chars
59-
quotes: [2, "single", "avoid-escape"]
60-
## 2 space indentation
61-
indent: [2, 2, {SwitchCase: 1}]
6258
## add space after comma
6359
comma-spacing: 2
64-
## put semi-colon
65-
semi: 2
66-
## require spaces operator like var sum = 1 + 1;
67-
space-infix-ops: 2
68-
## require spaces return, throw, case
69-
space-return-throw-case: 2
70-
## no space before function, eg. 'function()'
71-
space-before-function-paren: [2, "never"]
72-
## require space before blocks, eg 'function() {'
73-
space-before-blocks: [2, "always"]
74-
## require parens for Constructor
75-
new-parens: 2
60+
## require newline at end of files
61+
eol-last: 2
62+
## 2 space indentation
63+
indent: [2, 2, {SwitchCase: 1}]
7664
## max 80 length
7765
max-len: [2, 80, 2]
66+
## require parens for Constructor
67+
new-parens: 2
7868
## max 2 consecutive empty lines
7969
no-multiple-empty-lines: [2, {max: 2}]
80-
## require newline at end of files
81-
eol-last: 2
8270
## no trailing spaces
8371
no-trailing-spaces: 2
72+
## use single quote, we can use double quote when escape chars
73+
quotes: [2, "single", "avoid-escape"]
74+
## put semi-colon
75+
semi: 2
8476
## require space after keywords, eg 'for (..)'
8577
space-after-keywords: 2
78+
## require space before blocks, eg 'function() {'
79+
space-before-blocks: [2, "always"]
80+
## no space before function, eg. 'function()'
81+
space-before-function-paren: [2, "never"]
8682
## no leading/trailing spaces in parens
8783
space-in-parens: [2, "never"]
84+
## require spaces operator like var sum = 1 + 1;
85+
space-infix-ops: 2
86+
## require spaces return, throw, case
87+
space-return-throw-case: 2
8888
## no spaces with non-word unary operators, require for word unary operators
8989
space-unary-ops: 2
9090

0 commit comments

Comments
 (0)