/* eslint-disable canonical/no-reassign-imports -- Flat-config strict type-checked preset intentionally inspects imported plugin rule metadata. */
import { keyIn, objectEntries, objectFromEntries } from "ts-extras";
import { rules as pluginRules } from "../rules.js";
import { strict } from "./strict.js";
const additionalTypeCheckedRuleEntries = objectEntries(pluginRules).flatMap(([ruleName, ruleModule]) => {
    if (ruleModule.meta.deprecated !== false) {
        return [];
    }
    const docsMetadata = ruleModule.meta.docs;
    if (docsMetadata?.requiresTypeChecking !== true) {
        return [];
    }
    const qualifiedRuleName = `etc-misc/${ruleName}`;
    if (keyIn(strict.rules, qualifiedRuleName)) {
        return [];
    }
    return [[qualifiedRuleName, "error"]];
});
const strictTypeCheckedRules = {
    ...strict.rules,
    ...objectFromEntries(additionalTypeCheckedRuleEntries),
};
/**
 * Strict preset augmented with every non-deprecated rule that requires type
 * information.
 */
export const strictTypeChecked = {
    languageOptions: {
        parserOptions: {
            projectService: true,
        },
    },
    rules: strictTypeCheckedRules,
};
/* eslint-enable canonical/no-reassign-imports -- Re-enable canonical import reassignment restrictions for the remainder of the file. */
//# sourceMappingURL=strict-type-checked.js.map