/* eslint-disable */
const { resolve } = require("path");
const { RuleTester } = require("eslint");
const tseslint = require("@typescript-eslint/parser");

module.exports = {
    getRuleTester(options) {
        RuleTester.it = function (text, method) {
            if (options && options.beforeEach) {
                options.beforeEach();
            }
            test(RuleTester.it.title + ": " + text, method);
            if (options && options.afterEach) {
                options.afterEach();
            }
        };

        return new RuleTester({
            languageOptions: {
                parser: tseslint,
                parserOptions: { sourceType: "module", ecmaVersion: 2018 },
            },
        });
    },
};
