Files
n8n_Demo/n8n-n8n-1.109.2/packages/testing/playwright/eslint.config 2.mjs
Yep_Q 3db7af209c fix: 修复TypeScript配置错误并更新项目文档
详细说明:
- 修复了@n8n/config包的TypeScript配置错误
- 移除了不存在的jest-expect-message类型引用
- 清理了所有TypeScript构建缓存
- 更新了可行性分析文档,添加了技术实施方案
- 更新了Agent prompt文档
- 添加了会展策划工作流文档
- 包含了n8n-chinese-translation子项目
- 添加了exhibition-demo展示系统框架
2025-09-08 10:49:45 +08:00

72 lines
2.2 KiB
JavaScript
Executable File

import { baseConfig } from '@n8n/eslint-config/base';
import playwrightPlugin from 'eslint-plugin-playwright';
export default [
...baseConfig,
playwrightPlugin.configs['flat/recommended'],
{
ignores: ['playwright-report/**/*', 'ms-playwright-cache/**/*'],
},
{
rules: {
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/promise-function-async': 'off',
'n8n-local-rules/no-uncaught-json-parse': 'off',
'playwright/expect-expect': 'warn',
'playwright/max-nested-describe': 'warn',
'playwright/no-conditional-in-test': 'error',
'playwright/no-skipped-test': 'warn',
// Allow any naming convention for TestRequirements object properties
// This is specifically for workflow filenames and intercept keys that may not follow camelCase
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],
},
{
selector: 'typeLike',
format: ['PascalCase'],
},
{
selector: 'property',
format: ['camelCase', 'snake_case', 'UPPER_CASE'],
filter: {
// Allow any format for properties in TestRequirements objects (workflow files, intercept keys, etc.)
regex: '^(workflow|intercepts|storage|config)$',
match: false,
},
},
{
selector: 'objectLiteralProperty',
format: null, // Allow any format for object literal properties in TestRequirements
filter: {
// This allows workflow filenames and intercept keys to use any naming convention
regex: '\\.(json|spec\\.ts)$|[a-zA-Z0-9_-]+',
match: true,
},
},
],
'import-x/no-extraneous-dependencies': [
'error',
{
devDependencies: ['**/tests/**', '**/e2e/**', '**/playwright/**'],
optionalDependencies: false,
},
],
},
},
];