Skip to content

Commit 24d2bbf

Browse files
Ovidiu Viorel IepureFacebook Github Bot
authored andcommitted
Fix lint in local-cli
Reviewed By: cpojer Differential Revision: D4166993 fbshipit-source-id: 9a8249175d98b42d7557817846d8c09c9769485e
1 parent eeba5eb commit 24d2bbf

30 files changed

+193
-45
lines changed

local-cli/__mocks__/beeper.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
/**
2+
* Copyright (c) 2015-present, Facebook, Inc.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree. An additional grant
7+
* of patent rights can be found in the PATENTS file in the same directory.
8+
*/
9+
'use strict';
10+
111
// beeper@1.1.0 has a return statement outside of a function
212
// and therefore doesn't parse. Let's mock it so that we can
313
// run the tests.
4-
514
module.exports = function () {};

local-cli/__tests__/generators-test.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jest.autoMockOff();
1313
var path = require('path');
1414
var fs = require('fs');
1515

16+
// eslint-disable-next-line improperly-disabled-jasmine-tests
1617
xdescribe('React Yeoman Generators', function() {
1718
describe('react:react', function() {
1819
var assert;
@@ -44,7 +45,7 @@ xdescribe('React Yeoman Generators', function() {
4445
jest.runAllTicks();
4546
jest.runOnlyPendingTimers();
4647
return generated;
47-
}, "generation", 750);
48+
}, 'generation', 750);
4849
});
4950

5051
it('creates files', function() {
@@ -87,7 +88,7 @@ xdescribe('React Yeoman Generators', function() {
8788
var stat = fs.statSync('android');
8889

8990
expect(stat.isDirectory()).toBe(true);
90-
})
91+
});
9192
});
9293

9394
describe('react:android', function () {
@@ -123,7 +124,7 @@ xdescribe('React Yeoman Generators', function() {
123124
jest.runAllTicks();
124125
jest.runOnlyPendingTimers();
125126
return generated;
126-
}, "generation", 750);
127+
}, 'generation', 750);
127128
});
128129

129130
it('creates files', function () {
@@ -203,7 +204,7 @@ xdescribe('React Yeoman Generators', function() {
203204
jest.runAllTicks();
204205
jest.runOnlyPendingTimers();
205206
return generated;
206-
}, "generation", 750);
207+
}, 'generation', 750);
207208
});
208209

209210
it('creates files', function() {

local-cli/android/android.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99
'use strict';
1010

11-
var generate = require('../generate/generate');
1211
var fs = require('fs');
12+
var generate = require('../generate/generate');
1313

1414
function android(argv, config, args) {
1515
return generate([
@@ -29,9 +29,9 @@ module.exports = {
2929
try {
3030
return JSON.parse(
3131
fs.readFileSync('package.json', 'utf8')
32-
).name
32+
).name;
3333
} catch (e) {
34-
return 'unknown-app-name'
34+
return 'unknown-app-name';
3535
}
3636
},
3737
}],

local-cli/bundle/buildBundle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* LICENSE file in the root directory of this source tree. An additional grant
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
9+
'use strict';
910

1011
const log = require('../util/log').out('bundle');
1112
const Promise = require('promise');

local-cli/bundle/bundle.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
* LICENSE file in the root directory of this source tree. An additional grant
77
* of patent rights can be found in the PATENTS file in the same directory.
88
*/
9+
'use strict';
910

1011
const buildBundle = require('./buildBundle');
11-
const outputBundle = require('./output/bundle');
1212
const bundleCommandLineArgs = require('./bundleCommandLineArgs');
13+
const outputBundle = require('./output/bundle');
1314

1415
/**
1516
* Builds the bundle starting to look for dependencies at the given entry path.

local-cli/bundle/getAssetDestPathAndroid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99
'use strict';
1010

11-
const path = require('path');
1211
const assetPathUtils = require('./assetPathUtils');
12+
const path = require('path');
1313

1414
function getAssetDestPathAndroid(asset, scale) {
1515
const androidFolder = assetPathUtils.getAndroidDrawableFolderName(asset, scale);

local-cli/bundle/output/bundle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
'use strict';
1010

1111
const Promise = require('promise');
12+
1213
const meta = require('./meta');
1314
const writeFile = require('./writeFile');
1415

local-cli/bundle/output/unbundle/as-assets.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
*/
99
'use strict';
1010

11-
const mkdirp = require('mkdirp');
12-
const path = require('path');
11+
const MAGIC_UNBUNDLE_NUMBER = require('./magic-number');
1312
const Promise = require('promise');
1413

1514
const buildSourceMapWithMetaData = require('./build-unbundle-sourcemap-with-metadata');
15+
const mkdirp = require('mkdirp');
16+
const path = require('path');
1617
const writeFile = require('../writeFile');
1718
const writeSourceMap = require('./write-sourcemap');
18-
const MAGIC_UNBUNDLE_NUMBER = require('./magic-number');
19+
1920
const {joinModules} = require('./util');
2021

2122
const MAGIC_UNBUNDLE_FILENAME = 'UNBUNDLE'; // must not start with a dot, as that won't go into the apk

local-cli/bundle/output/unbundle/as-indexed-file.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
*/
99
'use strict';
1010

11+
const MAGIC_UNBUNDLE_FILE_HEADER = require('./magic-number');
12+
const Promise = require('promise');
13+
1114
const buildSourceMapWithMetaData = require('./build-unbundle-sourcemap-with-metadata');
1215
const fs = require('fs');
13-
const Promise = require('promise');
1416
const writeSourceMap = require('./write-sourcemap');
15-
const {joinModules} = require('./util');
1617

17-
const MAGIC_UNBUNDLE_FILE_HEADER = require('./magic-number');
18+
const {joinModules} = require('./util');
1819
const SIZEOF_UINT32 = 4;
1920

2021
/**

local-cli/bundle/output/unbundle/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
*/
99
'use strict';
1010

11-
const asIndexedFile = require('./as-indexed-file');
1211
const asAssets = require('./as-assets');
12+
const asIndexedFile = require('./as-indexed-file');
1313

1414
function buildBundle(packagerClient, requestOptions) {
1515
return packagerClient.buildBundle({

0 commit comments

Comments
 (0)