Repository: typescript-eslint/tslint-to-eslint-config (ts)

Issue:
Invalid "no-underscore-dangle" rule
-   `tslint-to-eslint-config` version: 0.2.11
-   ESLint version: 6.6.0
-   Node version: 12.8.1

#### Actual Behavior

Converts to this:

```js
"no-underscore-dangle": [
    "error",
     "off"
],
```

Which generates this error:

> ..\.eslintrc.js: Configuration for rule "no-underscore-dangle" is invalid: Value "off" should be object.

#### Expected Behavior

Should convert to this:

    "no-underscore-dangle": "off",

#### Reproduction

Point to a tslint.json file with the following rule:

    "variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore"]
Configuration for rule "no-underscore-dangle" is invalid
### 🐛 Bug Report

-   `tslint-to-eslint-config` version: 0.4.0
-   ESLint version: 6.7.2
-   Node version: 12.14.0

#### Actual Behavior

`.eslintrc.js`

```
module.exports = {
    ...
    "no-underscore-dangle": [
            "error",
            "off"
        ]
    ...
};
```

```
$ eslint index.ts
Error: .eslintrc.js:
        Configuration for rule "no-underscore-dangle" is invalid:
        Value "off" should be object.
```

#### Expected Behavior

```
module.exports = {
    ...
    "no-underscore-dangle": [
            "off"
        ]
    ...
};
```

#### Reproduction

```
#!/bin/bash
mkdir example
cd example/
node --version # v12.14.0
npm init -y
npm i -D \
  @typescript-eslint/parser@2.12.0 \
  @typescript-eslint/eslint-plugin@2.12.0 \
  eslint@6.7.2 \
  tslint@5.20.1 \
  typescript@3.7.3
cat <<EOS >tslint.json
{
  "rules": {
    "variable-name": [
      true,
      "check-format",
      "allow-leading-underscore"
    ]
  }
}
EOS
$(npm bin)/tsc --init
npx tslint-to-eslint-config@0.4.0

cat .eslintrc.js # generated
# module.exports = {
#     "env": {
#         "browser": true,
#         "es6": true
#     },
#     "parser": "@typescript-eslint/parser",
#     "parserOptions": {
#         "project": "tsconfig.json",
#         "sourceType": "module"
#     },
#     "plugins": [
#         "@typescript-eslint"
#     ],
#     "rules": {
#         "camelcase": "error",
#         "id-blacklist": "error",
#         "id-match": "error",
#         "no-underscore-dangle": [
#             "error",
#             "off"
#         ]
#     }
# };

# dummy source file
cat <<EOS >index.ts
function add(x: number, y: number) {
  return x + y;
}
EOS

$(npm bin)/eslint index.ts
# Error: .eslintrc.js:
#         Configuration for rule "no-underscore-dangle" is invalid:
#         Value "off" should be object.
```

Pull request description:
fix `no-underscore-dangle`
## PR Checklist

-   [x] Addresses an existing issue: fixes #266 and fixes #290
-   [ ] That issue was marked as [`status: accepting prs`](https://github.com/typescript-eslint/tslint-to-eslint-config/labels/status%3A%20accepting%20prs)

## Overview

See: #290

Patch:
diff --git a/src/rules/converters/variable-name.ts b/src/rules/converters/variable-name.ts
index 5a4e108..159ca4b 100644
--- a/src/rules/converters/variable-name.ts
+++ b/src/rules/converters/variable-name.ts
@@ -56,11 +56,11 @@ export const convertVariableName: RuleConverter = tslintRule => {
     };
 
     const getUnderscoreDangleRuleOptions = () => {
-        const underscoreDangleOptionArguments: string[] = [];
+        let underscoreDangleOptionSeverity: string | null = null;
         const underscoreDangleOptionNotice: string[] = [];
 
         if (hasCheckFormat && (allowedLeadingUnderscore || allowedTrailingUnderscore)) {
-            underscoreDangleOptionArguments.push("off");
+            underscoreDangleOptionSeverity = "off";
             underscoreDangleOptionNotice.push(IgnoreLeadingTrailingIdentifierMsg);
         } else {
             underscoreDangleOptionNotice.push(ForbiddenLeadingTrailingIdentifierMsg);
@@ -68,8 +68,8 @@ export const convertVariableName: RuleConverter = tslintRule => {
 
         return {
             notices: underscoreDangleOptionNotice,
-            ...(underscoreDangleOptionArguments.length !== 0 && {
-                ruleArguments: underscoreDangleOptionArguments,
+            ...(underscoreDangleOptionSeverity !== null && {
+                ruleSeverity: underscoreDangleOptionSeverity,
             }),
             ruleName: "no-underscore-dangle",
         };


Test patch:
diff --git a/src/rules/converters/tests/variable-name.test.ts b/src/rules/converters/tests/variable-name.test.ts
index 468e39d..9772176 100644
--- a/src/rules/converters/tests/variable-name.test.ts
+++ b/src/rules/converters/tests/variable-name.test.ts
@@ -198,8 +198,8 @@ describe(convertVariableName, () => {
                 },
                 {
                     notices: [IgnoreLeadingTrailingIdentifierMsg],
-                    ruleArguments: ["off"],
                     ruleName: "no-underscore-dangle",
+                    ruleSeverity: "off",
                 },
                 {
                     ruleName: "id-blacklist",
@@ -224,8 +224,8 @@ describe(convertVariableName, () => {
                 },
                 {
                     notices: [IgnoreLeadingTrailingIdentifierMsg],
-                    ruleArguments: ["off"],
                     ruleName: "no-underscore-dangle",
+                    ruleSeverity: "off",
                 },
                 {
                     ruleName: "id-blacklist",
@@ -254,8 +254,8 @@ describe(convertVariableName, () => {
                 },
                 {
                     notices: [IgnoreLeadingTrailingIdentifierMsg],
-                    ruleArguments: ["off"],
                     ruleName: "no-underscore-dangle",
+                    ruleSeverity: "off",
                 },
                 {
                     ruleName: "id-blacklist",
@@ -288,8 +288,8 @@ describe(convertVariableName, () => {
                 },
                 {
                     ruleName: "no-underscore-dangle",
-                    ruleArguments: ["off"],
                     notices: [IgnoreLeadingTrailingIdentifierMsg],
+                    ruleSeverity: "off",
                 },
                 {
                     ruleName: "id-blacklist",