Skip to content

Commit 6b8b745

Browse files
committed
add eslint rule
1 parent e7be821 commit 6b8b745

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

.eslintrc

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"extends": [ "axway/env-node", "axway/+mocha"],
33
"parserOptions": {
44
"ecmaVersion": 2017,
5-
"sourceType": "script"
5+
"sourceType": "script",
6+
"rulse": {
7+
"no-empty": ["error", { "allowEmptyCatch": true }]
8+
},
69
},
710
"overrides": [
811
{

lib/environ.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -167,18 +167,14 @@ module.exports.detectTitaniumSDKs = module.exports.detect = function detectTitan
167167
// read in the manifest.json
168168
try {
169169
sdk.manifest = JSON.parse(fs.readFileSync(manifestFile, 'utf-8'));
170-
} catch (e) {
171-
//
172-
}
170+
} catch (e) {}
173171
}
174172

175173
if (fs.existsSync(packageJsonFile)) {
176174
// read in the package.json
177175
try {
178176
sdk.packageJson = JSON.parse(fs.readFileSync(packageJsonFile, 'utf-8'));
179-
} catch (e) {
180-
//
181-
}
177+
} catch (e) {}
182178
}
183179

184180
sdk.packageJson || (sdk.packageJson = {});

lib/fs.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@ exports.isDirWritable = function (directory) {
133133
exports.touch(tmpFile);
134134
result = fs.existsSync(tmpFile);
135135
fs.unlinkSync(tmpFile);
136-
} catch (e) {
137-
//
138-
}
136+
} catch (e) {}
139137
}
140138
return result;
141139
};
@@ -192,9 +190,7 @@ exports.copyDirSyncRecursive = function copyDirSyncRecursive(sourceDir, newDirLo
192190
if (!opts.preserve) {
193191
try {
194192
fs.statSync(newDirLocation).isDirectory() && exports.rmdirSyncRecursive(newDirLocation);
195-
} catch (e) {
196-
//
197-
}
193+
} catch (e) {}
198194
}
199195

200196
// Create the directory where all our junk is moving to; read the mode of the source directory and mirror it

0 commit comments

Comments
 (0)