Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-25176] Fix node 4 compatibility #9322

Merged
merged 1 commit into from
Aug 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* Please see the LICENSE included with this distribution for details.
*/

'use strict';

const ADB = require('node-titanium-sdk/lib/adb'),
AdmZip = require('adm-zip'),
android = require('node-titanium-sdk/lib/android'),
Expand Down
2 changes: 2 additions & 0 deletions android/cli/commands/_buildModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* Please see the LICENSE included with this distribution for details.
*/

'use strict';

const AdmZip = require('adm-zip'),
androidDetect = require('../lib/detect').detect,
appc = require('node-appc'),
Expand Down
2 changes: 2 additions & 0 deletions android/cli/hooks/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* See the LICENSE file for more information.
*/

'use strict';

const appc = require('node-appc'),
fs = require('fs'),
path = require('path'),
Expand Down
2 changes: 2 additions & 0 deletions android/cli/hooks/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* See the LICENSE file for more information.
*/

'use strict';

const ADB = require('node-titanium-sdk/lib/adb'),
appc = require('node-appc'),
async = require('async'),
Expand Down
2 changes: 2 additions & 0 deletions android/cli/lib/AndroidManifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Please see the LICENSE file for information about licensing.
*/

'use strict';

const appc = require('node-appc'),
DOMParser = require('xmldom').DOMParser,
fs = require('fs'),
Expand Down
2 changes: 2 additions & 0 deletions android/cli/lib/base-builder.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

const appc = require('node-appc'),
Builder = require('node-titanium-sdk/lib/builder'),
DOMParser = require('xmldom').DOMParser,
Expand Down
2 changes: 2 additions & 0 deletions android/cli/lib/detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* Please see the LICENSE included with this distribution for details.
*/

'use strict';

const android = require('node-titanium-sdk/lib/android'),
ADB = require('node-titanium-sdk/lib/adb'),
EmulatorManager = require('node-titanium-sdk/lib/emulator'),
Expand Down
1 change: 1 addition & 0 deletions android/cli/lib/info.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict';
const appc = require('node-appc'),
__ = appc.i18n(__dirname).__,
fs = require('fs'),
Expand Down
2 changes: 2 additions & 0 deletions cli/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* See the LICENSE file for more information.
*/

'use strict';

const appc = require('node-appc'),
fields = require('fields'),
fs = require('fs'),
Expand Down
2 changes: 2 additions & 0 deletions cli/commands/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* See the LICENSE file for more information.
*/

'use strict';

const appc = require('node-appc'),
i18n = appc.i18n(__dirname),
__ = i18n.__,
Expand Down
2 changes: 2 additions & 0 deletions cli/commands/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* Please see the LICENSE included with this distribution for details.
*/

'use strict';

const appc = require('node-appc'),
async = require('async'),
fields = require('fields'),
Expand Down
2 changes: 2 additions & 0 deletions cli/commands/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* Copyright (c) 2012-2017, Appcelerator, Inc. All Rights Reserved.
* See the LICENSE file for more information.
*/
'use strict';

const path = require('path'),
ti = require('node-titanium-sdk'),
appc = require('node-appc'),
Expand Down
2 changes: 2 additions & 0 deletions cli/lib/creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* Please see the LICENSE included with this distribution for details.
*/

'use strict';

const appc = require('node-appc'),
async = require('async'),
ejs = require('ejs'),
Expand Down
2 changes: 2 additions & 0 deletions cli/lib/creators/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* Please see the LICENSE included with this distribution for details.
*/

'use strict';

const appc = require('node-appc'),
Creator = require('../creator'),
fs = require('fs'),
Expand Down
2 changes: 2 additions & 0 deletions cli/lib/creators/applewatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
* Please see the LICENSE included with this distribution for details.
*/

'use strict';

const appc = require('node-appc'),
Creator = require('../creator'),
DOMParser = require('xmldom').DOMParser,
Expand Down
2 changes: 2 additions & 0 deletions cli/lib/creators/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* Please see the LICENSE included with this distribution for details.
*/

'use strict';

const appc = require('node-appc'),
Creator = require('../creator'),
fs = require('fs'),
Expand Down
5 changes: 3 additions & 2 deletions cli/lib/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
* See the LICENSE file for more information.
*/

const
appc = require('node-appc'),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgtcoolguy Wondering if that format was expected with eslint and may be in other files as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this is my super old coding style. It's bad. Nowadays I specify const or let per variable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 On each variable declaration being separate, as always there's a rule for that but not sure whether all teams would buy in to having that in the config. There's also a rule for strict mode which imo if our min ver will be node 4 should be added to the config (again doubt all times would buy in though)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think we can still do per-project overrides, or additional rules on top of the common config. I'd agree that the "strict": "safe" rule is probably a good one to turn on while Node 4 is our min supported Node.

Personally, I like having multiple const/var/let` declarations combined.

'use strict';

const appc = require('node-appc'),
fs = require('fs'),
path = require('path'),
genymotion = require('node-titanium-sdk/lib/emulators/genymotion'),
Expand Down
2 changes: 2 additions & 0 deletions iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* Please see the LICENSE included with this distribution for details.
*/

'use strict';

const appc = require('node-appc'),
async = require('async'),
bufferEqual = require('buffer-equal'),
Expand Down
2 changes: 2 additions & 0 deletions iphone/cli/commands/_buildModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* Please see the LICENSE included with this distribution for details.
*/

'use strict';

const appc = require('node-appc'),
AdmZip = require('adm-zip'),
archiver = require('archiver'),
Expand Down
2 changes: 2 additions & 0 deletions iphone/cli/hooks/hyperloop.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* @author Jeff Haynie
* @date 02/06/2014
*/
'use strict';

const fs = require('fs'),
path = require('path'),
os = require('os'),
Expand Down
2 changes: 2 additions & 0 deletions iphone/cli/hooks/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* See the LICENSE file for more information.
*/

'use strict';

const appc = require('node-appc'),
async = require('async'),
fs = require('fs'),
Expand Down
2 changes: 2 additions & 0 deletions iphone/cli/hooks/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* See the LICENSE file for more information.
*/

'use strict';

const appc = require('node-appc'),
__ = appc.i18n(__dirname).__,
afs = appc.fs,
Expand Down
2 changes: 2 additions & 0 deletions iphone/cli/hooks/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* See the LICENSE file for more information.
*/

'use strict';

const appc = require('node-appc'),
ioslib = require('ioslib'),
i18n = appc.i18n(__dirname),
Expand Down
2 changes: 2 additions & 0 deletions iphone/cli/lib/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* Please see the LICENSE included with this distribution for details.
*/

'use strict';

const appc = require('node-appc'),
fs = require('fs'),
ioslib = require('ioslib'),
Expand Down