Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: adjust linter configs for new layout
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Oct 22, 2025
commit 3c1e9cd99e1a3599fc4e5ffaec950bf8508bb595
2 changes: 1 addition & 1 deletion build/files-checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
'cypress.config.ts',
'cypress',
'dist',
'eslint.config.mjs',
'eslint.config.js',
'flake.lock',
'flake.nix',
'index.html',
Expand Down
7 changes: 3 additions & 4 deletions eslint.config.mjs → eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { includeIgnoreFile } from '@eslint/compat'
import { recommendedVue2 } from '@nextcloud/eslint-config'
import { recommended } from '@nextcloud/eslint-config'
import CypressEslint from 'eslint-plugin-cypress'
import noOnlyTests from 'eslint-plugin-no-only-tests'
import { defineConfig } from 'eslint/config'
Expand All @@ -21,7 +21,7 @@ export default defineConfig([
},
},

...recommendedVue2,
...recommended,

// add globals configuration for Webpack injected variables
{
Expand All @@ -39,8 +39,7 @@ export default defineConfig([
name: 'server/scripts-are-cjs',
files: [
'*.js',
'build/**/*.js',
'**/core/src/icons.cjs',
'build/*.js',
],

languageOptions: {
Expand Down
65 changes: 29 additions & 36 deletions stylelint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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