40 lines
1.0 KiB
JavaScript
40 lines
1.0 KiB
JavaScript
// @ts-check
|
|
import withNuxt from './.nuxt/eslint.config.mjs';
|
|
import vueEslintParser from 'vue-eslint-parser';
|
|
import tsEslintPlugin from '@typescript-eslint/eslint-plugin';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
import eslintPluginVue from 'eslint-plugin-vue';
|
|
import { fileURLToPath } from 'url'
|
|
import { dirname } from 'path'
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
|
|
export default withNuxt({
|
|
files: ['**/*.vue'],
|
|
languageOptions: {
|
|
parser: vueEslintParser,
|
|
parserOptions: {
|
|
parser: tsParser,
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
extraFileExtensions: ['.vue'],
|
|
project: './tsconfig.json',
|
|
tsconfigRootDir: __dirname,
|
|
},
|
|
},
|
|
plugins: {
|
|
vue: eslintPluginVue,
|
|
'@typescript-eslint': tsEslintPlugin,
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': 'warn',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'vue/multi-word-component-names': 0,
|
|
},
|
|
ignores: [
|
|
'.nuxt/**',
|
|
'.output/**',
|
|
'node_modules',
|
|
],
|
|
});
|