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: Change block-opening-brace-space-before to always-single-line Created Sept. 18, 2017, 8:55 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
Index: stylelint-config-eyeo/index.js
===================================================================
new file mode 100644
--- /dev/null
+++ b/stylelint-config-eyeo/index.js
@@ -0,0 +1,60 @@
+/*
+ * 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",
juliandoucette 2017/10/13 14:21:06 NIT: We are currently using double slash comments
ire 2017/10/24 09:05:16 The rule doesn't apply to SCSS files. See https://
juliandoucette 2017/10/26 15:24:08 Acknowledged.
+ rules: {
+ // Opening braces go on their own line
+ "block-closing-brace-empty-line-before": "never",
+ "block-closing-brace-newline-after": "always",
+ "block-closing-brace-newline-before": "always-multi-line",
+ "block-opening-brace-newline-after": "always-multi-line",
+ "block-opening-brace-newline-before": "always-multi-line",
+
+ // Use a space between the last selector and the declaration block
+ // (Google HTML/CSS Style Guide)
juliandoucette 2017/10/13 14:21:06 Why did you put this label here? Is everything bel
ire 2017/10/24 09:05:16 I put the label to specify that this particular ru
juliandoucette 2017/10/26 15:24:08 I'm ok with: - no comments - category comments -
ire 2017/10/30 08:30:47 Ack. I think I prefer either no comments or rule c
+ "block-closing-brace-space-after": "always-single-line",
+ "block-closing-brace-space-before": "always-single-line",
+ "block-opening-brace-space-after": "always-single-line",
+ "block-opening-brace-space-before": "always-single-line",
+
+ // Use double over single quotation marks
+ "string-quotes": "double",
+
+ // CSS color values should be specified in hexadecimal where possible
+ "color-named": "never",
+
+ // CSS shorthand properties usage is optional
juliandoucette 2017/10/13 14:21:06 This doesn't refer to a property? (The same appli
ire 2017/10/24 09:05:16 You're right. But this is from our coding standard
juliandoucette 2017/10/26 15:24:08 I wasn't suggesting that we change our standards.
ire 2017/10/30 08:30:47 Oh right! Yes I thought it was clear that if there
+
+ // CSS rule declaration order should follow the
+ // WordPress CSS Coding Standards
+
+ // CSS number values should specify units where possible
+
+ // Don't omit the optional leading 0 for decimal numbers
+ "number-leading-zero": "always",
+ "number-no-trailing-zeros": true,
+
+ // Two spaces per logic level (Mozilla Coding Style)
+ "indentation": 2,
+
+ // Line length should be 80 characters or less
+ "max-line-length": 80
+ }
+};

Powered by Google App Engine
This is Rietveld