Commit a91ef140 authored by Mark Florian's avatar Mark Florian

Merge branch 'renovate/major-eslint-and-related' into 'master'

Update ESLint and related (major)

See merge request gitlab-org/gitlab!53367
parents e0807693 35a069ae
...@@ -2,7 +2,7 @@ import Vue from 'vue'; ...@@ -2,7 +2,7 @@ import Vue from 'vue';
import StatisticsPanelApp from './components/app.vue'; import StatisticsPanelApp from './components/app.vue';
import createStore from './store'; import createStore from './store';
export default function (el) { export default function initStatisticsPanel(el) {
if (!el) { if (!el) {
return false; return false;
} }
......
...@@ -117,7 +117,6 @@ const boardsStore = { ...@@ -117,7 +117,6 @@ const boardsStore = {
}, },
updateNewListDropdown(listId) { updateNewListDropdown(listId) {
// eslint-disable-next-line no-unused-expressions
document document
.querySelector(`.js-board-list-${getIdFromGraphQLId(listId)}`) .querySelector(`.js-board-list-${getIdFromGraphQLId(listId)}`)
?.classList.remove('is-active'); ?.classList.remove('is-active');
......
...@@ -5,7 +5,7 @@ import App from './components/app.vue'; ...@@ -5,7 +5,7 @@ import App from './components/app.vue';
Vue.use(VueApollo); Vue.use(VueApollo);
export default function () { export default function initIssuableSuggestions() {
const el = document.getElementById('js-suggestions'); const el = document.getElementById('js-suggestions');
const issueTitle = document.getElementById('issue_title'); const issueTitle = document.getElementById('issue_title');
const { projectPath } = el.dataset; const { projectPath } = el.dataset;
......
...@@ -71,7 +71,7 @@ if (gon?.disable_animations) { ...@@ -71,7 +71,7 @@ if (gon?.disable_animations) {
// inject test utilities if necessary // inject test utilities if necessary
if (process.env.NODE_ENV !== 'production' && gon?.test_env) { if (process.env.NODE_ENV !== 'production' && gon?.test_env) {
disableJQueryAnimations(); disableJQueryAnimations();
import(/* webpackMode: "eager" */ './test_utils/'); // eslint-disable-line no-unused-expressions import(/* webpackMode: "eager" */ './test_utils/');
} }
document.addEventListener('beforeunload', () => { document.addEventListener('beforeunload', () => {
......
import ZenMode from '~/zen_mode'; import ZenMode from '~/zen_mode';
import GLForm from '~/gl_form'; import GLForm from '~/gl_form';
export default function ($formEl) { export default function initProjectForm($formEl) {
new ZenMode(); // eslint-disable-line no-new new ZenMode(); // eslint-disable-line no-new
new GLForm($formEl); // eslint-disable-line no-new new GLForm($formEl); // eslint-disable-line no-new
} }
...@@ -16,7 +16,7 @@ import initInviteMemberModal from '~/invite_member/init_invite_member_modal'; ...@@ -16,7 +16,7 @@ import initInviteMemberModal from '~/invite_member/init_invite_member_modal';
import { IssuableType } from '~/issuable_show/constants'; import { IssuableType } from '~/issuable_show/constants';
export default function () { export default function initShowIssue() {
const initialDataEl = document.getElementById('js-issuable-app'); const initialDataEl = document.getElementById('js-issuable-app');
const { issueType, ...issuableData } = parseIssuableData(initialDataEl); const { issueType, ...issuableData } = parseIssuableData(initialDataEl);
......
...@@ -10,7 +10,7 @@ import initInviteMemberTrigger from '~/invite_member/init_invite_member_trigger' ...@@ -10,7 +10,7 @@ import initInviteMemberTrigger from '~/invite_member/init_invite_member_trigger'
import initInviteMemberModal from '~/invite_member/init_invite_member_modal'; import initInviteMemberModal from '~/invite_member/init_invite_member_modal';
import StatusBox from '~/merge_request/components/status_box.vue'; import StatusBox from '~/merge_request/components/status_box.vue';
export default function () { export default function initMergeRequestShow() {
new ZenMode(); // eslint-disable-line no-new new ZenMode(); // eslint-disable-line no-new
initIssuableSidebar(); initIssuableSidebar();
initPipelines(); initPipelines();
......
...@@ -77,7 +77,7 @@ const createTestDetails = () => { ...@@ -77,7 +77,7 @@ const createTestDetails = () => {
}); });
}; };
export default async function () { export default async function initPipelineDetailsBundle() {
createTestDetails(); createTestDetails();
createDagApp(); createDagApp();
......
import Vue from 'vue'; import Vue from 'vue';
import NewProjectCreationApp from './components/app.vue'; import NewProjectCreationApp from './components/app.vue';
export default function (el, props) { export default function initNewProjectCreation(el, props) {
return new Vue({ return new Vue({
el, el,
components: { components: {
......
...@@ -60,8 +60,8 @@ export default { ...@@ -60,8 +60,8 @@ export default {
const nextItemEl = itemEl.nextElementSibling; const nextItemEl = itemEl.nextElementSibling;
return { return {
beforeId: prevItemEl && parseInt(prevItemEl.dataset.orderingId, 0), beforeId: prevItemEl && parseInt(prevItemEl.dataset.orderingId, 10),
afterId: nextItemEl && parseInt(nextItemEl.dataset.orderingId, 0), afterId: nextItemEl && parseInt(nextItemEl.dataset.orderingId, 10),
}; };
}, },
reordered(event) { reordered(event) {
......
...@@ -86,7 +86,7 @@ const createValidator = (context, feedbackMap) => ({ el, reportInvalidInput = fa ...@@ -86,7 +86,7 @@ const createValidator = (context, feedbackMap) => ({ el, reportInvalidInput = fa
* @param {Object<string, { message: string, isValid: ?function}>} customFeedbackMap * @param {Object<string, { message: string, isValid: ?function}>} customFeedbackMap
* @returns {{ inserted: function, update: function }} validateDirective * @returns {{ inserted: function, update: function }} validateDirective
*/ */
export default function (customFeedbackMap = {}) { export default function initValidation(customFeedbackMap = {}) {
const feedbackMap = merge(defaultFeedbackMap, customFeedbackMap); const feedbackMap = merge(defaultFeedbackMap, customFeedbackMap);
const elDataMap = new WeakMap(); const elDataMap = new WeakMap();
......
import BoardsListSelector from './boards_list_selector/index'; import BoardsListSelector from './boards_list_selector/index';
export default function () { export default function initAssigneesListSelector() {
const $addListEl = document.querySelector('#js-add-list'); const $addListEl = document.querySelector('#js-add-list');
return new BoardsListSelector({ return new BoardsListSelector({
propsData: { propsData: {
......
import BoardsListSelector from './boards_list_selector'; import BoardsListSelector from './boards_list_selector';
export default function () { export default function initMilestoneListSelector() {
const $addListEl = document.querySelector('#js-add-list'); const $addListEl = document.querySelector('#js-add-list');
return new BoardsListSelector({ return new BoardsListSelector({
propsData: { propsData: {
......
...@@ -23,7 +23,7 @@ const disableMergeTrains = () => { ...@@ -23,7 +23,7 @@ const disableMergeTrains = () => {
mergeTrainsCheckbox.checked = false; mergeTrainsCheckbox.checked = false;
}; };
export default function () { export default function initMergeOptions() {
const { projectFullPath } = containerEl.dataset; const { projectFullPath } = containerEl.dataset;
const defaultClient = createDefaultClient(); const defaultClient = createDefaultClient();
......
import $ from 'jquery'; import $ from 'jquery';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
export default function (assigneeDropdown) { export default function initTrackInviteMembers(assigneeDropdown) {
const trackEvent = 'show_invite_members'; const trackEvent = 'show_invite_members';
const trackLabel = 'edit_assignee'; const trackLabel = 'edit_assignee';
......
...@@ -90,7 +90,7 @@ export default () => { ...@@ -90,7 +90,7 @@ export default () => {
allowSubEpics: parseBoolean(dataset.allowSubEpics), allowSubEpics: parseBoolean(dataset.allowSubEpics),
defaultInnerHeight: Number(dataset.innerHeight), defaultInnerHeight: Number(dataset.innerHeight),
isChildEpics: parseBoolean(dataset.childEpics), isChildEpics: parseBoolean(dataset.childEpics),
currentGroupId: parseInt(dataset.groupId, 0), currentGroupId: parseInt(dataset.groupId, 10),
basePath: dataset.epicsPath, basePath: dataset.epicsPath,
fullPath: dataset.fullPath, fullPath: dataset.fullPath,
epicIid: dataset.iid, epicIid: dataset.iid,
......
import CEGetStateKey from '~/vue_merge_request_widget/stores/get_state_key'; import CEGetStateKey from '~/vue_merge_request_widget/stores/get_state_key';
import { stateKey } from './state_maps'; import { stateKey } from './state_maps';
export default function () { export default function getStateKey() {
if (this.isGeoSecondaryNode) { if (this.isGeoSecondaryNode) {
return 'geoSecondaryNode'; return 'geoSecondaryNode';
} }
......
...@@ -6,7 +6,7 @@ import { getIdFromGraphQLId } from '~/graphql_shared/utils'; ...@@ -6,7 +6,7 @@ import { getIdFromGraphQLId } from '~/graphql_shared/utils';
Vue.use(VueApollo); Vue.use(VueApollo);
export default function () { export default function initIterationsDropdownBundle() {
const el = document.querySelector('#js-iteration-dropdown'); const el = document.querySelector('#js-iteration-dropdown');
const iterationField = document.getElementById('issue_iteration_id'); const iterationField = document.getElementById('issue_iteration_id');
......
This diff is collapsed.
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