mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-02-01 22:47:40 +00:00
- Removes Cypress test framework entirely, using only Playwright for E2E tests - All Cypress tests were already covered by Playwright; added 2 missing tests for URL filter/search parameters - Removes ~2000 lines of Cypress code and configuration - Updated ESLint and Stylelint configurations to reflect testing changes 🐰 Farewell to Cypress, dear and bright, We hop to Playwright's testing light, Factories cleared, the config gone, Our tests now march in Playwright's song! ~✨ The Testing Rabbit
83 lines
2.2 KiB
JavaScript
83 lines
2.2 KiB
JavaScript
import pluginVue from 'eslint-plugin-vue'
|
|
import js from '@eslint/js'
|
|
import vueTsEslintConfig from '@vue/eslint-config-typescript'
|
|
import { fileURLToPath } from 'node:url'
|
|
import { dirname } from 'node:path'
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
|
|
export default [
|
|
js.configs.recommended,
|
|
...pluginVue.configs['flat/recommended'],
|
|
...vueTsEslintConfig(),
|
|
{
|
|
ignores: [
|
|
'**/*.test.ts',
|
|
],
|
|
},
|
|
{
|
|
rules: {
|
|
'quotes': ['error', 'single'],
|
|
'comma-dangle': ['error', 'always-multiline'],
|
|
'semi': ['error', 'never'],
|
|
'indent': ['error', 'tab', { 'SwitchCase': 1 }],
|
|
|
|
'vue/v-on-event-hyphenation': ['warn', 'never', {'autofix': true}],
|
|
'vue/multi-word-component-names': 'off',
|
|
|
|
// uncategorized rules:
|
|
'vue/component-api-style': ['error', ['script-setup']],
|
|
'vue/component-name-in-template-casing': ['error', 'PascalCase', {
|
|
'globals': ['RouterView', 'RouterLink', 'Icon', 'Notifications', 'Modal', 'Card'],
|
|
}],
|
|
'vue/custom-event-name-casing': ['error', 'camelCase'],
|
|
'vue/define-macros-order': 'error',
|
|
'vue/match-component-file-name': ['error', {
|
|
'extensions': ['.js', '.jsx', '.ts', '.tsx', '.vue'],
|
|
'shouldMatchCase': true,
|
|
}],
|
|
'vue/match-component-import-name': 'error',
|
|
'vue/prefer-separate-static-class': 'warn',
|
|
|
|
'vue/padding-line-between-blocks': 'error',
|
|
'vue/next-tick-style': ['error', 'promise'],
|
|
'vue/block-lang': [
|
|
'error',
|
|
{'script': {'lang': 'ts'}},
|
|
],
|
|
'vue/no-duplicate-attr-inheritance': 'error',
|
|
'vue/no-empty-component-block': 'error',
|
|
'vue/html-indent': ['error', 'tab'],
|
|
|
|
// vue3
|
|
'vue/no-ref-object-reactivity-loss': 'error',
|
|
'vue/no-setup-props-reactivity-loss': 'error',
|
|
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
// 'args': 'all',
|
|
// 'argsIgnorePattern': '^_',
|
|
'caughtErrors': 'all',
|
|
'caughtErrorsIgnorePattern': '^_',
|
|
// 'destructuredArrayIgnorePattern': '^_',
|
|
'varsIgnorePattern': '^_',
|
|
'ignoreRestSiblings': true,
|
|
},
|
|
],
|
|
},
|
|
|
|
// files: ['*.vue', '**/*.vue'],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
parser: '@typescript-eslint/parser',
|
|
ecmaVersion: 'latest',
|
|
tsconfigRootDir: __dirname,
|
|
},
|
|
},
|
|
|
|
|
|
},
|
|
|
|
]
|