feat: refs #8006 41 problems
This commit is contained in:
parent
eb81b9b6ee
commit
1a284acdc5
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": ["plugin:cypress/recommended"]
|
||||
}
|
|
@ -0,0 +1,210 @@
|
|||
import cypress from 'eslint-plugin-cypress';
|
||||
import eslint from 'eslint-plugin-import';
|
||||
// Import eslint from '@eslint/eslintrc';
|
||||
import globals from 'globals';
|
||||
// Import path from 'node:path';
|
||||
// Import { fileURLToPath } from 'node:url';
|
||||
import js from '@eslint/js';
|
||||
import vue from 'eslint-plugin-vue';
|
||||
// Import { FlatCompat } from '';
|
||||
// Const compat = new FlatCompat({
|
||||
// BaseDirectory: import.meta.url,
|
||||
// RecommendedConfig: js.configs.recommended,
|
||||
// AllConfig: js.configs.all,
|
||||
// Cypress: cypress.configs.recommended,
|
||||
// });
|
||||
|
||||
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)
|
||||
|
||||
plugins: { vue, eslint, cypress },
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.node,
|
||||
...globals.browser,
|
||||
...vue.environments['setup-compiler-macros']['setup-compiler-macros'],
|
||||
...cypress.environments.globals.globals,
|
||||
ga: 'readonly',
|
||||
cordova: 'readonly',
|
||||
__statics: 'readonly',
|
||||
__QUASAR_SSR__: 'readonly',
|
||||
__QUASAR_SSR_SERVER__: 'readonly',
|
||||
__QUASAR_SSR_CLIENT__: 'readonly',
|
||||
__QUASAR_SSR_PWA__: 'readonly',
|
||||
process: 'readonly',
|
||||
Capacitor: 'readonly',
|
||||
chrome: 'readonly',
|
||||
},
|
||||
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module',
|
||||
|
||||
parserOptions: {
|
||||
parser: '@babel/eslint-parser',
|
||||
},
|
||||
},
|
||||
// Files: ['test/cypress/**/*.*'],
|
||||
// Rules: {
|
||||
// Semi: 'error',
|
||||
// 'space-before-function-paren': 0,
|
||||
// 'prefer-promise-reject-errors': 0,
|
||||
// 'vue/no-multiple-template-root': 0,
|
||||
// },
|
||||
rules: {
|
||||
...js.configs.recommended.rules,
|
||||
'generator-star-spacing': 'off',
|
||||
'arrow-parens': 'off',
|
||||
'one-var': 'off',
|
||||
'no-void': 'off',
|
||||
'multiline-ternary': 'off',
|
||||
'js/first': 'off',
|
||||
'vue/prefer-import-from-vue': 'error',
|
||||
'eslint/first': 'off',
|
||||
'eslint/dynamic-import-chunkname': 'off',
|
||||
'no-restricted-imports': 'off',
|
||||
'no-import-assign': 'off',
|
||||
'no-duplicate-imports': 'off',
|
||||
'no-useless-rename': 'off',
|
||||
'no-named-as-default': 'off',
|
||||
'no-named-as-default-member': 'off',
|
||||
'eslint/named': 'off',
|
||||
'no-unsafe-optional-chaining': 'off',
|
||||
'eslint/namespace': 'error',
|
||||
'eslint/default': 'error',
|
||||
'eslint/export': 'error',
|
||||
'eslint/extensions': 'off',
|
||||
'eslint/no-unresolved': 'off',
|
||||
'eslint/no-extraneous-dependencies': 'off',
|
||||
'eslint/no-import-module-exports': 'off',
|
||||
'eslint/no-self-import': 'off',
|
||||
semi: 'off',
|
||||
'space-before-function-paren': 'off',
|
||||
'no-undef': 'error',
|
||||
'no-unused-vars': 'warn',
|
||||
'no-console': 'error',
|
||||
'no-debugger': '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',
|
||||
// },
|
||||
// {
|
||||
|
||||
// },
|
||||
},
|
||||
// LinterOptions: {
|
||||
// ReportUnusedInlineConfigs: 'error',
|
||||
// },
|
||||
ignores: [
|
||||
'/dist',
|
||||
'/src-capacitor',
|
||||
'/src-cordova',
|
||||
'/.quasar',
|
||||
'/node_modules',
|
||||
'.eslintrc.js',
|
||||
],
|
||||
// Rules order is important, please avoid shuffling them
|
||||
// Extends: [
|
||||
// 'standard',
|
||||
// // 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: {},
|
||||
|
||||
// Add your custom rules here
|
||||
// Rules: {
|
||||
// // allow async-await
|
||||
// 'generator-star-spacing': 'error',
|
||||
// // allow paren-less arrow functions
|
||||
// 'arrow-parens': 'error',
|
||||
// 'one-var': 'error',
|
||||
// 'no-void': 'error',
|
||||
// 'multiline-ternary': 'error',
|
||||
|
||||
// 'import/first': 'error',
|
||||
// 'import/named': 'error',
|
||||
// 'import/namespace': 'error',
|
||||
// 'import/default': 'error',
|
||||
// 'import/export': 'error',
|
||||
// 'import/extensions': 'error',
|
||||
// 'import/no-unresolved': 'error',
|
||||
// 'import/no-extraneous-dependencies': 'error',
|
||||
// Semi: 'error',
|
||||
// 'space-before-function-paren': 'error',
|
||||
// 'no-undef': 'error',
|
||||
// 'no-unused-vars': 'warn',
|
||||
// 'no-console': 'error',
|
||||
// 'no-debugger': 'error',
|
||||
// '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',
|
||||
|
||||
// // allow debugger during development only
|
||||
// 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'error',
|
||||
// },
|
||||
// Overrides: [
|
||||
// {
|
||||
// Files: ['test/cypress/**/*.*'],
|
||||
// Extends: [
|
||||
// // Add Cypress-specific lint rules, globals and Cypress plugin
|
||||
// // See https://github.com/cypress-io/eslint-plugin-cypress#rules
|
||||
// 'plugin:cypress/recommended',
|
||||
// ],
|
||||
// Rules: {
|
||||
// Semi: 'error',
|
||||
// 'space-before-function-paren': 'error',
|
||||
// 'prefer-promise-reject-errors': 'error',
|
||||
// 'vue/no-multiple-template-root': 'error',
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
};
|
|
@ -0,0 +1,108 @@
|
|||
import vue from 'eslint-plugin-vue';
|
||||
import globals from 'globals';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import js from '@eslint/js';
|
||||
import { FlatCompat } from '@eslint/eslintrc';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
recommendedConfig: js.configs.recommended,
|
||||
allConfig: js.configs.all,
|
||||
});
|
||||
|
||||
export default [
|
||||
...compat.extends(
|
||||
'standard',
|
||||
'eslint:recommended',
|
||||
'plugin:vue/vue3-strongly-recommended',
|
||||
'plugin:cypress/recommended',
|
||||
'prettier',
|
||||
),
|
||||
{
|
||||
plugins: {
|
||||
vue,
|
||||
cypress: 'eslint-plugin-cypress',
|
||||
eslint: 'eslint-plugin-import',
|
||||
},
|
||||
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.node,
|
||||
...globals.browser,
|
||||
...vue.environments['setup-compiler-macros']['setup-compiler-macros'],
|
||||
ga: 'readonly',
|
||||
cordova: 'readonly',
|
||||
__statics: 'readonly',
|
||||
__QUASAR_SSR__: 'readonly',
|
||||
__QUASAR_SSR_SERVER__: 'readonly',
|
||||
__QUASAR_SSR_CLIENT__: 'readonly',
|
||||
__QUASAR_SSR_PWA__: 'readonly',
|
||||
process: 'readonly',
|
||||
Capacitor: 'readonly',
|
||||
chrome: 'readonly',
|
||||
},
|
||||
|
||||
ecmaVersion: 2018,
|
||||
sourceType: 'module',
|
||||
|
||||
parserOptions: {
|
||||
parser: '@babel/eslint-parser',
|
||||
},
|
||||
},
|
||||
|
||||
rules: {
|
||||
'jest/expect-expect': 'error',
|
||||
'generator-star-spacing': 'error',
|
||||
'arrow-parens': 'error',
|
||||
'one-var': 'error',
|
||||
'no-void': 'error',
|
||||
'multiline-ternary': 'error',
|
||||
'import/first': 'error',
|
||||
'import/named': 'error',
|
||||
'import/namespace': 'error',
|
||||
'import/default': 'error',
|
||||
'import/export': 'error',
|
||||
'import/extensions': 'error',
|
||||
'import/no-unresolved': 'error',
|
||||
'import/no-extraneous-dependencies': 'error',
|
||||
semi: 'error',
|
||||
'space-before-function-paren': 'error',
|
||||
'no-undef': 'error',
|
||||
'no-unused-vars': 'warn',
|
||||
'no-console': 'error',
|
||||
'no-debugger': 'error',
|
||||
'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',
|
||||
},
|
||||
},
|
||||
...compat.extends('plugin:cypress/recommended').map((config) => ({
|
||||
...config,
|
||||
files: ['test/cypress/**/*.*'],
|
||||
})),
|
||||
{
|
||||
files: ['test/cypress/**/*.*'],
|
||||
|
||||
rules: {
|
||||
semi: 'error',
|
||||
'space-before-function-paren': 'error',
|
||||
'prefer-promise-reject-errors': 'error',
|
||||
'vue/no-multiple-template-root': 'error',
|
||||
},
|
||||
},
|
||||
];
|
|
@ -1,3 +1,8 @@
|
|||
export * from './defaults/qTable';
|
||||
export * from './defaults/qInput';
|
||||
export * from './defaults/qSelect';
|
||||
import { qTable } from './defaults/qTable';
|
||||
import { qInput } from './defaults/qInput';
|
||||
import { qSelect } from './defaults/qSelect';
|
||||
export default {
|
||||
qTable,
|
||||
qInput,
|
||||
qSelect,
|
||||
};
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
const { defineConfig } = require('vitest/config');
|
||||
const vue = require('@vitejs/plugin-vue');
|
||||
const { quasar, transformAssetUrls } = require('@quasar/vite-plugin');
|
||||
const jsconfigPaths = require('vite-jsconfig-paths');
|
||||
const VueI18nPlugin = require('@intlify/unplugin-vue-i18n/vite');
|
||||
const path = require('path');
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import vue from '@vitejs/';
|
||||
import { quasar, transformAssetUrls } from '@quasar/vite-plugin';
|
||||
import jsconfigPaths from 'vite-jsconfig-paths';
|
||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
||||
import path from 'path';
|
||||
|
||||
let reporters, outputFile;
|
||||
|
||||
|
|
Loading…
Reference in New Issue