ESLint plugin
This project is maintained by iliubinskii
ESLint plugin / typescript/prefer-enum
Requires using enums instead of string literals.
module.exports = {
plugins: ["misc"],
rules: {
"misc/typescript/prefer-enum": "error"
}
};
type T = "a" | "b";
enum T {
a = "a",
b = "b"
};