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

require extensions in imports #4876

Merged
merged 4 commits into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ module.exports = {
},
"extends": "standard",
"plugins": [
"prebid"
"prebid",
"import"
],
"globals": {
"$$PREBID_GLOBAL$$": false
Expand All @@ -27,6 +28,7 @@ module.exports = {
"comma-dangle": "off",
"semi": "off",
"space-before-function-paren": "off",
"import/extensions": ["error", "ignorePackages"],

// Exceptions below this line are temporary, so that eslint can be added into the CI process.
// Violations of these styles should be fixed, and the exceptions removed over time.
Expand Down
10 changes: 5 additions & 5 deletions modules/1ad4goodBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as utils from '../src/utils';
import { registerBidder } from '../src/adapters/bidderFactory';
import { BANNER, VIDEO } from '../src/mediaTypes';
import find from 'core-js/library/fn/array/find';
import includes from 'core-js/library/fn/array/includes';
import * as utils from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';
import find from 'core-js/library/fn/array/find.js';
import includes from 'core-js/library/fn/array/includes.js';

const BIDDER_CODE = '1ad4good';
const URL = 'https://hb.1ad4good.org/prebid';
Expand Down
6 changes: 3 additions & 3 deletions modules/33acrossBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { registerBidder } from '../src/adapters/bidderFactory';
import { config } from '../src/config';
import * as utils from '../src/utils';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { config } from '../src/config.js';
import * as utils from '../src/utils.js';

const BIDDER_CODE = '33across';
const END_POINT = 'https://ssc.33across.com/api/v1/hb';
Expand Down
4 changes: 2 additions & 2 deletions modules/aardvarkBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as utils from '../src/utils';
import {registerBidder} from '../src/adapters/bidderFactory';
import * as utils from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';

const BIDDER_CODE = 'aardvark';
const DEFAULT_ENDPOINT = 'bidder.rtk.io';
Expand Down
6 changes: 3 additions & 3 deletions modules/ablidaBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as utils from '../src/utils';
import {config} from '../src/config';
import {registerBidder} from '../src/adapters/bidderFactory';
import * as utils from '../src/utils.js';
import {config} from '../src/config.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';

const BIDDER_CODE = 'ablida';
const ENDPOINT_URL = 'https://bidder.ablida.net/prebid';
Expand Down
6 changes: 3 additions & 3 deletions modules/adagioAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Analytics Adapter for Adagio
*/

import adapter from '../src/AnalyticsAdapter';
import adapterManager from '../src/adapterManager';
import adapter from '../src/AnalyticsAdapter.js';
import adapterManager from '../src/adapterManager.js';
import CONSTANTS from '../src/constants.json';
import * as utils from '../src/utils';
import * as utils from '../src/utils.js';

const emptyUrl = '';
const analyticsType = 'endpoint';
Expand Down
12 changes: 6 additions & 6 deletions modules/adagioBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import find from 'core-js/library/fn/array/find';
import * as utils from '../src/utils';
import {registerBidder} from '../src/adapters/bidderFactory';
import { loadExternalScript } from '../src/adloader'
import JSEncrypt from 'jsencrypt/bin/jsencrypt';
import sha256 from 'crypto-js/sha256';
import find from 'core-js/library/fn/array/find.js';
import * as utils from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import { loadExternalScript } from '../src/adloader.js'
import JSEncrypt from 'jsencrypt/bin/jsencrypt.js';
import sha256 from 'crypto-js/sha256.js';

const BIDDER_CODE = 'adagio';
const VERSION = '2.1.0';
Expand Down
6 changes: 3 additions & 3 deletions modules/adbutlerBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

import * as utils from '../src/utils';
import {config} from '../src/config';
import {registerBidder} from '../src/adapters/bidderFactory';
import * as utils from '../src/utils.js';
import {config} from '../src/config.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';

const BIDDER_CODE = 'adbutler';

Expand Down
6 changes: 3 additions & 3 deletions modules/adfinityBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { registerBidder } from '../src/adapters/bidderFactory';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes';
import * as utils from '../src/utils';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
import * as utils from '../src/utils.js';

const BIDDER_CODE = 'adfinity';
const AD_URL = 'https://stat.adfinity.pro/?c=o&m=multi';
Expand Down
10 changes: 5 additions & 5 deletions modules/adformBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

import { registerBidder } from '../src/adapters/bidderFactory';
import { config } from '../src/config';
import { BANNER, VIDEO } from '../src/mediaTypes';
import { Renderer } from '../src/Renderer';
import * as utils from '../src/utils';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { config } from '../src/config.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';
import { Renderer } from '../src/Renderer.js';
import * as utils from '../src/utils.js';

const OUTSTREAM_RENDERER_URL = 'https://s2.adform.net/banners/scripts/video/outstream/render.js';

Expand Down
8 changes: 4 additions & 4 deletions modules/adformOpenRTBBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

import {
registerBidder
} from '../src/adapters/bidderFactory';
} from '../src/adapters/bidderFactory.js';
import {
NATIVE
} from '../src/mediaTypes';
import * as utils from '../src/utils';
import { config } from '../src/config';
} from '../src/mediaTypes.js';
import * as utils from '../src/utils.js';
import { config } from '../src/config.js';

