mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-14 02:20:53 +08:00
【同步】前端项目源码
【修复】工作流兼容问题
This commit is contained in:
16
frontend/environment/eslint/src/vitest.js
Normal file
16
frontend/environment/eslint/src/vitest.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import tseslint from 'typescript-eslint'
|
||||
import pluginVitest from '@vitest/eslint-plugin' // vitest 插件,用于解析 .test 和 .spec 文件
|
||||
import pluginPlaywright from 'eslint-plugin-playwright' // playwright 插件,用于解析 playwright 测试
|
||||
|
||||
export default tseslint.config([
|
||||
// 配置 vitest 的 eslint 规则
|
||||
{
|
||||
...pluginVitest.configs.recommended,
|
||||
files: ['src/**/__tests__/*'],
|
||||
},
|
||||
// 配置 playwright 的 eslint 规则
|
||||
{
|
||||
...pluginPlaywright.configs['flat/recommended'],
|
||||
files: ['e2e/**/*.{test,spec}.{js,ts,jsx,tsx}'],
|
||||
},
|
||||
])
|
||||
Reference in New Issue
Block a user