mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
ci: Ensure that eslint runs on all frontend code (no-changelog) (#4602)
* ensure that eslint runs on all frontend code * remove tslint from `design-system` * enable prettier and eslint-prettier for `design-system` * Delete tslint.json * use a single editorconfig for the repo * enable prettier for all code in `design-system` * more linting fixes on design-system * ignore coverage for git and prettier * lintfix on editor-ui
This commit is contained in:
committed by
GitHub
parent
d96d6f11db
commit
13659d036f
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<ResizeObserver
|
||||
:breakpoints="[{bp: 'md', width: 500}]"
|
||||
>
|
||||
<ResizeObserver :breakpoints="[{ bp: 'md', width: 500 }]">
|
||||
<template v-slot="{ bp }">
|
||||
<div :class="bp === 'md' || columnView? $style.grid : $style.gridMulti">
|
||||
<div
|
||||
v-for="(input) in filteredInputs"
|
||||
:key="input.name"
|
||||
>
|
||||
<n8n-text color="text-base" v-if="input.properties.type === 'info'" tag="div" align="center">
|
||||
{{input.properties.label}}
|
||||
<div :class="bp === 'md' || columnView ? $style.grid : $style.gridMulti">
|
||||
<div v-for="input in filteredInputs" :key="input.name">
|
||||
<n8n-text
|
||||
color="text-base"
|
||||
v-if="input.properties.type === 'info'"
|
||||
tag="div"
|
||||
align="center"
|
||||
>
|
||||
{{ input.properties.label }}
|
||||
</n8n-text>
|
||||
<n8n-form-input
|
||||
v-else
|
||||
@@ -57,8 +57,8 @@ export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
showValidationWarnings: false,
|
||||
values: {} as {[key: string]: any},
|
||||
validity: {} as {[key: string]: boolean},
|
||||
values: {} as { [key: string]: any },
|
||||
validity: {} as { [key: string]: boolean },
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -74,10 +74,8 @@ export default Vue.extend({
|
||||
},
|
||||
computed: {
|
||||
filteredInputs(): IFormInput[] {
|
||||
return (this.inputs as IFormInput[]).filter(
|
||||
(input) => typeof input.shouldDisplay === 'function'
|
||||
? input.shouldDisplay(this.values)
|
||||
: true,
|
||||
return (this.inputs as IFormInput[]).filter((input) =>
|
||||
typeof input.shouldDisplay === 'function' ? input.shouldDisplay(this.values) : true,
|
||||
);
|
||||
},
|
||||
isReadyToSubmit(): boolean {
|
||||
@@ -96,7 +94,7 @@ export default Vue.extend({
|
||||
...this.values,
|
||||
[name]: value, // eslint-disable-line @typescript-eslint/no-unsafe-assignment
|
||||
};
|
||||
this.$emit('input', {name, value}); // eslint-disable-line @typescript-eslint/no-unsafe-assignment
|
||||
this.$emit('input', { name, value }); // eslint-disable-line @typescript-eslint/no-unsafe-assignment
|
||||
},
|
||||
onValidate(name: string, valid: boolean) {
|
||||
Vue.set(this.validity, name, valid);
|
||||
@@ -104,7 +102,7 @@ export default Vue.extend({
|
||||
onSubmit() {
|
||||
this.showValidationWarnings = true;
|
||||
if (this.isReadyToSubmit) {
|
||||
const toSubmit = (this.filteredInputs ).reduce<{ [key: string]: unknown }>((accu, input) => {
|
||||
const toSubmit = this.filteredInputs.reduce<{ [key: string]: unknown }>((accu, input) => {
|
||||
if (this.values[input.name]) {
|
||||
accu[input.name] = this.values[input.name];
|
||||
}
|
||||
@@ -133,5 +131,4 @@ export default Vue.extend({
|
||||
composes: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user