const js = require("@eslint/js");
const globals = require("globals");
module.exports = [
  js.configs.recommended,
  {
    languageOptions: {
      ecmaVersion: "latest",
      sourceType: "module",
      globals: {
        ...globals.node,
        ...globals.jasmine,
        mockFetch: "readonly",
        Parse: "readonly",
        reconfigureServer: "readonly",
        createTestUser: "readonly",
        jfail: "readonly",
        ok: "readonly",
        strictEqual: "readonly",
        TestObject: "readonly",
        Item: "readonly",
        Container: "readonly",
        equal: "readonly",
        expectAsync: "readonly",
        notEqual: "readonly",
        it_id: "readonly",
        fit_id: "readonly",
        it_only_db: "readonly",
        fit_only_db: "readonly",
        it_only_mongodb_version: "readonly",
        it_only_postgres_version: "readonly",
        it_only_node_version: "readonly",
        fit_only_mongodb_version: "readonly",
        fit_only_postgres_version: "readonly",
        fit_only_node_version: "readonly",
        it_exclude_dbs: "readonly",
        fit_exclude_dbs: "readonly",
        describe_only_db: "readonly",
        fdescribe_only_db: "readonly",
        describe_only: "readonly",
        fdescribe_only: "readonly",
        on_db: "readonly",
        defaultConfiguration: "readonly",
        range: "readonly",
        jequal: "readonly",
        create: "readonly",
        arrayContains: "readonly",
        databaseAdapter: "readonly",
        databaseURI: "readonly"
      },
    },
    rules: {
      indent: ["error", 2, { SwitchCase: 1 }],
      "linebreak-style": ["error", "unix"],
      "no-trailing-spaces": "error",
      "eol-last": "error",
      "space-in-parens": ["error", "never"],
      "no-multiple-empty-lines": "warn",
      "prefer-const": "error",
      "space-infix-ops": "error",
      "no-useless-escape": "off",
      "require-atomic-updates": "off",
      "object-curly-spacing": ["error", "always"],
      curly: ["error", "all"],
      "block-spacing": ["error", "always"],
      "no-unused-vars": "off",
    },
  },
];