const BIDDER_CODE = 'adformOpenRTB';
const NATIVE_ASSET_IDS = { 0: 'title', 2: 'icon', 3: 'image', 5: 'sponsoredBy', 4: 'body', 1: 'cta' };
Expand Down
8 changes: 4 additions & 4 deletions modules/adgenerationBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as utils from '../src/utils';
import {registerBidder} from '../src/adapters/bidderFactory';
import {BANNER, NATIVE} from '../src/mediaTypes';
import {config} from '../src/config';
import * as utils from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {BANNER, NATIVE} from '../src/mediaTypes.js';
import {config} from '../src/config.js';
const ADG_BIDDER_CODE = 'adgeneration';

export const spec = {
Expand Down
4 changes: 2 additions & 2 deletions modules/adheseBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

import { registerBidder } from '../src/adapters/bidderFactory';
import { BANNER, VIDEO } from '../src/mediaTypes';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';

const BIDDER_CODE = 'adhese';
const USER_SYNC_BASE_URL = 'https://user-sync.adhese.com/iframe/user_sync.html';
Expand Down
10 changes: 5 additions & 5 deletions modules/adkernelAdnAnalyticsAdapter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import adapter from '../src/AnalyticsAdapter';
import adapter from '../src/AnalyticsAdapter.js';
import CONSTANTS from '../src/constants.json';
import adapterManager from '../src/adapterManager';
import {parse} from '../src/url';
import * as utils from '../src/utils';
import {ajax} from '../src/ajax';
import adapterManager from '../src/adapterManager.js';
import {parse} from '../src/url.js';
import * as utils from '../src/utils.js';
import {ajax} from '../src/ajax.js';

const ANALYTICS_VERSION = '1.0.1';
const DEFAULT_QUEUE_TIMEOUT = 4000;
Expand Down
8 changes: 4 additions & 4 deletions modules/adkernelAdnBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as utils from '../src/utils';
import {registerBidder} from '../src/adapters/bidderFactory';
import {BANNER, VIDEO} from '../src/mediaTypes';
import {parse as parseUrl} from '../src/url';
import * as utils from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {BANNER, VIDEO} from '../src/mediaTypes.js';
import {parse as parseUrl} from '../src/url.js';

const DEFAULT_ADKERNEL_DSP_DOMAIN = 'tag.adkernel.com';
const DEFAULT_MIMES = ['video/mp4', 'video/webm', 'application/x-shockwave-flash', 'application/javascript'];
Expand Down
12 changes: 6 additions & 6 deletions modules/adkernelBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as utils from '../src/utils';
import { BANNER, VIDEO } from '../src/mediaTypes';
import {registerBidder} from '../src/adapters/bidderFactory';
import find from 'core-js/library/fn/array/find';
import includes from 'core-js/library/fn/array/includes';
import {parse as parseUrl} from '../src/url';
import * as utils from '../src/utils.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import find from 'core-js/library/fn/array/find.js';
import includes from 'core-js/library/fn/array/includes.js';
import {parse as parseUrl} from '../src/url.js';

/*
* In case you're AdKernel whitelable platform's client who needs branded adapter to
Expand Down
6 changes: 3 additions & 3 deletions modules/adliveBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as utils from '../src/utils';
import { registerBidder } from '../src/adapters/bidderFactory';
import { BANNER } from '../src/mediaTypes';
import * as utils from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER } from '../src/mediaTypes.js';

const BIDDER_CODE = 'adlive';
const ENDPOINT_URL = 'https://api.publishers.adlive.io/get?pbjs=1';
Expand Down
6 changes: 3 additions & 3 deletions modules/admanBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {registerBidder} from '../src/adapters/bidderFactory';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes';
import * as utils from '../src/utils';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
import * as utils from '../src/utils.js';

const BIDDER_CODE = 'adman';
const AD_URL = 'https://pub.admanmedia.com/?c=o&m=multi';
Expand Down
4 changes: 2 additions & 2 deletions modules/admaticBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as utils from '../src/utils';
import { registerBidder } from '../src/adapters/bidderFactory';
import * as utils from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';

const BIDDER_CODE = 'admatic';
const ENDPOINT_URL = 'https://ads4.admatic.com.tr/prebid/v3/bidrequest';
Expand Down
4 changes: 2 additions & 2 deletions modules/admediaBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as utils from '../src/utils';
import {registerBidder} from '../src/adapters/bidderFactory';
import * as utils from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';

const BIDDER_CODE = 'admedia';
const ENDPOINT_URL = 'https://prebid.admedia.com/bidder/';
Expand Down
4 changes: 2 additions & 2 deletions modules/admixerBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as utils from '../src/utils';
import {registerBidder} from '../src/adapters/bidderFactory';
import * as utils from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';

const BIDDER_CODE = 'admixer';
const ALIASES = ['go2net'];
Expand Down
4 changes: 2 additions & 2 deletions modules/adoceanBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as utils from '../src/utils';
import { registerBidder } from '../src/adapters/bidderFactory';
import * as utils from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';

const BIDDER_CODE = 'adocean';

Expand Down
10 changes: 5 additions & 5 deletions modules/adomikAnalyticsAdapter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import adapter from '../src/AnalyticsAdapter';
import adapter from '../src/AnalyticsAdapter.js';
import CONSTANTS from '../src/constants.json';
import adapterManager from '../src/adapterManager';
import { logInfo } from '../src/utils';
import find from 'core-js/library/fn/array/find';
import findIndex from 'core-js/library/fn/array/find-index';
import adapterManager from '../src/adapterManager.js';
import { logInfo } from '../src/utils.js';
import find from 'core-js/library/fn/array/find.js';
import findIndex from 'core-js/library/fn/array/find-index.js';

// Events used in adomik analytics adapter
const auctionInit = CONSTANTS.EVENTS.AUCTION_INIT;
Expand Down
22 changes: 11 additions & 11 deletions modules/adpod.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
* module that designed to support adpod video type ads. This import process allows this module to effectively act as a sub-module.
*/

import * as utils from '../src/utils';
import { addBidToAuction, doCallbacksIfTimedout, AUCTION_IN_PROGRESS, callPrebidCache, getPriceByGranularity, getPriceGranularity } from '../src/auction';
import { checkAdUnitSetup } from '../src/prebid';
import { checkVideoBidSetup } from '../src/video';
import { setupBeforeHookFnOnce, module } from '../src/hook';
import { store } from '../src/videoCache';
import { config } from '../src/config';
import { ADPOD } from '../src/mediaTypes';
import Set from 'core-js/library/fn/set';
import find from 'core-js/library/fn/array/find';
import { auctionManager } from '../src/auctionManager';
import * as utils from '../src/utils.js';
import { addBidToAuction, doCallbacksIfTimedout, AUCTION_IN_PROGRESS, callPrebidCache, getPriceByGranularity, getPriceGranularity } from '../src/auction.js';
import { checkAdUnitSetup } from '../src/prebid.js';
import { checkVideoBidSetup } from '../src/video.js';
import { setupBeforeHookFnOnce, module } from '../src/hook.js';
import { store } from '../src/videoCache.js';
import { config } from '../src/config.js';
import { ADPOD } from '../src/mediaTypes.js';
import Set from 'core-js/library/fn/set.js';
import find from 'core-js/library/fn/array/find.js';
import { auctionManager } from '../src/auctionManager.js';
import CONSTANTS from '../src/constants.json';

const from = require('core-js/library/fn/array/from');
Expand Down
6 changes: 3 additions & 3 deletions modules/adponeBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {BANNER} from '../src/mediaTypes';
import {registerBidder} from '../src/adapters/bidderFactory';
import {triggerPixel} from '../src/utils';
import {BANNER} from '../src/mediaTypes.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {triggerPixel} from '../src/utils.js';

const ADPONE_CODE = 'adpone';
const ADPONE_ENDPOINT = 'https://rtb.adpone.com/bid-request';
Expand Down
10 changes: 5 additions & 5 deletions modules/adspendBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as utils from '../src/utils';
import { ajax } from '../src/ajax'
import { config } from '../src/config';
import { registerBidder } from '../src/adapters/bidderFactory';
import { BANNER } from '../src/mediaTypes';
import * as utils from '../src/utils.js';
import { ajax } from '../src/ajax.js'
import { config } from '../src/config.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER } from '../src/mediaTypes.js';

const BIDDER_CODE = 'adspend';
const BID_URL = 'https://rtb.com.ru/headerbidding-bid';
Expand Down
10 changes: 5 additions & 5 deletions modules/adtelligentBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as utils from '../src/utils';
import {registerBidder} from '../src/adapters/bidderFactory';
import {VIDEO, BANNER} from '../src/mediaTypes';
import {Renderer} from '../src/Renderer';
import find from 'core-js/library/fn/array/find';
import * as utils from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {VIDEO, BANNER} from '../src/mediaTypes.js';
import {Renderer} from '../src/Renderer.js';
import find from 'core-js/library/fn/array/find.js';

const URL = 'https://ghb.adtelligent.com/auction/';
const OUTSTREAM_SRC = 'https://player.adtelligent.com/outstream-unit/2.01/outstream.min.js';
Expand Down
6 changes: 3 additions & 3 deletions modules/aduptechBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { registerBidder } from '../src/adapters/bidderFactory';
import { BANNER } from '../src/mediaTypes'
import * as utils from '../src/utils';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER } from '../src/mediaTypes.js'
import * as utils from '../src/utils.js';

