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

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

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

eslint-plugin-botland

Build Status Greenkeeper badge

Lint your BotLandScript bot scripts for Bot Land using eslint.

Rules

  • code-length Bot Land scripts can at most have 16500 characters
  • entry-point Check that the script has the required update function. Marks all entry points as used.
  • no-args-in-entry-point Entry points get passed no arguments.
  • no-big-array Items on arrays can only be assigned to indexes between 0 and 99.
  • no-code-after-terminator Warn about code after terminators, since it may not always be reached.
  • no-terminator-in-init Terminators in the init entry point are a no-op.
  • no-unreachable-code Check for code that is never reached via entry points.
  • no-unset Check for variables to be set when read and functions to be defined on the top level scope.
  • no-unsupported-syntax Check for unsupported JS syntax features.
  • no-terminator-expression Terminators must always be a statement on their own line.
  • no-call-entry Don't manually invoke entry points.
  • only-global-function-declaration Top level code must be function declarations and function declarations must be on the top level.
  • prefer-anything Prefer the shorter ANYTHING over its equivalent CPU | BOT | CHIP.
  • 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

  • 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.
  • string-length debugLog strings can at most have 50 characters.
  • no-nan-in-init warns about getX/getY resp. entity.x/entity.y being NaN inside the init code path.
  • no-reassign-loopvar-in-call warns about loop variables being reset in a function called within the loop.
  • prefer-find-entities prefer (or not) findEntities over findClosest* functions.

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:

    RuleLevelFixable
    code-lengtherrorNo
    entry-pointerrorNo
    no-unsupported-syntaxerrorNo
    only-global-function-declarationerrorNo
    use-array-variableserrorNo
    no-big-arrayerrorNo
    no-unseterrorNo
    no-unreachable-codeerrorNo
    no-terminator-expressionerrorNo
    no-call-entryerrorNo
    no-terminator-in-initwarningNo
    prefer-functionwarningYes
    no-code-after-terminatorwarningNo
    prefer-anythingwarningYes

Keywords

FAQs

Package last updated on 12 Oct 2019

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