module.exports = {
  env: {
    node: true,
    mocha: true,
    browser: true
  },
  parser: "@typescript-eslint/parser",
  parserOptions: {
    project: "./tsconfig.json",
    tsconfigRootDir: "./",
    sourceType: "module"
  },
  plugins: ["@typescript-eslint"],
  extends: [
    "eslint:recommended",
    "plugin:@typescript-eslint/eslint-recommended",
    "plugin:@typescript-eslint/recommended"
  ],
  rules: {
    "node/no-unsupported-features/es-syntax": "off",
    "@typescript-eslint/indent": "off",
    "@typescript-eslint/no-use-before-define": "off",
    "@typescript-eslint/no-explicit-any": "off",
    "@typescript-eslint/no-var-requires": "off",
    "@typescript-eslint/no-inferrable-types": "off",
    "@typescript-eslint/explicit-function-return-type": "off",
    "padding-line-between-statements": [
      "error",
      { "blankLine": "always", "prev": "class", "next": "*" },
      { "blankLine": "always", "prev": "block-like", "next": "*"  },
      { "blankLine": "always", "prev": "function", "next": "*"  },
      { blankLine: "any",    prev: ["const", "let", "var"], next: ["const", "let", "var"]}
    ],
    "no-unused-vars": [
      "error",
      {
        vars: "all",
        args: "all"
      }
    ],
    "key-spacing": [
      "error",
      {
        mode: "minimum",
        align: "value",
        beforeColon: false
      }
    ],
    "id-match": 0,
    semi: "off",
    "max-len": 0,
    "no-multi-spaces": 0,
    quotes: ["error", "single"],
    "prefer-rest-params": "off"
  }
};
