Description
🚀 Feature Request
Now, ban-types
converter drops the original TSLint configuration for each type descriptor.
I mean, even if TSLint specified ban-types
with the type argument, generated ESLint configuration doesn't contain the detailed type configuration.
In this situation, generated configuration only contains "@typescript-eslint/ban-types": "error"
, but according to the official documentation, probably this generated result
doesn't make sense because each rule requires the type name (and the message).
Existing Behavior
For example, when the TSLint configuration is like the following:
{
"rules": {
"ban-types": [true,
["Object", "Use {} instead."],
]
}
}
then, current logic generates the following ESLint configuration:
"rules": {
"@typescript-eslint/ban-types": "error"
}
Change Proposal
I suppose this should generate the configuration that is like the following:
"rules": {
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"Object": {
"message": "Use {} instead."
}
}
}
]
}
Note
I've already implemented a patch for this issue (but unit-tests are not yet).
https://github.com/typescript-eslint/tslint-to-eslint-config/compare/master...moznion:fix_ban_types?expand=1
Can I send a pull-request for this repository with unit-tests, if you don’t mind?