This repository was archived by the owner on Mar 23, 2024. It is now read-only.
Commit 1d7d39d
Preset: update wikimedia preset
Preset:
Update order of rules to match node-jscs documentation.
* requireSpaceBeforeKeywords: Add.
* requireSpaceAfterKeywords: Simplify by using true.
* disallowSpacesInCallExpression: Add.
* requireSpacesInsideParentheses: Add.
* disallowQuotedKeysInObjects: Change from all to allButReserved for ES3.
* requireSpaceBeforeBinaryOperators: Simplify by using true.
It was hardcoded as it used include ",", but that was fixed.
* disallowImplicitTypeConversion: Add, require explicit '!== -1'
and String().
* disallowOperatorBeforeLineBreak: Add, place dots in chaining
before line break.
* requireLineBreakAfterVariableAssignment: Add.
* requireSpaceAfterLineComment: Add.
* disallowNewlineBeforeBlockStatements: Add.
Test:
* Add example of space before keyword 'empty' and 'while'.
* Add example of one-line block.
* Add example of quoted ES3 reserved word object key.
* Add example of type converstion and method chaining.
Closes gh-8431 parent 5ccacb5 commit 1d7d39d
File tree
2 files changed
+78
-42
lines changed- presets
- test/data/options/preset
2 files changed
+78
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 11 | + | |
| 12 | + | |
25 | 13 | | |
26 | 14 | | |
27 | 15 | | |
| |||
31 | 19 | | |
32 | 20 | | |
33 | 21 | | |
| 22 | + | |
34 | 23 | | |
35 | 24 | | |
36 | 25 | | |
37 | 26 | | |
38 | 27 | | |
39 | | - | |
| 28 | + | |
| 29 | + | |
40 | 30 | | |
41 | 31 | | |
| 32 | + | |
42 | 33 | | |
43 | 34 | | |
44 | 35 | | |
45 | 36 | | |
46 | 37 | | |
47 | 38 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 39 | + | |
67 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
68 | 45 | | |
69 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
70 | 49 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
75 | 54 | | |
76 | 55 | | |
77 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
78 | 60 | | |
79 | 61 | | |
80 | 62 | | |
81 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
82 | 69 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
22 | | - | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
26 | 36 | | |
27 | 37 | | |
28 | 38 | | |
| |||
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
36 | 56 | | |
37 | 57 | | |
38 | 58 | | |
| |||
49 | 69 | | |
50 | 70 | | |
51 | 71 | | |
| 72 | + | |
52 | 73 | | |
53 | 74 | | |
54 | 75 | | |
| |||
68 | 89 | | |
69 | 90 | | |
70 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
71 | 97 | | |
72 | 98 | | |
73 | 99 | | |
| |||
80 | 106 | | |
81 | 107 | | |
82 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
83 | 121 | | |
84 | 122 | | |
85 | 123 | | |
86 | | - | |
| 124 | + | |
| 125 | + | |
87 | 126 | | |
88 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
89 | 138 | | |
90 | 139 | | |
91 | 140 | | |
0 commit comments