mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
ci: Add testing lint fix (#17197)
This commit is contained in:
3
.github/workflows/linting-reusable.yml
vendored
3
.github/workflows/linting-reusable.yml
vendored
@@ -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
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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';
|
||||||
|
|||||||
@@ -1,30 +1,36 @@
|
|||||||
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/**'],
|
{
|
||||||
rules: {
|
ignores: ['**/playwright-report/**'],
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
|
||||||
'@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',
|
|
||||||
'import-x/no-extraneous-dependencies': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
devDependencies: ['**/tests/**', '**/e2e/**', '**/playwright/**'],
|
|
||||||
optionalDependencies: false,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
});
|
baseConfig,
|
||||||
|
playwrightPlugin.configs['flat/recommended'],
|
||||||
|
{
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
|
'@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',
|
||||||
|
'import-x/no-extraneous-dependencies': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
devDependencies: ['**/tests/**', '**/e2e/**', '**/playwright/**'],
|
||||||
|
optionalDependencies: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|||||||
@@ -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"]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user