Skip to content

Shinyaigeek/eslint-plugin-ban-orthographical-variant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

eslint plugin to ban orthographical variant

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors