Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tslint-mobx

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tslint-mobx

Lint rules for projects that use MobX.

  • 1.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by14.29%
Maintainers
1
Weekly downloads
 
Created
Source

tslint-mobx

Lint rules for projects that use MobX.

Usage

First install:

npm install --save-dev tslint-mobx

Then to use the default rules you can add tslint-mobx to extends in your tslint.json:

{
  "extends": ["tslint-mobx"]
}

Rules

  • mobx-react-no-unused-inject
    • Makes sure you don't have any unused injected store.
    • For example if you have @inject('someStore') decorator wrapping your component, but this.props.someStore is unused.
  • mobx-react-no-empty-inject
    • Makes sure you don't have any empty injects (@inject()).
  • mobx-react-no-inject-decorators
    • Makes sure you don't have any inject decorators (@inject()) at all on classes.
  • mobx-react-no-async-action
    • Makes sure you don't have any action decorators (@action) on async methods.

Adding your own rules

Adding your own rules is straightforward.

Add your rule file to the src/rules directory, and your tests to a file with the same name, ending with .spec, in the test directory.

PRs are welcome.

FAQs

Package last updated on 09 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc