How to disable Eslint rule "Expected imports instead of AMD define()? " So that eslint wont report.

1 Answers

Dor Shinar On

The easiest way to disable a rule is to turn it off in your configuration file (This is an example .eslintrc.json file):

  /* Your specific configuration */
  "rules": {
    "@typescript-eslint/no-function-return-type": 0 // Here I manually override this specific rule
    /* The rest of your rule overrides */

From the official ESLint documentation:

  • "off" or 0 - turn the rule off
  • "warn" or 1 - turn the rule on as a warning (doesn’t affect exit code)
  • "error" or 2 - turn the rule on as an error (exit code is 1 when triggered)

In your case I believe this rule is giving you the error, so to turn it off just specify the following in your ESLint config:
import/no-amd: 0