Skip to content

Commit

Permalink
fixed lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbenz committed Jan 28, 2020
1 parent c482762 commit 4b15454
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
18 changes: 11 additions & 7 deletions platform/lib/middleware/subdomain.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,17 @@ class Subdomain {
if (!subdomainApp) {
subdomainApp = express();
subdomainApp.disable('x-powered-by');
subdomainApp.use(cors({
origin: true,
credentials: true,
}));
subdomainApp.use(ampCors({
email: true,
}));
subdomainApp.use(
cors({
origin: true,
credentials: true,
})
);
subdomainApp.use(
ampCors({
email: true,
})
);
subdomainApp.listen(hostConfig.port, () => {
signale.info(
`${hostConfig.subdomain} dev server listening on ${hostConfig.port}`
Expand Down
7 changes: 6 additions & 1 deletion platform/lib/pipeline/componentReferenceImporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ require('module-alias/register');
// If a doc is broken in a release, add it to this this list to fetch from master instead.
//
// DON'T FORGET TO REMOVE ONCE IT'S FIXED
const DOCS_TO_FETCH_FROM_MASTER = ['amp-script', 'amp-carousel', 'amp-consent', 'amp-bind'];
const DOCS_TO_FETCH_FROM_MASTER = [
'amp-script',
'amp-carousel',
'amp-consent',
'amp-bind',
];
const DEFAULT_VERSION = 0.1;

const {GitHubImporter, DEFAULT_REPOSITORY} = require('./gitHubImporter');
Expand Down
7 changes: 5 additions & 2 deletions platform/lib/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let templates = null;
* @param {expressjs.Request} request
* @return {Object}
*/
function createRequestContext(request={'query': {}}, context={}) {
function createRequestContext(request = {'query': {}}, context = {}) {
// Store the initially requested format to be able
// to match user request against available formats later
context.requestedFormat = request.query.format;
Expand Down Expand Up @@ -82,7 +82,10 @@ class Templates {
});

// Add extension to determine default document format at runtime
this.nunjucksEnv_.addExtension('SupportedFormatsExtension', new SupportedFormatsExtension());
this.nunjucksEnv_.addExtension(
'SupportedFormatsExtension',
new SupportedFormatsExtension()
);

// One locale has ~860 pages with each weighing ~92KB. The cache therefore
// maxes out at ~224MB to be safe
Expand Down

0 comments on commit 4b15454

Please sign in to comment.