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:
कारतोफ्फेलस्क्रिप्ट™
2022-11-15 18:20:54 +01:00
committed by GitHub
parent d96d6f11db
commit 13659d036f
227 changed files with 2222 additions and 2566 deletions

View File

@@ -8,15 +8,8 @@
v-on="$listeners"
>
<span :class="$style.icon" v-if="loading || icon">
<n8n-spinner
v-if="loading"
:size="size"
/>
<n8n-icon
v-else-if="icon"
:icon="icon"
:size="size"
/>
<n8n-spinner v-if="loading" :size="size" />
<n8n-icon v-else-if="icon" :icon="icon" :size="size" />
</span>
<span v-if="label || $slots.default">
<slot>{{ label }}</slot>
@@ -76,13 +69,12 @@ export default Vue.extend({
},
float: {
type: String,
validator: (value: string): boolean =>
['left', 'right'].includes(value),
validator: (value: string): boolean => ['left', 'right'].includes(value),
},
square: {
type: Boolean,
default: false,
},
square: {
type: Boolean,
default: false,
},
},
components: {
N8nSpinner,
@@ -96,7 +88,8 @@ export default Vue.extend({
return this.disabled ? 'true' : 'false';
},
classes(): string {
return `button ${this.$style.button} ${this.$style[this.type]}` +
return (
`button ${this.$style.button} ${this.$style[this.type]}` +
`${this.size ? ` ${this.$style[this.size]}` : ''}` +
`${this.outline ? ` ${this.$style.outline}` : ''}` +
`${this.loading ? ` ${this.$style.loading}` : ''}` +
@@ -106,7 +99,8 @@ export default Vue.extend({
`${this.block ? ` ${this.$style.block}` : ''}` +
`${this.active ? ` ${this.$style.active}` : ''}` +
`${this.icon || this.loading ? ` ${this.$style.icon}` : ''}` +
`${this.square ? ` ${this.$style.square}` : ''}`;
`${this.square ? ` ${this.$style.square}` : ''}`
);
},
},
});
@@ -150,7 +144,8 @@ export default Vue.extend({
outline: $focus-outline-width solid $button-focus-outline-color;
}
&:active, &.active {
&:active,
&.active {
color: $button-active-color;
border-color: $button-active-border-color;
background-color: $button-active-background-color;
@@ -213,7 +208,12 @@ $loading-overlay-background-color: rgba(255, 255, 255, 0);
--button-hover-color: var(--color-text-dark);
--button-hover-border-color: var(--color-neutral-800);
--button-focus-outline-color: hsla(var(--color-neutral-h), var(--color-neutral-s), var(--color-neutral-l), 0.2);
--button-focus-outline-color: hsla(
var(--color-neutral-h),
var(--color-neutral-s),
var(--color-neutral-l),
0.2
);
}
.success {
@@ -227,7 +227,12 @@ $loading-overlay-background-color: rgba(255, 255, 255, 0);
--button-hover-background-color: var(--color-success-450);
--button-hover-border-color: var(--color-success-450);
--button-focus-outline-color: hsla(var(--color-success-h), var(--color-success-s), var(--color-success-l), 0.33);
--button-focus-outline-color: hsla(
var(--color-success-h),
var(--color-success-s),
var(--color-success-l),
0.33
);
}
.warning {
@@ -241,7 +246,12 @@ $loading-overlay-background-color: rgba(255, 255, 255, 0);
--button-hover-background-color: var(--color-warning-650);
--button-hover-border-color: var(--color-warning-650);
--button-focus-outline-color: hsla(var(--color-warning-h), var(--color-warning-s), var(--color-warning-l), 0.33);
--button-focus-outline-color: hsla(
var(--color-warning-h),
var(--color-warning-s),
var(--color-warning-l),
0.33
);
}
.danger {
@@ -256,7 +266,12 @@ $loading-overlay-background-color: rgba(255, 255, 255, 0);
--button-hover-background-color: var(--color-danger-700);
--button-hover-border-color: var(--color-danger-700);
--button-focus-outline-color: hsla(var(--color-danger-h), var(--color-danger-s), var(--color-danger-l), 0.33);
--button-focus-outline-color: hsla(
var(--color-danger-h),
var(--color-danger-s),
var(--color-danger-l),
0.33
);
}
/**
@@ -440,7 +455,7 @@ $loading-overlay-background-color: rgba(255, 255, 255, 0);
.icon {
display: inline-flex;
justify-content: center;
justify-content: center;
svg {
display: block;