Skip to content

Commit

Permalink
var -> const in require statements, use arrow function in define requ…
Browse files Browse the repository at this point in the history
…ire call, phetsims/tasks#1010
  • Loading branch information
zepumph committed Sep 19, 2019
1 parent 1ceb2f1 commit f9412b8
Show file tree
Hide file tree
Showing 18 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion js/ActionIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Michael Kauzmann (PhET Interactive Simulations)
* @author Andrew Adare (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
Expand Down
4 changes: 2 additions & 2 deletions js/BooleanPropertyTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* @author Sam Reid (PhET Interactive Simulations)
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
const BooleanIO = require( 'TANDEM/types/BooleanIO' );
var BooleanProperty = require( 'AXON/BooleanProperty' );
const BooleanProperty = require( 'AXON/BooleanProperty' );

QUnit.module( 'BooleanProperty' );
QUnit.test( 'BooleanProperty', function( assert ) {
Expand Down
6 changes: 3 additions & 3 deletions js/DerivedPropertyTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var DerivedProperty = require( 'AXON/DerivedProperty' );
var Property = require( 'AXON/Property' );
const DerivedProperty = require( 'AXON/DerivedProperty' );
const Property = require( 'AXON/Property' );

QUnit.module( 'DerivedProperty' );

Expand Down
6 changes: 3 additions & 3 deletions js/DynamicPropertyTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var DynamicProperty = require( 'AXON/DynamicProperty' );
var Property = require( 'AXON/Property' );
const DynamicProperty = require( 'AXON/DynamicProperty' );
const Property = require( 'AXON/Property' );

QUnit.module( 'DynamicProperty' );

Expand Down
2 changes: 1 addition & 1 deletion js/EnumerationPropertyTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
Expand Down
6 changes: 3 additions & 3 deletions js/Events.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* @deprecated - use Emitter.js instead
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var axon = require( 'AXON/axon' );
var cleanArray = require( 'PHET_CORE/cleanArray' );
const axon = require( 'AXON/axon' );
const cleanArray = require( 'PHET_CORE/cleanArray' );

/**
* @constructor
Expand Down
4 changes: 2 additions & 2 deletions js/EventsTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Events = require( 'AXON/Events' );
const Events = require( 'AXON/Events' );

QUnit.module( 'Events' );

Expand Down
6 changes: 3 additions & 3 deletions js/Multilink.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var axon = require( 'AXON/axon' );
var inherit = require( 'PHET_CORE/inherit' );
const axon = require( 'AXON/axon' );
const inherit = require( 'PHET_CORE/inherit' );

/**
* @param {Property[]} dependencies
Expand Down
2 changes: 1 addition & 1 deletion js/NumberProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Chris Malley (PixelZoom, Inc.)
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
Expand Down
8 changes: 4 additions & 4 deletions js/NumberPropertyTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* @author Sam Reid (PhET Interactive Simulations)
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var NumberIO = require( 'TANDEM/types/NumberIO' );
var NumberProperty = require( 'AXON/NumberProperty' );
var Range = require( 'DOT/Range' );
const NumberIO = require( 'TANDEM/types/NumberIO' );
const NumberProperty = require( 'AXON/NumberProperty' );
const Range = require( 'DOT/Range' );

QUnit.module( 'NumberProperty' );

Expand Down
16 changes: 8 additions & 8 deletions js/ObservableArray.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
* @author Sam Reid (PhET Interactive Simulations)
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var axon = require( 'AXON/axon' );
var inherit = require( 'PHET_CORE/inherit' );
var NumberProperty = require( 'AXON/NumberProperty' );
var ObjectIO = require( 'TANDEM/types/ObjectIO' );
var ObservableArrayIO = require( 'AXON/ObservableArrayIO' );
var PhetioObject = require( 'TANDEM/PhetioObject' );
var Tandem = require( 'TANDEM/Tandem' );
const axon = require( 'AXON/axon' );
const inherit = require( 'PHET_CORE/inherit' );
const NumberProperty = require( 'AXON/NumberProperty' );
const ObjectIO = require( 'TANDEM/types/ObjectIO' );
const ObservableArrayIO = require( 'AXON/ObservableArrayIO' );
const PhetioObject = require( 'TANDEM/PhetioObject' );
const Tandem = require( 'TANDEM/Tandem' );

// Factor out to reduce memory footprint, see https://github.com/phetsims/tandem/issues/71
var DefaultObservableArrayIOType = ObservableArrayIO( ObjectIO );
Expand Down
4 changes: 2 additions & 2 deletions js/ObservableArrayTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var ObservableArray = require( 'AXON/ObservableArray' );
const ObservableArray = require( 'AXON/ObservableArray' );

QUnit.module( 'Observable Array' );

Expand Down
2 changes: 1 addition & 1 deletion js/PropertyTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
Expand Down
2 changes: 1 addition & 1 deletion js/StringProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Sam Reid (PhET Interactive Simulations)
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
Expand Down
6 changes: 3 additions & 3 deletions js/StringPropertyTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* @author Sam Reid (PhET Interactive Simulations)
* @author Chris Malley (PixelZoom, Inc.)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var StringIO = require( 'TANDEM/types/StringIO' );
var StringProperty = require( 'AXON/StringProperty' );
const StringIO = require( 'TANDEM/types/StringIO' );
const StringProperty = require( 'AXON/StringProperty' );

QUnit.module( 'StringProperty' );
QUnit.test( 'Test StringProperty', function( assert ) {
Expand Down
4 changes: 2 additions & 2 deletions js/TransactionTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
Expand All @@ -14,7 +14,7 @@ define( function( require ) {
const NumberIO = require( 'TANDEM/types/NumberIO' );
const NumberProperty = require( 'AXON/NumberProperty' );
const Tandem = require( 'TANDEM/Tandem' );
var Transaction = require( 'AXON/Transaction' );
const Transaction = require( 'AXON/Transaction' );

QUnit.module( 'Transaction' );

Expand Down
4 changes: 2 additions & 2 deletions js/axon.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright 2013-2019, University of Colorado Boulder

define( function( require ) {
define( require => {
'use strict';

var Namespace = require( 'PHET_CORE/Namespace' );
const Namespace = require( 'PHET_CORE/Namespace' );

return new Namespace( 'axon' );
} );
4 changes: 2 additions & 2 deletions js/units.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var axon = require( 'AXON/axon' );
const axon = require( 'AXON/axon' );

var units = {
values: [
Expand Down

0 comments on commit f9412b8

Please sign in to comment.