Skip to content

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

Closed
@sophia-belous

Description

@sophia-belous

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",
});
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: incorrect converterRule converter with incomplete, incorrect, or invalid rule names and/or argumentsgood first issueGood for newcomers; welcome aboard!status: accepting prsPlease, send in a PR to resolve this! ✨type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions