@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
rule | description |
---|---|
no-spread | reject usages of ...var on call expressions |
no-rest-params | reject usages of ...var: T on function definition |
no-closure | reject usages of closures |
types | TODO |
variables | TODO |
Publishing
$ yarn version --new-version <major|minor|patch>
$ git push --follow-tags
# then deploy on shipit.