88 lines
2.7 KiB
JavaScript
88 lines
2.7 KiB
JavaScript
import cypress from 'eslint-plugin-cypress';
|
|
import eslint from 'eslint-plugin-import';
|
|
import globals from 'globals';
|
|
import js from '@eslint/js';
|
|
import vue from 'eslint-plugin-vue';
|
|
export default {
|
|
plugins: { vue, eslint, cypress },
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.node,
|
|
...globals.browser,
|
|
...vue.configs['vue3-strongly-recommended'].globals,
|
|
...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',
|
|
},
|
|
},
|
|
rules: {
|
|
...vue.rules['flat/strongly-recommended'],
|
|
...js.configs.recommended.rules,
|
|
semi: 'off',
|
|
'generator-star-spacing': 'warn',
|
|
'arrow-parens': 'warn',
|
|
'no-var': 'error',
|
|
'prefer-const': 'error',
|
|
'prefer-template': 'warn',
|
|
'prefer-destructuring': 'off',
|
|
'prefer-spread': 'warn',
|
|
'prefer-rest-params': 'warn',
|
|
'prefer-object-spread': 'warn',
|
|
'prefer-arrow-callback': 'warn',
|
|
'prefer-numeric-literals': 'warn',
|
|
'prefer-exponentiation-operator': 'warn',
|
|
'prefer-regex-literals': 'warn',
|
|
'one-var': [
|
|
'error',
|
|
{
|
|
let: 'never',
|
|
const: 'never',
|
|
},
|
|
],
|
|
'no-void': 'off',
|
|
'prefer-promise-reject-errors': 'error',
|
|
'multiline-ternary': 'warn',
|
|
'no-restricted-imports': 'warn',
|
|
'no-import-assign': 'warn',
|
|
'no-duplicate-imports': 'warn',
|
|
'no-useless-rename': 'warn',
|
|
'eslint/no-named-as-default': 'warn',
|
|
'eslint/no-named-as-default-member': 'warn',
|
|
'no-unsafe-optional-chaining': 'warn',
|
|
'no-undef': 'error',
|
|
'no-unused-vars': 'error',
|
|
'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',
|
|
},
|
|
ignores: [
|
|
'/dist',
|
|
'/src-capacitor',
|
|
'/src-cordova',
|
|
'/.quasar',
|
|
'/node_modules',
|
|
'.eslintrc.js',
|
|
],
|
|
};
|