Move "use strict" directives up

Move "use strict" directives to the first line of each file. In
particular, move them above any ESLint comments, which are far less
important.

There are few exceptions:

  Executable files

    In these, the "use strict" directive must give way to the shebang.

  lib/parser.js

    Here, the "Generated by..." comment comes first. Also, ESLint
    comments are prepended in post-processing.
redux
David Majda 8 years ago
parent ff7193776e
commit c134e06229

@ -1,11 +1,11 @@
"use strict";
/* eslint-env browser, jquery */
let benchmarks = require("./benchmarks.js");
let Runner = require("./runner.js");
$("#run").click(() => {
"use strict";
// Results Table Manipulation
let resultsTable = $("#results-table");
@ -134,7 +134,5 @@ $("#run").click(() => {
});
$(document).ready(() => {
"use strict";
$("#run").focus();
});

@ -1,10 +1,10 @@
#!/usr/bin/env node
"use strict";
/* eslint-env node */
/* eslint no-console: 0*/
"use strict";
let fs = require("fs");
let benchmarks = require("./benchmarks.js");

@ -1,7 +1,7 @@
/* global setTimeout */
"use strict";
/* global setTimeout */
let peg = require("../lib/peg");
let Runner = {

@ -1,10 +1,10 @@
#!/usr/bin/env node
"use strict";
/* eslint-env node */
/* eslint no-console: 0 */
"use strict";
// Small server whose main purpose is to ensure that both the benchmarked code
// and the benchmark get passed through Babel & Browserify before they are
// served to the browser.

@ -1,8 +1,8 @@
"use strict";
/* eslint no-console: 0 */
/* global console */
"use strict";
let peg = require("../../lib/peg");
describe("generated parser API", function() {

@ -1,8 +1,8 @@
"use strict";
/* eslint no-console: 0 */
/* global console */
"use strict";
let peg = require("../../lib/peg");
describe("generated parser behavior", function() {

@ -1,10 +1,10 @@
#!/usr/bin/env node
"use strict";
/* eslint-env node */
/* eslint no-console: 0 */
"use strict";
// Small server whose main purpose is to ensure that both the specced code and
// the specs get passed through Babel & Browserify before they are served to the
// browser.

Loading…
Cancel
Save