Skip to content

xkochevnikx/eslint-plugin-interface-prefix-control-svt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

npm version

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"
    }
}

About

eslint plugin interface prefix control

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published