1.14.1 • Published 7 months ago

eslint-plugin-webassembly v1.14.1

Weekly downloads
33
License
MIT
Repository
github
Last release
7 months ago

eslint-plugin-webassembly

ESLint plugin for WebAssembly

Installation

You'll first need to install ESLint:

$ yarn add eslint --save-dev

Next, install eslint-plugin-webassembly:

$ yarn add eslint-plugin-webassembly --save-dev

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

Usage

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

{
    "plugins": [
        "webassembly"
    ]
}

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

{
    "rules": {
        "webassembly/no-unknown-export": 2
    }
}

Supported Rules

no-unknown-export

Checks that the exports exists, example:

Good:

import("module.wasm").then(x => {
  x.test();
});

import("module.wasm").then(({test}) => {
  test();
});

Bad:

import("module.wasm").then(x => {
  x.unknownExport();
});

import("module.wasm").then(({unknownExport}) => {
  unknownExport();
});

Parsing error: The keyword 'import' is reserved

ESLint doesn't support dynamic import out of the box. Make sure to check out https://github.com/babel/babel-eslint.

1.14.1

7 months ago

1.13.2

7 months ago

1.13.1

7 months ago

1.12.1

1 year ago

1.11.6

2 years ago

1.11.5

2 years ago

1.11.3

3 years ago

1.11.1

4 years ago

1.11.0

4 years ago

1.10.1

4 years ago

1.10.0

4 years ago

1.9.1

5 years ago

1.9.0

5 years ago

1.8.5

6 years ago

1.8.4

6 years ago

1.8.3

6 years ago

1.8.2

6 years ago

1.8.1

6 years ago

1.8.0

7 years ago

1.7.11

7 years ago

1.7.10

7 years ago

1.7.9

7 years ago

1.7.8

7 years ago

1.7.7

7 years ago

1.7.6

7 years ago

1.7.5

7 years ago

1.7.4

7 years ago

1.7.3

7 years ago

1.7.2

7 years ago

1.7.2-1

7 years ago

1.7.2-0

7 years ago

1.7.1

7 years ago

1.7.0

7 years ago

1.7.0-3

7 years ago

1.7.0-2

7 years ago

1.7.0-1

7 years ago

1.6.1

7 years ago

1.7.1-0

7 years ago

1.7.0-0

7 years ago

1.6.0

7 years ago

1.5.13

7 years ago

1.5.12

7 years ago

1.5.11

7 years ago

1.5.10

7 years ago

1.5.9

7 years ago

1.5.8

7 years ago

1.5.7

7 years ago

1.5.6

7 years ago

1.5.5

7 years ago

1.5.4

7 years ago

1.5.3

7 years ago

1.5.2

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.3

7 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.8

7 years ago

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago