eslint-plugin-ban-orthographical-variant
Features
- ban orthographical variant in your code base
How to use?
npm install eslint-plugin-ban-orthographical-variant -D
and write eslint config
{
...
"plugins": [
["ban-orthographical-variant", {
dictionaryPath: "~~dictionary.json"
}],
...
],
...
"rules": [
...,
"ban-orthographical-variant/ban-orthographical-variant": "warn",
]
}
and write your dictionary
{
"Audio": {
"synonyms": ["Speech", "Music"]
},
"Video": {
"synonyms": ["Movie", "TV Show", "Game", "Animation", "Documentary"]
},
"Image": {
"synonyms": ["Photo", "Drawing", "Painting", "Photograph", "Illustration"]
}
}
examples
const audioPath = "hoge"; // ok
const musicPath = "hoge"; // warning!