mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-17 05:29:44 +02:00
chore: Complete base package migration to Oxlint (#40257)
This commit is contained in:
parent
e18afc84cc
commit
72a4024161
File diff suppressed because it is too large
Load Diff
|
|
@ -1,10 +0,0 @@
|
|||
import { defineConfig } from 'eslint/config';
|
||||
import { baseConfig } from '@n8n/eslint-config/base';
|
||||
|
||||
export default defineConfig(baseConfig, {
|
||||
rules: {
|
||||
// TODO: Remove this
|
||||
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'warn',
|
||||
'@typescript-eslint/no-floating-promises': 'warn',
|
||||
},
|
||||
});
|
||||
13
packages/@n8n/extension-sdk/oxlint.config.mts
Normal file
13
packages/@n8n/extension-sdk/oxlint.config.mts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { baseConfig } from '@n8n/oxlint-config/base';
|
||||
import { defineConfig } from 'oxlint';
|
||||
|
||||
export default defineConfig({
|
||||
extends: [baseConfig],
|
||||
options: { typeAware: true },
|
||||
ignorePatterns: ['**/*.vue'],
|
||||
rules: {
|
||||
'typescript/no-deprecated': 'off',
|
||||
'typescript/no-floating-promises': 'off',
|
||||
'typescript/no-unnecessary-boolean-literal-compare': 'off',
|
||||
},
|
||||
});
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
"scripts": {
|
||||
"clean": "rimraf dist",
|
||||
"dev": "tsdown --watch",
|
||||
"lint": "eslint . --quiet",
|
||||
"lint": "oxlint src scripts --quiet",
|
||||
"typecheck": "pnpm --sequential run \"/^typecheck:.+/\"",
|
||||
"typecheck:frontend": "tsc --noEmit --project tsconfig.frontend.json",
|
||||
"typecheck:backend": "tsc --noEmit --project tsconfig.backend.json",
|
||||
|
|
@ -47,11 +47,14 @@
|
|||
"vue-router": "catalog:frontend"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@n8n/oxlint-config": "workspace:*",
|
||||
"@n8n/typescript-config": "workspace:*",
|
||||
"@vue/tsconfig": "catalog:frontend",
|
||||
"prettier": "catalog:",
|
||||
"tsdown": "catalog:",
|
||||
"@typescript/native": "catalog:typescript-tooling",
|
||||
"oxlint": "catalog:",
|
||||
"oxlint-tsgolint": "catalog:",
|
||||
"typescript": "catalog:typescript-tooling",
|
||||
"rimraf": "catalog:",
|
||||
"vite": "catalog:",
|
||||
|
|
|
|||
4
packages/@n8n/extension-sdk/scripts/tsconfig.json
Normal file
4
packages/@n8n/extension-sdk/scripts/tsconfig.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"extends": "../tsconfig.scripts.json",
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
8
packages/@n8n/extension-sdk/src/tsconfig.json
Normal file
8
packages/@n8n/extension-sdk/src/tsconfig.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"extends": "../tsconfig.common.json",
|
||||
"compilerOptions": {
|
||||
"composite": false,
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["**/*.ts"]
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
import { defineConfig } from 'eslint/config';
|
||||
import { baseConfig } from '@n8n/eslint-config/base';
|
||||
|
||||
export default defineConfig(
|
||||
baseConfig,
|
||||
{
|
||||
rules: {
|
||||
'import-x/no-extraneous-dependencies': 'error',
|
||||
'n8n-local-rules/no-dynamic-regexp': 'error',
|
||||
complexity: ['error', 23],
|
||||
|
||||
'id-denylist': 'warn',
|
||||
'no-fallthrough': 'warn',
|
||||
'no-useless-escape': 'warn',
|
||||
'no-extra-boolean-cast': 'warn',
|
||||
'no-case-declarations': 'warn',
|
||||
'no-prototype-builtins': 'warn',
|
||||
'@typescript-eslint/no-base-to-string': 'warn',
|
||||
'@typescript-eslint/no-redundant-type-constituents': 'warn',
|
||||
'@typescript-eslint/prefer-optional-chain': 'warn',
|
||||
'@typescript-eslint/return-await': ['error', 'always'],
|
||||
'@typescript-eslint/no-duplicate-type-constituents': 'warn',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.test.ts'],
|
||||
rules: {
|
||||
// TODO: remove these
|
||||
'prefer-const': 'warn',
|
||||
'@typescript-eslint/no-unused-expressions': 'warn',
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
||||
'@typescript-eslint/no-unsafe-assignment': 'warn',
|
||||
'@typescript-eslint/no-unsafe-return': 'warn',
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
'n8n-local-rules/no-dynamic-regexp': 'off',
|
||||
},
|
||||
},
|
||||
);
|
||||
45
packages/workflow/oxlint.config.mts
Normal file
45
packages/workflow/oxlint.config.mts
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import { baseConfig } from '@n8n/oxlint-config/base';
|
||||
import { defineConfig } from 'oxlint';
|
||||
|
||||
export default defineConfig({
|
||||
extends: [baseConfig],
|
||||
options: { typeAware: true },
|
||||
rules: {
|
||||
'import-x-alias/no-extraneous-dependencies': 'error',
|
||||
'n8n-local-rules/no-dynamic-regexp': 'error',
|
||||
complexity: ['error', 23],
|
||||
'id-denylist': 'off',
|
||||
'no-fallthrough': 'off',
|
||||
'no-useless-escape': 'off',
|
||||
'no-extra-boolean-cast': 'off',
|
||||
'no-case-declarations': 'off',
|
||||
'no-prototype-builtins': 'off',
|
||||
'typescript/no-base-to-string': 'off',
|
||||
'typescript/no-deprecated': 'off',
|
||||
'typescript/no-redundant-type-constituents': 'off',
|
||||
'typescript/prefer-optional-chain': 'off',
|
||||
'typescript/return-await': ['error', 'always'],
|
||||
'typescript/no-duplicate-type-constituents': 'off',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['src/telemetry-helpers.ts'],
|
||||
rules: {
|
||||
'no-unsafe-optional-chaining': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.test.ts'],
|
||||
rules: {
|
||||
'prefer-const': 'off',
|
||||
'typescript/no-unused-expressions': 'off',
|
||||
'typescript/no-explicit-any': 'off',
|
||||
'typescript/no-unsafe-member-access': 'off',
|
||||
'typescript/no-unsafe-assignment': 'off',
|
||||
'typescript/no-unsafe-return': 'off',
|
||||
'typescript/ban-ts-comment': 'off',
|
||||
'n8n-local-rules/no-dynamic-regexp': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
@ -32,8 +32,8 @@
|
|||
"build:unchecked": "tsc --build tsconfig.build.esm.json tsconfig.build.cjs.json --noCheck",
|
||||
"format": "biome format --write .",
|
||||
"format:check": "biome ci .",
|
||||
"lint": "eslint src --quiet",
|
||||
"lint:fix": "eslint src --fix",
|
||||
"lint": "oxlint src --quiet",
|
||||
"lint:fix": "oxlint src --fix",
|
||||
"watch": "tsc --build tsconfig.build.esm.json tsconfig.build.cjs.json --watch",
|
||||
"test": "vitest run",
|
||||
"test:unit": "vitest run",
|
||||
|
|
@ -47,6 +47,7 @@
|
|||
"devDependencies": {
|
||||
"@langchain/core": "catalog:",
|
||||
"@n8n/config": "workspace:*",
|
||||
"@n8n/oxlint-config": "workspace:*",
|
||||
"@n8n/playwright-janitor": "workspace:*",
|
||||
"@n8n/typescript-config": "workspace:*",
|
||||
"@n8n/vitest-config": "workspace:*",
|
||||
|
|
@ -63,6 +64,8 @@
|
|||
"fast-check": "catalog:",
|
||||
"jsdom": "catalog:",
|
||||
"nock": "catalog:",
|
||||
"oxlint": "catalog:",
|
||||
"oxlint-tsgolint": "catalog:",
|
||||
"typescript": "catalog:typescript",
|
||||
"vite": "catalog:",
|
||||
"vitest": "catalog:",
|
||||
|
|
|
|||
|
|
@ -2996,6 +2996,9 @@ importers:
|
|||
specifier: 3.25.76
|
||||
version: 3.25.76
|
||||
devDependencies:
|
||||
'@n8n/oxlint-config':
|
||||
specifier: workspace:*
|
||||
version: link:../oxlint-config
|
||||
'@n8n/typescript-config':
|
||||
specifier: workspace:*
|
||||
version: link:../typescript-config
|
||||
|
|
@ -3005,6 +3008,12 @@ importers:
|
|||
'@vue/tsconfig':
|
||||
specifier: catalog:frontend
|
||||
version: 0.7.0(@typescript/typescript6@6.0.2)(vue@3.5.26(@typescript/typescript6@6.0.2))
|
||||
oxlint:
|
||||
specifier: 'catalog:'
|
||||
version: 1.78.0(oxlint-tsgolint@0.21.1)
|
||||
oxlint-tsgolint:
|
||||
specifier: 'catalog:'
|
||||
version: 0.21.1
|
||||
prettier:
|
||||
specifier: 'catalog:'
|
||||
version: 3.6.2
|
||||
|
|
@ -8357,6 +8366,9 @@ importers:
|
|||
'@n8n/config':
|
||||
specifier: workspace:*
|
||||
version: link:../@n8n/config
|
||||
'@n8n/oxlint-config':
|
||||
specifier: workspace:*
|
||||
version: link:../@n8n/oxlint-config
|
||||
'@n8n/playwright-janitor':
|
||||
specifier: workspace:*
|
||||
version: link:../quality/testing/janitor
|
||||
|
|
@ -8405,6 +8417,12 @@ importers:
|
|||
nock:
|
||||
specifier: 'catalog:'
|
||||
version: 14.0.14
|
||||
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
|
||||
|
|
|
|||
|
|
@ -131,6 +131,9 @@
|
|||
"@n8n/engine#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
"@n8n/extension-sdk#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
"@n8n/errors#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
|
|
@ -209,6 +212,9 @@
|
|||
"n8n-playwright#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
"n8n-workflow#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
"n8n#lint": {
|
||||
"dependsOn": ["^build", "@n8n/oxlint-config#build"]
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user