Skip to content

DSpotDevelopers/dspot-eslint-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@dspot/eslint-plugin

Enforces project practices

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install @dspot/eslint-plugin:

npm install @dspot/eslint-plugin@https://github.com/DSpotDevelopers/dspot-eslint-plugin --save-dev

//If using yarn
yarn add -D @dspot/eslint-plugin@https://github.com/DSpotDevelopers/dspot-eslint-plugin

Usage

Add @dspot/eslint-plugin to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "@dspot/eslint-plugin"
    ]
}

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

{
    "rules": {
        "@dspot/rule-name": "error"
    }
}

Supported Rules

Name Description
no-business-in-controller disallow usage of business logic in Controllers (NestJS)
no-complex-logic-in-view-attributes disallow using complex expressions in attributes of elements inside Functional Components for "Views"
no-method-declaration-in-view disallow declaring functions within Functional Components for "Views"
no-prop-object-from-custom-hook-spread disallow to use Spread for Prop objects from custom hooks (ie. View Models)
no-react-hooks-in-view disallow to use React Hooks in Functional Components for "Views"
require-props-object disallow to use multiple properties when assigning to a single Element

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published