Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: stylelint-config-eyeo/index.js

Issue 29541680: Issue 5109 - Create stylelintrc for websites and ui modules (Closed) Base URL: https://hg.adblockplus.org/codingtools
Left Patch Set: Add new rules Created Oct. 24, 2017, 9:04 a.m.
Right Patch Set: Fix trailing whitespace errors Created Dec. 14, 2017, 10:38 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « stylelint-config-eyeo/README.md ('k') | stylelint-config-eyeo/package.json » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 "use strict"; 18 "use strict";
19 19
20 module.exports = { 20 module.exports = {
21 extends: "stylelint-config-recommended", 21 extends: "stylelint-config-recommended",
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",
25 "block-opening-brace-newline-after": "always-multi-line",
26 "block-closing-brace-newline-before": "always-multi-line",
27 "block-closing-brace-newline-after": "always",
24 "block-closing-brace-empty-line-before": "never", 28 "block-closing-brace-empty-line-before": "never",
25 "block-closing-brace-newline-after": "always",
26 "block-closing-brace-newline-before": "always-multi-line",
27 "block-opening-brace-newline-after": "always-multi-line",
28 "block-opening-brace-newline-before": "always-multi-line",
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 // (Google HTML/CSS Style Guide) 31 "block-opening-brace-space-before": "always-single-line",
32 "block-closing-brace-space-after": "always-single-line", 32 "block-closing-brace-space-after": "always-single-line",
33 "block-closing-brace-space-before": "always-single-line",
34 "block-opening-brace-space-after": "always-single-line",
35 "block-opening-brace-space-before": "always-single-line",
36 33
37 // Use a space after a property name’s colon. 34 // Use a space after a property name’s colon
38 // (Google HTML/CSS Style Guide)
39 "declaration-colon-space-after": "always", 35 "declaration-colon-space-after": "always",
40 36
41 // Separate selectors and declarations by new lines. 37 // Selectors and declarations should be on their own line
42 // (Google HTML/CSS Style Guide)
43 "selector-list-comma-newline-after": "always", 38 "selector-list-comma-newline-after": "always",
44 "declaration-block-semicolon-newline-after": "always-multi-line", 39 "declaration-block-semicolon-newline-after": "always-multi-line",
45 40
46 // Separate rules by new lines. 41 // Separate rules by an empty line
47 // (Google HTML/CSS Style Guide) 42 "rule-empty-line-before": ["always", {
48 "rule-empty-line-before": "always", 43 "ignore": ["after-comment", "first-nested"]
44 }],
49 45
50 // Use double over single quotation marks 46 // Use double over single quotation marks
51 "string-quotes": "double", 47 "string-quotes": "double",
52 48
53 // CSS color values should be specified in hexadecimal where possible 49 // CSS color values should be specified in hexadecimal where possible
54 "color-named": "never", 50 "color-named": "never",
55 51
56 // Use 3 character hexadecimal notation where possible. 52 // Use short hexadecimal notation where possible
57 // (Google HTML/CSS Style Guide)
58 "color-hex-length": "short", 53 "color-hex-length": "short",
59
60 // CSS shorthand properties usage is optional
61
62 // CSS rule declaration order should follow the
63 // WordPress CSS Coding Standards
64 54
65 // Don't omit the optional leading 0 for decimal numbers 55 // Don't omit the optional leading 0 for decimal numbers
66 "number-leading-zero": "always", 56 "number-leading-zero": "always",
67 "number-no-trailing-zeros": true, 57 "number-no-trailing-zeros": true,
68 58
69 // Two spaces per logic level (Mozilla Coding Style) 59 // Two spaces per logic level
70 "indentation": 2, 60 "indentation": 2,
71 61
72 // Line length should be 80 characters or less 62 // Line length should be 80 characters or less
73 "max-line-length": 80, 63 "max-line-length": 80,
74 64
75 // Avoid qualifying ID and class names with type selectors. 65 // Avoid qualifying ID and class names with type selectors
76 // (Google HTML/CSS Style Guide)
77 "selector-no-qualifying-type": [true, { 66 "selector-no-qualifying-type": [true, {
78 "ignore": ["attribute"] 67 "ignore": ["attribute"]
79 }] 68 }]
80 } 69 }
81 }; 70 };
LEFTRIGHT

Powered by Google App Engine
This is Rietveld