Skip to content

Commit 3da7e77

Browse files
committed
style: linter updates
1 parent c466745 commit 3da7e77

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/react-native-bundle-visualizer.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ function getAppName() {
1717
if (pkgJSON.name) return sanitizeString(pkgJSON.name);
1818
try {
1919
const appJSON = JSON.parse(fs.readFileSync('./app.json'));
20-
return sanitizeString(appJSON.name) || sanitizeString(appJSON.expo.name) || 'UnknownApp';
20+
return (
21+
sanitizeString(appJSON.name) ||
22+
sanitizeString(appJSON.expo.name) ||
23+
'UnknownApp'
24+
);
2125
} catch (err) {
2226
return 'UnknownApp';
2327
}
@@ -68,7 +72,7 @@ const commands = [
6872
'--bundle-output',
6973
bundleOutput,
7074
'--sourcemap-output',
71-
bundleOutputSourceMap
75+
bundleOutputSourceMap,
7276
];
7377
if (resetCache) {
7478
commands.push('--reset-cache');
@@ -113,23 +117,23 @@ bundlePromise
113117
return explore(
114118
{
115119
code: bundleOutput,
116-
map: bundleOutputSourceMap
120+
map: bundleOutputSourceMap,
117121
},
118122
{
119123
output: {
120124
format: 'html',
121-
filename: bundleOutputExplorerHTML
122-
}
125+
filename: bundleOutputExplorerHTML,
126+
},
123127
}
124128
);
125129
}
126130

127131
// Log info and open html file
128132
)
129-
.then(result => {
133+
.then((result) => {
130134
if (verbose) {
131-
result.bundles.forEach(bundle => {
132-
Object.keys(bundle.files).forEach(file => {
135+
result.bundles.forEach((bundle) => {
136+
Object.keys(bundle.files).forEach((file) => {
133137
console.log(
134138
chalk.green(file + ', size: ' + bundle.files[file] + ' bytes')
135139
);
@@ -139,7 +143,7 @@ bundlePromise
139143

140144
// Log any errors
141145
if (result.errors) {
142-
result.errors.forEach(error => {
146+
result.errors.forEach((error) => {
143147
if (error.isWarning) {
144148
console.log(chalk.yellow.bold(error.message));
145149
} else {

0 commit comments

Comments
 (0)