Skip to content

Commit 4c2ada7

Browse files
authored
Merge pull request code-dot-org#10294 from code-dot-org/remove-use-strict
Remove unneeded 'use strict'
2 parents cc47687 + 3b86db4 commit 4c2ada7

File tree

193 files changed

+4
-279
lines changed

Some content is hidden

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

193 files changed

+4
-279
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ module.exports = {
6060
"space-before-function-paren": ["error", {
6161
"anonymous": "always",
6262
"named": "never"
63-
}]
63+
}],
64+
"strict": "error",
6465
}
6566
};

apps/src/CommandHistory.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/** @file Provide browsable command history to a textbox with limited depth. */
2-
'use strict';
32

43
var CommandHistory = module.exports = function () {
54
/**

apps/src/JsDebuggerUi.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/** @file Debugger controls and debug console used in our rich JavaScript IDEs */
2-
'use strict';
3-
42
var CommandHistory = require('./CommandHistory');
53
var constants = require('./constants');
64
var DebugArea = require('./DebugArea');

apps/src/JsInterpreterLogger.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/** @file Observes a JSInterpreter and logs to the designated browser console. */
2-
'use strict';
3-
42
var Observer = require('./Observer');
53

64
/**

apps/src/MusicController.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/** @file The maestro! Helper that knows which music tracks can be played, and
22
* which one is playing now, and selects and plays them appropriately. */
3-
'use strict';
4-
53
var utils = require('./utils');
64
var _ = require('lodash');
75

apps/src/ObservableEvent.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
/**
42
* A subscription/notification atom, used to cleanly hook up callbacks
53
* without attaching anything to the DOM or other global scope.

apps/src/Observer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/** @file Helper for consuming ObservableEvents. */
2-
'use strict';
32

43
/**
54
* Helper object for consuming ObservableEvents, designed for composition into

apps/src/RunLoop.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/* global window */
2-
'use strict';
3-
42
var ObservableEvent = require('./ObservableEvent');
53

64
// It is more accurate to use performance.now(), but we use Date.now()

apps/src/applab/ChartApi.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
* @see {GoogleChart}
66
*/
77
/* global Promise */
8-
'use strict';
9-
108
var utils = require('../utils');
119
var GoogleChart = require('./GoogleChart');
1210

apps/src/applab/EventSandboxer.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/** @file Helper that generates sanitized, standardized event objects. */
2-
'use strict';
3-
42
var keyEvent = require('./keyEvent');
53

64
/**

apps/src/applab/GoogleChart.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*
44
* @see https://developers.google.com/chart/
55
*/
6-
'use strict';
76
/* global google, Promise */
87

98
require('../utils'); // Provides Function.prototype.inherits

apps/src/applab/RecordListener.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
/**
42
* Class which allows callers to listen to changes to data tables. This is currently
53
* done by polling. Some modest rate-limiting is achieved by waiting for one second

apps/src/applab/actions.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/** @file Redux action-creators for App Lab.
22
* @see http://redux.js.org/docs/basics/Actions.html */
3-
'use strict';
4-
53
var utils = require('../utils');
64

75
/** @enum {string} */

apps/src/applab/appStorage.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
/* global Applab */
42

53
var RecordListener = require('./RecordListener');

apps/src/applab/applab.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*
66
*/
77
/* global dashboard */
8-
9-
'use strict';
108
import $ from 'jquery';
119
var React = require('react');
1210
var ReactDOM = require('react-dom');

apps/src/applab/reducers.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/** @file Redux reducer functions for App Lab.
22
* @see http://redux.js.org/docs/basics/Reducers.html */
3-
'use strict';
4-
53
import { ActionType } from './actions';
64
import { ApplabInterfaceMode } from './constants';
75
import data from './redux/data';

apps/src/blockTooltips/tooltipUtils.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/* global ace */
2-
'use strict';
3-
42
var _ = require('lodash');
53

64
/**

apps/src/blocksCommon.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/**
22
* Defines blocks useful in multiple blockly apps
33
*/
4-
'use strict';
5-
64
var commonMsg = require('@cdo/locale');
75

86
/**

apps/src/bounce/blocks.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* Copyright 2013 Code.org
55
*
66
*/
7-
'use strict';
8-
97
var msg = require('./locale');
108
var codegen = require('../codegen');
119

apps/src/bounce/bounce.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
* Copyright 2013 Code.org
55
*
66
*/
7-
8-
'use strict';
9-
107
var React = require('react');
118
var ReactDOM = require('react-dom');
129
var studioApp = require('../StudioApp').singleton;

apps/src/bounce/tiles.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
/**
42
* Constants for cardinal directions. Subsequent code assumes these are
53
* in the range 0..3 and that opposites have an absolute difference of 2.

apps/src/calc/blocks.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
* @fileoverview Demonstration of Blockly: Calc Graphics.
2222
* @author [email protected] (Neil Fraser)
2323
*/
24-
'use strict';
25-
2624
var msg = require('./locale');
2725
var commonMsg = require('@cdo/locale');
2826

apps/src/calc/calc.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
17-
'use strict';
18-
1916
var Calc = module.exports;
2017

2118
/**

apps/src/calc/js-numbers/js-numbers.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ module.exports = jsnums;
2727

2828

2929
(function() {
30-
'use strict';
3130
// Abbreviation
3231
var Numbers = jsnums;
3332

apps/src/code-studio/clientState.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
* @file Helper functions for accessing client state. This state is stored in a
33
* combination of cookies and HTML5 web storage.
44
*/
5-
'use strict';
6-
75
import cookies from 'js-cookie';
86
var sessionStorage = window.sessionStorage;
97

apps/src/code-studio/code-studio.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
* Note: This is included _after_ application.js.erb during our transition period,
77
* so when moving things preserve the include order as much as possible.
88
*/
9-
'use strict';
10-
119
// Require this first at each bundle entry point for full ES6 support.
1210
require("babel-polyfill");
1311

apps/src/code-studio/components/AssetUploader.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/** @file Upload button wrapping a hidden uploader component. */
2-
'use strict';
3-
42
var React = require('react');
53
var HiddenUploader = require('./HiddenUploader.jsx');
64

apps/src/code-studio/components/HiddenUploader.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/** @file Hidden file input with interface for handling uploads. */
2-
'use strict';
32
import $ from 'jquery';
43
var React = require('react');
54

apps/src/code-studio/consoleShim.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* @see http://jsperf.com/console-polyfill
77
* @see https://getfirebug.com/wiki/index.php/Console_API
88
*/
9-
'use strict';
109

1110
/**
1211
* Call this method, passing in the window object, to fill missing console

apps/src/code-studio/initializeCodeMirror.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* @file Function that initializes a CodeMirror editor in place of a textarea.
33
*/
44
/* global inlineAttach */
5-
'use strict';
65
import $ from 'jquery';
76
var CodeMirror = require('codemirror');
87
require("codemirror/mode/markdown/markdown");

apps/src/code-studio/initializeEmbeddedMarkdownEditor.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* @file Defines a function for initializing an embedded markdown editor using
33
* CodeMirror and marked.
44
*/
5-
'use strict';
65
var marked = require("marked");
76
var initializeCodeMirror = require("./initializeCodeMirror");
87

apps/src/code-studio/jsonEditor.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
import $ from 'jquery';
32
var CodeMirror = require('codemirror');
43

apps/src/code-studio/levelbuilder.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
22
* @file Main entry point for scripts used on all level editing pages.
33
*/
4-
'use strict';
54
var _ = require('lodash');
65

76
window.levelbuilder = window.levelbuilder || {};

apps/src/code-studio/levelbuilder_markdown.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import $ from 'jquery';
44
* @file Main entry point for scripts used only in levelbuilder when editing
55
* DSL-defined levels.
66
*/
7-
'use strict';
87
var initializeEmbeddedMarkdownEditor = require('./initializeEmbeddedMarkdownEditor');
98

109
// Initialize markdown editors on page load

apps/src/code-studio/levelbuilder_studio.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import $ from 'jquery';
44
* @file Main entry point for scripts used only in levelbuilder on when editing
55
* studio-type levels.
66
*/
7-
'use strict';
87
var CodeMirror = require('codemirror');
98

109
// On page load, specifically for this editor page.

apps/src/code-studio/levels/widget.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
* @file JavaScript loaded in all Widget-type levels.
33
*/
44
/* global apps, appOptions, dashboard */
5-
'use strict';
6-
75
import $ from 'jquery';
86
var _ = require('lodash');
97

apps/src/code-studio/url_test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
// Tests whether the browser can access an image URL.
42
// Useful as a workaround for CORS security to test access to an origin.
53
function testImageAccess(url, successCallback, failureCallback, timeoutMs) {

apps/src/code-studio/utils.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
module.exports = {
42
/**
53
* Gets the URL querystring params.

apps/src/code-studio/videos.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
'use strict';
21
/* global dashboard, Dialog, YT, YTConfig, trackEvent */
32

43
import $ from 'jquery';

apps/src/craft/blocks.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
var i18n = require('./locale');
42

53
var blocksToDisplayText = {

apps/src/craft/craft.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/* global trackEvent */
2-
3-
'use strict';
42
import $ from 'jquery';
53
import React from 'react';
64
import ReactDOM from 'react-dom';

apps/src/eval/blocks.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
* @fileoverview Demonstration of Blockly: Eval Graphics.
2222
* @author [email protected] (Neil Fraser)
2323
*/
24-
'use strict';
25-
2624
var msg = require('./locale');
2725
var commonMsg = require('@cdo/locale');
2826

apps/src/eval/eval.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
'use strict';
18-
1917
var Eval = module.exports;
2018

2119
/**

apps/src/flappy/blocks.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* Copyright 2013 Code.org
55
*
66
*/
7-
'use strict';
8-
97
var msg = require('./locale');
108
var commonMsg = require('@cdo/locale');
119
var blockUtils = require('../block_utils');

apps/src/flappy/flappy.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*
66
*/
77

8-
'use strict';
9-
108
var React = require('react');
119
var ReactDOM = require('react-dom');
1210
var studioApp = require('../StudioApp').singleton;

apps/src/gamelab/AnimationPicker/AnimationPickerBody.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/** Body of the animation picker dialog */
2-
'use strict';
3-
42
import React from 'react';
53
import Radium from 'radium';
64
import color from '../../color';

apps/src/gamelab/AnimationPicker/AnimationPickerListItem.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/** @file A clickable item in the scroll area of the animation picker */
2-
'use strict';
3-
42
import React from 'react';
53
import Radium from 'radium';
64
import color from '../../color';

apps/src/gamelab/AnimationPicker/AnimationPickerSearchBar.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/** Animation picker dialog search bar */
2-
'use strict';
3-
42
import React from 'react';
53
var color = require('../../color');
64

apps/src/gamelab/AnimationPicker/animationPickerModule.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/** @file Redux reducer and actions for the Animation Picker */
2-
'use strict';
3-
42
import _ from 'lodash';
53
import {addBlankAnimation, addAnimation, addLibraryAnimation} from '../animationListModule';
64
import { makeEnum } from '../../utils';

apps/src/gamelab/AnimationPicker/styles.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/** @file Shared styles for the animation picker dialog. */
2-
'use strict';
3-
42
var color = require('../../color');
53

64
module.exports = {

apps/src/gamelab/AnimationTab/AnimationList.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/** @file Vertical scrolling list of animation sequences */
2-
'use strict';
3-
42
import React from 'react';
53
import { connect } from 'react-redux';
64
import color from '../../color';

apps/src/gamelab/AnimationTab/AnimationListItem.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/** A single list item representing an animation. */
2-
'use strict';
3-
42
import React from 'react';
53
import Radium from 'radium';
64
import {connect} from 'react-redux';

apps/src/gamelab/AnimationTab/ListItemButtons.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
/** @file controls below an animation thumbnail */
2-
'use strict';
3-
42
import React from 'react';
53
import color from '../../color';
64
import Radium from 'radium';

0 commit comments

Comments
 (0)