Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 11 matching lines...) Expand all Loading... | |
22 rules: { | 22 rules: { |
23 // Opening braces go on their own line | 23 // Opening braces go on their own line |
24 "block-opening-brace-newline-before": "always-multi-line", | 24 "block-opening-brace-newline-before": "always-multi-line", |
25 "block-opening-brace-newline-after": "always-multi-line", | 25 "block-opening-brace-newline-after": "always-multi-line", |
26 "block-closing-brace-newline-before": "always-multi-line", | 26 "block-closing-brace-newline-before": "always-multi-line", |
27 "block-closing-brace-newline-after": "always", | 27 "block-closing-brace-newline-after": "always", |
28 "block-closing-brace-empty-line-before": "never", | 28 "block-closing-brace-empty-line-before": "never", |
29 | 29 |
30 // Use a space between the last selector and the declaration block | 30 // Use a space between the last selector and the declaration block |
31 "block-opening-brace-space-before": "always-single-line", | 31 "block-opening-brace-space-before": "always-single-line", |
32 "block-opening-brace-space-after": "always-single-line", | |
33 "block-closing-brace-space-before": "always-single-line", | |
34 "block-closing-brace-space-after": "always-single-line", | 32 "block-closing-brace-space-after": "always-single-line", |
35 | 33 |
36 // Use a space after a property name’s colon. | 34 // Use a space after a property name’s colon |
37 "declaration-colon-space-after": "always", | 35 "declaration-colon-space-after": "always", |
38 | 36 |
39 // Separate selectors and declarations by new lines. | 37 // Selectors and declarations should be on their own line |
Thomas Greiner
2017/11/14 13:18:32
Suggestion: This sentence and the one below are a
ire
2017/11/15 06:38:33
I agree with you. Done.
| |
40 "selector-list-comma-newline-after": "always", | 38 "selector-list-comma-newline-after": "always", |
41 "declaration-block-semicolon-newline-after": "always-multi-line", | 39 "declaration-block-semicolon-newline-after": "always-multi-line", |
42 | 40 |
43 // Separate rules by new lines. | 41 // Separate rules by an empty line |
44 "rule-empty-line-before": ["always", { | 42 "rule-empty-line-before": ["always", { |
45 "ignore": ["after-comment", "inside-block"] | 43 "ignore": ["after-comment", "first-nested"] |
Thomas Greiner
2017/11/14 13:18:32
Do we actually want to specify "inside-block"?
i.
ire
2017/11/15 06:38:33
You're right. Done.
| |
46 }], | 44 }], |
47 | 45 |
48 // Use double over single quotation marks | 46 // Use double over single quotation marks |
49 "string-quotes": "double", | 47 "string-quotes": "double", |
50 | 48 |
51 // CSS color values should be specified in hexadecimal where possible | 49 // CSS color values should be specified in hexadecimal where possible |
52 "color-named": "never", | 50 "color-named": "never", |
53 | 51 |
54 // Use 3 character hexadecimal notation where possible. | 52 // Use short hexadecimal notation where possible |
Thomas Greiner
2017/11/14 13:18:31
Suggestion: The rule below also encourages 4-digit
ire
2017/11/15 06:38:32
Sorry I don't understand. Is your suggestion that
Thomas Greiner
2017/11/15 12:22:00
I just wanted to point out that this statement doe
ire
2017/11/15 17:04:02
Ah I see what you mean (that completely flew over
| |
55 "color-hex-length": "short", | 53 "color-hex-length": "short", |
56 | 54 |
57 // Don't omit the optional leading 0 for decimal numbers | 55 // Don't omit the optional leading 0 for decimal numbers |
58 "number-leading-zero": "always", | 56 "number-leading-zero": "always", |
59 "number-no-trailing-zeros": true, | 57 "number-no-trailing-zeros": true, |
60 | 58 |
61 // Two spaces per logic level | 59 // Two spaces per logic level |
62 "indentation": 2, | 60 "indentation": 2, |
63 | 61 |
64 // Line length should be 80 characters or less | 62 // Line length should be 80 characters or less |
65 "max-line-length": 80, | 63 "max-line-length": 80, |
66 | 64 |
67 // Avoid qualifying ID and class names with type selectors. | 65 // Avoid qualifying ID and class names with type selectors |
68 "selector-no-qualifying-type": [true, { | 66 "selector-no-qualifying-type": [true, { |
69 "ignore": ["attribute"] | 67 "ignore": ["attribute"] |
Thomas Greiner
2017/11/14 13:18:32
This rule appears to refer to https://google.githu
ire
2017/11/15 06:38:33
The way I read that rule was that it implicitly al
Thomas Greiner
2017/11/15 12:22:00
Very good point. I guess I assumed that they impli
| |
70 }] | 68 }] |
71 } | 69 } |
72 }; | 70 }; |
LEFT | RIGHT |