Skip to content

Add global var to eslint config #43

@kaitmore

Description

@kaitmore

I saw some eslint warnings about undefined globals in the hello-world.spec.js file:

❯ yarn lint
yarn run v1.22.17
$ eslint .

/Users/kaitm/Exercism/wasm/hello-world/hello-world.spec.js
  12:24  error  'WebAssembly' is not defined  no-undef
  26:26  error  'WebAssembly' is not defined  no-undef
  27:31  error  'WebAssembly' is not defined  no-undef

Adding WebAssembly to eslint globals fixed it for me:

// .eslintrc
  "globals": {
    "WebAssembly": true
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions