init
This commit is contained in:
39
eslint.config.mjs
Normal file
39
eslint.config.mjs
Normal file
@@ -0,0 +1,39 @@
|
||||
// @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',
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user