ESLint plugin
This project is maintained by iliubinskii
ESLint plugin / consistent-enum-members
Requires consistent key-value pairs inside enums (key should match value).
module.exports = {
plugins: ["misc"],
rules: {
"misc/consistent-enum-members": [
"error",
{
overrides: [
{
_id: string,
filesToLint: string[],
filesToSkip: string[],
format: "PascalCase" | "camelCase" | "kebab-case",
selector: string | string[]
},
...
]
}
]
}
};
| Option | Description | Default | | :—– | :———- | :—— |
overrides._id |
Id | - |
overrides.filesToLint |
Files to lint (minimatch patterns) | [] |
overrides.filesToSkip |
Files to skip (minimatch patterns) | [] |
overrides.format |
Overrides default file name format | - |
overrides.selector |
Triggers override when AST element matching AST selector is found | - |
enum Enum {
a = "b"
}
enum Enum {
a = "a"
}