New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mokahr/eslint-plugin-moka

Package Overview
Dependencies
Maintainers
5
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mokahr/eslint-plugin-moka

Eslint Plugin of Moka

  • 0.0.9
  • latest
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

eslint-plugin-moka

Eslint Plugin of Moka

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-moka:

$ npm install eslint-plugin-moka --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-moka globally.

Usage

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

{
    "plugins": [
        "moka"
    ]
}

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

{
    "rules": {
        "moka/rule-name": 2
    }
}

Supported Rules

  • promise-return - Remind you to return something defined when the next promise chain needs parameters.

    .then(() => {
      // not allowed (forget to return a value)
    })
    .then((result)) => {
    })
    
  • no-jsx-spread-attribute - Forbid spread attribute in jsx element for better static anslysis.

    <MyComponent {...this.props}/> // not allowed (using spread attribute)
    
  • lingui-mark - Non-i18n string detector

    const message = '你好世界' // Non-i18n string is detected
    
  • no-global-assign - Forbid assigning variable to window/global.

    window.userId = 123; // You may not want to assign variable to window/global
    

Keywords

FAQs

Package last updated on 09 Jun 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