eslint-plugin-interface-prefix-control-svt
v0.0.3
Published
interface prefix control
Downloads
9
Maintainers
Readme
Eslint plugin for controlling the names of ts "interfaces"
Hello friend, if your project needs to track ts interface prefixes, this plugin is for you. There is no autofix in it, there is only a message about a violation of the spelling rule.
Rules:
eslint-plugin-interface-prefix-control-svt
supports one rule:
- enforcing prefixing
Enforcing prefixes
- Interfaces should start with the letter I
| Valid | Invalid |
| ------------------------------------------- | ------------------------------------------ |
| interface IProps { className: "string"; }
| interface Props { className: "string"; }
|
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
install eslint-plugin-interface-prefix-control-svt
:
npm i -D eslint-plugin-interface-prefix-control-svt
Usage
Add interface-prefix-control-svt
to the plugins section of your .eslintrc
/.eslintrc.js
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["interface-prefix-control-svt"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"interface-prefix-control-svt/prefix-control": "warn" //or "error"
}
}