Skip to content

Commit

Permalink
fix: use javascript strict mode everywhere to prevent errors
Browse files Browse the repository at this point in the history
Some direct global variable assignments where causing issues in older
version of Node. Using strict mode everywhere disallows that pattern,
so it's easier to spot.
  • Loading branch information
rdeltour committed Oct 6, 2017
1 parent 89cb1d7 commit b41e77b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/core/logger.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

const winston = require('winston');
const fs = require('fs-extra');
const LOGFILE = __dirname + "/../ace.log";
Expand Down
2 changes: 2 additions & 0 deletions src/http/http.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env node

'use strict';

const express = require('express');
const uuidv4 = require('uuid/v4');
const multer = require('multer');
Expand Down
4 changes: 3 additions & 1 deletion src/report/analyze-a11y-metadata.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

// input: json extraction of metadata
// output: description of accessibility metadata
/*
Expand All @@ -11,7 +13,7 @@

const winston = require('winston');

a11yMeta = [
const a11yMeta = [
"schema:accessMode",
"schema:accessibilityFeature",
"schema:accessibilityHazard",
Expand Down
5 changes: 4 additions & 1 deletion src/scripts/ace-axe.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/* eslint-disable */
window.daisy = window.daisy || {};

'use strict';

var daisy = window.daisy = window.daisy || {};
daisy.ace = daisy.ace || {};
daisy.epub = daisy.epub || {};

Expand Down
7 changes: 5 additions & 2 deletions src/scripts/ace-extraction.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/* eslint-disable */
window.daisy = window.daisy || {};
ace = daisy.ace = daisy.ace || {};

'use strict';

var daisy = window.daisy = window.daisy || {};
var ace = daisy.ace = daisy.ace || {};

ace.createReport = function(report) {
let reportData = function(field, array) {
Expand Down

0 comments on commit b41e77b

Please sign in to comment.