{"version":3,"file":"eslintConfig.mjs","names":["globalIgnores","setGlobalIgnores"],"sources":["../src/eslintConfig.ts"],"sourcesContent":["import eslint from '@eslint/js';\nimport { defineConfig, globalIgnores as setGlobalIgnores } from 'eslint/config';\nimport { type Linter } from 'eslint';\nimport stylistic, { type RuleOptions } from '@stylistic/eslint-plugin';\nimport json from '@eslint/json';\nimport globals from 'globals/globals.json' with { type: 'json' };\nimport tseslint from 'typescript-eslint';\n\n// https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config\n// https://www.google.com/search?q=javascript+recurse+through+object+and+remove+undefined+properties\n\nconst globalIgnores: ReturnType<typeof setGlobalIgnores> = setGlobalIgnores([\n  '_tsout/**/*',\n  '_tsout/*',\n  '_tsout/',\n  'cjs/**/*',\n  'cjs/*/*',\n  'cjs/*',\n  'mjs/**/*',\n  'mjs/*',\n  'mjs/',\n  'node_modules/**/*',\n  '**/node_modules/**/*',\n  '**/*.tsbuildinfo',\n  '**/bin/**/*',\n  '**/obj/**/*',\n  '.pnp.cjs',\n  '.pnp.loader.mjs',\n  '.yarn/sdks/**',\n]);\n\nconst stylisticWarn: Linter.Config = stylistic.configs.customize({\n  quoteProps: 'as-needed',\n  semi: true,\n  indent: 2,\n  severity: 'warn',\n});\nstylisticWarn.rules ??= {};\n\nstylisticWarn.rules['@stylistic/no-extra-parens'] = [\n  'warn',\n  'all',\n  {\n    allowParensAfterCommentPattern: '@type|@satisfies',\n    nestedBinaryExpressions: false,\n  },\n] satisfies Linter.RuleEntry<RuleOptions['@stylistic/no-extra-parens']>;\n\nstylisticWarn.rules['@stylistic/semi'] = [\n  'warn',\n  'always',\n  {\n    omitLastInOneLineBlock: false,\n    omitLastInOneLineClassBody: false,\n  },\n] satisfies Linter.RuleEntry<RuleOptions['@stylistic/semi']>;\n\nconst config: ReturnType<typeof defineConfig> = defineConfig(\n  { ...json.configs.recommended, name: 'JSON Recommended', files: ['**/*.json'], ignores: ['**/.vscode/*.json'], language: 'json/json' },\n  { name: 'JSON - Allow empty keys in package-lock.json', files: ['**/package-lock.json'], rules: { 'json/no-empty-keys': 'off' } },\n  { ...json.configs.recommended, name: 'JSONC Recommended', files: ['**/*.jsonc', '**/.vscode/*.json'], language: 'json/jsonc' },\n  { ...json.configs.recommended, name: 'JSON5 Recommended', files: ['**/*.json5'], language: 'json/json5' },\n  {\n    name: 'TSJS',\n    extends: [\n      eslint.configs.recommended,\n      ...tseslint.configs.strictTypeChecked,\n      ...tseslint.configs.stylisticTypeChecked,\n      stylisticWarn,\n    ],\n    files: [\n      '**/*.ts',\n      '**/*.cts',\n      '**/*.mts',\n      '**/*.js',\n      '**/*.cjs',\n      '**/*.mjs',\n      '**/*.jsx',\n      '**/*.tsx',\n    ],\n    ignores: globalIgnores.ignores,\n    languageOptions: {\n      parserOptions: {\n        projectService: true,\n      },\n      globals: globals.node,\n    },\n  },\n  globalIgnores,\n);\nexport default config;\n"],"mappings":";;;;;;;;AAWA,MAAMA,kBAAqDC,cAAiB;CAC1E;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,gBAA+B,UAAU,QAAQ,UAAU;CAC/D,YAAY;CACZ,MAAM;CACN,QAAQ;CACR,UAAU;AACZ,CAAC;AACD,cAAc,UAAU,CAAC;AAEzB,cAAc,MAAM,gCAAgC;CAClD;CACA;CACA;EACE,gCAAgC;EAChC,yBAAyB;CAC3B;AACF;AAEA,cAAc,MAAM,qBAAqB;CACvC;CACA;CACA;EACE,wBAAwB;EACxB,4BAA4B;CAC9B;AACF;AAEA,MAAM,SAA0C,aAC9C;CAAE,GAAG,KAAK,QAAQ;CAAa,MAAM;CAAoB,OAAO,CAAC,WAAW;CAAG,SAAS,CAAC,mBAAmB;CAAG,UAAU;AAAY,GACrI;CAAE,MAAM;CAAgD,OAAO,CAAC,sBAAsB;CAAG,OAAO,EAAE,sBAAsB,MAAM;AAAE,GAChI;CAAE,GAAG,KAAK,QAAQ;CAAa,MAAM;CAAqB,OAAO,CAAC,cAAc,mBAAmB;CAAG,UAAU;AAAa,GAC7H;CAAE,GAAG,KAAK,QAAQ;CAAa,MAAM;CAAqB,OAAO,CAAC,YAAY;CAAG,UAAU;AAAa,GACxG;CACE,MAAM;CACN,SAAS;EACP,OAAO,QAAQ;EACf,GAAG,SAAS,QAAQ;EACpB,GAAG,SAAS,QAAQ;EACpB;CACF;CACA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,SAASD,gBAAc;CACvB,iBAAiB;EACf,eAAe,EACb,gBAAgB,KAClB;EACA,SAAS,QAAQ;CACnB;AACF,GACAA,eACF"}