mirror of
https://github.com/nextcloud/server.git
synced 2025-12-18 15:56:14 -05:00
chore: adjust linter configs for new layout
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
da5e27917f
commit
3c1e9cd99e
3 changed files with 38 additions and 46 deletions
|
|
@ -58,7 +58,7 @@ $expectedFiles = [
|
|||
'cypress.config.ts',
|
||||
'cypress',
|
||||
'dist',
|
||||
'eslint.config.mjs',
|
||||
'eslint.config.js',
|
||||
'flake.lock',
|
||||
'flake.nix',
|
||||
'index.html',
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
@ -21,7 +21,7 @@ export default defineConfig([
|
|||
},
|
||||
},
|
||||
|
||||
...recommendedVue2,
|
||||
...recommended,
|
||||
|
||||
// add globals configuration for Webpack injected variables
|
||||
{
|
||||
|
|
@ -39,8 +39,7 @@ export default defineConfig([
|
|||
name: 'server/scripts-are-cjs',
|
||||
files: [
|
||||
'*.js',
|
||||
'build/**/*.js',
|
||||
'**/core/src/icons.cjs',
|
||||
'build/*.js',
|
||||
],
|
||||
|
||||
languageOptions: {
|
||||
|
|
@ -3,45 +3,38 @@
|
|||
* 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',
|
||||
],
|
||||
}],
|
||||
},
|
||||
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'],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
const additionalPseudoSelectors = [
|
||||
// Vue <style scoped>
|
||||
// See: https://vuejs.org/api/sfc-css-features.html
|
||||
'deep',
|
||||
'slotted',
|
||||
|
||||
module.exports = config
|
||||
// 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} */
|
||||
export default {
|
||||
extends: '@nextcloud/stylelint-config',
|
||||
ignoreFiles: [
|
||||
'**/*.(!(vue|scss))',
|
||||
],
|
||||
|
||||
// remove with nextcloud/stylelint-config 3.1.1+
|
||||
rules: {
|
||||
'selector-pseudo-class-no-unknown': [
|
||||
true,
|
||||
{
|
||||
ignorePseudoClasses: additionalPseudoSelectors,
|
||||
},
|
||||
],
|
||||
'selector-pseudo-element-no-unknown': [
|
||||
true,
|
||||
{
|
||||
ignorePseudoElements: additionalPseudoSelectors,
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue