mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -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.config.ts',
|
||||||
'cypress',
|
'cypress',
|
||||||
'dist',
|
'dist',
|
||||||
'eslint.config.mjs',
|
'eslint.config.js',
|
||||||
'flake.lock',
|
'flake.lock',
|
||||||
'flake.nix',
|
'flake.nix',
|
||||||
'index.html',
|
'index.html',
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { includeIgnoreFile } from '@eslint/compat'
|
import { includeIgnoreFile } from '@eslint/compat'
|
||||||
import { recommendedVue2 } from '@nextcloud/eslint-config'
|
import { recommended } from '@nextcloud/eslint-config'
|
||||||
import CypressEslint from 'eslint-plugin-cypress'
|
import CypressEslint from 'eslint-plugin-cypress'
|
||||||
import noOnlyTests from 'eslint-plugin-no-only-tests'
|
import noOnlyTests from 'eslint-plugin-no-only-tests'
|
||||||
import { defineConfig } from 'eslint/config'
|
import { defineConfig } from 'eslint/config'
|
||||||
|
|
@ -21,7 +21,7 @@ export default defineConfig([
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
...recommendedVue2,
|
...recommended,
|
||||||
|
|
||||||
// add globals configuration for Webpack injected variables
|
// add globals configuration for Webpack injected variables
|
||||||
{
|
{
|
||||||
|
|
@ -39,8 +39,7 @@ export default defineConfig([
|
||||||
name: 'server/scripts-are-cjs',
|
name: 'server/scripts-are-cjs',
|
||||||
files: [
|
files: [
|
||||||
'*.js',
|
'*.js',
|
||||||
'build/**/*.js',
|
'build/*.js',
|
||||||
'**/core/src/icons.cjs',
|
|
||||||
],
|
],
|
||||||
|
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
|
|
@ -3,45 +3,38 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @type {import('stylelint').Config} */
|
const additionalPseudoSelectors = [
|
||||||
const config = {
|
// Vue <style scoped>
|
||||||
extends: '@nextcloud/stylelint-config',
|
// See: https://vuejs.org/api/sfc-css-features.html
|
||||||
plugins: ['stylelint-use-logical'],
|
'deep',
|
||||||
rules: {
|
'slotted',
|
||||||
'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'],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
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