pact-foundation/pact-js

View on GitHub
.eslintrc.json

Summary

Maintainability
Test Coverage
{
  "root": true,
  "parser": "@typescript-eslint/parser",
  "plugins": ["@typescript-eslint", "import", "mocha", "chai-friendly"],
  "extends": [
    "eslint:recommended",
    "plugin:@typescript-eslint/recommended",
    "airbnb-base",
    "airbnb-typescript/base",
    "prettier"
  ],
  "settings": {
    "import/resolver": {
      "typescript": {
        "project": "tsconfig.json"
      }
    }
  },
  "parserOptions": {
    "ecmaVersion": 2018,
    "sourceType": "module",
    "project": "tsconfig.json"
  },
  "rules": {
    "@typescript-eslint/explicit-module-boundary-types": "error",
    "@typescript-eslint/no-unused-vars": "error",
    "@typescript-eslint/no-explicit-any": "error",
    "@typescript-eslint/no-shadow": "error",
    "@typescript-eslint/no-empty-function": [
      "error",
      { "allow": ["constructors"] }
    ],
    "class-methods-use-this": "off",
    "import/prefer-default-export": "off",
    "no-underscore-dangle": ["error", { "allow": ["__pactMessageMetadata"] }]
  },
  "overrides": [
    {
      "files": ["**/*.spec.ts"],
      "extends": ["plugin:mocha/recommended"],
      "env": {
        "mocha": true
      },
      "rules": {
        "@typescript-eslint/ban-ts-comment": "off",
        "@typescript-eslint/no-explicit-any": "off",
        "@typescript-eslint/no-empty-function": "off",
        "@typescript-eslint/no-unused-expressions": "off",
        "@typescript-eslint/no-unused-vars": [
          "error",
          { "varsIgnorePattern": "unused" }
        ],
        "class-methods-use-this": "off",
        "chai-friendly/no-unused-expressions": "error",
        "mocha/no-mocha-arrows": "off",
        "mocha/no-setup-in-describe": "off",
        "no-new": "off"
      }
    }
  ],
  "globals": {
    "NodeJS": true
  }
}