mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
refactor: Phase out TSLint in editor-ui
(no-changelog) (#4935)
* 🔥 Remove `tslint.json` * 🔥 Remove TSLint commands * 🔥 Remove exceptions in `editor-ui` * 🔥 Remove from `.npmignore` * 🔥 Remove from `eslint-config` * 🔥 Remove exception from `design-system` * 🎨 Prettify * 📦 Update pnpm-lock * 🔥 Remove duplicate import * 🔥 Remove exemption for `no-explicit-any` * 👕 Inline `no-explicit-any` exemptions
This commit is contained in:
parent
efa4c56757
commit
0e4cda5763
|
@ -23,7 +23,6 @@ yarn-error.log*
|
||||||
.editorconfig
|
.editorconfig
|
||||||
.eslintrc.js
|
.eslintrc.js
|
||||||
tsconfig.json
|
tsconfig.json
|
||||||
tslint.json
|
|
||||||
|
|
||||||
.turbo
|
.turbo
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
"eslint-plugin-import": "~2.26",
|
"eslint-plugin-import": "~2.26",
|
||||||
"eslint-plugin-n8n-local-rules": "~1.0",
|
"eslint-plugin-n8n-local-rules": "~1.0",
|
||||||
"eslint-plugin-prettier": "~4.2",
|
"eslint-plugin-prettier": "~4.2",
|
||||||
"eslint-plugin-vue": "~7.17",
|
"eslint-plugin-vue": "~7.17"
|
||||||
"tslint": "^6.1.3"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rimraf .turbo",
|
"clean": "rimraf .turbo",
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
/* tslint:disable:variable-name */
|
|
||||||
import N8nNodeCreatorNode from './NodeCreatorNode.vue';
|
import N8nNodeCreatorNode from './NodeCreatorNode.vue';
|
||||||
import { StoryFn } from '@storybook/vue';
|
import { StoryFn } from '@storybook/vue';
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ module.exports = {
|
||||||
'@typescript-eslint/naming-convention': 'off',
|
'@typescript-eslint/naming-convention': 'off',
|
||||||
'@typescript-eslint/no-duplicate-imports': 'off',
|
'@typescript-eslint/no-duplicate-imports': 'off',
|
||||||
'@typescript-eslint/no-empty-interface': 'off',
|
'@typescript-eslint/no-empty-interface': 'off',
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
|
||||||
'@typescript-eslint/no-floating-promises': 'off',
|
'@typescript-eslint/no-floating-promises': 'off',
|
||||||
'@typescript-eslint/no-for-in-array': 'off',
|
'@typescript-eslint/no-for-in-array': 'off',
|
||||||
'@typescript-eslint/no-loop-func': 'off',
|
'@typescript-eslint/no-loop-func': 'off',
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
"build": "cross-env VUE_APP_PUBLIC_PATH=\"/{{BASE_PATH}}/\" NODE_OPTIONS=\"--max-old-space-size=8192\" vite build",
|
"build": "cross-env VUE_APP_PUBLIC_PATH=\"/{{BASE_PATH}}/\" NODE_OPTIONS=\"--max-old-space-size=8192\" vite build",
|
||||||
"typecheck": "vue-tsc --emitDeclarationOnly",
|
"typecheck": "vue-tsc --emitDeclarationOnly",
|
||||||
"dev": "pnpm serve",
|
"dev": "pnpm serve",
|
||||||
"lint": "tslint -p tsconfig.json -c tslint.json && eslint --ext .js,.ts,.vue src",
|
"lint": "eslint --ext .js,.ts,.vue src",
|
||||||
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json && eslint --ext .js,.ts,.vue src --fix",
|
"lintfix": "eslint --ext .js,.ts,.vue src --fix",
|
||||||
"format": "prettier --write . --ignore-path ../../.prettierignore",
|
"format": "prettier --write . --ignore-path ../../.prettierignore",
|
||||||
"serve": "cross-env VUE_APP_URL_BASE_API=http://localhost:5678/ vite --host 0.0.0.0 --port 8080 dev",
|
"serve": "cross-env VUE_APP_URL_BASE_API=http://localhost:5678/ vite --host 0.0.0.0 --port 8080 dev",
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import { IMenuItem } from 'n8n-design-system';
|
import { IMenuItem } from 'n8n-design-system';
|
||||||
import {
|
import {
|
||||||
jsPlumbInstance,
|
jsPlumbInstance,
|
||||||
|
@ -75,19 +76,19 @@ declare module 'jsplumb' {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// bind(event: string, (connection: Connection): void;): void; // tslint:disable-line:no-any
|
// bind(event: string, (connection: Connection): void;): void;
|
||||||
bind(event: string, callback: Function): void;
|
bind(event: string, callback: Function): void;
|
||||||
removeOverlay(name: string): void;
|
removeOverlay(name: string): void;
|
||||||
removeOverlays(): void;
|
removeOverlays(): void;
|
||||||
setParameter(name: string, value: any): void; // tslint:disable-line:no-any
|
setParameter(name: string, value: any): void;
|
||||||
setPaintStyle(arg0: PaintStyle): void;
|
setPaintStyle(arg0: PaintStyle): void;
|
||||||
addOverlay(arg0: any[]): void; // tslint:disable-line:no-any
|
addOverlay(arg0: any[]): void;
|
||||||
setConnector(arg0: any[]): void; // tslint:disable-line:no-any
|
setConnector(arg0: any[]): void;
|
||||||
getUuids(): [string, string];
|
getUuids(): [string, string];
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Endpoint {
|
interface Endpoint {
|
||||||
endpoint: any; // tslint:disable-line:no-any
|
endpoint: any;
|
||||||
elementId: string;
|
elementId: string;
|
||||||
__meta?: {
|
__meta?: {
|
||||||
nodeName: string;
|
nodeName: string;
|
||||||
|
@ -96,7 +97,7 @@ declare module 'jsplumb' {
|
||||||
totalEndpoints: number;
|
totalEndpoints: number;
|
||||||
};
|
};
|
||||||
getUuid(): string;
|
getUuid(): string;
|
||||||
getOverlay(name: string): any; // tslint:disable-line:no-any
|
getOverlay(name: string): any;
|
||||||
repaint(params?: object): void;
|
repaint(params?: object): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,7 +220,7 @@ export interface IRestApi {
|
||||||
firstId?: string | number,
|
firstId?: string | number,
|
||||||
): Promise<IExecutionsListResponse>;
|
): Promise<IExecutionsListResponse>;
|
||||||
stopCurrentExecution(executionId: string): Promise<IExecutionsStopData>;
|
stopCurrentExecution(executionId: string): Promise<IExecutionsStopData>;
|
||||||
makeRestApiRequest(method: string, endpoint: string, data?: any): Promise<any>; // tslint:disable-line:no-any
|
makeRestApiRequest(method: string, endpoint: string, data?: any): Promise<any>;
|
||||||
getCredentialTranslation(credentialType: string): Promise<object>;
|
getCredentialTranslation(credentialType: string): Promise<object>;
|
||||||
removeTestWebhook(workflowId: string): Promise<boolean>;
|
removeTestWebhook(workflowId: string): Promise<boolean>;
|
||||||
runWorkflow(runData: IStartRunData): Promise<IExecutionPushResponse>;
|
runWorkflow(runData: IStartRunData): Promise<IExecutionPushResponse>;
|
||||||
|
|
|
@ -62,8 +62,8 @@ export default mixins(genericHelpers, debounceHelper).extend({
|
||||||
|
|
||||||
return 'SM';
|
return 'SM';
|
||||||
},
|
},
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
value(): any | undefined {
|
value(): any | undefined {
|
||||||
// tslint:disable-line:no-any
|
|
||||||
if (this.$props.valueXS !== undefined && this.$data.width < BREAKPOINT_SM) {
|
if (this.$props.valueXS !== undefined && this.$data.width < BREAKPOINT_SM) {
|
||||||
return this.$props.valueXS;
|
return this.$props.valueXS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -601,8 +601,8 @@ export default mixins(showMessage, nodeHelpers).extend({
|
||||||
Vue.set(this.credentialData, 'sharedWith', sharees);
|
Vue.set(this.credentialData, 'sharedWith', sharees);
|
||||||
this.hasUnsavedChanges = true;
|
this.hasUnsavedChanges = true;
|
||||||
},
|
},
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
onDataChange({ name, value }: { name: string; value: any }) {
|
onDataChange({ name, value }: { name: string; value: any }) {
|
||||||
// tslint:disable-line:no-any
|
|
||||||
this.hasUnsavedChanges = true;
|
this.hasUnsavedChanges = true;
|
||||||
|
|
||||||
const { oauthTokenData, ...credData } = this.credentialData;
|
const { oauthTokenData, ...credData } = this.credentialData;
|
||||||
|
|
|
@ -139,7 +139,8 @@ export default mixins(externalHooks, genericHelpers, debounceHelper).extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
itemSelected(eventData: IVariableItemSelected) {
|
itemSelected(eventData: IVariableItemSelected) {
|
||||||
(this.$refs.inputFieldExpression as any).itemSelected(eventData); // tslint:disable-line:no-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
(this.$refs.inputFieldExpression as any).itemSelected(eventData);
|
||||||
this.$externalHooks().run('expressionEdit.itemSelected', {
|
this.$externalHooks().run('expressionEdit.itemSelected', {
|
||||||
parameter: this.parameter,
|
parameter: this.parameter,
|
||||||
value: this.value,
|
value: this.value,
|
||||||
|
@ -215,8 +216,9 @@ export default mixins(externalHooks, genericHelpers, debounceHelper).extend({
|
||||||
this.latestValue = this.value;
|
this.latestValue = this.value;
|
||||||
|
|
||||||
const resolvedExpressionValue =
|
const resolvedExpressionValue =
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
(this.$refs.expressionResult && (this.$refs.expressionResult as any).getValue()) ||
|
(this.$refs.expressionResult && (this.$refs.expressionResult as any).getValue()) ||
|
||||||
undefined; // tslint:disable-line:no-any
|
undefined;
|
||||||
this.$externalHooks().run('expressionEdit.dialogVisibleChanged', {
|
this.$externalHooks().run('expressionEdit.dialogVisibleChanged', {
|
||||||
dialogVisible: newValue,
|
dialogVisible: newValue,
|
||||||
parameter: this.parameter,
|
parameter: this.parameter,
|
||||||
|
|
|
@ -70,7 +70,8 @@ export default Vue.extend({
|
||||||
cursor +=
|
cursor +=
|
||||||
segment.kind === 'plaintext'
|
segment.kind === 'plaintext'
|
||||||
? segment.plaintext.length
|
? segment.plaintext.length
|
||||||
: (segment.resolved as any).toString().length;
|
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
(segment.resolved as any).toString().length;
|
||||||
|
|
||||||
segment.to = cursor;
|
segment.to = cursor;
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,8 @@ export default Vue.extend({
|
||||||
cursor +=
|
cursor +=
|
||||||
segment.kind === 'plaintext'
|
segment.kind === 'plaintext'
|
||||||
? segment.plaintext.length
|
? segment.plaintext.length
|
||||||
: (segment.resolved as any).toString().length;
|
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
(segment.resolved as any).toString().length;
|
||||||
segment.to = cursor;
|
segment.to = cursor;
|
||||||
return segment;
|
return segment;
|
||||||
})
|
})
|
||||||
|
|
|
@ -87,7 +87,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="node-options no-select-on-click" v-if="!isReadOnly" v-show="!hideActions">
|
<div class="node-options no-select-on-click" v-if="!isReadOnly" v-show="!hideActions">
|
||||||
<div v-touch:tap="deleteNode" class="option" :title="$locale.baseText('node.deleteNode')" data-test-id="delete-node-button">
|
<div
|
||||||
|
v-touch:tap="deleteNode"
|
||||||
|
class="option"
|
||||||
|
:title="$locale.baseText('node.deleteNode')"
|
||||||
|
data-test-id="delete-node-button"
|
||||||
|
>
|
||||||
<font-awesome-icon icon="trash" />
|
<font-awesome-icon icon="trash" />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -97,6 +97,7 @@ const draggableStyle = computed<{ top: string; left: string }>(() => ({
|
||||||
|
|
||||||
const isCommunityNode = computed<boolean>(() => isCommunityPackageName(props.nodeType.name));
|
const isCommunityNode = computed<boolean>(() => isCommunityPackageName(props.nodeType.name));
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const displayName = computed<any>(() => {
|
const displayName = computed<any>(() => {
|
||||||
const displayName = props.nodeType.displayName.trimEnd();
|
const displayName = props.nodeType.displayName.trimEnd();
|
||||||
|
|
||||||
|
|
|
@ -428,6 +428,7 @@ export default mixins(externalHooks, nodeHelpers).extend({
|
||||||
|
|
||||||
try {
|
try {
|
||||||
parameters = JSON.parse(parameters) as {
|
parameters = JSON.parse(parameters) as {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -444,14 +444,16 @@ export default mixins(
|
||||||
shortcuts: [
|
shortcuts: [
|
||||||
{
|
{
|
||||||
text: 'Today', // TODO
|
text: 'Today', // TODO
|
||||||
// tslint:disable-next-line:no-any
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
onClick(picker: any) {
|
onClick(picker: any) {
|
||||||
picker.$emit('pick', new Date());
|
picker.$emit('pick', new Date());
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Yesterday', // TODO
|
text: 'Yesterday', // TODO
|
||||||
// tslint:disable-next-line:no-any
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
onClick(picker: any) {
|
onClick(picker: any) {
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
||||||
|
@ -460,7 +462,8 @@ export default mixins(
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'A week ago', // TODO
|
text: 'A week ago', // TODO
|
||||||
// tslint:disable-next-line:no-any
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
onClick(picker: any) {
|
onClick(picker: any) {
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
|
|
|
@ -188,7 +188,8 @@ export default mixins(showMessage).extend({
|
||||||
focusOnTag(tagId: string) {
|
focusOnTag(tagId: string) {
|
||||||
const tagOptions = (this.$refs.tag as Vue[]) || [];
|
const tagOptions = (this.$refs.tag as Vue[]) || [];
|
||||||
if (tagOptions && tagOptions.length) {
|
if (tagOptions && tagOptions.length) {
|
||||||
const added = tagOptions.find((ref: any) => ref.value === tagId); // tslint:disable-line:no-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const added = tagOptions.find((ref: any) => ref.value === tagId);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
focusOnInput() {
|
focusOnInput() {
|
||||||
|
|
|
@ -171,7 +171,8 @@ export default Vue.extend({
|
||||||
|
|
||||||
focusOnInput(): void {
|
focusOnInput(): void {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const input = this.$refs.nameInput as any; // tslint:disable-line:no-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const input = this.$refs.nameInput as any;
|
||||||
if (input && input.focus) {
|
if (input && input.focus) {
|
||||||
input.focus();
|
input.focus();
|
||||||
}
|
}
|
||||||
|
@ -180,7 +181,8 @@ export default Vue.extend({
|
||||||
|
|
||||||
focusOnDelete(): void {
|
focusOnDelete(): void {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const input = this.$refs.deleteHiddenInput as any; // tslint:disable-line:no-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const input = this.$refs.deleteHiddenInput as any;
|
||||||
if (input && input.focus) {
|
if (input && input.focus) {
|
||||||
input.focus();
|
input.focus();
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,7 +259,10 @@
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div v-if="workflowSettings.executionTimeout > -1" data-test-id="workflow-settings-timeout-form">
|
<div
|
||||||
|
v-if="workflowSettings.executionTimeout > -1"
|
||||||
|
data-test-id="workflow-settings-timeout-form"
|
||||||
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10" class="setting-name">
|
<el-col :span="10" class="setting-name">
|
||||||
{{ $locale.baseText('workflowSettings.timeoutAfter') + ':' }}
|
{{ $locale.baseText('workflowSettings.timeoutAfter') + ':' }}
|
||||||
|
@ -334,7 +337,11 @@ import {
|
||||||
WorkflowCallerPolicyDefaultOption,
|
WorkflowCallerPolicyDefaultOption,
|
||||||
} from '@/Interface';
|
} from '@/Interface';
|
||||||
import Modal from './Modal.vue';
|
import Modal from './Modal.vue';
|
||||||
import {EnterpriseEditionFeature, PLACEHOLDER_EMPTY_WORKFLOW_ID, WORKFLOW_SETTINGS_MODAL_KEY} from '../constants';
|
import {
|
||||||
|
EnterpriseEditionFeature,
|
||||||
|
PLACEHOLDER_EMPTY_WORKFLOW_ID,
|
||||||
|
WORKFLOW_SETTINGS_MODAL_KEY,
|
||||||
|
} from '../constants';
|
||||||
|
|
||||||
import mixins from 'vue-typed-mixins';
|
import mixins from 'vue-typed-mixins';
|
||||||
|
|
||||||
|
@ -409,7 +416,9 @@ export default mixins(externalHooks, genericHelpers, restApi, showMessage).exten
|
||||||
return this.workflowsStore.workflowId;
|
return this.workflowsStore.workflowId;
|
||||||
},
|
},
|
||||||
isWorkflowSharingEnabled(): boolean {
|
isWorkflowSharingEnabled(): boolean {
|
||||||
return this.settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.WorkflowSharing);
|
return this.settingsStore.isEnterpriseFeatureEnabled(
|
||||||
|
EnterpriseEditionFeature.WorkflowSharing,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
|
|
|
@ -4,11 +4,11 @@ import Vue from 'vue';
|
||||||
export const debounceHelper = Vue.extend({
|
export const debounceHelper = Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
debouncedFunctions: [] as any[], // tslint:disable-line:no-any
|
debouncedFunctions: [] as any[],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// tslint:disable-next-line:no-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
async callDebounced(...inputParameters: any[]): Promise<void> {
|
async callDebounced(...inputParameters: any[]): Promise<void> {
|
||||||
const functionName = inputParameters.shift() as string;
|
const functionName = inputParameters.shift() as string;
|
||||||
const { trailing, debounceTime } = inputParameters.shift();
|
const { trailing, debounceTime } = inputParameters.shift();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
// tslint:disable-next-line:no-any
|
|
||||||
function broadcast(componentName: string, eventName: string, params: any) {
|
function broadcast(componentName: string, eventName: string, params: any) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
(this as Vue).$children.forEach((child) => {
|
(this as Vue).$children.forEach((child) => {
|
||||||
|
@ -19,7 +19,6 @@ function broadcast(componentName: string, eventName: string, params: any) {
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
methods: {
|
methods: {
|
||||||
// tslint:disable-next-line:no-any
|
|
||||||
$dispatch(componentName: string, eventName: string, params: any) {
|
$dispatch(componentName: string, eventName: string, params: any) {
|
||||||
let parent = this.$parent || this.$root;
|
let parent = this.$parent || this.$root;
|
||||||
let name = parent.$options.name;
|
let name = parent.$options.name;
|
||||||
|
@ -37,7 +36,7 @@ export default Vue.extend({
|
||||||
parent.$emit.apply(parent, [eventName].concat(params));
|
parent.$emit.apply(parent, [eventName].concat(params));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// tslint:disable-next-line:no-any
|
|
||||||
$broadcast(componentName: string, eventName: string, params: any) {
|
$broadcast(componentName: string, eventName: string, params: any) {
|
||||||
broadcast.call(this, componentName, eventName, params);
|
broadcast.call(this, componentName, eventName, params);
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,7 +6,8 @@ import mixins from 'vue-typed-mixins';
|
||||||
export const genericHelpers = mixins(showMessage).extend({
|
export const genericHelpers = mixins(showMessage).extend({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loadingService: null as any | null, // tslint:disable-line:no-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
loadingService: null as any | null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -65,7 +65,7 @@ export const restApi = Vue.extend({
|
||||||
method: Method,
|
method: Method,
|
||||||
endpoint: string,
|
endpoint: string,
|
||||||
data?: IDataObject,
|
data?: IDataObject,
|
||||||
// tslint:disable-next-line:no-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
return makeRestApiRequest(self.rootStore.getRestApiContext, method, endpoint, data);
|
return makeRestApiRequest(self.rootStore.getRestApiContext, method, endpoint, data);
|
||||||
},
|
},
|
||||||
|
|
|
@ -68,7 +68,6 @@ import { useTemplatesStore } from '@/stores/templates';
|
||||||
import { useNodeTypesStore } from '@/stores/nodeTypes';
|
import { useNodeTypesStore } from '@/stores/nodeTypes';
|
||||||
import { useUsersStore } from '@/stores/users';
|
import { useUsersStore } from '@/stores/users';
|
||||||
import { useWorkflowsEEStore } from '@/stores/workflows.ee';
|
import { useWorkflowsEEStore } from '@/stores/workflows.ee';
|
||||||
import { ICredentialMap, ICredentialsResponse, IUsedCredential } from '@/Interface';
|
|
||||||
import { getWorkflowPermissions, IPermissions } from '@/permissions';
|
import { getWorkflowPermissions, IPermissions } from '@/permissions';
|
||||||
import { ICredentialsResponse } from '@/Interface';
|
import { ICredentialsResponse } from '@/Interface';
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ import {
|
||||||
import { faStickyNote } from '@fortawesome/free-regular-svg-icons';
|
import { faStickyNote } from '@fortawesome/free-regular-svg-icons';
|
||||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||||
|
|
||||||
// tslint:disable-next-line:no-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
function addIcon(icon: any) {
|
function addIcon(icon: any) {
|
||||||
library.add(icon as IconDefinition);
|
library.add(icon as IconDefinition);
|
||||||
}
|
}
|
||||||
|
|
2
packages/editor-ui/src/shims.d.ts
vendored
2
packages/editor-ui/src/shims.d.ts
vendored
|
@ -10,9 +10,7 @@ declare global {
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace JSX {
|
namespace JSX {
|
||||||
// tslint:disable no-empty-interface
|
|
||||||
interface Element extends VNode {}
|
interface Element extends VNode {}
|
||||||
// tslint:disable no-empty-interface
|
|
||||||
interface ElementClass extends Vue {}
|
interface ElementClass extends Vue {}
|
||||||
interface IntrinsicElements {
|
interface IntrinsicElements {
|
||||||
[elem: string]: any;
|
[elem: string]: any;
|
||||||
|
|
|
@ -125,7 +125,6 @@ export const useNodeTypesStore = defineStore(STORES.NODE_TYPES, {
|
||||||
Vue.set(this, 'nodeTypes', nodeTypes);
|
Vue.set(this, 'nodeTypes', nodeTypes);
|
||||||
|
|
||||||
// Trigger compute of mergedAppNodes getter so it's ready when user opens the node creator
|
// Trigger compute of mergedAppNodes getter so it's ready when user opens the node creator
|
||||||
// tslint:disable-next-line: no-unused-expression
|
|
||||||
useNodeCreatorStore().mergedAppNodes;
|
useNodeCreatorStore().mergedAppNodes;
|
||||||
},
|
},
|
||||||
removeNodeTypes(nodeTypesToRemove: INodeTypeDescription[]): void {
|
removeNodeTypes(nodeTypesToRemove: INodeTypeDescription[]): void {
|
||||||
|
|
|
@ -557,7 +557,7 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||||
][sourceData.index]) {
|
][sourceData.index]) {
|
||||||
for (propertyName of checkProperties) {
|
for (propertyName of checkProperties) {
|
||||||
if (
|
if (
|
||||||
// tslint:disable-next-line:no-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
(existingConnection as any)[propertyName] !== (destinationData as any)[propertyName]
|
(existingConnection as any)[propertyName] !== (destinationData as any)[propertyName]
|
||||||
) {
|
) {
|
||||||
continue connectionLoop;
|
continue connectionLoop;
|
||||||
|
|
|
@ -202,7 +202,8 @@ function getValue<T extends object>(obj: T, prop: string): unknown {
|
||||||
}
|
}
|
||||||
|
|
||||||
const segments = prop.split('.');
|
const segments = prop.split('.');
|
||||||
let result: any = obj; // tslint:disable-line:no-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
let result: any = obj;
|
||||||
let i = 0;
|
let i = 0;
|
||||||
while (result && i < segments.length) {
|
while (result && i < segments.length) {
|
||||||
result = result[segments[i]];
|
result = result[segments[i]];
|
||||||
|
|
|
@ -2401,6 +2401,7 @@ export default mixins(
|
||||||
this.canvasStore.setZoomLevel(1, 0);
|
this.canvasStore.setZoomLevel(1, 0);
|
||||||
this.canvasStore.zoomToFit();
|
this.canvasStore.zoomToFit();
|
||||||
},
|
},
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
tryToAddWelcomeSticky: once(async function (this: any) {
|
tryToAddWelcomeSticky: once(async function (this: any) {
|
||||||
const newWorkflow = this.workflowData;
|
const newWorkflow = this.workflowData;
|
||||||
if (window.posthog?.getFeatureFlag?.('welcome-note') === 'test') {
|
if (window.posthog?.getFeatureFlag?.('welcome-note') === 'test') {
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
<n8n-action-box
|
<n8n-action-box
|
||||||
:heading="$locale.baseText('settings.users.setupToInviteUsers')"
|
:heading="$locale.baseText('settings.users.setupToInviteUsers')"
|
||||||
:buttonText="$locale.baseText('settings.users.setupMyAccount')"
|
:buttonText="$locale.baseText('settings.users.setupMyAccount')"
|
||||||
:description="`${isSharingEnabled ? '' : $locale.baseText('settings.users.setupToInviteUsersInfo')}${$locale.baseText('settings.users.setupSMTPInfo')}`"
|
:description="`${
|
||||||
|
isSharingEnabled ? '' : $locale.baseText('settings.users.setupToInviteUsersInfo')
|
||||||
|
}${$locale.baseText('settings.users.setupSMTPInfo')}`"
|
||||||
@click="redirectToSetup"
|
@click="redirectToSetup"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -51,11 +53,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {
|
import { EnterpriseEditionFeature, INVITE_USER_MODAL_KEY, VIEWS } from '@/constants';
|
||||||
EnterpriseEditionFeature,
|
|
||||||
INVITE_USER_MODAL_KEY,
|
|
||||||
VIEWS,
|
|
||||||
} from '@/constants';
|
|
||||||
|
|
||||||
import PageAlert from '../components/PageAlert.vue';
|
import PageAlert from '../components/PageAlert.vue';
|
||||||
import { IUser } from '@/Interface';
|
import { IUser } from '@/Interface';
|
||||||
|
|
|
@ -1,75 +0,0 @@
|
||||||
{
|
|
||||||
"linterOptions": {
|
|
||||||
"exclude": ["node_modules/**/*", "../../node_modules/**/*", "**/*.json"]
|
|
||||||
},
|
|
||||||
"defaultSeverity": "error",
|
|
||||||
"jsRules": {},
|
|
||||||
"rules": {
|
|
||||||
"array-type": [true, "array-simple"],
|
|
||||||
"arrow-return-shorthand": true,
|
|
||||||
"ban": [
|
|
||||||
true,
|
|
||||||
{
|
|
||||||
"name": "Array",
|
|
||||||
"message": "tsstyle#array-constructor"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ban-types": [
|
|
||||||
true,
|
|
||||||
["Object", "Use {} instead."],
|
|
||||||
["String", "Use 'string' instead."],
|
|
||||||
["Number", "Use 'number' instead."],
|
|
||||||
["Boolean", "Use 'boolean' instead."]
|
|
||||||
],
|
|
||||||
"class-name": true,
|
|
||||||
"curly": [true, "ignore-same-line"],
|
|
||||||
"forin": true,
|
|
||||||
"jsdoc-format": true,
|
|
||||||
"label-position": true,
|
|
||||||
"indent": [true, "tabs", 2],
|
|
||||||
"member-access": [true, "no-public"],
|
|
||||||
"new-parens": true,
|
|
||||||
"no-angle-bracket-type-assertion": true,
|
|
||||||
"no-any": true,
|
|
||||||
"no-arg": true,
|
|
||||||
"no-conditional-assignment": true,
|
|
||||||
"no-construct": true,
|
|
||||||
"no-debugger": true,
|
|
||||||
// "no-default-export": true,
|
|
||||||
"no-duplicate-variable": true,
|
|
||||||
"no-inferrable-types": true,
|
|
||||||
"no-reference": true,
|
|
||||||
"no-string-throw": true,
|
|
||||||
"no-unused-expression": true,
|
|
||||||
"no-var-keyword": true,
|
|
||||||
"object-literal-shorthand": true,
|
|
||||||
"only-arrow-functions": [true, "allow-declarations", "allow-named-functions"],
|
|
||||||
"prefer-const": true,
|
|
||||||
"radix": true,
|
|
||||||
"semicolon": [true, "always", "ignore-bound-class-methods"],
|
|
||||||
"switch-default": true,
|
|
||||||
"trailing-comma": [
|
|
||||||
true,
|
|
||||||
{
|
|
||||||
"multiline": {
|
|
||||||
"objects": "always",
|
|
||||||
"arrays": "always",
|
|
||||||
"functions": "always",
|
|
||||||
"typeLiterals": "ignore"
|
|
||||||
},
|
|
||||||
"esSpecCompliant": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"triple-equals": [true, "allow-null-check"],
|
|
||||||
"use-isnan": true,
|
|
||||||
"quotes": ["error", "single"],
|
|
||||||
"variable-name": [
|
|
||||||
true,
|
|
||||||
"check-format",
|
|
||||||
"ban-keywords",
|
|
||||||
"allow-leading-underscore",
|
|
||||||
"allow-trailing-underscore"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"rulesDirectory": []
|
|
||||||
}
|
|
|
@ -73,7 +73,6 @@ importers:
|
||||||
eslint-plugin-n8n-local-rules: ~1.0
|
eslint-plugin-n8n-local-rules: ~1.0
|
||||||
eslint-plugin-prettier: ~4.2
|
eslint-plugin-prettier: ~4.2
|
||||||
eslint-plugin-vue: ~7.17
|
eslint-plugin-vue: ~7.17
|
||||||
tslint: ^6.1.3
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@types/eslint': 8.4.6
|
'@types/eslint': 8.4.6
|
||||||
'@typescript-eslint/eslint-plugin': 5.45.0_psz44bhp76u27vmulntnlx26h4
|
'@typescript-eslint/eslint-plugin': 5.45.0_psz44bhp76u27vmulntnlx26h4
|
||||||
|
@ -87,7 +86,6 @@ importers:
|
||||||
eslint-plugin-n8n-local-rules: 1.0.0
|
eslint-plugin-n8n-local-rules: 1.0.0
|
||||||
eslint-plugin-prettier: 4.2.1_pgxuib4rd7wiymfktharf5ydt4
|
eslint-plugin-prettier: 4.2.1_pgxuib4rd7wiymfktharf5ydt4
|
||||||
eslint-plugin-vue: 7.17.0_eslint@8.28.0
|
eslint-plugin-vue: 7.17.0_eslint@8.28.0
|
||||||
tslint: 6.1.3_typescript@4.8.4
|
|
||||||
|
|
||||||
packages/cli:
|
packages/cli:
|
||||||
specifiers:
|
specifiers:
|
||||||
|
@ -8193,11 +8191,6 @@ packages:
|
||||||
dev: false
|
dev: false
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
/builtin-modules/1.1.1:
|
|
||||||
resolution: {integrity: sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==}
|
|
||||||
engines: {node: '>=0.10.0'}
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/builtin-status-codes/3.0.0:
|
/builtin-status-codes/3.0.0:
|
||||||
resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==}
|
resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==}
|
||||||
dev: true
|
dev: true
|
||||||
|
@ -20454,44 +20447,11 @@ packages:
|
||||||
/tslib/2.4.0:
|
/tslib/2.4.0:
|
||||||
resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==}
|
resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==}
|
||||||
|
|
||||||
/tslint/6.1.3_typescript@4.8.4:
|
|
||||||
resolution: {integrity: sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==}
|
|
||||||
engines: {node: '>=4.8.0'}
|
|
||||||
deprecated: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
|
|
||||||
hasBin: true
|
|
||||||
peerDependencies:
|
|
||||||
typescript: '>=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev'
|
|
||||||
dependencies:
|
|
||||||
'@babel/code-frame': 7.18.6
|
|
||||||
builtin-modules: 1.1.1
|
|
||||||
chalk: 2.4.2
|
|
||||||
commander: 2.20.3
|
|
||||||
diff: 4.0.2
|
|
||||||
glob: 7.2.3
|
|
||||||
js-yaml: 3.14.1
|
|
||||||
minimatch: 3.1.2
|
|
||||||
mkdirp: 0.5.6
|
|
||||||
resolve: 1.22.1
|
|
||||||
semver: 5.7.1
|
|
||||||
tslib: 1.14.1
|
|
||||||
tsutils: 2.29.0_typescript@4.8.4
|
|
||||||
typescript: 4.8.4
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/tsscmp/1.0.6:
|
/tsscmp/1.0.6:
|
||||||
resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==}
|
resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==}
|
||||||
engines: {node: '>=0.6.x'}
|
engines: {node: '>=0.6.x'}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/tsutils/2.29.0_typescript@4.8.4:
|
|
||||||
resolution: {integrity: sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==}
|
|
||||||
peerDependencies:
|
|
||||||
typescript: '>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev'
|
|
||||||
dependencies:
|
|
||||||
tslib: 1.14.1
|
|
||||||
typescript: 4.8.4
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/tsutils/3.21.0_typescript@4.8.4:
|
/tsutils/3.21.0_typescript@4.8.4:
|
||||||
resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
|
resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
|
||||||
engines: {node: '>= 6'}
|
engines: {node: '>= 6'}
|
||||||
|
|
Loading…
Reference in a new issue