mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2026-04-23 07:00:19 +08:00
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
import js from '@eslint/js'
|
|
import globals from 'globals'
|
|
import tseslint from 'typescript-eslint'
|
|
import pluginVue from 'eslint-plugin-vue'
|
|
import json from '@eslint/json'
|
|
import css from '@eslint/css'
|
|
import { defineConfig } from 'eslint/config'
|
|
|
|
export default defineConfig([
|
|
tseslint.configs.recommended,
|
|
{
|
|
files: ['**/*.{js,mjs,cjs,ts,mts,cts,vue}'],
|
|
plugins: { js },
|
|
extends: ['js/recommended'],
|
|
languageOptions: { globals: globals.browser },
|
|
rules: {
|
|
'no-undef': 'off'
|
|
// 'no-unused-vars': 'off'
|
|
// '@typescript-eslint/no-unused-vars': 'off'
|
|
}
|
|
},
|
|
|
|
pluginVue.configs['flat/essential'],
|
|
{
|
|
files: ['**/*.vue'],
|
|
languageOptions: { parserOptions: { parser: tseslint.parser } },
|
|
rules: {
|
|
'vue/multi-word-component-names': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'no-empty': 'off',
|
|
'no-undef': 'off',
|
|
'@typescript-eslint/no-unused-vars': 'off'
|
|
}
|
|
},
|
|
{
|
|
files: ['**/*.json'],
|
|
plugins: { json },
|
|
language: 'json/json',
|
|
extends: ['json/recommended']
|
|
},
|
|
{
|
|
files: ['**/*.jsonc'],
|
|
plugins: { json },
|
|
language: 'json/jsonc',
|
|
extends: ['json/recommended']
|
|
},
|
|
{
|
|
files: ['**/*.json5'],
|
|
plugins: { json },
|
|
language: 'json/json5',
|
|
extends: ['json/recommended']
|
|
},
|
|
{ files: ['**/*.css'], plugins: { css }, language: 'css/css', extends: ['css/recommended'] }
|
|
])
|