Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>pull/55495/head
parent
c267036030
commit
1d580e886f
@ -1,14 +0,0 @@ |
||||
# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors |
||||
# SPDX-License-Identifier: AGPL-3.0-or-later |
||||
# Ignoring folders for eslint |
||||
node_modules/ |
||||
3rdparty/ |
||||
**/vendor/ |
||||
**/l10n/ |
||||
**/js/* |
||||
*.config.js |
||||
tests/lib/ |
||||
apps-extra |
||||
|
||||
# TODO: remove when comments files is not using handlebar templates anymore |
||||
apps/comments/src/templates.js |
@ -1,62 +0,0 @@ |
||||
/** |
||||
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors |
||||
* SPDX-License-Identifier: AGPL-3.0-or-later |
||||
*/ |
||||
module.exports = { |
||||
globals: { |
||||
__webpack_nonce__: true, |
||||
_: true, |
||||
$: true, |
||||
dayNames: true, |
||||
escapeHTML: true, |
||||
firstDay: true, |
||||
moment: true, |
||||
oc_userconfig: true, |
||||
sinon: true, |
||||
}, |
||||
plugins: [ |
||||
'cypress', |
||||
], |
||||
extends: [ |
||||
'@nextcloud/eslint-config/typescript', |
||||
'plugin:cypress/recommended', |
||||
], |
||||
rules: { |
||||
'comma-dangle': 'error', |
||||
'no-tabs': 'warn', |
||||
// TODO: make sure we fix this as this is bad vue coding style.
|
||||
// Use proper sync modifier
|
||||
'vue/no-mutating-props': 'warn', |
||||
'vue/custom-event-name-casing': ['error', 'kebab-case', { |
||||
// allows custom xxxx:xxx events formats
|
||||
ignores: ['/^[a-z]+(?:-[a-z]+)*:[a-z]+(?:-[a-z]+)*$/u'], |
||||
}], |
||||
'vue/html-self-closing': 'error', |
||||
'jsdoc/require-jsdoc': 'off', |
||||
'jsdoc/require-param-description': 'off', |
||||
}, |
||||
settings: { |
||||
jsdoc: { |
||||
mode: 'typescript', |
||||
}, |
||||
'import/resolver': { |
||||
typescript: {}, // this loads <rootdir>/tsconfig.json to eslint
|
||||
}, |
||||
}, |
||||
overrides: [ |
||||
// Allow any in tests
|
||||
{ |
||||
files: ['**/*.spec.ts'], |
||||
rules: { |
||||
'@typescript-eslint/no-explicit-any': 'warn', |
||||
}, |
||||
}, |
||||
{ |
||||
files: ['*.vue'], |
||||
rules: { |
||||
'no-irregular-whitespace': 'off', |
||||
'vue/no-irregular-whitespace': 'error', |
||||
}, |
||||
}, |
||||
], |
||||
} |
@ -0,0 +1,41 @@ |
||||
/** |
||||
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors |
||||
* SPDX-License-Identifier: AGPL-3.0-or-later |
||||
*/ |
||||
|
||||
import { includeIgnoreFile } from "@eslint/compat"; |
||||
import { recommendedVue2 } from '@nextcloud/eslint-config' |
||||
import { defineConfig } from 'eslint/config' |
||||
import { fileURLToPath } from "node:url"; |
||||
import * as globals from 'globals' |
||||
|
||||
const gitignorePath = fileURLToPath(new URL(".gitignore", import.meta.url)); |
||||
|
||||
export default defineConfig([ |
||||
...recommendedVue2, |
||||
includeIgnoreFile(gitignorePath, "Imported .gitignore patterns"), |
||||
{ |
||||
ignores: [ |
||||
'3rdparty/', // PHP tests
|
||||
'tests/', // PHP tests
|
||||
'**/l10n/', // all translations (config only ignored in root)
|
||||
], |
||||
}, |
||||
{ |
||||
files: ['cypress/**'], |
||||
rules: { |
||||
'no-console': 'off', |
||||
}, |
||||
}, |
||||
// scripts are cjs
|
||||
{ |
||||
files: ['*.js', 'build/**/*.js'], |
||||
languageOptions: { |
||||
globals: { |
||||
...globals.es2023, |
||||
...globals.node, |
||||
...globals.nodeBuiltin, |
||||
}, |
||||
} |
||||
}, |
||||
]) |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue