stylelint.config.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /**
  2. * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: AGPL-3.0-or-later
  4. */
  5. /** @type {import('stylelint').Config} */
  6. const config = {
  7. extends: '@nextcloud/stylelint-config',
  8. plugins: ['stylelint-use-logical'],
  9. rules: {
  10. 'csstools/use-logical': ['always',
  11. {
  12. except: [
  13. // For now ignore block rules for logical properties
  14. /(^|-)(height|width)$/, /(^|-)(top|bottom)(-|$)/,
  15. // Also ignore float as this is not well supported (I look at you Samsung)
  16. 'clear', 'float',
  17. ],
  18. },
  19. ],
  20. },
  21. overrides: [
  22. {
  23. files: ['**/*.vue'],
  24. // Override the nextcloud rules to also allow :global (we should put this into the config...)
  25. rules: {
  26. 'selector-pseudo-element-no-unknown': [
  27. true,
  28. {
  29. // Vue deep and global pseudo-element
  30. ignorePseudoElements: ['deep', 'global'],
  31. },
  32. ],
  33. 'selector-pseudo-class-no-unknown': [
  34. true,
  35. {
  36. // vue deep and global pseudo-class
  37. ignorePseudoClasses: ['deep', 'global'],
  38. },
  39. ],
  40. }
  41. }
  42. ],
  43. }
  44. module.exports = config