OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-present eyeo GmbH |
| 4 * |
| 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 |
| 7 * published by the Free Software Foundation. |
| 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. |
| 13 * |
| 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/>. |
| 16 */ |
| 17 |
| 18 "use strict"; |
| 19 |
| 20 module.exports = { |
| 21 extends: "stylelint-config-recommended", |
| 22 rules: { |
| 23 // Opening braces go on their own line |
| 24 "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 |
| 30 // Use a space between the last selector and the declaration block |
| 31 // (Google HTML/CSS Style Guide) |
| 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 |
| 37 // Use a space after a property name’s colon. |
| 38 // (Google HTML/CSS Style Guide) |
| 39 "declaration-colon-space-after": "always", |
| 40 |
| 41 // Separate selectors and declarations by new lines. |
| 42 // (Google HTML/CSS Style Guide) |
| 43 "selector-list-comma-newline-after": "always", |
| 44 "declaration-block-semicolon-newline-after": "always-multi-line", |
| 45 |
| 46 // Separate rules by new lines. |
| 47 // (Google HTML/CSS Style Guide) |
| 48 "rule-empty-line-before": "always", |
| 49 |
| 50 // Use double over single quotation marks |
| 51 "string-quotes": "double", |
| 52 |
| 53 // CSS color values should be specified in hexadecimal where possible |
| 54 "color-named": "never", |
| 55 |
| 56 // Use 3 character hexadecimal notation where possible. |
| 57 // (Google HTML/CSS Style Guide) |
| 58 "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 |
| 65 // Don't omit the optional leading 0 for decimal numbers |
| 66 "number-leading-zero": "always", |
| 67 "number-no-trailing-zeros": true, |
| 68 |
| 69 // Two spaces per logic level (Mozilla Coding Style) |
| 70 "indentation": 2, |
| 71 |
| 72 // Line length should be 80 characters or less |
| 73 "max-line-length": 80, |
| 74 |
| 75 // Avoid qualifying ID and class names with type selectors. |
| 76 // (Google HTML/CSS Style Guide) |
| 77 "selector-no-qualifying-type": [true, { |
| 78 "ignore": ["attribute"] |
| 79 }] |
| 80 } |
| 81 }; |
OLD | NEW |