- tsconfig: drop TS6-deprecated baseUrl; moduleResolution Node -> Bundler - eslint: migrate .eslintrc.cjs to flat config (eslint.config.mjs); add vue-eslint-parser, globals, @eslint/js; drop --ext from lint scripts - vuetify 4: theme.global.name.value = x -> theme.change(x) - drop unused watch import; rename unused status arg; remove required: true from prop that has a default
58 lines
1.6 KiB
JavaScript
58 lines
1.6 KiB
JavaScript
import js from '@eslint/js'
|
|
import tseslint from '@typescript-eslint/eslint-plugin'
|
|
import tsParser from '@typescript-eslint/parser'
|
|
import vuePlugin from 'eslint-plugin-vue'
|
|
import vueParser from 'vue-eslint-parser'
|
|
import globals from 'globals'
|
|
|
|
export default [
|
|
{
|
|
ignores: ['dist/**', 'node_modules/**', 'src/generated/**', '**/*.d.ts'],
|
|
},
|
|
js.configs.recommended,
|
|
...vuePlugin.configs['flat/recommended'],
|
|
{
|
|
files: ['**/*.{js,mjs,cjs,jsx,ts,tsx,cts,mts,vue}'],
|
|
languageOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
...globals.es2022,
|
|
},
|
|
parser: vueParser,
|
|
parserOptions: {
|
|
parser: tsParser,
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
extraFileExtensions: ['.vue'],
|
|
},
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': tseslint,
|
|
vue: vuePlugin,
|
|
},
|
|
rules: {
|
|
...tseslint.configs.recommended.rules,
|
|
|
|
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'@typescript-eslint/ban-ts-comment': 'warn',
|
|
|
|
'vue/multi-word-component-names': 'off',
|
|
'vue/no-v-html': 'off',
|
|
'vue/require-default-prop': 'off',
|
|
'vue/max-attributes-per-line': 'off',
|
|
'vue/singleline-html-element-content-newline': 'off',
|
|
'vue/html-closing-bracket-newline': 'off',
|
|
'vue/html-self-closing': 'off',
|
|
'vue/html-indent': 'off',
|
|
'vue/v-slot-style': 'off',
|
|
|
|
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
|
'prefer-const': 'error',
|
|
},
|
|
},
|
|
]
|