1.0.4 • Published 2 years ago

eslint-plugin-custom-rules-rtkit v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

eslint-plugin-custom-rules-rtkit

A plugin with a custom set of rules for static AST checking.

Other Languages: Russian

Why?

This is an eslint plugin that adds self-written rules that are used on several projects in which I am involved. Use them in addition to your rules if you use similar standards for coding.

Installation

You'll first need to install ESLint:

# npm
npm install eslint --save-dev

# yarn
yarn add eslint --dev

Next, install eslint-plugin-custom-rules-rtkit:

# npm
npm i eslint-plugin-custom-rules-rtkit --save-dev

# yarn
yarn add eslint-plugin-custom-rules-rtkit --dev

Note: If you installed ESLint globally (using the -g flag in npm, or the global prefix in yarn) then you must also install eslint-plugin-custom-rules-rtkit globally.

Usage

Add custom-rules-rtkit to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["custom-rules-rtkit"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "custom-rules-rtkit/rule-name": 2
  }
}

Rules

NameDescription
enum-declarationEnum must start with a capital letter and be prefixed with E
enum-uppercase-propertesEnum properties must be in upper case.
iterface-declarationInterface names must start with a capital letter and be prefixed with I.
interface-locatedInterfaces should be located in a file called interfaces.
styled-components-declarationstyled-components must start with a capital letter and be prefixed with S.
styled-components-locatedstyled-components should be located in a file called styles.
type-declarationType names must start with a capital letter and be prefixed with T.
type-locatedType should be located in a file called interfaces.
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago