ims-front/eslint.config.js
my_ong 0b6c1e9000
All checks were successful
Release / lint (push) Successful in 29s
Release / Release (push) Successful in 1m21s
art: 🎨 页面全局提示
2025-01-10 10:23:42 +08:00

45 lines
1.1 KiB
JavaScript

import globals from 'globals'
import pluginJs from '@eslint/js'
import tseslint from 'typescript-eslint'
import pluginVue from 'eslint-plugin-vue'
import pluginPrettierRecommendedConfigs from 'eslint-plugin-prettier/recommended'
import parserVue from 'vue-eslint-parser'
import { readFileSync } from 'fs'
const fileUrl = new URL('./.eslintrc-auto-import.json', import.meta.url)
const esAuto = JSON.parse(readFileSync(fileUrl))
export default [
// eslint 默认推荐规则
pluginJs.configs.recommended,
// ts 默认推荐规则
...tseslint.configs.recommended,
// vue3 基础推荐规则
...pluginVue.configs['flat/recommended'],
// prettier 默认推荐规则
pluginPrettierRecommendedConfigs,
{
languageOptions: {
globals: {
...globals.browser,
...globals.es2020,
...globals.node,
...esAuto.globals,
acl: true,
dictionary: true,
sensor: true,
station: true,
material: true,
},
ecmaVersion: 2020,
parser: parserVue,
parserOptions: {
parser: tseslint.parser,
},
},
},
{
ignores: ['public/', 'index.html', 'report.html'],
},
]