"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
var _a, _b, _c, _d, _e, _f;
Object.defineProperty(exports, "__esModule", { value: true });
const eslint_plugin_n_1 = __importDefault(require("eslint-plugin-n"));
const nodeNoUnsupportedFeatures_1 = __importDefault(require("../../rules/node/nodeNoUnsupportedFeatures"));
const utils_1 = require("../../utils");
const flatNodeConfig = eslint_plugin_n_1.default.configs['flat/recommended'];
const flatModuleConfig = eslint_plugin_n_1.default.configs['flat/recommended-module'];
const flatScriptConfig = eslint_plugin_n_1.default.configs['flat/recommended-script'];
const nodeRecommendedExtensionsConfig = [
    Object.assign({ name: 'airbnb/config/node-configurations', files: utils_1.allFiles }, (flatNodeConfig
        ? {
            languageOptions: flatNodeConfig.languageOptions,
            rules: {
                'n/no-unsupported-features/es-syntax': (_b = (_a = flatNodeConfig.rules) === null || _a === void 0 ? void 0 : _a['n/no-unsupported-features/es-syntax']) !== null && _b !== void 0 ? _b : nodeNoUnsupportedFeatures_1.default.rules['n/no-unsupported-features/es-syntax'],
            },
        }
        : null)),
    Object.assign({ name: 'airbnb/config/node-configurations-for-module', files: ['**/*.mjs', '**/*.mts'] }, (flatModuleConfig
        ? {
            languageOptions: flatModuleConfig.languageOptions,
            rules: {
                'n/no-unsupported-features/es-syntax': (_d = (_c = flatModuleConfig.rules) === null || _c === void 0 ? void 0 : _c['n/no-unsupported-features/es-syntax']) !== null && _d !== void 0 ? _d : nodeNoUnsupportedFeatures_1.default.rules['n/no-unsupported-features/es-syntax'],
            },
        }
        : null)),
    Object.assign({ name: 'airbnb/config/node-configurations-for-script', files: ['**/*.cjs', '**/*.cts'] }, (flatScriptConfig
        ? {
            languageOptions: flatScriptConfig.languageOptions,
            rules: {
                'n/no-unsupported-features/es-syntax': (_f = (_e = flatScriptConfig.rules) === null || _e === void 0 ? void 0 : _e['n/no-unsupported-features/es-syntax']) !== null && _f !== void 0 ? _f : nodeNoUnsupportedFeatures_1.default.rules['n/no-unsupported-features/es-syntax'],
            },
        }
        : null)),
];
exports.default = nodeRecommendedExtensionsConfig;
