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

Unified Diff: stylelint-config-eyeo/index.js

Issue 29541680: Issue 5109 - Create stylelintrc for websites and ui modules (Closed) Base URL: https://hg.adblockplus.org/codingtools
Patch Set: Order: opening before > opening after > closing before > closing after Created Nov. 1, 2017, 11:05 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « stylelint-config-eyeo/README.md ('k') | stylelint-config-eyeo/package.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: stylelint-config-eyeo/index.js
===================================================================
new file mode 100644
--- /dev/null
+++ b/stylelint-config-eyeo/index.js
@@ -0,0 +1,72 @@
+/*
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-present eyeo GmbH
+ *
+ * Adblock Plus is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * Adblock Plus is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+"use strict";
+
+module.exports = {
+ extends: "stylelint-config-recommended",
+ rules: {
+ // Opening braces go on their own line
+ "block-opening-brace-newline-before": "always-multi-line",
+ "block-opening-brace-newline-after": "always-multi-line",
+ "block-closing-brace-newline-before": "always-multi-line",
+ "block-closing-brace-newline-after": "always",
+ "block-closing-brace-empty-line-before": "never",
+
+ // Use a space between the last selector and the declaration block
+ "block-opening-brace-space-before": "always-single-line",
+ "block-opening-brace-space-after": "always-single-line",
+ "block-closing-brace-space-before": "always-single-line",
+ "block-closing-brace-space-after": "always-single-line",
+
+ // Use a space after a property name’s colon.
+ "declaration-colon-space-after": "always",
+
+ // Separate selectors and declarations by new lines.
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.
+ "selector-list-comma-newline-after": "always",
+ "declaration-block-semicolon-newline-after": "always-multi-line",
+
+ // Separate rules by new lines.
+ "rule-empty-line-before": ["always", {
+ "ignore": ["after-comment", "inside-block"]
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.
+ }],
+
+ // Use double over single quotation marks
+ "string-quotes": "double",
+
+ // CSS color values should be specified in hexadecimal where possible
+ "color-named": "never",
+
+ // Use 3 character 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
+ "color-hex-length": "short",
+
+ // Don't omit the optional leading 0 for decimal numbers
+ "number-leading-zero": "always",
+ "number-no-trailing-zeros": true,
+
+ // Two spaces per logic level
+ "indentation": 2,
+
+ // Line length should be 80 characters or less
+ "max-line-length": 80,
+
+ // Avoid qualifying ID and class names with type selectors.
+ "selector-no-qualifying-type": [true, {
+ "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
+ }]
+ }
+};
« no previous file with comments | « stylelint-config-eyeo/README.md ('k') | stylelint-config-eyeo/package.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld