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

eslint-plugin-botland

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-botland

Lint your botland JS scripts

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-botland

Build Status

Lint your Bot Land bot scripts using eslint.

Rules

  • entry-point Check that the script has the required update function. Marks all entry points as used.
  • no-terminator-in-init Terminators in the init entry point are a no-op.
  • no-unsupported-syntax Check for unsupported JS syntax features.
  • only-global-function-declaration Top level code must be function declarations and function declarations must be on the top level.
  • prefer-function Enforce function name to use for aliased functions. Can take an option object with two properties: exclude and prefer. Both take an array of strings. Functions listed in exclude are ignored by the rule. Functions listed in prefer are preferred over the default name of the function.
  • use-array-variables There are two special variables in Bot Land, array1 and array2 to access and mutate arrays. Arrays can not be interacted with in any other way.

Future rules to add

  • use-guarded-terminator Terminators should be guarded in an if. Should be able to auto fix some terminators by adding the basic canDoX check.
  • no-unreachable-code No code in blocks after terminators. Synergizes with the use-guarded-terminator rule, since code after terminators can be reached.
  • arg-types Check argument count and types for methods. Should at the very least be able to check number of args, type of literals and direction literals.

Configs

  • recommended Adds all the global functions and variables of Bot Land so eslint doesn't complain about them, removes all the ECMA Script globals and adds the following rules:

    RuleLevel
    entry-pointerror
    no-unsupported-syntaxerror
    only-global-function-declarationerror
    use-array-variableserror
    no-terminator-in-initwarning
    prefer-functionwarning

Keywords

FAQs

Package last updated on 27 Aug 2018

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