mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
build: Only enable no-argument-spread lint rule in node packages (#18378)
This commit is contained in:
@@ -24,7 +24,6 @@ export const localRulesPlugin = {
|
|||||||
'n8n-local-rules/no-interpolation-in-regular-string': 'error',
|
'n8n-local-rules/no-interpolation-in-regular-string': 'error',
|
||||||
'n8n-local-rules/no-unused-param-in-catch-clause': 'error',
|
'n8n-local-rules/no-unused-param-in-catch-clause': 'error',
|
||||||
'n8n-local-rules/no-useless-catch-throw': 'error',
|
'n8n-local-rules/no-useless-catch-throw': 'error',
|
||||||
'n8n-local-rules/no-argument-spread': 'warn', // TODO: mark error
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,17 +9,19 @@ export default defineConfig(
|
|||||||
// TODO: remove all the following rules
|
// TODO: remove all the following rules
|
||||||
eqeqeq: 'warn',
|
eqeqeq: 'warn',
|
||||||
'id-denylist': 'warn',
|
'id-denylist': 'warn',
|
||||||
'import-x/extensions': 'warn',
|
|
||||||
'prefer-spread': 'warn',
|
|
||||||
'no-case-declarations': 'warn',
|
'no-case-declarations': 'warn',
|
||||||
'no-extra-boolean-cast': 'warn',
|
'no-extra-boolean-cast': 'warn',
|
||||||
'no-empty': 'warn',
|
'no-empty': 'warn',
|
||||||
'no-prototype-builtins': 'warn',
|
'no-prototype-builtins': 'warn',
|
||||||
'import-x/order': 'warn',
|
|
||||||
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
|
|
||||||
'no-async-promise-executor': 'warn',
|
'no-async-promise-executor': 'warn',
|
||||||
'no-useless-escape': 'warn',
|
'no-useless-escape': 'warn',
|
||||||
|
|
||||||
|
'import-x/order': 'warn',
|
||||||
|
'import-x/extensions': 'warn',
|
||||||
|
|
||||||
|
'n8n-local-rules/no-argument-spread': 'warn', // TODO: mark error
|
||||||
|
|
||||||
|
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
|
||||||
'@typescript-eslint/naming-convention': ['error', { selector: 'memberLike', format: null }],
|
'@typescript-eslint/naming-convention': ['error', { selector: 'memberLike', format: null }],
|
||||||
'@typescript-eslint/no-explicit-any': 'warn', //812 warnings, better to fix in separate PR
|
'@typescript-eslint/no-explicit-any': 'warn', //812 warnings, better to fix in separate PR
|
||||||
'@typescript-eslint/no-non-null-assertion': 'warn', //665 errors, better to fix in separate PR
|
'@typescript-eslint/no-non-null-assertion': 'warn', //665 errors, better to fix in separate PR
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||||
/* eslint-disable id-denylist */
|
/* eslint-disable id-denylist */
|
||||||
/* eslint-disable prefer-spread */
|
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||||
|
|
||||||
import { Logger } from '@n8n/backend-common';
|
import { Logger } from '@n8n/backend-common';
|
||||||
|
|||||||
@@ -586,7 +586,7 @@ function getParentTypes(name: string): string[] {
|
|||||||
const types: string[] = [];
|
const types: string[] = [];
|
||||||
for (const typeName of type.extends) {
|
for (const typeName of type.extends) {
|
||||||
types.push(typeName);
|
types.push(typeName);
|
||||||
types.push.apply(types, getParentTypes(typeName)); // eslint-disable-line prefer-spread
|
types.push.apply(types, getParentTypes(typeName));
|
||||||
}
|
}
|
||||||
|
|
||||||
return types;
|
return types;
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ export default defineConfig(
|
|||||||
// TODO: remove all the following rules
|
// TODO: remove all the following rules
|
||||||
eqeqeq: 'warn',
|
eqeqeq: 'warn',
|
||||||
'id-denylist': 'warn',
|
'id-denylist': 'warn',
|
||||||
'prefer-spread': 'warn',
|
|
||||||
'no-empty': 'warn',
|
'no-empty': 'warn',
|
||||||
'no-useless-escape': 'warn',
|
'no-useless-escape': 'warn',
|
||||||
'no-prototype-builtins': 'warn',
|
'no-prototype-builtins': 'warn',
|
||||||
@@ -22,12 +21,16 @@ export default defineConfig(
|
|||||||
'no-dupe-else-if': 'warn',
|
'no-dupe-else-if': 'warn',
|
||||||
'no-extra-boolean-cast': 'warn',
|
'no-extra-boolean-cast': 'warn',
|
||||||
'no-fallthrough': 'warn',
|
'no-fallthrough': 'warn',
|
||||||
|
|
||||||
'import-x/extensions': 'warn',
|
'import-x/extensions': 'warn',
|
||||||
'import-x/no-default-export': 'warn',
|
'import-x/no-default-export': 'warn',
|
||||||
'import-x/export': 'warn',
|
'import-x/export': 'warn',
|
||||||
'import-x/order': 'warn',
|
'import-x/order': 'warn',
|
||||||
'import-x/no-default-export': 'warn',
|
'import-x/no-default-export': 'warn',
|
||||||
'import-x/no-extraneous-dependencies': 'warn',
|
'import-x/no-extraneous-dependencies': 'warn',
|
||||||
|
|
||||||
|
'n8n-local-rules/no-argument-spread': 'warn', // TODO: mark error
|
||||||
|
|
||||||
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
|
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
|
||||||
'@typescript-eslint/naming-convention': ['warn'],
|
'@typescript-eslint/naming-convention': ['warn'],
|
||||||
'@typescript-eslint/no-explicit-any': 'warn', //812 warnings, better to fix in separate PR
|
'@typescript-eslint/no-explicit-any': 'warn', //812 warnings, better to fix in separate PR
|
||||||
|
|||||||
@@ -44,6 +44,5 @@ const playwrightRoot = findProjectRoot('playwright.config.ts');
|
|||||||
* @returns An absolute path to the file or directory.
|
* @returns An absolute path to the file or directory.
|
||||||
*/
|
*/
|
||||||
export function resolveFromRoot(...pathSegments: string[]): string {
|
export function resolveFromRoot(...pathSegments: string[]): string {
|
||||||
// eslint-disable-next-line n8n-local-rules/no-argument-spread
|
|
||||||
return path.join(playwrightRoot, ...pathSegments);
|
return path.join(playwrightRoot, ...pathSegments);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||||
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
|
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
|
||||||
/* eslint-disable prefer-spread */
|
|
||||||
import get from 'lodash/get';
|
import get from 'lodash/get';
|
||||||
import isEqual from 'lodash/isEqual';
|
import isEqual from 'lodash/isEqual';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user