typescript-eslint / tslint-to-eslint-config

Converts your TSLint configuration to the closest possible ESLint equivalent. 🚀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

sophia-belous opened this issue · 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 😄