Skip to content
Snippets Groups Projects
Commit e5a2eaed authored by Mark Florian's avatar Mark Florian :two:
Browse files

Merge branch 'renovate/gitlab-packages' into 'master'

Update dependency @gitlab/eslint-plugin to v12.3.0

See merge request !85948
parents 7e7a69fb 4f8c56de
No related branches found
No related tags found
1 merge request!85948Update dependency @gitlab/eslint-plugin to v12.3.0
Pipeline #577915816 passed
Showing
with 49 additions and 44 deletions
......@@ -122,6 +122,8 @@ overrides:
rules:
'@gitlab/require-i18n-strings': off
'@gitlab/no-runtime-template-compiler': off
'import/no-dynamic-require': off
'no-import-assign': off
'no-restricted-syntax':
- error
- selector: CallExpression[callee.object.name=/(wrapper|vm)/][callee.property.name="setData"]
......
/* eslint-disable no-restricted-properties, camelcase,
/* eslint-disable camelcase,
no-unused-expressions, default-case,
consistent-return, no-param-reassign,
no-shadow, no-useless-escape,
......@@ -357,7 +357,7 @@ export default class Notes {
if (shouldReset == null) {
shouldReset = true;
}
const nthInterval = this.basePollingInterval * Math.pow(2, this.maxPollingSteps - 1);
const nthInterval = this.basePollingInterval * 2 ** (this.maxPollingSteps - 1);
if (shouldReset) {
this.pollingInterval = this.basePollingInterval;
} else if (this.pollingInterval < nthInterval) {
......
......@@ -90,6 +90,7 @@ export default class EditorInstance {
this.dispatchExtAction = EditorInstance.useUnuse.bind(instProxy, extensionsStore);
// eslint-disable-next-line no-constructor-return
return instProxy;
}
......
......@@ -15,8 +15,6 @@ export default class EnvironmentsStore {
this.state.availableCounter = 0;
this.state.paginationInformation = {};
this.state.reviewAppDetails = {};
return this;
}
/**
......
......@@ -54,24 +54,23 @@ export default class IssuableBulkUpdateSidebar {
new MilestoneSelect();
subscriptionSelect();
// Checking IS_EE and using ee_else_ce is odd, but we do it here to satisfy
// the import/no-unresolved lint rule when FOSS_ONLY=1, even though at
// runtime this block won't execute.
if (IS_EE) {
import('ee/vue_shared/components/sidebar/health_status_select/health_status_bundle')
import('ee_else_ce/vue_shared/components/sidebar/health_status_select/health_status_bundle')
.then(({ default: HealthStatusSelect }) => {
HealthStatusSelect();
})
.catch(() => {});
}
if (IS_EE) {
import('ee/vue_shared/components/sidebar/epics_select/epics_select_bundle')
import('ee_else_ce/vue_shared/components/sidebar/epics_select/epics_select_bundle')
.then(({ default: EpicSelect }) => {
EpicSelect();
})
.catch(() => {});
}
if (IS_EE) {
import('ee/vue_shared/components/sidebar/iterations_dropdown_bundle')
import('ee_else_ce/vue_shared/components/sidebar/iterations_dropdown_bundle')
.then(({ default: iterationsDropdown }) => {
iterationsDropdown();
})
......
......@@ -169,28 +169,27 @@ export default class CreateMergeRequestDropdown {
}
createMergeRequest() {
return new Promise(() => {
this.isCreatingMergeRequest = true;
return this.createBranch(false)
.then(() => api.trackRedisHllUserEvent('i_code_review_user_create_mr_from_issue'))
.then(() => {
let path = canCreateConfidentialMergeRequest()
? this.createMrPath.replace(
this.projectPath,
confidentialMergeRequestState.selectedProject.pathWithNamespace,
)
: this.createMrPath;
path = mergeUrlParams(
{
'merge_request[target_branch]': this.refInput.value,
'merge_request[source_branch]': this.branchInput.value,
},
path,
);
window.location.href = path;
});
});
this.isCreatingMergeRequest = true;
return this.createBranch(false)
.then(() => api.trackRedisHllUserEvent('i_code_review_user_create_mr_from_issue'))
.then(() => {
let path = canCreateConfidentialMergeRequest()
? this.createMrPath.replace(
this.projectPath,
confidentialMergeRequestState.selectedProject.pathWithNamespace,
)
: this.createMrPath;
path = mergeUrlParams(
{
'merge_request[target_branch]': this.refInput.value,
'merge_request[source_branch]': this.branchInput.value,
},
path,
);
window.location.href = path;
});
}
disable() {
......
......@@ -591,8 +591,7 @@ export const addSelectOnFocusBehaviour = (selector = '.js-select-on-focus') => {
* @param {Number} precision
*/
export const roundOffFloat = (number, precision = 0) => {
// eslint-disable-next-line no-restricted-properties
const multiplier = Math.pow(10, precision);
const multiplier = 10 ** precision;
return Math.round(number * multiplier) / multiplier;
};
......@@ -622,8 +621,7 @@ export const roundToNearestHalf = (num) => Math.round(num * 2).toFixed() / 2;
* @param {Number} precision
*/
export const roundDownFloat = (number, precision = 0) => {
// eslint-disable-next-line no-restricted-properties
const multiplier = Math.pow(10, precision);
const multiplier = 10 ** precision;
return Math.floor(number * multiplier) / multiplier;
};
......
......@@ -53,7 +53,7 @@ window.gl = window.gl || {};
// inject test utilities if necessary
if (process.env.NODE_ENV !== 'production' && gon?.test_env) {
import(/* webpackMode: "eager" */ './test_utils/');
import(/* webpackMode: "eager" */ './test_utils');
}
document.addEventListener('beforeunload', () => {
......
......@@ -41,8 +41,6 @@ function updateUrlWithNoteId(noteId) {
// Unmask the note's ID
note?.setAttribute('id', `note_${noteId}`);
} else if (noteId) {
updateHistory(newHistoryEntry);
}
}
......
......@@ -33,6 +33,7 @@ export default class SidebarService {
SidebarService.singleton = this;
}
// eslint-disable-next-line no-constructor-return
return SidebarService.singleton;
}
......
......@@ -11,6 +11,8 @@ export default class SidebarMediator {
if (!SidebarMediator.singleton) {
this.initSingleton(options);
}
// eslint-disable-next-line no-constructor-return
return SidebarMediator.singleton;
}
......
......@@ -4,6 +4,7 @@ export default class SidebarStore {
this.initSingleton(options);
}
// eslint-disable-next-line no-constructor-return
return SidebarStore.singleton;
}
......
// This empty file satisfies the import/no-unresolved rule for ee_else_ce imports.
// This empty file satisfies the import/no-unresolved rule for ee_else_ce imports.
// This empty file satisfies the import/no-unresolved rule for ee_else_ce imports.
<script>
import { GlButtonGroup, GlButton } from '@gitlab/ui';
// eslint-disable-next-line import/no-cycle
import { VIEW_TYPES, LINE_TYPES } from './constants';
// eslint-disable-next-line import/no-cycle
import { createDiffData } from './diff_utils';
export default {
......
<script>
// eslint-disable-next-line import/no-cycle
import { isOfTypeList } from './utils';
export default {
......
......@@ -14,8 +14,7 @@ const createRelativeRequire = (filename) => {
const rel = path.relative(__dirname, path.dirname(filename));
const base = path.resolve(__dirname, rel);
// reason: Dynamic require should be fine here since the code is dynamically evaluated anyways.
// eslint-disable-next-line import/no-dynamic-require, global-require
// eslint-disable-next-line global-require
return (pathArg) => require(transformRequirePath(base, pathArg));
};
......
......@@ -8,7 +8,7 @@ beforeAll(async () => {
// that jQuery isn't available *before* we import @rails/ujs.
delete global.jQuery;
const { initRails } = await import('~/lib/utils/rails_ujs.js');
const { initRails } = await import('~/lib/utils/rails_ujs');
initRails();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment