Skip to content

Commit a275849

Browse files
author
Ahmad Awais
committed
πŸ‘Œ IMPROVE: Use Strict
1 parent cdeddf8 commit a275849

11 files changed

Lines changed: 21 additions & 5 deletions

File tree

β€Žpackages/create-guten-block/app/cli.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* Set the options for -v --help etc.
55
*/
66

7+
'use strict';
8+
79
const chalk = require( 'chalk' );
810
const commander = require( 'commander' );
911
const packageJson = require( '../package.json' );

β€Žpackages/create-guten-block/app/consoleClear.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* Support for win32 and others.
55
*/
66

7+
'use strict';
8+
79
module.exports = () => {
810
process.stdout.write(
911
process.platform === 'win32' ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H'

β€Žpackages/create-guten-block/app/createPluginDir.jsβ€Ž

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

8+
'use strict';
9+
810
const chalk = require( 'chalk' );
911
const shell = require( 'shelljs' );
1012
const clearConsole = require( './consoleClear' );

β€Žpackages/create-guten-block/app/getBlockDir.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* @return {string} The block directory.
66
*/
77

8+
'use strict';
9+
810
module.exports = blockName => {
911
return `${ process.cwd() }/${ blockName }`;
1012
};

β€Žpackages/create-guten-block/app/getBlockName.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* @return {string} The block name.
66
*/
77

8+
'use strict';
9+
810
const chalk = require( 'chalk' );
911

1012
module.exports = theThirdArg => {

β€Žpackages/create-guten-block/app/initBlock.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* @param {string} blockDir The block directory.
66
*/
77

8+
'use strict';
9+
810
const path = require( 'path' );
911

1012
module.exports = ( blockName, blockDir ) => {

β€Žpackages/create-guten-block/app/npmInstallScripts.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* @return {promise} promise resolved.
1010
*/
1111

12+
'use strict';
13+
1214
const path = require( 'path' );
1315
const fs = require( 'fs-extra' );
1416
const execa = require( 'execa' );

β€Žpackages/create-guten-block/app/prePrint.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* @param {string} blockDir The block directory.
66
*/
77

8+
'use strict';
9+
810
const chalk = require( 'chalk' );
911

1012
module.exports = ( blockName, blockDir ) => {

β€Žpackages/create-guten-block/app/run.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* Runs all the functions with async/await.
55
*/
66

7+
'use strict';
8+
79
const ora = require( 'ora' );
810
const chalk = require( 'chalk' );
911
const clearConsole = require( './consoleClear' );

β€Žpackages/create-guten-block/app/updateNotifier.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Update notifier
33
*/
44

5+
'use strict';
6+
57
const updateNotifier = require( 'update-notifier' );
68
const pkg = require( '../package.json' );
79

0 commit comments

Comments
Β (0)