Commit 72c11eb5 authored by Lukas Eipert's avatar Lukas Eipert

Run prettier on 31 files - 35 of 73

Part of our prettier migration; changing the arrow-parens style.
parent b48e14b8
......@@ -1020,39 +1020,6 @@ ee/app/assets/javascripts/analytics/cycle_analytics/store/modules/duration_chart
ee/app/assets/javascripts/analytics/cycle_analytics/store/modules/type_of_work/actions.js
ee/app/assets/javascripts/analytics/cycle_analytics/store/mutations.js
## strange-shirley
ee/app/assets/javascripts/approvals/components/project_settings/project_rules.vue
ee/app/assets/javascripts/approvals/components/rule_form.vue
ee/app/assets/javascripts/approvals/components/security_configuration/unconfigured_security_rules.vue
ee/app/assets/javascripts/approvals/mappers.js
ee/app/assets/javascripts/approvals/stores/modules/base/getters.js
ee/app/assets/javascripts/approvals/stores/modules/license_compliance/actions.js
ee/app/assets/javascripts/approvals/stores/modules/mr_edit/actions.js
ee/app/assets/javascripts/approvals/stores/modules/mr_edit/mutations.js
ee/app/assets/javascripts/approvals/stores/modules/project_settings/actions.js
ee/app/assets/javascripts/audit_events/components/audit_events_filter.vue
ee/app/assets/javascripts/audit_events/components/sorting_field.vue
ee/app/assets/javascripts/audit_events/components/tokens/member_token.vue
ee/app/assets/javascripts/audit_events/components/tokens/project_token.vue
ee/app/assets/javascripts/audit_events/components/tokens/shared/audit_filter_token.vue
ee/app/assets/javascripts/audit_events/components/tokens/user_token.vue
ee/app/assets/javascripts/audit_events/constants.js
ee/app/assets/javascripts/audit_events/init_audit_events.js
ee/app/assets/javascripts/audit_events/store/getters.js
ee/app/assets/javascripts/audit_events/utils.js
ee/app/assets/javascripts/audit_events/validators.js
ee/app/assets/javascripts/billings/seat_usage/store/actions.js
ee/app/assets/javascripts/billings/seat_usage/store/getters.js
ee/app/assets/javascripts/billings/subscriptions/store/actions.js
ee/app/assets/javascripts/billings/subscriptions/store/getters.js
ee/app/assets/javascripts/billings/subscriptions/store/mutations.js
ee/app/assets/javascripts/boards/boards_util.js
ee/app/assets/javascripts/boards/components/board_scope.vue
ee/app/assets/javascripts/boards/components/boards_list_selector/index.js
ee/app/assets/javascripts/boards/components/boards_list_selector/list_container.vue
ee/app/assets/javascripts/boards/components/epics_swimlanes.vue
ee/app/assets/javascripts/boards/components/new_list_dropdown.js
## great-keldysh
ee/app/assets/javascripts/boards/components/sidebar/remove_issue.js
ee/app/assets/javascripts/boards/config_toggle.js
......
......@@ -29,15 +29,15 @@ export default {
computed: {
...mapState(['settings']),
...mapState({
rules: state => state.approvals.rules,
rules: (state) => state.approvals.rules,
}),
hasNamedRule() {
return this.rules.some(rule => rule.ruleType === RULE_TYPE_REGULAR);
return this.rules.some((rule) => rule.ruleType === RULE_TYPE_REGULAR);
},
hasAnyRule() {
return (
this.settings.allowMultiRule &&
!this.rules.some(rule => rule.ruleType === RULE_TYPE_ANY_APPROVER)
!this.rules.some((rule) => rule.ruleType === RULE_TYPE_ANY_APPROVER)
);
},
},
......@@ -46,7 +46,7 @@ export default {
handler(newValue) {
if (
this.settings.allowMultiRule &&
!newValue.some(rule => rule.ruleType === RULE_TYPE_ANY_APPROVER)
!newValue.some((rule) => rule.ruleType === RULE_TYPE_ANY_APPROVER)
) {
this.addEmptyRule();
}
......
......@@ -14,7 +14,7 @@ const DEFAULT_NAME_FOR_VULNERABILITY_CHECK = 'Vulnerability-Check';
const READONLY_NAMES = [DEFAULT_NAME_FOR_LICENSE_REPORT, DEFAULT_NAME_FOR_VULNERABILITY_CHECK];
function mapServerResponseToValidationErrors(messages) {
return Object.entries(messages).flatMap(([key, msgs]) => msgs.map(msg => `${key} ${msg}`));
return Object.entries(messages).flatMap(([key, msgs]) => msgs.map((msg) => `${key} ${msg}`));
}
export default {
......@@ -71,7 +71,7 @@ export default {
return this.defaultRuleName ? null : this.initRule;
},
approversByType() {
return groupBy(this.approvers, x => x.type);
return groupBy(this.approvers, (x) => x.type);
},
users() {
return this.approversByType[TYPE_USER] || [];
......@@ -80,10 +80,10 @@ export default {
return this.approversByType[TYPE_GROUP] || [];
},
userIds() {
return this.users.map(x => x.id);
return this.users.map((x) => x.id);
},
groupIds() {
return this.groups.map(x => x.id);
return this.groups.map((x) => x.id);
},
validation() {
if (!this.showValidation) {
......@@ -140,12 +140,12 @@ export default {
invalidBranches() {
if (this.isMrEdit) return '';
const invalidTypes = this.branches.filter(id => typeof id !== 'number');
const invalidTypes = this.branches.filter((id) => typeof id !== 'number');
return invalidTypes.length ? __('Please select a valid target branch') : '';
},
isValid() {
return Object.keys(this.validation).every(key => !this.validation[key]);
return Object.keys(this.validation).every((key) => !this.validation[key]);
},
isMultiSubmission() {
return this.settings.allowMultiRule && !this.isFallbackSubmission;
......@@ -229,7 +229,7 @@ export default {
submission = this.submitRule();
}
submission.catch(failureResponse => {
submission.catch((failureResponse) => {
this.serverValidationErrors = mapServerResponseToValidationErrors(
failureResponse?.response?.data?.message || {},
);
......@@ -293,9 +293,9 @@ export default {
const { containsHiddenGroups = false, removeHiddenGroups = false } = this.initRule;
const users = this.initRule.users.map(x => ({ ...x, type: TYPE_USER }));
const groups = this.initRule.groups.map(x => ({ ...x, type: TYPE_GROUP }));
const branches = this.initRule.protectedBranches?.map(x => x.id) || [];
const users = this.initRule.users.map((x) => ({ ...x, type: TYPE_USER }));
const groups = this.initRule.groups.map((x) => ({ ...x, type: TYPE_GROUP }));
const branches = this.initRule.protectedBranches?.map((x) => x.id) || [];
return {
name: this.initRule.name || '',
......
......@@ -34,9 +34,9 @@ export default {
computed: {
...mapState('securityConfiguration', ['configuration']),
...mapState({
rules: state => state.approvals.rules,
isApprovalsLoading: state => state.approvals.isLoading,
isSecurityConfigurationLoading: state => state.securityConfiguration.isLoading,
rules: (state) => state.approvals.rules,
isApprovalsLoading: (state) => state.approvals.isLoading,
isSecurityConfigurationLoading: (state) => state.securityConfiguration.isLoading,
}),
isRulesLoading() {
return this.isApprovalsLoading || this.isSecurityConfigurationLoading;
......@@ -84,14 +84,14 @@ export default {
...mapActions('securityConfiguration', ['fetchSecurityConfiguration']),
...mapActions({ openCreateModal: 'createModal/open' }),
hasApprovalRuleDefined(matchRule) {
return this.rules.some(rule => {
return this.rules.some((rule) => {
return matchRule.name === rule.name;
});
},
hasConfiguredJob(matchRule) {
const { features = [] } = this.configuration;
return this.$options.featureTypes[camelCase(matchRule.name)].some(featureType => {
return features.some(feature => {
return this.$options.featureTypes[camelCase(matchRule.name)].some((featureType) => {
return features.some((feature) => {
return feature.type === featureType && feature.configured;
});
});
......
......@@ -24,7 +24,7 @@ function withDefaultEmptyRule(rules = []) {
];
}
export const mapApprovalRuleRequest = req => ({
export const mapApprovalRuleRequest = (req) => ({
name: req.name,
approvals_required: req.approvalsRequired,
users: req.users,
......@@ -33,11 +33,11 @@ export const mapApprovalRuleRequest = req => ({
protected_branch_ids: req.protectedBranchIds,
});
export const mapApprovalFallbackRuleRequest = req => ({
export const mapApprovalFallbackRuleRequest = (req) => ({
fallback_approvals_required: req.approvalsRequired,
});
export const mapApprovalRuleResponse = res => ({
export const mapApprovalRuleResponse = (res) => ({
id: res.id,
hasSource: Boolean(res.source_rule),
name: res.name,
......@@ -52,7 +52,7 @@ export const mapApprovalRuleResponse = res => ({
overridden: res.overridden,
});
export const mapApprovalSettingsResponse = res => ({
export const mapApprovalSettingsResponse = (res) => ({
rules: withDefaultEmptyRule(res.rules.map(mapApprovalRuleResponse)),
fallbackApprovalsRequired: res.fallback_approvals_required,
});
......@@ -78,7 +78,7 @@ export const mapMRSourceRule = ({ id, ...rule }) => ({
* - If needed, extract the fallback approvals required
* from the fallback rule.
*/
export const mapMRApprovalSettingsResponse = res => {
export const mapMRApprovalSettingsResponse = (res) => {
const rules = res.rules.filter(({ rule_type }) => visibleTypes.has(rule_type));
const fallbackApprovalsRequired = res.fallback_approvals_required || 0;
......@@ -87,7 +87,7 @@ export const mapMRApprovalSettingsResponse = res => {
rules: withDefaultEmptyRule(
rules
.map(mapApprovalRuleResponse)
.map(res.approval_rules_overwritten ? x => x : mapMRSourceRule),
.map(res.approval_rules_overwritten ? (x) => x : mapMRSourceRule),
),
fallbackApprovalsRequired,
minFallbackApprovalsRequired: 0,
......
export const isEmpty = state => !state.rules || !state.rules.length;
export const isEmpty = (state) => !state.rules || !state.rules.length;
......@@ -20,7 +20,7 @@ export const fetchRules = ({ rootState, dispatch, commit }) => {
return axios
.get(settingsPath)
.then(response => dispatch('receiveRulesSuccess', mapApprovalSettingsResponse(response.data)))
.then((response) => dispatch('receiveRulesSuccess', mapApprovalSettingsResponse(response.data)))
.catch(() => createFlash(__('An error occurred fetching the approval rules.')));
};
......
......@@ -7,20 +7,20 @@ import * as types from './mutation_types';
import { RULE_TYPE_ANY_APPROVER } from '../../../constants';
import { mapMRApprovalSettingsResponse } from '../../../mappers';
const fetchGroupMembers = memoize(id => Api.groupMembers(id).then(response => response.data));
const fetchGroupMembers = memoize((id) => Api.groupMembers(id).then((response) => response.data));
const fetchApprovers = ({ userRecords, groups }) => {
const groupUsersAsync = Promise.all(groups.map(fetchGroupMembers));
return groupUsersAsync
.then(flatten)
.then(groupUsers => groupUsers.concat(userRecords))
.then(users => uniqBy(users, x => x.id));
.then((groupUsers) => groupUsers.concat(userRecords))
.then((users) => uniqBy(users, (x) => x.id));
};
const seedApprovers = rule =>
const seedApprovers = (rule) =>
rule.groups || rule.userRecords
? fetchApprovers(rule).then(approvers => ({
? fetchApprovers(rule).then((approvers) => ({
...rule,
approvers,
}))
......@@ -32,9 +32,9 @@ const seedUsers = ({ userRecords, ...rule }) =>
const seedGroups = ({ groupRecords, ...rule }) =>
groupRecords ? { ...rule, groups: groupRecords } : rule;
const seedLocalRule = rule => seedApprovers(rule).then(seedUsers).then(seedGroups);
const seedLocalRule = (rule) => seedApprovers(rule).then(seedUsers).then(seedGroups);
const seedNewRule = rule => {
const seedNewRule = (rule) => {
const name = rule.ruleType === RULE_TYPE_ANY_APPROVER ? '' : rule.name;
return {
......@@ -78,34 +78,34 @@ export const fetchRules = (
return axios
.get(path, params)
.then(response => mapMRApprovalSettingsResponse(response.data))
.then(settings => ({
.then((response) => mapMRApprovalSettingsResponse(response.data))
.then((settings) => ({
...settings,
rules: settings.rules.map(x => (x.id ? x : seedNewRule(x))),
rules: settings.rules.map((x) => (x.id ? x : seedNewRule(x))),
}))
.then(settings => dispatch('receiveRulesSuccess', { settings, resetToDefault }))
.then((settings) => dispatch('receiveRulesSuccess', { settings, resetToDefault }))
.catch(() => dispatch('receiveRulesError'));
};
export const postRule = ({ commit, dispatch }, rule) =>
seedLocalRule(rule)
.then(seedNewRule)
.then(newRule => {
.then((newRule) => {
commit(types.POST_RULE, newRule);
dispatch('createModal/close');
})
.catch(e => {
.catch((e) => {
createFlash(__('An error occurred fetching the approvers for the new rule.'));
throw e;
});
export const putRule = ({ commit, dispatch }, rule) =>
seedLocalRule(rule)
.then(newRule => {
.then((newRule) => {
commit(types.PUT_RULE, newRule);
dispatch('createModal/close');
})
.catch(e => {
.catch((e) => {
createFlash(__('An error occurred fetching the approvers for the new rule.'));
throw e;
});
......@@ -131,12 +131,12 @@ export const requestDeleteRule = ({ dispatch }, rule) => {
export const postRegularRule = ({ commit, dispatch }, rule) =>
seedLocalRule(rule)
.then(seedNewRule)
.then(newRule => {
.then((newRule) => {
commit(types.POST_REGULAR_RULE, newRule);
commit(types.DELETE_ANY_RULE);
dispatch('createModal/close');
})
.catch(e => {
.catch((e) => {
createFlash(__('An error occurred fetching the approvers for the new rule.'));
throw e;
});
......
......@@ -5,7 +5,7 @@ import { RULE_TYPE_ANY_APPROVER } from '../../../constants';
export default {
...base,
[types.DELETE_RULE](state, id) {
const idx = state.rules.findIndex(x => x.id === id);
const idx = state.rules.findIndex((x) => x.id === id);
if (idx < 0) {
return;
......@@ -34,7 +34,7 @@ export default {
state.rules = [newRule];
},
[types.PUT_RULE](state, { id, ...newRule }) {
const idx = state.rules.findIndex(x => x.id === id);
const idx = state.rules.findIndex((x) => x.id === id);
if (idx < 0) {
return;
......@@ -63,7 +63,7 @@ export default {
state.fallbackApprovalsRequired = fallback.approvalsRequired;
},
[types.SET_EMPTY_RULE](state) {
const anyRule = state.initialRules.find(rule => rule.ruleType === RULE_TYPE_ANY_APPROVER);
const anyRule = state.initialRules.find((rule) => rule.ruleType === RULE_TYPE_ANY_APPROVER);
if (anyRule) {
state.rules = [anyRule];
......
......@@ -28,7 +28,7 @@ export const fetchRules = ({ rootState, dispatch }) => {
return axios
.get(settingsPath)
.then(response => dispatch('receiveRulesSuccess', mapApprovalSettingsResponse(response.data)))
.then((response) => dispatch('receiveRulesSuccess', mapApprovalSettingsResponse(response.data)))
.catch(() => dispatch('receiveRulesError'));
};
......
......@@ -22,7 +22,7 @@ export default {
},
data() {
return {
filterTokens: this.filterTokenOptions.map(option => ({
filterTokens: this.filterTokenOptions.map((option) => ({
...AUDIT_FILTER_CONFIGS.find(({ type }) => type === option.type),
...option,
})),
......@@ -30,14 +30,14 @@ export default {
},
computed: {
tokenSearchTerm() {
return this.value.find(term => this.filterTokens.find(token => token.type === term.type));
return this.value.find((term) => this.filterTokens.find((token) => token.type === term.type));
},
enabledTokens() {
const { tokenSearchTerm } = this;
// If a user has searched for a term within a token, limit the user to that one token
if (tokenSearchTerm) {
return this.filterTokens.map(token => ({
return this.filterTokens.map((token) => ({
...token,
disabled: tokenSearchTerm.type !== token.type,
}));
......
......@@ -29,7 +29,7 @@ export default {
},
computed: {
selectedOption() {
return SORTING_OPTIONS.find(option => option.key === this.sortBy) || SORTING_OPTIONS[0];
return SORTING_OPTIONS.find((option) => option.key === this.sortBy) || SORTING_OPTIONS[0];
},
},
methods: {
......
......@@ -10,13 +10,13 @@ export default {
inheritAttrs: false,
tokenMethods: {
fetchItem(id) {
return Api.user(id).then(res => res.data);
return Api.user(id).then((res) => res.data);
},
fetchSuggestions(term) {
const { groupId, projectPath } = this.config;
if (groupId) {
return Api.groupMembers(groupId, { search: term }).then(res => res.data);
return Api.groupMembers(groupId, { search: term }).then((res) => res.data);
}
if (projectPath) {
......
......@@ -9,10 +9,10 @@ export default {
inheritAttrs: false,
tokenMethods: {
fetchItem(id) {
return Api.project(id).then(res => res.data);
return Api.project(id).then((res) => res.data);
},
fetchSuggestions(term) {
return Api.projects(term, { membership: false }).then(res => res.data);
return Api.projects(term, { membership: false }).then((res) => res.data);
},
getItemName({ name }) {
return name;
......
......@@ -105,12 +105,12 @@ export default {
createFlash(sprintf(message, { type }));
},
selectActiveItem(id) {
this.activeItem = this.suggestions.find(u => u.id === id);
this.activeItem = this.suggestions.find((u) => u.id === id);
},
loadView(id) {
this.viewLoading = true;
return this.fetchItem(id)
.then(data => {
.then((data) => {
this.activeItem = data;
})
.catch(this.onApiError)
......@@ -121,7 +121,7 @@ export default {
loadSuggestions(term) {
this.suggestionsLoading = true;
return this.fetchSuggestions(term)
.then(data => {
.then((data) => {
this.suggestions = data;
})
.catch(this.onApiError)
......
......@@ -9,10 +9,10 @@ export default {
inheritAttrs: false,
tokenMethods: {
fetchItem(id) {
return Api.user(id).then(res => res.data);
return Api.user(id).then((res) => res.data);
},
fetchSuggestions(term) {
return Api.users(term).then(res => res.data);
return Api.users(term).then((res) => res.data);
},
getItemName({ name }) {
return name;
......
......@@ -55,7 +55,7 @@ export const AUDIT_FILTER_CONFIGS = [
},
];
export const AVAILABLE_TOKEN_TYPES = AUDIT_FILTER_CONFIGS.map(token => token.type);
export const AVAILABLE_TOKEN_TYPES = AUDIT_FILTER_CONFIGS.map((token) => token.type);
export const MAX_DATE_RANGE = 31;
......
......@@ -5,7 +5,7 @@ import { convertObjectPropsToCamelCase, parseBoolean } from '~/lib/utils/common_
import AuditEventsApp from './components/audit_events_app.vue';
import createStore from './store';
export default selector => {
export default (selector) => {
const el = document.querySelector(selector);
const { events, isLastPage, filterTokenOptions, exportUrl, showFilter = true } = el.dataset;
......@@ -15,12 +15,12 @@ export default selector => {
return new Vue({
el,
store,
render: createElement =>
render: (createElement) =>
createElement(AuditEventsApp, {
props: {
events: JSON.parse(events),
isLastPage: parseBoolean(isLastPage),
filterTokenOptions: JSON.parse(filterTokenOptions).map(filterTokenOption =>
filterTokenOptions: JSON.parse(filterTokenOptions).map((filterTokenOption) =>
convertObjectPropsToCamelCase(filterTokenOption),
),
exportUrl,
......
......@@ -6,7 +6,7 @@ import { createAuditEventSearchQuery } from '../utils';
* @param {string} exportUrl
* @returns {string}
*/
export const buildExportHref = state => exportUrl => {
export const buildExportHref = (state) => (exportUrl) => {
return setUrlParams(
createAuditEventSearchQuery({
filterValue: state.filterValue,
......
import { parsePikadayDate, pikadayToString } from '~/lib/utils/datetime_utility';
import { AVAILABLE_TOKEN_TYPES, AUDIT_FILTER_CONFIGS } from './constants';
export const isNumeric = str => {
export const isNumeric = (str) => {
return !Number.isNaN(parseInt(str, 10));
};
export const getTypeFromEntityType = entityType => {
export const getTypeFromEntityType = (entityType) => {
return AUDIT_FILTER_CONFIGS.find(
({ entityType: configEntityType }) => configEntityType === entityType,
)?.type;
};
export const getEntityTypeFromType = type => {
export const getEntityTypeFromType = (type) => {
return AUDIT_FILTER_CONFIGS.find(({ type: configType }) => configType === type)?.entityType;
};
......@@ -28,7 +28,7 @@ export const parseAuditEventSearchQuery = ({
});
export const createAuditEventSearchQuery = ({ filterValue, startDate, endDate, sortBy }) => {
const entityValue = filterValue.find(value => AVAILABLE_TOKEN_TYPES.includes(value.type));
const entityValue = filterValue.find((value) => AVAILABLE_TOKEN_TYPES.includes(value.type));
return {
created_after: startDate ? pikadayToString(startDate) : null,
......
......@@ -3,5 +3,5 @@ import { AVAILABLE_TOKEN_TYPES } from './constants';
export function filterTokenOptionsValidator(filterTokenOptions) {
return filterTokenOptions
.map(({ type }) => type)
.every(type => AVAILABLE_TOKEN_TYPES.includes(type));
.every((type) => AVAILABLE_TOKEN_TYPES.includes(type));
}
......@@ -7,7 +7,7 @@ export const fetchBillableMembersList = ({ dispatch, state }, page) => {
dispatch('requestBillableMembersList');
return Api.fetchBillableGroupMembersList(state.namespaceId, { page })
.then(data => dispatch('receiveBillableMembersListSuccess', data))
.then((data) => dispatch('receiveBillableMembersListSuccess', data))
.catch(() => dispatch('receiveBillableMembersListError'));
};
......
export const tableItems = state => {
export const tableItems = (state) => {
if (state.members.length) {
return state.members.map(({ name, username, avatar_url, web_url, email }) => {
const formattedUserName = `@${username}`;
......
......@@ -38,7 +38,7 @@ export const fetchHasBillableGroupMembers = ({ dispatch, state }) => {
dispatch('requestHasBillableGroupMembers');
return Api.fetchBillableGroupMembersList(state.namespaceId, { per_page: 1, page: 1 })
.then(data => dispatch('receiveHasBillableGroupMembersSuccess', data))
.then((data) => dispatch('receiveHasBillableGroupMembersSuccess', data))
.catch(() => dispatch('receiveHasBillableGroupMembersError'));
};
......
export const isFreePlan = state => ['free', null].includes(state.plan.code);
export const isFreePlan = (state) => ['free', null].includes(state.plan.code);
......@@ -32,8 +32,8 @@ export default {
tableKey = TABLE_TYPE_TRIAL;
}
state.tables[tableKey].rows.forEach(row => {
row.columns.forEach(col => {
state.tables[tableKey].rows.forEach((row) => {
row.columns.forEach((col) => {
if (Object.prototype.hasOwnProperty.call(usage, col.id)) {
Vue.set(col, 'value', usage[col.id]);
} else if (Object.prototype.hasOwnProperty.call(billing, col.id)) {
......
......@@ -67,7 +67,7 @@ export function transformBoardConfig(boardConfig) {
let updatedFilterPath = objectToQuery(updatedBoardConfig);
const filterPath = updatedFilterPath ? updatedFilterPath.split('&') : [];
boardConfig.labels.forEach(label => {
boardConfig.labels.forEach((label) => {
const labelTitle = encodeURIComponent(label.title);
const param = `label_name[]=${labelTitle}`;
const labelIndex = passedFilterParams.label_name?.indexOf(labelTitle);
......
......@@ -75,7 +75,7 @@ export default {
handleLabelClick(label) {
if (label.isAny) {
this.board.labels = [];
} else if (!this.board.labels.find(l => l.id === label.id)) {
} else if (!this.board.labels.find((l) => l.id === label.id)) {
this.board.labels.push(
new ListLabel({
id: label.id,
......@@ -86,7 +86,7 @@ export default {
);
} else {
let { labels } = this.board;
labels = labels.filter(selected => selected.id !== label.id);
labels = labels.filter((selected) => selected.id !== label.id);
this.board.labels = labels;
}
},
......
......@@ -37,7 +37,7 @@ export default Vue.extend({
filterItems(term, items) {
const query = term.toLowerCase();
return items.filter(item => {
return items.filter((item) => {
const name = item.name ? item.name.toLowerCase() : item.title.toLowerCase();
const foundName = name.indexOf(query) > -1;
......
......@@ -33,7 +33,7 @@ export default {
if (!this.query) return this.items;
const query = this.query.toLowerCase();
return this.items.filter(item => {
return this.items.filter((item) => {
const name = item.name ? item.name.toLowerCase() : item.title.toLowerCase();
if (this.listType === 'milestones') {
......
......@@ -40,7 +40,7 @@ export default {
...mapState(['epics', 'pageInfoByListId', 'listsFlags']),
...mapGetters(['getUnassignedIssues']),
unassignedIssues() {
return listId => this.getUnassignedIssues(listId);
return (listId) => this.getUnassignedIssues(listId);
},
unassignedIssuesCount() {
return this.lists.reduce(
......@@ -70,7 +70,7 @@ export default {
hasMoreUnassignedIssues() {
return (
this.unassignedIssuesCount > 0 &&
this.lists.some(list => this.pageInfoByListId[list.id]?.hasNextPage)
this.lists.some((list) => this.pageInfoByListId[list.id]?.hasNextPage)
);
},
},
......@@ -89,7 +89,7 @@ export default {
});
},
fetchMoreUnassignedIssues() {
this.lists.forEach(list => {
this.lists.forEach((list) => {
if (this.pageInfoByListId[list.id]?.hasNextPage) {
this.fetchIssuesForList({ listId: list.id, fetchNext: true, noEpicIssues: true });
}
......
......@@ -3,7 +3,7 @@ import initNewListDropdown from '~/boards/components/new_list_dropdown';
import AssigneeList from './assignees_list_selector';
import MilestoneList from './milestone_list_selector';
const handleDropdownHide = e => {
const handleDropdownHide = (e) => {
const $currTarget = $(e.currentTarget);
if ($currTarget.data('preventClose')) {
e.preventDefault();
......@@ -14,7 +14,7 @@ const handleDropdownHide = e => {
let assigneeList;
let milestoneList;
const handleDropdownTabClick = e => {
const handleDropdownTabClick = (e) => {
const $addListEl = $('#js-add-list');
$addListEl.data('preventClose', true);
if (e.target.dataset.action === 'tab-assignees' && !assigneeList) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment