mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 20:00:02 +00:00
build: Update ESLint to v9 (#16639)
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
const sharedOptions = require('@n8n/eslint-config/shared');
|
||||
|
||||
/**
|
||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||
*/
|
||||
module.exports = {
|
||||
extends: ['@n8n/eslint-config/node'],
|
||||
|
||||
...sharedOptions(__dirname),
|
||||
|
||||
parserOptions: {
|
||||
project: './tsconfig.json',
|
||||
},
|
||||
|
||||
ignorePatterns: ['bin/*.js', 'nodes-testing/*.ts'],
|
||||
|
||||
rules: {
|
||||
complexity: 'error',
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
|
||||
// TODO: Remove this
|
||||
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': true }],
|
||||
},
|
||||
};
|
||||
46
packages/core/eslint.config.mjs
Normal file
46
packages/core/eslint.config.mjs
Normal file
@@ -0,0 +1,46 @@
|
||||
import { defineConfig, globalIgnores } from 'eslint/config';
|
||||
import { nodeConfig } from '@n8n/eslint-config/node';
|
||||
|
||||
export default defineConfig(
|
||||
nodeConfig,
|
||||
globalIgnores(['bin/*.js', 'nodes-testing/*.ts']),
|
||||
{
|
||||
rules: {
|
||||
// TODO: Lower the complexity threshold
|
||||
complexity: ['error', 27],
|
||||
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
||||
|
||||
// TODO: Remove these
|
||||
'no-prototype-builtins': 'warn',
|
||||
'no-empty': 'warn',
|
||||
'no-ex-assign': 'warn',
|
||||
'no-useless-escape': 'warn',
|
||||
'@typescript-eslint/no-require-imports': 'warn',
|
||||
'@typescript-eslint/require-await': 'warn',
|
||||
'@typescript-eslint/no-base-to-string': 'warn',
|
||||
'@typescript-eslint/prefer-optional-chain': 'warn',
|
||||
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
|
||||
'@typescript-eslint/no-empty-object-type': 'warn',
|
||||
'@typescript-eslint/naming-convention': 'warn',
|
||||
'@typescript-eslint/no-array-delete': 'warn',
|
||||
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.test.ts', '**/test/**/*.ts', '**/__test__/**/*.ts', '**/__tests__/**/*.ts'],
|
||||
rules: {
|
||||
// TODO: Remove these
|
||||
'prefer-const': 'warn',
|
||||
'import-x/no-duplicates': 'warn',
|
||||
'import-x/no-default-export': 'warn',
|
||||
'n8n-local-rules/no-uncaught-json-parse': 'warn',
|
||||
'@typescript-eslint/no-unsafe-assignment': 'warn',
|
||||
'@typescript-eslint/no-unsafe-argument': 'warn',
|
||||
'@typescript-eslint/no-unsafe-call': 'warn',
|
||||
'@typescript-eslint/no-unsafe-return': 'warn',
|
||||
'@typescript-eslint/unbound-method': 'warn',
|
||||
'@typescript-eslint/no-unused-expressions': 'warn',
|
||||
'id-denylist': 'warn',
|
||||
},
|
||||
},
|
||||
);
|
||||
@@ -31,7 +31,7 @@ import { constructExecutionMetaData } from './utils/construct-execution-metadata
|
||||
import { copyInputItems } from './utils/copy-input-items';
|
||||
import { getDeduplicationHelperFunctions } from './utils/deduplication-helper-functions';
|
||||
import { getFileSystemHelperFunctions } from './utils/file-system-helper-functions';
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
// eslint-disable-next-line import-x/no-cycle
|
||||
import { getInputConnectionData } from './utils/get-input-connection-data';
|
||||
import { normalizeItems } from './utils/normalize-items';
|
||||
import { getRequestHelperFunctions } from './utils/request-helper-functions';
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
|
||||
import { createNodeAsTool } from './create-node-as-tool';
|
||||
import type { ExecuteContext, WebhookContext } from '../../node-execution-context';
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
// eslint-disable-next-line import-x/no-cycle
|
||||
import { SupplyDataContext } from '../../node-execution-context/supply-data-context';
|
||||
|
||||
function getNextRunIndex(runExecutionData: IRunExecutionData, nodeName: string) {
|
||||
|
||||
Reference in New Issue
Block a user