mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-17 05:29:44 +02:00
chore: Migrate remaining simple base packages to Oxlint (#40255)
This commit is contained in:
parent
bec84a1dad
commit
e18afc84cc
|
|
@ -1,24 +0,0 @@
|
|||
import { defineConfig } from 'eslint/config';
|
||||
import { baseConfig } from '@n8n/eslint-config/base';
|
||||
|
||||
export default defineConfig(
|
||||
baseConfig,
|
||||
{
|
||||
rules: {
|
||||
'import-x/no-cycle': 'off',
|
||||
complexity: 'error',
|
||||
|
||||
// TODO: Remove this
|
||||
'no-constant-condition': 'warn',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.test.ts'],
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-expressions': 'warn',
|
||||
'@typescript-eslint/naming-convention': 'warn',
|
||||
'@typescript-eslint/no-unsafe-assignment': 'warn',
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
},
|
||||
},
|
||||
);
|
||||
23
packages/@n8n/json-schema-to-zod/oxlint.config.mts
Normal file
23
packages/@n8n/json-schema-to-zod/oxlint.config.mts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import { baseConfig } from '@n8n/oxlint-config/base';
|
||||
import { defineConfig } from 'oxlint';
|
||||
|
||||
export default defineConfig({
|
||||
extends: [baseConfig],
|
||||
options: { typeAware: true },
|
||||
rules: {
|
||||
'import/no-cycle': 'off',
|
||||
complexity: 'error',
|
||||
'no-constant-condition': 'off',
|
||||
'typescript/no-deprecated': 'off',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['**/*.test.ts'],
|
||||
rules: {
|
||||
'typescript/no-unused-expressions': 'off',
|
||||
'typescript/no-unsafe-assignment': 'off',
|
||||
'typescript/ban-ts-comment': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
@ -21,8 +21,8 @@
|
|||
"dev": "tsc -w",
|
||||
"format": "biome format --write src",
|
||||
"format:check": "biome ci src",
|
||||
"lint": "eslint src --quiet",
|
||||
"lint:fix": "eslint src --fix",
|
||||
"lint": "oxlint src --quiet",
|
||||
"lint:fix": "oxlint src --fix",
|
||||
"build:types": "tsc -p tsconfig.types.json",
|
||||
"build:cjs": "tsc -p tsconfig.cjs.json && node postcjs.cjs",
|
||||
"build:esm": "tsc -p tsconfig.esm.json && node postesm.cjs",
|
||||
|
|
@ -64,11 +64,14 @@
|
|||
"zod": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@n8n/oxlint-config": "workspace:*",
|
||||
"@n8n/typescript-config": "workspace:*",
|
||||
"@types/json-schema": "catalog:",
|
||||
"zod": "catalog:",
|
||||
"@n8n/vitest-config": "workspace:*",
|
||||
"@vitest/coverage-v8": "catalog:",
|
||||
"oxlint": "catalog:",
|
||||
"oxlint-tsgolint": "catalog:",
|
||||
"typescript": "catalog:typescript",
|
||||
"vitest": "catalog:"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
import { defineConfig } from 'eslint/config';
|
||||
import { baseConfig } from '@n8n/eslint-config/base';
|
||||
|
||||
export default defineConfig(
|
||||
{
|
||||
ignores: ['vite.*.config.mts', 'vitest.config.mts', 'scripts/**'],
|
||||
},
|
||||
baseConfig,
|
||||
{
|
||||
rules: {
|
||||
'unicorn/filename-case': ['error', { case: 'camelCase' }],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['src/**/*.test.ts', 'src/__tests__/**/*.ts'],
|
||||
rules: {
|
||||
'n8n-local-rules/no-uncaught-json-parse': 'off',
|
||||
'@typescript-eslint/no-unsafe-assignment': 'off',
|
||||
},
|
||||
},
|
||||
);
|
||||
21
packages/@n8n/mcp-browser-extension/oxlint.config.mts
Normal file
21
packages/@n8n/mcp-browser-extension/oxlint.config.mts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { baseConfig } from '@n8n/oxlint-config/base';
|
||||
import { defineConfig } from 'oxlint';
|
||||
|
||||
export default defineConfig({
|
||||
extends: [baseConfig],
|
||||
options: { typeAware: true },
|
||||
ignorePatterns: ['vite.*.config.mts', 'vitest.config.mts', 'scripts/**', '**/*.vue'],
|
||||
rules: {
|
||||
'typescript/no-deprecated': 'off',
|
||||
'unicorn/filename-case': ['error', { case: 'camelCase' }],
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['src/**/*.test.ts', 'src/__tests__/**/*.ts'],
|
||||
rules: {
|
||||
'n8n-local-rules/no-uncaught-json-parse': 'off',
|
||||
'typescript/no-unsafe-assignment': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
@ -9,8 +9,8 @@
|
|||
"build:unchecked": "pnpm run build",
|
||||
"bundle": "pnpm build && node scripts/bundle.mjs",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"lint": "eslint . --quiet",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"lint": "oxlint --quiet",
|
||||
"lint:fix": "oxlint --fix",
|
||||
"test": "vitest run",
|
||||
"test:unit": "vitest run",
|
||||
"test:dev": "vitest",
|
||||
|
|
@ -23,11 +23,14 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/lucide": "catalog:",
|
||||
"@n8n/oxlint-config": "workspace:*",
|
||||
"@n8n/typescript-config": "workspace:*",
|
||||
"@n8n/vitest-config": "workspace:*",
|
||||
"@types/chrome": "0.0.300",
|
||||
"@vitejs/plugin-vue": "catalog:frontend",
|
||||
"@vue/test-utils": "catalog:frontend",
|
||||
"oxlint": "catalog:",
|
||||
"oxlint-tsgolint": "catalog:",
|
||||
"unplugin-icons": "catalog:frontend",
|
||||
"@typescript/native": "catalog:typescript-tooling",
|
||||
"typescript": "catalog:typescript-tooling",
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
import { defineConfig } from 'eslint/config';
|
||||
import { baseConfig } from '@n8n/eslint-config/base';
|
||||
|
||||
export default defineConfig(
|
||||
baseConfig,
|
||||
{
|
||||
rules: {
|
||||
'@typescript-eslint/no-restricted-types': 'off',
|
||||
'@typescript-eslint/no-implied-eval': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
// Debt: the base layer enforces kebab-case filenames and this package has
|
||||
// 12 files that predate it. Rename them, then delete this block.
|
||||
rules: {
|
||||
'unicorn/filename-case': 'off',
|
||||
},
|
||||
},
|
||||
);
|
||||
14
packages/@n8n/tournament/oxlint.config.mts
Normal file
14
packages/@n8n/tournament/oxlint.config.mts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { baseConfig } from '@n8n/oxlint-config/base';
|
||||
import { defineConfig } from 'oxlint';
|
||||
|
||||
export default defineConfig({
|
||||
extends: [baseConfig],
|
||||
options: { typeAware: true },
|
||||
rules: {
|
||||
'typescript/no-deprecated': 'off',
|
||||
'typescript/no-restricted-types': 'off',
|
||||
'typescript/no-implied-eval': 'off',
|
||||
'typescript/no-explicit-any': 'off',
|
||||
'unicorn/filename-case': 'off',
|
||||
},
|
||||
});
|
||||
|
|
@ -22,8 +22,8 @@
|
|||
"test": "vitest run",
|
||||
"test:unit": "vitest run",
|
||||
"test:dev": "vitest --silent=false",
|
||||
"lint": "eslint src --quiet",
|
||||
"lint:fix": "eslint src --fix",
|
||||
"lint": "oxlint src --quiet",
|
||||
"lint:fix": "oxlint src --fix",
|
||||
"format": "biome format --write .",
|
||||
"format:check": "biome ci ."
|
||||
},
|
||||
|
|
@ -38,9 +38,12 @@
|
|||
"author": "",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.13.0",
|
||||
"@n8n/oxlint-config": "workspace:*",
|
||||
"@n8n/vitest-config": "workspace:*",
|
||||
"@types/node": "^18.13.0",
|
||||
"@vitest/coverage-v8": "catalog:",
|
||||
"oxlint": "catalog:",
|
||||
"oxlint-tsgolint": "catalog:",
|
||||
"vite": "catalog:",
|
||||
"vitest": "catalog:",
|
||||
"typescript": "catalog:typescript"
|
||||
|
|
|
|||
|
|
@ -3251,6 +3251,9 @@ importers:
|
|||
|
||||
packages/@n8n/json-schema-to-zod:
|
||||
devDependencies:
|
||||
'@n8n/oxlint-config':
|
||||
specifier: workspace:*
|
||||
version: link:../oxlint-config
|
||||
'@n8n/typescript-config':
|
||||
specifier: workspace:*
|
||||
version: link:../typescript-config
|
||||
|
|
@ -3263,6 +3266,12 @@ importers:
|
|||
'@vitest/coverage-v8':
|
||||
specifier: 'catalog:'
|
||||
version: 5.0.1(@vitest/browser@5.0.1)(vitest@5.0.1)
|
||||
oxlint:
|
||||
specifier: 'catalog:'
|
||||
version: 1.78.0(oxlint-tsgolint@0.21.1)
|
||||
oxlint-tsgolint:
|
||||
specifier: 'catalog:'
|
||||
version: 0.21.1
|
||||
typescript:
|
||||
specifier: catalog:typescript
|
||||
version: 7.0.2
|
||||
|
|
@ -3489,6 +3498,9 @@ importers:
|
|||
'@iconify-json/lucide':
|
||||
specifier: 'catalog:'
|
||||
version: 1.2.114
|
||||
'@n8n/oxlint-config':
|
||||
specifier: workspace:*
|
||||
version: link:../oxlint-config
|
||||
'@n8n/typescript-config':
|
||||
specifier: workspace:*
|
||||
version: link:../typescript-config
|
||||
|
|
@ -3507,6 +3519,12 @@ importers:
|
|||
'@vue/test-utils':
|
||||
specifier: catalog:frontend
|
||||
version: 2.4.6
|
||||
oxlint:
|
||||
specifier: 'catalog:'
|
||||
version: 1.78.0(oxlint-tsgolint@0.21.1)
|
||||
oxlint-tsgolint:
|
||||
specifier: 'catalog:'
|
||||
version: 0.21.1
|
||||
typescript:
|
||||
specifier: catalog:typescript-tooling
|
||||
version: '@typescript/typescript6@6.0.2'
|
||||
|
|
@ -4384,6 +4402,9 @@ importers:
|
|||
specifier: ^0.22.0
|
||||
version: 0.22.0
|
||||
devDependencies:
|
||||
'@n8n/oxlint-config':
|
||||
specifier: workspace:*
|
||||
version: link:../oxlint-config
|
||||
'@n8n/vitest-config':
|
||||
specifier: workspace:*
|
||||
version: link:../vitest-config
|
||||
|
|
@ -4393,6 +4414,12 @@ importers:
|
|||
'@vitest/coverage-v8':
|
||||
specifier: 'catalog:'
|
||||
version: 5.0.1(@vitest/browser@5.0.1)(vitest@5.0.1)
|
||||
oxlint:
|
||||
specifier: 'catalog:'
|
||||
version: 1.78.0(oxlint-tsgolint@0.21.1)
|
||||
oxlint-tsgolint:
|
||||
specifier: 'catalog:'
|
||||
version: 0.21.1
|
||||
typescript:
|
||||
specifier: catalog:typescript
|
||||
version: 7.0.2
|
||||
|
|
|
|||
|
|
@ -143,12 +143,18 @@
|
|||
"@n8n/instance-ai#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
"@n8n/json-schema-to-zod#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
"@n8n/local-gateway#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
"@n8n/mcp-browser#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
"@n8n/mcp-browser-extension#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
"@n8n/node-cli#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
|
|
@ -179,6 +185,9 @@
|
|||
"@n8n/task-runner#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
"@n8n/tournament#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
"@n8n/telemetry#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user