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
@@ -30,8 +30,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
/* tslint:disable: @typescript-eslint/no-unsafe-assignment */
|
||||
import Vue from 'vue';
|
||||
import 'vue';
|
||||
import N8nUserInfo from '../N8nUserInfo';
|
||||
import { IUser } from '../../types';
|
||||
import ElSelect from 'element-ui/lib/select';
|
||||
@@ -74,8 +73,7 @@ export default mixins(Locale).extend({
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
validator: (value: string): boolean =>
|
||||
['mini', 'small', 'large'].includes(value),
|
||||
validator: (value: string): boolean => ['mini', 'small', 'large'].includes(value),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
@@ -85,33 +83,32 @@ export default mixins(Locale).extend({
|
||||
},
|
||||
computed: {
|
||||
fitleredUsers(): IUser[] {
|
||||
return (this.users as IUser[])
|
||||
.filter((user) => {
|
||||
if (user.isPendingUser || !user.email) {
|
||||
return false;
|
||||
}
|
||||
return (this.users as IUser[]).filter((user) => {
|
||||
if (user.isPendingUser || !user.email) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.ignoreIds && this.ignoreIds.includes(user.id)) {
|
||||
return false;
|
||||
}
|
||||
if (this.ignoreIds?.includes(user.id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (user.fullName) {
|
||||
const match = user.fullName.toLowerCase().includes(this.filter.toLowerCase());
|
||||
if (match) {
|
||||
return true;
|
||||
}
|
||||
if (user.fullName) {
|
||||
const match = user.fullName.toLowerCase().includes(this.filter.toLowerCase());
|
||||
if (match) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return user.email.includes(this.filter);
|
||||
});
|
||||
return user.email.includes(this.filter);
|
||||
});
|
||||
},
|
||||
sortedUsers(): IUser[] {
|
||||
return [...(this.fitleredUsers )].sort((a: IUser, b: IUser) => {
|
||||
return [...this.fitleredUsers].sort((a: IUser, b: IUser) => {
|
||||
if (a.lastName && b.lastName && a.lastName !== b.lastName) {
|
||||
return a.lastName > b.lastName ? 1 : -1;
|
||||
}
|
||||
if (a.firstName && b.firstName && a.firstName !== b.firstName) {
|
||||
return a.firstName > b.firstName? 1 : -1;
|
||||
return a.firstName > b.firstName ? 1 : -1;
|
||||
}
|
||||
|
||||
if (!a.email || !b.email) {
|
||||
@@ -121,7 +118,6 @@ export default mixins(Locale).extend({
|
||||
return a.email > b.email ? 1 : -1;
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
setFilter(value: string) {
|
||||
@@ -141,13 +137,13 @@ export default mixins(Locale).extend({
|
||||
return user.email;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||
return `${user.fullName} (${user.email})`;
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" module>
|
||||
.itemContainer {
|
||||
--select-option-padding: var(--spacing-2xs) var(--spacing-s);
|
||||
|
||||
Reference in New Issue
Block a user