Skip to content

Commit

Permalink
update npm packages and eslint migration to 9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mgineer85 committed Oct 2, 2024
1 parent fba3722 commit 6290395
Show file tree
Hide file tree
Showing 6 changed files with 1,021 additions and 785 deletions.
9 changes: 0 additions & 9 deletions .eslintignore

This file was deleted.

87 changes: 0 additions & 87 deletions .eslintrc.cjs

This file was deleted.

96 changes: 96 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin';
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 [
{
ignores: [
'dist',
'src-capacitor',
'src-cordova',
'.quasar',
'node_modules',
'**/.eslintrc.js',
'**/.eslintrc.cjs',
'**/eslint.config.mjs',
'src-ssr',
'quasar.config.*.temporary.compiled*',
],
},
...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-essential',
'plugin:vue/vue3-strongly-recommended',
'plugin:vue/vue3-recommended',
'prettier',
'plugin:@intlify/vue-i18n/recommended',
),
{
plugins: {
'@typescript-eslint': typescriptEslint,
vue,
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
...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: 5,
sourceType: 'commonjs',

parserOptions: {
parser: 'D:\\dev\\photobooth\\photobooth-frontend\\node_modules\\@typescript-eslint\\parser\\dist\\index.js',
extraFileExtensions: ['.vue'],
},
},

settings: {
'vue-i18n': {
localeDir: './src/i18n/locales/*.json',
},
},

rules: {
quotes: [
'warn',
'single',
{
avoidEscape: true,
},
],
'no-debugger': 'off',
},
},
{
files: ['**/src/components/form/**/*.{js,ts,mjs,cjs,vue}'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
];
Loading

0 comments on commit 6290395

Please sign in to comment.