0.1.13 • Published 3 years ago

@shopify/eslint-plugin-assemblyscript v0.1.13

Weekly downloads
45
License
ISC
Repository
-
Last release
3 years ago

@shopify/eslint-plugin-assemblyscript

Custom Eslint plugin to lint and validate assemblyscript.

Warnings

This plugin is built using eslint-typescript/parser, which is obviously not an assembly script parser. Ultimately a custom parser for assemblescript that outputs an AST understood by Eslint would be ideal, but is quite a big endeavour. For now, we can rely on the fact that the syntax is mostly compatible with typescript to validate it.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install @shopify/eslint-plugin-assemblyscript:

$ npm install @shopify/eslint-plugin-assemblyscript --save-dev

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

Usage

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

{
    "plugins": [
        "@shopify/assemblyscript"
    ]
}

Supported Rules

ruledescription
no-spreadreject usages of ...var on call expressions
no-rest-paramsreject usages of ...var: T on function definition
no-closurereject usages of closures
typesTODO
variablesTODO

Publishing

$ yarn version --new-version <major|minor|patch>
$ git push --follow-tags
# then deploy on shipit.