"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const typescript_1 = __importDefault(require("../../../legacy/configs/base/typescript"));
const utils_1 = require("../../../utils");
const legacyReactTypescriptConfig = [
    ...typescript_1.default,
    {
        name: 'airbnb/config/react-configurations/typescript/legacy',
        files: utils_1.tsFiles,
        rules: {
            // Append 'tsx' to Airbnb 'react/jsx-filename-extension' rule
            // Original: ['.jsx']
            'react/jsx-filename-extension': [
                'error',
                {
                    extensions: ['.jsx', '.tsx'],
                },
            ],
        },
    },
    {
        name: 'airbnb/config/react-configurations/typescript-settings/legacy',
        files: utils_1.allFiles,
        settings: {
            // Apply special parsing for TypeScript files
            'import/parsers': {
                '@typescript-eslint/parser': utils_1.tsExtensionsWithReactDTS,
            },
            // Append 'ts' extensions to Airbnb 'import/resolver' setting
            // Prepend 'mjs' to match shared config
            // Original: ['.js', '.jsx', '.json']
            'import/resolver': {
                node: {
                    extensions: [...utils_1.tsExtensionsWithReactDTS, '.json'],
                },
                typescript: true,
            },
            // Append 'ts' extensions to Airbnb 'import/extensions' setting
            // Original: ['.js', '.mjs', '.jsx']
            'import/extensions': utils_1.tsExtensionsWithReactDTS,
        },
    },
];
exports.default = legacyReactTypescriptConfig;
