Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Remove js prefix from require statements #1262

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions client/src/boot/BootRoutes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* global window, document */

/* eslint-disable
no-alert
maxime-rainville marked this conversation as resolved.
Show resolved Hide resolved
*/
import $ from 'jquery';
import React from 'react';
import { Provider } from 'react-redux';
Expand Down Expand Up @@ -138,7 +140,6 @@ class BootRoutes {
WARNING: Your changes have not been saved.\n\n
Press OK to continue, or Cancel to stay on the current page.`
);
// eslint-disable-next-line no-alert
if (!this.shouldConfirmBeforeUnload() || window.confirm(msg)) {
// eslint-disable-next-line no-param-reassign
ctx.store = store;
Expand Down
3 changes: 2 additions & 1 deletion client/src/bundles/vendor.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* eslint-disable
import/no-webpack-loader-syntax,
import/no-extraneous-dependencies,
import/no-unresolved
import/no-unresolved,
import/extensions
*/
// TODO Enable require(*.css) includes once https://github.com/webpack/extract-text-webpack-plugin/issues/179
// is resolved. Included in bundle.scss for now.
Expand Down
2 changes: 0 additions & 2 deletions client/src/legacy/DateField.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import i18n from 'i18n';
import moment from 'moment';
import modernizr from 'modernizr';

require('../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');

jQuery.entwine('ss', ($) => {
$('input[type=date]').entwine({
onadd() {
Expand Down
3 changes: 3 additions & 0 deletions client/src/legacy/DatetimeField.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* eslint-disable
import/extensions
*/
import jQuery from 'jquery';
import i18n from 'i18n';
import moment from 'moment';
Expand Down
6 changes: 1 addition & 5 deletions client/src/lib/tests/ShortcodeSerialiser-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/* global jest, jasmine, describe, beforeEach, it, pit, expect, process */

jest.dontMock('../ShortcodeSerialiser.js');

// FYI: Changing this to an import statements broke jest's automocking
const ShortcodeSerialiser = require('../ShortcodeSerialiser.js').default;
import ShortcodeSerialiser from '../ShortcodeSerialiser';

describe('ShortcodeSerialiser', () => {
describe('match', () => {
Expand Down
6 changes: 1 addition & 5 deletions client/src/lib/tests/router-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/* global jest, jasmine, describe, beforeEach, it, expect, process */

jest.dontMock('../Router.js');

// FYI: Changing this to an import statements broke jest's automocking
const router = require('../Router.js').default;
import router from '../Router';

describe('Router', () => {
// Mock base dir
Expand Down