import stylistic from '@stylistic/eslint-plugin'; import globals from 'globals'; import pluginVue from 'eslint-plugin-vue'; import pluginQuasar from '@quasar/app-vite/eslint'; export default [ { /** * Ignore the following files. * Please note that pluginQuasar.configs.recommended() already ignores * the "node_modules" folder for you (and all other Quasar project * relevant folders and files). * * ESLint requires "ignores" key to be the only one in this object */ // ignores: [] }, ...pluginQuasar.configs.recommended(), /** * https://eslint.vuejs.org * * pluginVue.configs.base * -> Settings and rules to enable correct ESLint parsing. * pluginVue.configs[ 'flat/essential'] * -> base, plus rules to prevent errors or unintended behavior. * pluginVue.configs["flat/strongly-recommended"] * -> Above, plus rules to considerably improve code readability and/or dev experience. * pluginVue.configs["flat/recommended"] * -> Above, plus rules to enforce subjective community defaults to ensure consistency. */ ...pluginVue.configs['flat/essential'], ...pluginVue.configs['flat/strongly-recommended'], { plugins: { '@stylistic': stylistic, }, languageOptions: { ecmaVersion: 'latest', sourceType: 'module', globals: { ...globals.browser, ...globals.node, // SSR, Electron, config files process: 'readonly', // process.env.* ga: 'readonly', // Google Analytics cordova: 'readonly', Capacitor: 'readonly', chrome: 'readonly', // BEX related browser: 'readonly' // BEX related } }, // add your custom rules here rules: { 'prefer-promise-reject-errors': 'off', // allow debugger during development only 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', // enforce Allman brace style '@stylistic/brace-style': ['warn', 'allman'], '@stylistic/indent': ['warn', 2], //Enforce single quotes '@stylistic/quotes': ['warn', 'single', { avoidEscape: true }], '@stylistic/quote-props': ['warn', 'as-needed', { keywords: true, unnecessary: true, numbers: true }], //Enforce semicolon '@stylistic/semi': ['warn', 'always'], '@stylistic/space-before-function-paren': ['warn', 'never'], } }, { files: ['src-pwa/custom-service-worker.js'], languageOptions: { globals: { ...globals.serviceworker } } } ];