typescript-eslint/tslint-to-eslint-config

'PascalCase' and 'snake_case' never get migrated in variable-name rule

sophia-belous opened this issue ยท 2 comments

PascalCase and snake_case configuration options never get migrated to eslint because formats variable is not used anywhere.
See:

const formats = ["camelCase", "UPPER_CASE"];
if (hasCheckFormat && allowPascalCase) {
formats.push("PascalCase");
}
if (hasCheckFormat && allowSnakeCase) {
formats.push("snake_case");
}
if (!hasCheckFormat) {
camelCaseRules.push({
selector: "variable",
format: ["camelCase", "UPPER_CASE"],
leadingUnderscore: "forbid",
trailingUnderscore: "forbid",
});
} else {
camelCaseRules.push({
selector: "variable",
format: ["camelCase", "UPPER_CASE"],
leadingUnderscore: allowedLeadingUnderscore ? "allow" : "forbid",
trailingUnderscore: allowedTrailingUnderscore ? "allow" : "forbid",
});
}

It looks like this fix got merged and released, but the issue wasn't automatically closed? Just trying to make sure no potential future contributors are confused :)

...huh, you're right! Thanks @hyperupcall ๐Ÿ˜„