Rule: no-import-side-effect

Avoid import statements with side-effect.

Rationale

Imports with side effects may have behavior which is hard for static verification.

Config

One argument may be optionally provided:

  • ignore-module allows to specify a regex and ignore modules which it matches.
Config examples
"no-import-side-effect": true
"no-import-side-effect": [true, {"ignore-module": "(\\.html|\\.css)$"}]
Schema
{
  "items": {
    "properties": {
      "ignore-module": {
        "type": "string"
      }
    },
    "type": "object"
  },
  "maxLength": 1,
  "minLength": 0,
  "type": "array"
}