ci: Add testing lint fix (#17197)

This commit is contained in:
shortstacked
2025-07-21 12:48:28 +01:00
committed by GitHub
parent 5ddf290795
commit 1cd5808846
6 changed files with 45 additions and 28 deletions

View File

@@ -43,3 +43,6 @@ jobs:
- name: Lint Frontend - name: Lint Frontend
run: pnpm lint:frontend run: pnpm lint:frontend
- name: Lint Testing
run: pnpm lint:testing

View File

@@ -37,6 +37,7 @@
"lint:backend": "turbo run lint:backend", "lint:backend": "turbo run lint:backend",
"lint:nodes": "turbo run lint:nodes", "lint:nodes": "turbo run lint:nodes",
"lint:frontend": "turbo run lint:frontend", "lint:frontend": "turbo run lint:frontend",
"lint:testing": "turbo run lint:testing",
"optimize-svg": "find ./packages -name '*.svg' ! -name 'pipedrive.svg' -print0 | xargs -0 -P16 -L20 npx svgo", "optimize-svg": "find ./packages -name '*.svg' ! -name 'pipedrive.svg' -print0 | xargs -0 -P16 -L20 npx svgo",
"setup-backend-module": "node scripts/ensure-zx.mjs && zx scripts/backend-module/setup.mjs", "setup-backend-module": "node scripts/ensure-zx.mjs && zx scripts/backend-module/setup.mjs",
"start": "run-script-os", "start": "run-script-os",

View File

@@ -1,10 +1,10 @@
import { PostgreSqlContainer } from '@testcontainers/postgresql'; import { PostgreSqlContainer } from '@testcontainers/postgresql';
import { RedisContainer } from '@testcontainers/redis'; import { RedisContainer } from '@testcontainers/redis';
import { setTimeout as wait } from 'node:timers/promises';
import type { StartedNetwork, StartedTestContainer } from 'testcontainers'; import type { StartedNetwork, StartedTestContainer } from 'testcontainers';
import { GenericContainer, Wait } from 'testcontainers'; import { GenericContainer, Wait } from 'testcontainers';
import { createSilentLogConsumer } from './n8n-test-container-utils'; import { createSilentLogConsumer } from './n8n-test-container-utils';
import { setTimeout as wait } from 'node:timers/promises';
export async function setupRedis({ export async function setupRedis({
redisImage, redisImage,

View File

@@ -1,4 +1,3 @@
/* eslint-disable import-x/no-extraneous-dependencies */
import type { FrontendSettings } from '@n8n/api-types'; import type { FrontendSettings } from '@n8n/api-types';
import type { BrowserContext, Route } from '@playwright/test'; import type { BrowserContext, Route } from '@playwright/test';
import cloneDeep from 'lodash/cloneDeep'; import cloneDeep from 'lodash/cloneDeep';

View File

@@ -1,9 +1,14 @@
import { defineConfig, globalIgnores } from 'eslint/config'; import { defineConfig } from 'eslint/config';
import { baseConfig } from '@n8n/eslint-config/base'; import { baseConfig } from '@n8n/eslint-config/base';
import playwrightPlugin from 'eslint-plugin-playwright'; import playwrightPlugin from 'eslint-plugin-playwright';
export default defineConfig(baseConfig, playwrightPlugin.configs['flat/recommended'], { export default defineConfig(
ignores: ['playwright-report/**'], {
ignores: ['**/playwright-report/**'],
},
baseConfig,
playwrightPlugin.configs['flat/recommended'],
{
rules: { rules: {
'@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/no-unsafe-argument': 'off',
@@ -27,4 +32,5 @@ export default defineConfig(baseConfig, playwrightPlugin.configs['flat/recommend
}, },
], ],
}, },
}); },
);

View File

@@ -83,6 +83,14 @@
"@n8n/json-schema-to-zod#lint" "@n8n/json-schema-to-zod#lint"
] ]
}, },
"lint:testing": {
"dependsOn": [
"@n8n/eslint-config#build",
"^build",
"n8n-playwright#lint",
"n8n-containers#lint"
]
},
"lint": { "lint": {
"dependsOn": ["^build", "@n8n/eslint-config#build"] "dependsOn": ["^build", "@n8n/eslint-config#build"]
}, },