|
|
|
|
@ -3,45 +3,38 @@ |
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
const additionalPseudoSelectors = [ |
|
|
|
|
// Vue <style scoped>
|
|
|
|
|
// See: https://vuejs.org/api/sfc-css-features.html
|
|
|
|
|
'deep', |
|
|
|
|
'slotted', |
|
|
|
|
|
|
|
|
|
// CSS Modules (including Vue <style module>)
|
|
|
|
|
// See: https://github.com/css-modules/css-modules/blob/master/docs/composition.md#exceptions
|
|
|
|
|
'global', |
|
|
|
|
'local', |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
/** @type {import('stylelint').Config} */ |
|
|
|
|
const config = { |
|
|
|
|
export default { |
|
|
|
|
extends: '@nextcloud/stylelint-config', |
|
|
|
|
plugins: ['stylelint-use-logical'], |
|
|
|
|
ignoreFiles: [ |
|
|
|
|
'**/*.(!(vue|scss))', |
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
// remove with nextcloud/stylelint-config 3.1.1+
|
|
|
|
|
rules: { |
|
|
|
|
'csstools/use-logical': ['always', |
|
|
|
|
'selector-pseudo-class-no-unknown': [ |
|
|
|
|
true, |
|
|
|
|
{ |
|
|
|
|
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', |
|
|
|
|
], |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|
overrides: [ |
|
|
|
|
{ |
|
|
|
|
files: ['**/*.vue'], |
|
|
|
|
// Override the nextcloud rules to also allow :global (we should put this into the config...)
|
|
|
|
|
rules: { |
|
|
|
|
'selector-pseudo-element-no-unknown': [ |
|
|
|
|
true, |
|
|
|
|
{ |
|
|
|
|
// Vue deep and global pseudo-element
|
|
|
|
|
ignorePseudoElements: ['deep', 'global'], |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
'selector-pseudo-class-no-unknown': [ |
|
|
|
|
true, |
|
|
|
|
{ |
|
|
|
|
// vue deep and global pseudo-class
|
|
|
|
|
ignorePseudoClasses: ['deep', 'global'], |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
ignorePseudoClasses: additionalPseudoSelectors, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
], |
|
|
|
|
'selector-pseudo-element-no-unknown': [ |
|
|
|
|
true, |
|
|
|
|
{ |
|
|
|
|
ignorePseudoElements: additionalPseudoSelectors, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
module.exports = config |
|
|
|
|
|