export const BIDDER_CODE = 'aduptech';
export const PUBLISHER_PLACEHOLDER = '{PUBLISHER}';
Expand Down
14 changes: 7 additions & 7 deletions modules/advangelistsBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import * as utils from '../src/utils';
import { parse as parseUrl } from '../src/url';
import { config } from '../src/config';
import { registerBidder } from '../src/adapters/bidderFactory';
import { VIDEO, BANNER } from '../src/mediaTypes';
import find from 'core-js/library/fn/array/find';
import includes from 'core-js/library/fn/array/includes';
import * as utils from '../src/utils.js';
import { parse as parseUrl } from '../src/url.js';
import { config } from '../src/config.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { VIDEO, BANNER } from '../src/mediaTypes.js';
import find from 'core-js/library/fn/array/find.js';
import includes from 'core-js/library/fn/array/includes.js';

const ADAPTER_VERSION = '1.0';
const BIDDER_CODE = 'advangelists';
Expand Down
6 changes: 3 additions & 3 deletions modules/advenueBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { registerBidder } from '../src/adapters/bidderFactory';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes';
import * as utils from '../src/utils';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
import * as utils from '../src/utils.js';

const BIDDER_CODE = 'advenue';
const URL_MULTI = 'https://ssp.advenuemedia.co.uk/?c=o&m=multi';
Expand Down
12 changes: 6 additions & 6 deletions modules/advertlyBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { registerBidder } from '../src/adapters/bidderFactory';
import { config } from '../src/config';
import * as utils from '../src/utils';
import {BANNER, VIDEO} from '../src/mediaTypes';
import { ajax } from '../src/ajax';
import {Renderer} from '../src/Renderer';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { config } from '../src/config.js';
import * as utils from '../src/utils.js';
import {BANNER, VIDEO} from '../src/mediaTypes.js';
import { ajax } from '../src/ajax.js';
import {Renderer} from '../src/Renderer.js';

const SUPPORTED_AD_TYPES = [BANNER, VIDEO];
const BIDDER_CODE = 'advertly';
Expand Down
Loading