1.12.1 • Published 1 month ago

eslint-plugin-webassembly v1.12.1

Weekly downloads
33
License
MIT
Repository
github
Last release
1 month 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.12.1

1 month ago

1.11.6

12 months ago

1.11.5

1 year ago

1.11.3

2 years ago

1.11.1

3 years ago

1.11.0

3 years ago

1.10.1

3 years ago

1.10.0

3 years ago

1.9.1

4 years ago

1.9.0

4 years ago

1.8.5

5 years ago

1.8.4

5 years ago

1.8.3

5 years ago

1.8.2

5 years ago

1.8.1

5 years ago

1.8.0

5 years ago

1.7.11

5 years ago

1.7.10

6 years ago

1.7.9

6 years ago

1.7.8

6 years ago

1.7.7

6 years ago

1.7.6

6 years ago

1.7.5

6 years ago

1.7.4

6 years ago

1.7.3

6 years ago

1.7.2

6 years ago

1.7.2-1

6 years ago

1.7.2-0

6 years ago

1.7.1

6 years ago

1.7.0

6 years ago

1.7.0-3

6 years ago

1.7.0-2

6 years ago

1.7.0-1

6 years ago

1.6.1

6 years ago

1.7.1-0

6 years ago

1.7.0-0

6 years ago

1.6.0

6 years ago

1.5.13

6 years ago

1.5.12

6 years ago

1.5.11

6 years ago

1.5.10

6 years ago

1.5.9

6 years ago

1.5.8

6 years ago

1.5.7

6 years ago

1.5.6

6 years ago

1.5.5

6 years ago

1.5.4

6 years ago

1.5.3

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.3

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.8

6 years ago

1.2.7

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago