diff --git a/src/Command/Command.js b/src/Command/Command.js index 18b36f2..7352523 100644 --- a/src/Command/Command.js +++ b/src/Command/Command.js @@ -294,7 +294,7 @@ export default class Command extends implementationOf(CommandInterface) { try { this._application = application; this._fullDefinition = null; - } catch (e) { + } catch { // Do nothing... } } diff --git a/src/Command/DumpCompletionCommand.js b/src/Command/DumpCompletionCommand.js index 08e8874..fea99c9 100644 --- a/src/Command/DumpCompletionCommand.js +++ b/src/Command/DumpCompletionCommand.js @@ -40,7 +40,7 @@ class DumpCompletionCommand extends Command { fullCommand = (() => { try { return realpathSync(fullCommand); - } catch (_) { + } catch { return null; } })() || fullCommand; diff --git a/src/Completion/CompletionInput.js b/src/Completion/CompletionInput.js index d766e4c..162f183 100644 --- a/src/Completion/CompletionInput.js +++ b/src/Completion/CompletionInput.js @@ -223,7 +223,7 @@ export default class CompletionInput extends ArgvInput { _parseToken(token, parseOptions) { try { return super._parseToken(token, parseOptions); - } catch (e) { + } catch { // Suppress errors, completed input is almost never valid } diff --git a/src/Formatter/OutputFormatter.js b/src/Formatter/OutputFormatter.js index 3c5c00b..92e4a26 100644 --- a/src/Formatter/OutputFormatter.js +++ b/src/Formatter/OutputFormatter.js @@ -245,7 +245,7 @@ export default class OutputFormatter extends implementationOf(OutputFormatterInt } else { try { style.setOption(match[2]); - } catch (e) { + } catch { return false; } } diff --git a/test/.eslintrc.json b/test/.eslintrc.json deleted file mode 100644 index fa4dd4a..0000000 --- a/test/.eslintrc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "rules": { - "no-new": "off", - "no-new-wrappers": "off", - "no-unused-expressions": "off" - } -}