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 d112ab4 commit 6911816
Show file tree
Hide file tree
Showing 25 changed files with 247 additions and 247 deletions.
10 changes: 5 additions & 5 deletions js/least-squares-regression-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
*
* @author Martin Veillette (Berea College)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var LeastSquaresRegressionScreen = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionScreen' );
var Sim = require( 'JOIST/Sim' );
var SimLauncher = require( 'JOIST/SimLauncher' );
const LeastSquaresRegressionScreen = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionScreen' );
const Sim = require( 'JOIST/Sim' );
const SimLauncher = require( 'JOIST/SimLauncher' );

// strings
var leastSquaresRegressionTitleString = require( 'string!LEAST_SQUARES_REGRESSION/least-squares-regression.title' );
const leastSquaresRegressionTitleString = require( 'string!LEAST_SQUARES_REGRESSION/least-squares-regression.title' );

var simOptions = {
credits: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
*
* @author Martin Veillette (Berea College)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
var PhetFont = require( 'SCENERY_PHET/PhetFont' );
const leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
const PhetFont = require( 'SCENERY_PHET/PhetFont' );

var LeastSquaresRegressionConstants = {

Expand Down
16 changes: 8 additions & 8 deletions js/least-squares-regression/LeastSquaresRegressionScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
*
* @author Martin Veillette (Berea College)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
var LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
var LeastSquaresRegressionModel = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/model/LeastSquaresRegressionModel' );
var LeastSquaresRegressionScreenView = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/view/LeastSquaresRegressionScreenView' );
var Property = require( 'AXON/Property' );
var Screen = require( 'JOIST/Screen' );
const inherit = require( 'PHET_CORE/inherit' );
const leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
const LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
const LeastSquaresRegressionModel = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/model/LeastSquaresRegressionModel' );
const LeastSquaresRegressionScreenView = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/view/LeastSquaresRegressionScreenView' );
const Property = require( 'AXON/Property' );
const Screen = require( 'JOIST/Screen' );

/**
* @constructor
Expand Down
16 changes: 8 additions & 8 deletions js/least-squares-regression/model/DataPoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
* @author John Blanco
* @author Martin Veillette (Berea College)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BooleanProperty = require( 'AXON/BooleanProperty' );
var Emitter = require( 'AXON/Emitter' );
var inherit = require( 'PHET_CORE/inherit' );
var leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
var LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
var Vector2 = require( 'DOT/Vector2' );
var Vector2Property = require( 'DOT/Vector2Property' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const Emitter = require( 'AXON/Emitter' );
const inherit = require( 'PHET_CORE/inherit' );
const leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
const LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
const Vector2 = require( 'DOT/Vector2' );
const Vector2Property = require( 'DOT/Vector2Property' );

/**
* @param {Vector2} initialPosition
Expand Down
6 changes: 3 additions & 3 deletions js/least-squares-regression/model/DataSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
* @author Martin Veillette (Berea College)
*/

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

// modules
var leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
var Range = require( 'DOT/Range' );
const leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
const Range = require( 'DOT/Range' );

// source strings - isolated here, these sources should not be translatable
var SOURCES = {
Expand Down
22 changes: 11 additions & 11 deletions js/least-squares-regression/model/Graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
* @author John Blanco
* @author Martin Veillette (Berea College)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BooleanProperty = require( 'AXON/BooleanProperty' );
var Bounds2 = require( 'DOT/Bounds2' );
var DerivedProperty = require( 'AXON/DerivedProperty' );
var inherit = require( 'PHET_CORE/inherit' );
var leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
var NumberProperty = require( 'AXON/NumberProperty' );
var ObservableArray = require( 'AXON/ObservableArray' );
var Property = require( 'AXON/Property' );
var Residual = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/model/Residual' );
var Vector2 = require( 'DOT/Vector2' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const Bounds2 = require( 'DOT/Bounds2' );
const DerivedProperty = require( 'AXON/DerivedProperty' );
const inherit = require( 'PHET_CORE/inherit' );
const leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
const NumberProperty = require( 'AXON/NumberProperty' );
const ObservableArray = require( 'AXON/ObservableArray' );
const Property = require( 'AXON/Property' );
const Residual = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/model/Residual' );
const Vector2 = require( 'DOT/Vector2' );

/**
* @param {Range} xRange
Expand Down
28 changes: 14 additions & 14 deletions js/least-squares-regression/model/LeastSquaresRegressionModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
*
* @author Martin Veillette (Berea College)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var BooleanProperty = require( 'AXON/BooleanProperty' );
var Bucket = require( 'PHETCOMMON/model/Bucket' );
var DataPoint = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/model/DataPoint' );
var DataSet = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/model/DataSet' );
var Dimension2 = require( 'DOT/Dimension2' );
var Emitter = require( 'AXON/Emitter' );
var Graph = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/model/Graph' );
var inherit = require( 'PHET_CORE/inherit' );
var leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
var ObservableArray = require( 'AXON/ObservableArray' );
var Property = require( 'AXON/Property' );
var Util = require( 'DOT/Util' );
var Vector2 = require( 'DOT/Vector2' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const Bucket = require( 'PHETCOMMON/model/Bucket' );
const DataPoint = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/model/DataPoint' );
const DataSet = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/model/DataSet' );
const Dimension2 = require( 'DOT/Dimension2' );
const Emitter = require( 'AXON/Emitter' );
const Graph = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/model/Graph' );
const inherit = require( 'PHET_CORE/inherit' );
const leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
const ObservableArray = require( 'AXON/ObservableArray' );
const Property = require( 'AXON/Property' );
const Util = require( 'DOT/Util' );
const Vector2 = require( 'DOT/Vector2' );

// constants
var BUCKET_SIZE = new Dimension2( 100, 55 );
Expand Down
8 changes: 4 additions & 4 deletions js/least-squares-regression/model/Residual.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* @author John Blanco
* @author Martin Veillette (Berea College)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
var Vector2 = require( 'DOT/Vector2' );
const inherit = require( 'PHET_CORE/inherit' );
const leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
const Vector2 = require( 'DOT/Vector2' );

/**
*
Expand Down
34 changes: 17 additions & 17 deletions js/least-squares-regression/view/BestFitLineControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@
* @author Martin Veillette (Berea College)
*/

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

// modules
var AccordionBox = require( 'SUN/AccordionBox' );
var Checkbox = require( 'SUN/Checkbox' );
var EquationNode = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/view/EquationNode' );
var HStrut = require( 'SCENERY/nodes/HStrut' );
var inherit = require( 'PHET_CORE/inherit' );
var LayoutBox = require( 'SCENERY/nodes/LayoutBox' );
var leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
var LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
var Panel = require( 'SUN/Panel' );
var Property = require( 'AXON/Property' );
var SumOfSquaredResidualsChart = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/view/SumOfSquaredResidualsChart' );
var SunConstants = require( 'SUN/SunConstants' );
var Text = require( 'SCENERY/nodes/Text' );
const AccordionBox = require( 'SUN/AccordionBox' );
const Checkbox = require( 'SUN/Checkbox' );
const EquationNode = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/view/EquationNode' );
const HStrut = require( 'SCENERY/nodes/HStrut' );
const inherit = require( 'PHET_CORE/inherit' );
const LayoutBox = require( 'SCENERY/nodes/LayoutBox' );
const leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
const LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
const Panel = require( 'SUN/Panel' );
const Property = require( 'AXON/Property' );
const SumOfSquaredResidualsChart = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/view/SumOfSquaredResidualsChart' );
const SunConstants = require( 'SUN/SunConstants' );
const Text = require( 'SCENERY/nodes/Text' );

// strings
var bestFitLineString = require( 'string!LEAST_SQUARES_REGRESSION/bestFitLine' );
var residualsString = require( 'string!LEAST_SQUARES_REGRESSION/residuals' );
var squaredResidualsString = require( 'string!LEAST_SQUARES_REGRESSION/squaredResiduals' );
const bestFitLineString = require( 'string!LEAST_SQUARES_REGRESSION/bestFitLine' );
const residualsString = require( 'string!LEAST_SQUARES_REGRESSION/residuals' );
const squaredResidualsString = require( 'string!LEAST_SQUARES_REGRESSION/squaredResiduals' );

/**
* @param {Graph} graph - model of the graph
Expand Down
20 changes: 10 additions & 10 deletions js/least-squares-regression/view/DataPointCreatorNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
* @author John Blanco
* @author Martin Veillette (Berea College)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Circle = require( 'SCENERY/nodes/Circle' );
var DataPoint = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/model/DataPoint' );
var inherit = require( 'PHET_CORE/inherit' );
var leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
var LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
var Node = require( 'SCENERY/nodes/Node' );
var ScreenView = require( 'JOIST/ScreenView' );
var SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' );
var Vector2 = require( 'DOT/Vector2' );
const Circle = require( 'SCENERY/nodes/Circle' );
const DataPoint = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/model/DataPoint' );
const inherit = require( 'PHET_CORE/inherit' );
const leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
const LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
const Node = require( 'SCENERY/nodes/Node' );
const ScreenView = require( 'JOIST/ScreenView' );
const SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' );
const Vector2 = require( 'DOT/Vector2' );

/**
* @param {Function} addDataPointToModel - A function for adding the created dataPoint to the model
Expand Down
8 changes: 4 additions & 4 deletions js/least-squares-regression/view/DataPointNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* @author John Blanco
* @author Martin Veillette (Berea College)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
var Node = require( 'SCENERY/nodes/Node' );
const inherit = require( 'PHET_CORE/inherit' );
const leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
const Node = require( 'SCENERY/nodes/Node' );

/**
* @param {DataPoint} dataPoint
Expand Down
2 changes: 1 addition & 1 deletion js/least-squares-regression/view/DataSetComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @author Martin Veillette (Berea College)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
Expand Down
14 changes: 7 additions & 7 deletions js/least-squares-regression/view/DynamicDataPointNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
*
* @author Martin Veillette (Berea College)
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Circle = require( 'SCENERY/nodes/Circle' );
var DataPointNode = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/view/DataPointNode' );
var inherit = require( 'PHET_CORE/inherit' );
var leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
var LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
var SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' );
const Circle = require( 'SCENERY/nodes/Circle' );
const DataPointNode = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/view/DataPointNode' );
const inherit = require( 'PHET_CORE/inherit' );
const leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
const LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
const SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' );

/**
* @param {DataPoint} dataPoint
Expand Down
20 changes: 10 additions & 10 deletions js/least-squares-regression/view/EquationNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
* @author Martin Veillette (Berea College)
*/

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

// modules
var inherit = require( 'PHET_CORE/inherit' );
var leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
var LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
var MathSymbols = require( 'SCENERY_PHET/MathSymbols' );
var Node = require( 'SCENERY/nodes/Node' );
var Text = require( 'SCENERY/nodes/Text' );
var Util = require( 'DOT/Util' );
const inherit = require( 'PHET_CORE/inherit' );
const leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
const LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
const MathSymbols = require( 'SCENERY_PHET/MathSymbols' );
const Node = require( 'SCENERY/nodes/Node' );
const Text = require( 'SCENERY/nodes/Text' );
const Util = require( 'DOT/Util' );

// strings
var symbolXString = require( 'string!LEAST_SQUARES_REGRESSION/symbol.x' );
var symbolYString = require( 'string!LEAST_SQUARES_REGRESSION/symbol.y' );
const symbolXString = require( 'string!LEAST_SQUARES_REGRESSION/symbol.x' );
const symbolYString = require( 'string!LEAST_SQUARES_REGRESSION/symbol.y' );

/**
* Scenery Node responsible for laying out the linear equation y = m x + b
Expand Down
24 changes: 12 additions & 12 deletions js/least-squares-regression/view/GraphAxesNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ define( function ( require ) {
'use strict';

// modules
var inherit = require( 'PHET_CORE/inherit' );
var leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
var LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
var Line = require( 'SCENERY/nodes/Line' );
var MathSymbols = require( 'SCENERY_PHET/MathSymbols' );
var Node = require( 'SCENERY/nodes/Node' );
var Path = require( 'SCENERY/nodes/Path' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
var Shape = require( 'KITE/Shape' );
var Text = require( 'SCENERY/nodes/Text' );
var Util = require( 'DOT/Util' );
var Vector2 = require( 'DOT/Vector2' );
const inherit = require( 'PHET_CORE/inherit' );
const leastSquaresRegression = require( 'LEAST_SQUARES_REGRESSION/leastSquaresRegression' );
const LeastSquaresRegressionConstants = require( 'LEAST_SQUARES_REGRESSION/least-squares-regression/LeastSquaresRegressionConstants' );
const Line = require( 'SCENERY/nodes/Line' );
const MathSymbols = require( 'SCENERY_PHET/MathSymbols' );
const Node = require( 'SCENERY/nodes/Node' );
const Path = require( 'SCENERY/nodes/Path' );
const Rectangle = require( 'SCENERY/nodes/Rectangle' );
const Shape = require( 'KITE/Shape' );
const Text = require( 'SCENERY/nodes/Text' );
const Util = require( 'DOT/Util' );
const Vector2 = require( 'DOT/Vector2' );

//----------------------------------------------------------------------------------------
// constants
Expand Down
Loading

0 comments on commit 6911816

Please sign in to comment.