revert: refs #8006 clean branch

This commit is contained in:
Javier Segarra 2025-03-25 21:50:38 +01:00
parent dc35377f13
commit 240d671701
6 changed files with 1205 additions and 1706 deletions

View File

@ -1,19 +1,48 @@
module.exports = {
export default {
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
// This option interrupts the configuration hierarchy at this file
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
root: true,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaVersion: '2021', // Allows for the parsing of modern ECMAScript features
},
env: {
node: true,
browser: true,
'vue/setup-compiler-macros': true,
es2024: true,
},
extends: ['eslint:recommended', 'plugin:vue/vue3-strongly-recommended', 'prettier'],
plugins: ['vue'],
// Rules order is important, please avoid shuffling them
extends: [
// Base ESLint recommended rules
'eslint:recommended',
// Uncomment any of the lines below to choose desired strictness,
// but leave only one uncommented!
// See https://eslint.vuejs.org/rules/#available-rules
// 'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
// 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
// https://github.com/prettier/eslint-config-prettier#installation
// usage with Prettier, provided by 'eslint-config-prettier'.
'prettier',
],
plugins: [
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
// required to lint *.vue files
'vue',
// https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
// Prettier has not been included as plugin to avoid performance impact
// add it as an extension for your IDE
],
globals: {
ga: 'readonly',
ga: 'readonly', // Google Analytics
cordova: 'readonly',
__statics: 'readonly',
__QUASAR_SSR__: 'readonly',
@ -23,58 +52,24 @@ module.exports = {
process: 'readonly',
Capacitor: 'readonly',
chrome: 'readonly',
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
},
// add your custom rules here
rules: {
'generator-star-spacing': 'off',
'arrow-parens': 'off',
'one-var': 'off',
'no-void': 'off',
'multiline-ternary': 'off',
'import/first': 'off',
'import/named': 'error',
'import/namespace': 'error',
'import/default': 'error',
'import/export': 'error',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
semi: 'off',
'space-before-function-paren': 'off',
'no-undef': 'error',
'prefer-promise-reject-errors': 'off',
'no-unused-vars': 'warn',
'no-console': 'error',
'vue/no-multiple-template-root': 'off',
// allow debugger during development only
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-useless-escape': 'error',
'no-prototype-builtins': 'error',
'no-async-promise-executor': 'error',
'no-irregular-whitespace': 'error',
'no-constant-condition': 'error',
'no-unsafe-finally': 'error',
'no-extend-native': 'error',
'vue/no-unused-components': 'error',
'vue/no-unused-properties': 'error',
'vue/no-multiple-template-root': 'error',
'vue/no-v-html': 'error',
'vue/no-v-model-argument': 'error',
'vue/no-parsing-error': 'error',
'vue/no-deprecated-slot-attribute': 'error',
'prefer-promise-reject-errors': 'error',
},
overrides: [
{
files: ['test/cypress/**/*.*'],
extends: ['plugin:cypress/recommended'],
rules: {
semi: 'off',
'space-before-function-paren': 'off',
'prefer-promise-reject-errors': 'off',
'vue/no-multiple-template-root': 'off',
},
extends: [
// Add Cypress-specific lint rules, globals and Cypress plugin
// See https://github.com/cypress-io/eslint-plugin-cypress#rules
'plugin:cypress/recommended',
],
},
],
};

View File

@ -9,7 +9,7 @@
"type": "module",
"scripts": {
"resetDatabase": "cd ../salix && gulp docker",
"lint": "eslint --ext {.js,.vue} ./",
"lint": "eslint --ext .js,.vue ./",
"format": "prettier --write \"**/*.{js,vue,scss,html,md,json}\" --ignore-path .gitignore",
"test:e2e": "cypress open",
"test:e2e:ci": "npm run resetDatabase && cd ../salix-front && cypress run",
@ -36,15 +36,13 @@
"quasar": "^2.17.7",
"validator": "^13.9.0",
"vue": "^3.5.13",
"vue-i18n": "^9.4.0",
"vue-i18n": "^9.3.0",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^19.1.0",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.20.0",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@intlify/unplugin-vue-i18n": "^0.8.2",
"@pinia/testing": "^0.1.2",
"@quasar/app-vite": "^2.0.8",
"@quasar/quasar-app-extension-qcalendar": "^4.0.2",
@ -56,9 +54,7 @@
"eslint": "^9.18.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-cypress": "^4.1.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-vue": "^9.32.0",
"globals": "^16.0.0",
"husky": "^8.0.0",
"junit-merge": "^2.0.0",
"mocha": "^11.1.0",
@ -80,4 +76,4 @@
"vite": "^6.0.11",
"vitest": "^0.31.1"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/* eslint-disable */
// https://github.com/michael-ciniawsky/postcss-load-config
import autoprefixer from 'autoprefixer';

View File

@ -53,7 +53,7 @@ export default configure(function (/* ctx */) {
build: {
target: {
browser: ['es2022', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
node: 'node20',
node: 'node18',
},
vueRouterMode: 'hash', // available values: 'hash', 'history'

View File

@ -28,9 +28,6 @@ export default defineConfig({
'src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
],
},
server: {
hmr: { overlay: false },
},
plugins: [
vue({
template: {