mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Run eslint --fix
Summary: CI is currently failing because of a lint issue, this fixes it and a bunch of other warnings that are auto-fixable. **Test plan** Quick manual test, cosmetic changes only. Closes https://github.com/facebook/react-native/pull/16229 Differential Revision: D6009748 Pulled By: TheSavior fbshipit-source-id: cabd44fed99dd90bd0b35626492719c139c89f34
This commit is contained in:
committed by
Facebook Github Bot
parent
32e5c8e5b5
commit
0cd69e8a02
@@ -9,7 +9,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
var fs = require('fs')
|
||||
var fs = require('fs');
|
||||
var glob = require('glob');
|
||||
var mkdirp = require('mkdirp');
|
||||
var optimist = require('optimist');
|
||||
@@ -36,7 +36,7 @@ function splitHeader(content) {
|
||||
function rmFile(file) {
|
||||
try {
|
||||
fs.unlinkSync(file);
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
/* seriously, unlink throws when the file doesn't exist :( */
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ function extractMetadata(content) {
|
||||
var key = keyvalue[0].trim();
|
||||
var value = keyvalue.slice(1).join(':').trim();
|
||||
// Handle the case where you have "Community #10"
|
||||
try { value = JSON.parse(value); } catch(e) { }
|
||||
try { value = JSON.parse(value); } catch (e) { }
|
||||
metadata[key] = value;
|
||||
}
|
||||
return {metadata: metadata, rawContent: both.content};
|
||||
|
||||
Reference in New Issue
Block a user