0.0.1 • Published 8 years ago

eslint-plugin-asmjs v0.0.1

Weekly downloads
-
License
BSD-2-Clause
Repository
-
Last release
8 years ago

eslint-plugin-asmjs

asm.js validation for ESLint

asm.js has performance benefits over vanilla JS in many browsers. However, invalid asm.js code may be interpreted as normal JS, causing a hard-to-identify deoptimization. This helps identify those cases in hand-written asm.js code that may be intertwined with your normal JS.

It uses the

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-asmjs:

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

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

Usage

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

{
    "plugins": [
        "asmjs"
    ]
}

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

{
    "rules": {
        "asmjs/asmjs": 2
    }
}

Supported Rules

Known Limitations

  • The official validator has no error recovery, so this only returns one error at a time.
  • Mixing this rule with certain other eslint rules, such as no-bitwise may cause conflicts.