Commit 2200b5fd authored by Mike Greiling's avatar Mike Greiling

fix remaining commonjs uses within EE

parent 52e58cbf
/* global BoardService */
import Vue from 'vue';
const boardMilestoneSelect = require('./milestone_select');
const extraMilestones = require('../mixins/extra_milestones');
import boardMilestoneSelect from './milestone_select';
import extraMilestones from '../mixins/extra_milestones';
(() => {
window.gl = window.gl || {};
......
import Vue from 'vue';
require('./board_new_form');
import './board_new_form';
(() => {
window.gl = window.gl || {};
......
/* global BoardService */
const extraMilestones = require('../mixins/extra_milestones');
import extraMilestones from '../mixins/extra_milestones';
module.exports = {
export default {
props: {
board: {
type: Object,
......
......@@ -2,11 +2,10 @@
import Vue from 'vue';
import queryData from '../../utils/query_data';
require('./header');
require('./list');
require('./footer');
require('./empty_state');
import './header';
import './list';
import './footer';
import './empty_state';
const ModalStore = gl.issueBoards.ModalStore;
......
module.exports = [
export default [
{
id: null,
title: 'Any Milestone',
......
......@@ -37,14 +37,12 @@
/* global ShortcutsWiki */
import Issue from './issue';
import BindInOut from './behaviors/bind_in_out';
import DeleteModal from './branches/branches_delete_modal';
import Group from './group';
import GroupName from './group_name';
import GroupsList from './groups_list';
import ProjectsList from './projects_list';
import ApproversSelect from './approvers_select';
import MiniPipelineGraph from './mini_pipeline_graph_dropdown';
import BlobLinePermalinkUpdater from './blob/blob_line_permalink_updater';
import Landing from './landing';
......@@ -58,8 +56,10 @@ import GeoNodes from './geo_nodes';
import ServiceDeskRoot from './projects/settings_service_desk/service_desk_root';
import AutoWidthDropdownSelect from './issuable/auto_width_dropdown_select';
import GfmAutoComplete from './gfm_auto_complete';
import ShortcutsBlob from './shortcuts_blob';
const ShortcutsBlob = require('./shortcuts_blob');
// EE-only
import ApproversSelect from './approvers_select';
(function() {
var Dispatcher;
......
require('./filtered_search_token_keys');
import './filtered_search_token_keys';
const weightTokenKey = {
key: 'weight',
......
require('./export_csv_modal');
import './export_csv_modal';
......@@ -179,7 +179,7 @@ import './ldap_groups_select';
import './path_locks';
import './weight_select';
// eslint-disable-next-line global-require
// eslint-disable-next-line global-require, import/no-commonjs
if (process.env.NODE_ENV !== 'production') require('./test_utils/');
document.addEventListener('beforeunload', function () {
......
......@@ -6,15 +6,17 @@
import $ from 'jquery';
import Cookies from 'js-cookie';
import autosize from 'vendor/autosize';
import Dropzone from 'dropzone';
import 'vendor/jquery.caret'; // required by jquery.atwho
import 'vendor/jquery.atwho';
import CommentTypeToggle from './comment_type_toggle';
import './autosave';
import './dropzone_input';
import './task_list';
require('./autosave');
window.autosize = require('vendor/autosize');
window.Dropzone = require('dropzone');
require('./dropzone_input');
require('vendor/jquery.caret'); // required by jquery.atwho
require('vendor/jquery.atwho');
require('./task_list');
window.autosize = autosize;
window.Dropzone = Dropzone;
const normalizeNewlines = function(str) {
return str.replace(/\r\n/g, '\n');
......
require('~/gl_dropdown');
require('~/lib/utils/type_utility');
require('~/blob/create_branch_dropdown');
require('~/blob/target_branch_dropdown');
import '~/gl_dropdown';
import '~/lib/utils/type_utility';
import '~/blob/create_branch_dropdown';
import '~/blob/target_branch_dropdown';
describe('CreateBranchDropdown', () => {
const fixtureTemplate = 'static/target_branch_dropdown.html.raw';
......
require('~/gl_dropdown');
require('~/lib/utils/type_utility');
require('~/blob/create_branch_dropdown');
require('~/blob/target_branch_dropdown');
import '~/gl_dropdown';
import '~/lib/utils/type_utility';
import '~/blob/create_branch_dropdown';
import '~/blob/target_branch_dropdown';
describe('TargetBranchDropdown', () => {
const fixtureTemplate = 'static/target_branch_dropdown.html.raw';
......
......@@ -3,11 +3,10 @@
/* global BoardService */
import Vue from 'vue';
const milestoneSelect = require('~/boards/components/milestone_select');
require('~/boards/services/board_service');
require('~/boards/stores/boards_store');
require('./mock_data');
import milestoneSelect from '~/boards/components/milestone_select';
import '~/boards/services/board_service';
import '~/boards/stores/boards_store';
import './mock_data';
describe('Milestone select component', () => {
let selectMilestoneSpy;
......
import Vue from 'vue';
import DeployBoard from '~/environments/components/deploy_board_component.vue';
import Service from '~/environments/services/environments_service';
const { deployBoardMockData, invalidDeployBoardMockData } = require('./mock_data');
import { deployBoardMockData, invalidDeployBoardMockData } from './mock_data';
describe('Deploy Board', () => {
let DeployBoardComponent;
......
require('~/extensions/array');
require('~/filtered_search/filtered_search_token_keys_with_weights');
import '~/extensions/array';
import '~/filtered_search/filtered_search_token_keys_with_weights';
(() => {
describe('Filtered Search Token Keys With Weights', () => {
......
/* eslint no-param-reassign: "off" */
import GfmAutoComplete from '~/gfm_auto_complete';
require('vendor/jquery.caret');
require('vendor/jquery.atwho');
import 'vendor/jquery.caret';
import 'vendor/jquery.atwho';
describe('GfmAutoComplete', function () {
const gfmAutoCompleteCallbacks = GfmAutoComplete.prototype.getDefaultCallbacks.call({
......
/* eslint-disable comma-dangle, no-param-reassign, no-unused-expressions, max-len */
require('~/gl_dropdown');
require('~/lib/utils/common_utils');
require('~/lib/utils/type_utility');
require('~/lib/utils/url_utility');
import '~/gl_dropdown';
import '~/lib/utils/common_utils';
import '~/lib/utils/type_utility';
import '~/lib/utils/url_utility';
(() => {
const NON_SELECTABLE_CLASSES = '.divider, .separator, .dropdown-header, .dropdown-menu-empty-link';
......
......@@ -2,15 +2,15 @@
/* global IssuableContext */
/* global LabelsSelect */
require('~/lib/utils/type_utility');
require('~/gl_dropdown');
require('select2');
require('vendor/jquery.nicescroll');
require('~/api');
require('~/create_label');
require('~/issuable_context');
require('~/users_select');
require('~/labels_select');
import '~/lib/utils/type_utility';
import '~/gl_dropdown';
import 'select2';
import 'vendor/jquery.nicescroll';
import '~/api';
import '~/create_label';
import '~/issuable_context';
import '~/users_select';
import '~/labels_select';
(() => {
let saveLabelCount = 0;
......
require('~/project_new');
import '~/project_new';
describe('ApproversSelect', function () {
const projectSettingsTemplate = 'projects/edit.html.raw';
......
/* eslint-disable space-before-function-paren, no-unused-expressions, no-return-assign, no-param-reassign, no-var, new-cap, wrap-iife, no-unused-vars, quotes, jasmine/no-expect-in-setup-teardown, max-len */
/* global Project */
require('select2/select2.js');
require('~/lib/utils/type_utility');
require('~/gl_dropdown');
require('~/api');
require('~/project_select');
require('~/project');
import 'select2/select2';
import '~/lib/utils/type_utility';
import '~/gl_dropdown';
import '~/api';
import '~/project_select';
import '~/project';
(function() {
describe('Project Title', function() {
......
/* eslint-disable space-before-function-paren, max-len, no-var, one-var, one-var-declaration-per-line, no-unused-expressions, consistent-return, no-param-reassign, default-case, no-return-assign, comma-dangle, object-shorthand, prefer-template, quotes, new-parens, vars-on-top, new-cap, max-len */
require('~/gl_dropdown');
require('~/search_autocomplete');
require('~/lib/utils/common_utils');
require('~/lib/utils/type_utility');
require('vendor/fuzzaldrin-plus');
import '~/gl_dropdown';
import '~/search_autocomplete';
import '~/lib/utils/common_utils';
import '~/lib/utils/type_utility';
import 'vendor/fuzzaldrin-plus';
(function() {
var addBodyAttributes, assertLinks, dashboardIssuesPath, dashboardMRsPath, groupIssuesPath, groupMRsPath, groupName, mockDashboardOptions, mockGroupOptions, mockProjectOptions, projectIssuesPath, projectMRsPath, projectName, userId, widget;
......
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