aboutsummaryrefslogtreecommitdiffstats
path: root/stylelint.config.js
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-08-27 21:56:15 +0200
committernextcloud-command <nextcloud-command@users.noreply.github.com>2024-08-29 08:35:06 +0000
commitfaeb2f0f439065bb8118b08b138cc5e9da1d0321 (patch)
treecc479d7bebb75d000e3351577da7c2fb0242f967 /stylelint.config.js
parentaea0e8df6addb215b187898003afa6e52a984f6a (diff)
downloadnextcloud-server-faeb2f0f439065bb8118b08b138cc5e9da1d0321.tar.gz
nextcloud-server-faeb2f0f439065bb8118b08b138cc5e9da1d0321.zip
chore: Add stylelint rules to verify we only use logical properties
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'stylelint.config.js')
-rw-r--r--stylelint.config.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/stylelint.config.js b/stylelint.config.js
new file mode 100644
index 00000000000..03e25cc5bdb
--- /dev/null
+++ b/stylelint.config.js
@@ -0,0 +1,24 @@
+/**
+ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+/** @type {import('stylelint').Config} */
+const config = {
+ extends: '@nextcloud/stylelint-config',
+ plugins: ['stylelint-use-logical'],
+ rules: {
+ 'csstools/use-logical': ['always',
+ {
+ except: [
+ // For now ignore block rules for logical properties
+ /(^|-)(height|width)$/, /(^|-)(top|bottom)(-|$)/,
+ // Also ignore float as this is not well supported (I look at you Samsung)
+ 'clear', 'float',
+ ],
+ },
+ ],
+ },
+}
+
+module.exports = config