Skip to content

Commit bde5b7b

Browse files
committed
Build: Enable the strict ESLint rule
1 parent dabf788 commit bde5b7b

File tree

236 files changed

+516
-14
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+516
-14
lines changed

build/release-test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use strict";
2+
13
var shell = require( "shelljs" );
24
var Release = {
35
define: function( props ) {

build/release.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use strict";
2+
13
module.exports = function( Release ) {
24

35
var crypto = require( "crypto" );

build/tasks/build.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
module.exports = function( grunt ) {
2-
31
"use strict";
42

3+
module.exports = function( grunt ) {
4+
55
grunt.registerTask( "clean", function() {
66
require( "rimraf" ).sync( "dist" );
77
} );

build/tasks/testswarm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
module.exports = function( grunt ) {
2-
31
"use strict";
42

3+
module.exports = function( grunt ) {
4+
55
var versions = {
66
"git": "git",
77
"3.x-git": "3.x-git",

external/qunit-assert-classes/qunit-assert-classes.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
( function( factory ) {
2+
"use strict";
3+
24
if ( typeof define === "function" && define.amd ) {
35

46
// AMD. Register as an anonymous module.

tests/.eslintrc.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@
1010
},
1111

1212
"rules": {
13-
// "strict": [ "error", "function" ]
13+
"strict": [ "error", "function" ],
1414

1515
// The following rule is relaxed due to too many violations:
1616
"no-unused-vars": [ "error", { "vars": "all", "args": "after-used" } ],
1717

1818
// Too many violations:
19-
"max-len": "off",
20-
"strict": "off"
19+
"max-len": "off"
2120
},
2221

2322
"globals": {

tests/lib/bootstrap.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
( function() {
2+
"use strict";
23

34
var DEFAULT_JQUERY_VERSION = "1.12.4";
45

tests/lib/common.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ define( [
33
"jquery",
44
"lib/helper"
55
], function( QUnit, $, helper ) {
6+
"use strict";
67

78
var exports = {};
89

tests/lib/css.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
( function() {
2+
"use strict";
23

34
function includeStyle( url ) {
45
document.write( "<link rel='stylesheet' href='../../../" + url + "'>" );

tests/lib/qunit-assert-domequal.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ define( [
88
"qunit",
99
"jquery"
1010
], function( QUnit, $ ) {
11+
"use strict";
1112

1213
var domEqual = QUnit.assert.domEqual = function( selector, modifier, message ) {
1314

tests/lib/qunit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ define( [
66
"lib/qunit-assert-domequal",
77
"phantom-bridge"
88
], function( QUnit, $ ) {
9+
"use strict";
910

1011
QUnit.config.autostart = false;
1112
QUnit.config.requireExpects = true;

tests/unit/accordion/core.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"./helper",
55
"ui/widgets/accordion"
66
], function( QUnit, $, testHelper ) {
7+
"use strict";
78

89
var beforeAfterEach = testHelper.beforeAfterEach,
910
state = testHelper.state;

tests/unit/accordion/events.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"./helper",
55
"ui/widgets/accordion"
66
], function( QUnit, $, testHelper ) {
7+
"use strict";
78

89
var beforeAfterEach = testHelper.beforeAfterEach,
910
state = testHelper.state;

tests/unit/accordion/helper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/accordion"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
return $.extend( helper, {
910
equalHeight: function( assert, accordion, height ) {

tests/unit/accordion/methods.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"./helper",
55
"ui/widgets/accordion"
66
], function( QUnit, $, testHelper ) {
7+
"use strict";
78

89
var equalHeight = testHelper.equalHeight,
910
beforeAfterEach = testHelper.beforeAfterEach,

tests/unit/accordion/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"./helper",
55
"ui/widgets/accordion"
66
], function( QUnit, $, testHelper ) {
7+
"use strict";
78

89
var equalHeight = testHelper.equalHeight,
910
beforeAfterEach = testHelper.beforeAfterEach,

tests/unit/autocomplete/core.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/autocomplete"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "autocomplete: core", { afterEach: helper.moduleAfterEach } );
910

tests/unit/autocomplete/events.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/autocomplete"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "autocomplete: events", { afterEach: helper.moduleAfterEach } );
910

tests/unit/autocomplete/methods.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/autocomplete"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "autocomplete: methods", { afterEach: helper.moduleAfterEach } );
910

tests/unit/autocomplete/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/autocomplete"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "autocomplete: options", { afterEach: helper.moduleAfterEach } );
910

tests/unit/button/core.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ define( [
55
"ui/safe-active-element",
66
"ui/widgets/button"
77
], function( QUnit, $, helper ) {
8+
"use strict";
89

910
QUnit.module( "Button: core", { afterEach: helper.moduleAfterEach } );
1011

tests/unit/button/deprecated.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/button"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "Button (deprecated): core", { afterEach: helper.moduleAfterEach } );
910

tests/unit/button/events.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/button"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "Button: events", { afterEach: helper.moduleAfterEach } );
910

tests/unit/button/methods.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/button"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "Button: methods", { afterEach: helper.moduleAfterEach } );
910

tests/unit/button/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/button"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "button: options", { afterEach: helper.moduleAfterEach } );
910

tests/unit/checkboxradio/core.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/checkboxradio"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "Checkboxradio: core", { afterEach: helper.moduleAfterEach } );
910

tests/unit/checkboxradio/events.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/checkboxradio"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "Checkboxradio: events", { afterEach: helper.moduleAfterEach } );
910

tests/unit/checkboxradio/methods.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/checkboxradio"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "Checkboxradio: methods", { afterEach: helper.moduleAfterEach } );
910

tests/unit/checkboxradio/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/checkboxradio"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "Checkboxradio: options", { afterEach: helper.moduleAfterEach } );
910

tests/unit/controlgroup/core.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ define( [
88
"ui/widgets/button",
99
"ui/widgets/spinner"
1010
], function( QUnit, $, helper ) {
11+
"use strict";
1112

1213
QUnit.module( "Controlgroup: Core", { afterEach: helper.moduleAfterEach } );
1314

tests/unit/controlgroup/methods.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ define( [
88
"ui/widgets/button",
99
"ui/widgets/spinner"
1010
], function( QUnit, $, helper ) {
11+
"use strict";
1112

1213
QUnit.module( "Controlgroup: methods", { afterEach: helper.moduleAfterEach } );
1314

tests/unit/controlgroup/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ define( [
88
"ui/widgets/button",
99
"ui/widgets/spinner"
1010
], function( QUnit, $, helper ) {
11+
"use strict";
1112

1213
QUnit.module( "Controlgroup: options", { afterEach: helper.moduleAfterEach } );
1314

tests/unit/core/core.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ define( [
77
"ui/labels",
88
"ui/unique-id"
99
], function( QUnit, $, common, helper ) {
10+
"use strict";
1011

1112
QUnit.module( "core - jQuery extensions", { afterEach: helper.moduleAfterEach } );
1213

tests/unit/core/selector.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ define( [
66
"ui/focusable",
77
"ui/tabbable"
88
], function( QUnit, $, helper ) {
9+
"use strict";
910

1011
QUnit.module( "core - selectors", { afterEach: helper.moduleAfterEach } );
1112

tests/unit/datepicker/core.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ define( [
77
"ui/widgets/datepicker",
88
"ui/i18n/datepicker-he"
99
], function( QUnit, $, common, helper, testHelper ) {
10+
"use strict";
1011

1112
QUnit.module( "datepicker: core", {
1213
beforeEach: function() {

tests/unit/datepicker/events.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"./helper",
55
"ui/widgets/datepicker"
66
], function( QUnit, $, testHelper ) {
7+
"use strict";
78

89
var beforeAfterEach = testHelper.beforeAfterEach;
910

tests/unit/datepicker/helper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/datepicker"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
return $.extend( helper, {
910
addMonths: function( date, offset ) {

tests/unit/datepicker/methods.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"./helper",
55
"ui/widgets/datepicker"
66
], function( QUnit, $, testHelper ) {
7+
"use strict";
78

89
var beforeAfterEach = testHelper.beforeAfterEach;
910

tests/unit/datepicker/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ define( [
88
"ui/i18n/datepicker-zh-CN",
99
"ui/ie"
1010
], function( QUnit, $, testHelper ) {
11+
"use strict";
1112

1213
var beforeAfterEach = testHelper.beforeAfterEach;
1314

tests/unit/dialog/core.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/dialog"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
// TODO add afterEach callback to remove dialogs
910
QUnit.module( "dialog: core", { afterEach: helper.moduleAfterEach } );

tests/unit/dialog/deprecated.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/dialog"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "dialog (deprecated): options", { afterEach: helper.moduleAfterEach } );
910

tests/unit/dialog/events.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"./helper",
55
"ui/widgets/dialog"
66
], function( QUnit, $, testHelper ) {
7+
"use strict";
78

89
QUnit.module( "dialog: events", { afterEach: testHelper.moduleAfterEach } );
910

tests/unit/dialog/helper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/dialog"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
return $.extend( helper, {
910
drag: function( element, handle, dx, dy ) {

tests/unit/dialog/methods.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/dialog"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
QUnit.module( "dialog: methods", {
910
afterEach: function() {

tests/unit/dialog/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ define( [
77
"ui/effects/effect-blind",
88
"ui/effects/effect-explode"
99
], function( QUnit, $, helper, testHelper ) {
10+
"use strict";
1011

1112
QUnit.module( "dialog: options", { afterEach: helper.moduleAfterEach } );
1213

tests/unit/draggable/core.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ define( [
77
"ui/widgets/droppable",
88
"ui/widgets/resizable"
99
], function( QUnit, $, helper, testHelper ) {
10+
"use strict";
1011

1112
QUnit.module( "draggable: core", { afterEach: helper.moduleAfterEach } );
1213

tests/unit/draggable/events.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/draggable"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
var element;
910

tests/unit/draggable/helper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ define( [
44
"lib/helper",
55
"ui/widgets/draggable"
66
], function( QUnit, $, helper ) {
7+
"use strict";
78

89
return $.extend( helper, {
910

tests/unit/draggable/methods.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ define( [
55
"./helper",
66
"ui/widgets/draggable"
77
], function( QUnit, $, helper, testHelper ) {
8+
"use strict";
89

910
var element;
1011

0 commit comments

Comments
 (0)