'use strict';
import './types/eslint-plugin-github.d.js';
import { defineConfig } from 'eslint/config';
import _0x116483 from 'eslint-plugin-react-compiler';
import _0xe799ff from 'eslint-plugin-react-hooks';
import _0x3ea994 from 'eslint-plugin-react';
import _0x4da7c8 from 'eslint-plugin-react-refresh';
import _0x474eb7 from '@stylistic/eslint-plugin';
import _0xf1b9c5 from 'eslint-plugin-import';
import _0x29155c from '@next/eslint-plugin-next';
import _0x56962b from 'eslint-plugin-jsonc';
import config from './eslint-next-web-vitals-temp.config.js';
import { packagesPath, folders, nonRootProjectPaths } from '@fernir2/base-repo/app-constants/project-paths';
import { aliases } from '@fernir2/base-repo/app-constants/alias-symbols';
import { noRestrictedImportsMessages, noRestrictedPathsMessages, noRestrictedSyntaxMessages } from './constants/messages.js';
import { resolveLintTsconfigPath } from './paths/resolve-lint-tsconfig-paths.js';
import { compat } from './constants/flat-compat.js';
import index_default from './dist/rules/index.js';
import _0x466e47 from 'eslint-plugin-github';

const relativeImportRestrictions=[{'group':[aliases['packages']],'message':noRestrictedImportsMessages['packagesImports']}];const testRestriction=[{'group':[aliases['test']],'message':noRestrictedImportsMessages['testImports']}];const nextRestriction=[{'group':['next/**'],'message':noRestrictedImportsMessages['nextImports']}];const reactRestriction=[{'group':['react'],'message':noRestrictedImportsMessages['reactImports']}];const tsMorphRestriction=[{'group':['ts-morph/**'],'message':noRestrictedImportsMessages['tsMorphImports']}];const packageRestriction=[{'group':['@fernir2/saas-kit','@fernir2/saas-kit/**'],'message':noRestrictedImportsMessages['packageImport']}];const customRulesPlugin=index_default,baseConfig=defineConfig([{'ignores':['**/*.ico','**/*.mjs','**/*.d.ts','**/*.css','**/*.svg',folders['dist']+'/',folders['nodeModules']+'/',folders['dotNext']+'/',folders['nodeCache']+'/',folders['nx']+'/',folders['lib']+'/',folders['vscode']+'/',folders['playwrightReport']+'/',folders['testResults']+'/',folders['generated']+'/',folders['build']+'/']},{'files':['**/*.ts','**/*.tsx'],'languageOptions':{'sourceType':'script','parserOptions':{'project':resolveLintTsconfigPath(import.meta.url),'createDefaultProgram':!![],'ecmaFeatures':{'jsx':!![]}}}},...compat['extends']('eslint:recommended','plugin:@typescript-eslint/recommended','plugin:react/recommended','plugin:react/jsx-runtime','prettier','plugin:sonarjs/recommended-legacy')['map'](_0x4a72d2=>({..._0x4a72d2,'files':['**/*.ts','**/*.tsx']})),...config,_0x474eb7['configs']['disable-legacy'],{'files':['**/*.{js,jsx,ts,tsx}'],'plugins':{'import':_0xf1b9c5},'settings':{'import/parsers':{'@typescript-eslint/parser':['.ts','.mts','.cts','.tsx','.d.ts']},'import/resolver':{'node':{'extensions':['.js','.jsx','.ts','.tsx']},'typescript':{'alwaysTryTypes':!![]}}},'rules':{'import/no-anonymous-default-export':'warn','import/no-default-export':'off','import/no-deprecated':'error','import/no-mutable-exports':'error','import/no-cycle':'off','import/no-absolute-path':'error','import/no-self-import':'error','import/no-duplicates':'error','import/no-extraneous-dependencies':['off',{'devDependencies':![]}],'import/no-restricted-paths':['error',{'zones':[{'target':['./'+folders['src']+'/*','./'+folders['src']+'/!(fd-pages|app)/**/*'],'from':packagesPath['packagesServer'],'message':noRestrictedPathsMessages['src']}]}]}},{'files':['**/*.ts','**/*.tsx'],'plugins':{'react-compiler':_0x116483,'react-hooks':_0xe799ff,'react':_0x3ea994,'react-refresh':_0x4da7c8,'custom-eslint-rules':customRulesPlugin,'github':_0x466e47,'@stylistic':_0x474eb7},'rules':{'custom-eslint-rules/enum-type-immediate-definition':'error','custom-eslint-rules/must-do-await-data-in-one-line':'error','no-console':'error','custom-eslint-rules/must-add-empty-line-before-assert-act-arrange':'error','custom-eslint-rules/must-use-camelcase-for-html-items-id-attribute':'error','custom-eslint-rules/must-not-use-see-link-in-docs-if-type-available':'error','sonarjs/no-empty-collection':'error','sonarjs/no-unused-collection':'error','sonarjs/no-commented-code':'error','github/authenticity-token':'error','accessor-pairs':'error','no-constant-condition':'error','no-unreachable':'error','prefer-object-has-own':'error','prefer-const':'off','prefer-regex-literals':'error','prefer-object-spread':'error','prefer-template':'off','no-throw-literal':'error','no-control-regex':'error','no-debugger':'error','no-octal-escape':'error','no-duplicate-case':'error','no-empty':'error','no-eval':'error','@stylistic/no-extra-semi':'error','no-invalid-regexp':'error','no-irregular-whitespace':'error','@stylistic/no-multiple-empty-lines':'error','no-return-await':'error','no-sequences':'error','prefer-spread':'error','no-sparse-arrays':'error','no-template-curly-in-string':'error','no-undef-init':'error','no-param-reassign':'error','no-useless-rename':'error','no-useless-constructor':'error','no-alert':'error','no-multi-str':'error','no-proto':'error','no-caller':'error','no-lone-blocks':'error','new-cap':'error','no-var':'error','no-lonely-if':'error','no-unmodified-loop-condition':'error','no-constructor-return':'error','no-useless-call':'error','no-self-compare':'error','react/jsx-no-comment-textnodes':'error','react/no-unused-prop-types':'error','react/hook-use-state':['error',{'allowDestructuredState':!![]}],'react/no-this-in-sfc':'error','react/no-access-state-in-setstate':'error','react/no-unused-class-component-methods':'error','react/no-unstable-nested-components':'error','react/jsx-no-constructed-context-values':'off','no-new-func':'error','no-unneeded-ternary':'error','@stylistic/comma-dangle':['error','only-multiline'],'consistent-return':'error','github/prefer-observers':'error','github/no-dynamic-script-tag':'error','github/async-preventdefault':'error','complexity':['error',{'max':0xf}],'eqeqeq':['error','always'],'@stylistic/semi':['error','always'],'@stylistic/space-in-parens':['error','never'],'default-case':'error','max-classes-per-file':['error',-0x9*-0x40e+0x43*-0x73+-0x1*0x663],'@stylistic/max-len':['error',{'code':0x78,'ignorePattern':'^import\x5cs.+\x5csfrom\x5cs.+;$'}],'@typescript-eslint/default-param-last':'error','@typescript-eslint/prefer-optional-chain':'error','@typescript-eslint/no-unsafe-return':'error','@typescript-eslint/no-unsafe-assignment':'off','@typescript-eslint/consistent-type-assertions':['error',{'assertionStyle':'never'}],'@typescript-eslint/no-unused-vars':['error',{'varsIgnorePattern':'^React$','args':'all','argsIgnorePattern':'^_$'}],'@typescript-eslint/array-type':['error',{'default':'array'}],'@typescript-eslint/await-thenable':'error','@typescript-eslint/no-empty-object-type':'off','@typescript-eslint/no-restricted-types':['error',{'types':{'Object':'Use\x20{}\x20instead.','Function':'Avoid\x20using\x20the\x20`Function`\x20type.\x20Use\x20a\x20specific\x20function\x20type,\x20like\x20`()\x20=>\x20void`.','Boolean':'Use\x20`boolean`\x20instead.','Number':'Use\x20`number`\x20instead.','String':'Use\x20`string`\x20instead.','Symbol':'Use\x20`symbol`\x20instead.'}}],'@typescript-eslint/consistent-type-definitions':'error','@typescript-eslint/explicit-member-accessibility':['error',{'accessibility':'no-public'}],'@typescript-eslint/member-ordering':['error',{'default':{'memberTypes':['public-field','protected-field','private-field','constructor','public-method']}}],'@typescript-eslint/naming-convention':['error',{'selector':'import','format':['camelCase','PascalCase']},{'selector':'variable','format':['camelCase']},{'selector':'typeLike','format':['camelCase','PascalCase']},{'selector':'enumMember','format':['camelCase','PascalCase']},{'selector':'class','format':['PascalCase']},{'selector':'interface','format':['PascalCase']},{'selector':['property','typeProperty'],'modifiers':['requiresQuotes'],'format':null},{'selector':['property','typeProperty'],'filter':{'regex':'^\x5cd+$','match':!![]},'format':null},{'selector':['property','typeProperty'],'filter':{'regex':'__','match':!![]},'format':null},{'selector':['property','typeProperty'],'filter':{'regex':'^[A-Z][A-Za-z0-9]*_[A-Za-z0-9_]+$','match':!![]},'format':null},{'selector':['property','typeProperty'],'format':['camelCase','snake_case','PascalCase','UPPER_CASE'],'leadingUnderscore':'allow'},{'selector':'function','format':['camelCase']}],'@typescript-eslint/no-empty-interface':'off','@typescript-eslint/no-explicit-any':'error','@typescript-eslint/no-for-in-array':'error','@typescript-eslint/no-inferrable-types':'error','@typescript-eslint/no-require-imports':'error','@typescript-eslint/no-this-alias':'error','@typescript-eslint/adjacent-overload-signatures':'error','@typescript-eslint/prefer-function-type':'error','@stylistic/padding-line-between-statements':['error',{'blankLine':'always','prev':'*','next':'function'},{'blankLine':'always','prev':'function','next':'*'},{'blankLine':'always','prev':'*','next':'if'},{'blankLine':'always','prev':'if','next':'*'},{'blankLine':'always','prev':'*','next':'switch'},{'blankLine':'always','prev':'switch','next':'*'},{'blankLine':'always','prev':'*','next':'for'},{'blankLine':'always','prev':'*','next':'try'},{'blankLine':'always','prev':'try','next':'*'}],'@typescript-eslint/no-unused-expressions':['error',{'allowShortCircuit':!![]}],'@typescript-eslint/no-var-requires':'error','@stylistic/quotes':['error','double',{'avoidEscape':!![]}],'@typescript-eslint/unbound-method':'error','@typescript-eslint/no-shadow':'error','@typescript-eslint/no-confusing-non-null-assertion':'error','@typescript-eslint/prefer-for-of':'error','@typescript-eslint/prefer-return-this-type':'error','@typescript-eslint/no-unnecessary-type-arguments':'error','@typescript-eslint/no-empty-function':'error','@typescript-eslint/prefer-string-starts-ends-with':'error','@typescript-eslint/prefer-nullish-coalescing':'error','@typescript-eslint/no-misused-promises':'off','react/jsx-no-useless-fragment':'error','@stylistic/jsx-pascal-case':'error','react-hooks/rules-of-hooks':'error','react-hooks/exhaustive-deps':'warn','react-compiler/react-compiler':'error','sonarjs/anchor-precedence':'error','sonarjs/no-unused-vars':'off','sonarjs/prefer-read-only-props':'off','sonarjs/no-small-switch':'off','sonarjs/no-nested-conditional':'off','sonarjs/different-types-comparison':'error','sonarjs/cognitive-complexity':'error','sonarjs/no-undefined-argument':'off','sonarjs/no-selector-parameter':'off','sonarjs/no-all-duplicated-branches':'error','sonarjs/no-identical-expressions':'off','sonarjs/arguments-order':'error','sonarjs/prefer-single-boolean-return':'error','sonarjs/array-callback-without-return':'error','sonarjs/no-ignored-return':'error','sonarjs/no-ignored-exceptions':'error','sonarjs/argument-type':'error','sonarjs/no-misleading-array-reverse':'error','sonarjs/redundant-type-aliases':'error','sonarjs/empty-string-repetition':'error','sonarjs/no-duplicated-branches':'error','sonarjs/deprecation':'error','sonarjs/no-hardcoded-passwords':'off','sonarjs/slow-regex':'off','sonarjs/no-globals-shadowing':'error','sonarjs/no-useless-intersection':'error','sonarjs/no-empty-test-file':'off','sonarjs/prefer-regexp-exec':'error','sonarjs/no-nested-assignment':'error','sonarjs/pseudo-random':'error','sonarjs/no-os-command-from-path':'error','sonarjs/no-identical-functions':'error','sonarjs/no-gratuitous-expressions':'error','sonarjs/no-dead-store':'error','sonarjs/os-command':'off','sonarjs/no-alphabetical-sort':'error','custom-eslint-rules/no-tailwind-colors':'error','custom-eslint-rules/no-string-length-check':'error','custom-eslint-rules/max-lines-per-function':['error',{'maxLines':0x3c}],'custom-eslint-rules/no-use-type-undefined-for-optional':'error','custom-eslint-rules/must-create-resources-in-src-dir':'error','custom-eslint-rules/no-todo':'error','custom-eslint-rules/use-nullish-coalescing-for-default':'error','custom-eslint-rules/no-then':'error','custom-eslint-rules/must-consolidate-conditional-expressions':'error','custom-eslint-rules/for-each-max-lines':'error','custom-eslint-rules/must-put-empty-line':'error','custom-eslint-rules/no-integers-instead-of-enums':'error','custom-eslint-rules/use-function-without-parameter-shortcut':'error','custom-eslint-rules/no-constructor-name-for-resource':'error','custom-eslint-rules/no-to-lower-case-with-resource-name':'error','custom-eslint-rules/must-limit-lines-without-comments':'error','custom-eslint-rules/must-use-native-private':'error','custom-eslint-rules/no-nullable-check':'error','no-continue':'error','custom-eslint-rules/no-use-enum':'error','custom-eslint-rules/must-add-prefix-to-po-functions':'error','custom-eslint-rules/must-use-resource-name-instead-of-resource':'error','custom-eslint-rules/group-consts-as-const':'error','custom-eslint-rules/must-use-prefix-for-env-vars':'error','no-restricted-imports':['error',{'patterns':[...relativeImportRestrictions,...nextRestriction,...packageRestriction,...testRestriction]}],'custom-eslint-rules/no-redundant-type-alias':'error','custom-eslint-rules/must-not-use-ternary-operator-for-complicated-conditions':'error','custom-eslint-rules/must-use-wrappers-to-access-first-element':'error','custom-eslint-rules/must-not-use-location-href':'error','custom-eslint-rules/no-duplicate-imports':'error','custom-eslint-rules/no-array-destructuring-from-function-calls':'error','custom-eslint-rules/use-of-only-english-in-repository':'error','custom-eslint-rules/must-avoid-code-duplication-in-functions':'error','custom-eslint-rules/no-literal-duplication':'error','custom-eslint-rules/must-not-use-inline-await':'error','custom-eslint-rules/must-use-func-declaration-for-named-func':'error','custom-eslint-rules/must-add-space-for-comments':'error','custom-eslint-rules/must-use-single-return-in-function':'error','custom-eslint-rules/no-useless-destructing':'error','custom-eslint-rules/must-throw-full-error-objects':'error','custom-eslint-rules/no-empty-files':'error','custom-eslint-rules/no-fd-prefix-in-folders':'error','custom-eslint-rules/must-use-plural-enum-const-and-singular-type':'error','custom-eslint-rules/no-use-id':'error','custom-eslint-rules/must-not-use-redundant-string':'error','custom-eslint-rules/no-get-in-function-names-without-return':'error','custom-eslint-rules/must-use-create-error':'error','custom-eslint-rules/must-not-use-emojis':'error','custom-eslint-rules/must-use-pascal-case-for-types-and-interfaces':'error','custom-eslint-rules/must-not-use-anonymous-objects-only-with-explicit-typization':'error','custom-eslint-rules/must-not-declare-func-inside-another-func':'error','custom-eslint-rules/no-specify-return-type':'error','custom-eslint-rules/must-not-use-negation-with-enums':'error','custom-eslint-rules/must-start-comments-with-uppercase':'error','custom-eslint-rules/must-not-use-null':'error','custom-eslint-rules/must-use-new-url-constructor':'error','custom-eslint-rules/no-untyped-objects-between-components':'error','custom-eslint-rules/must-not-import-react':'error','custom-eslint-rules/no-centralized-error-messages':'error','custom-eslint-rules/must-not-use-common-constants-outside-constants-files':'error','custom-eslint-rules/must-use-interfaces-for-complex-types':['error',{'maxComplexity':0x4}],'custom-eslint-rules/must-not-needlessly-copy-arrays':'off','custom-eslint-rules/must-not-create-funcs-files-for-non-components':'error','custom-eslint-rules/must-use-descriptive-names-for-functions-and-parameters':'error','custom-eslint-rules/must-not-use-empty-lines-in-html':'error','custom-eslint-rules/must-not-use-process-env':'error','custom-eslint-rules/must-use-color-variables-instead-of-hardcoded-values':'error','custom-eslint-rules/no-naked-query-return':'error','custom-eslint-rules/must-return-empty-array':'error','custom-eslint-rules/must-not-modify-data-or-workspace-in-readonly-tests':'error','custom-eslint-rules/must-not-use-indexed-access-type-in-function-params':'error','custom-eslint-rules/must-use-odata-builder':'error','custom-eslint-rules/must-use-funcs-only-for-same-named-component':'error','custom-eslint-rules/no-manual-resource-instantiation':['error',{'restrictedClasses':[{'name':'TimeRange','fromPath':'time-range.resource'}]}]}},{'files':['**/'+nonRootProjectPaths['serverFramework']+'/*','**/'+nonRootProjectPaths['clientFramework']+'/*'],'rules':{'no-restricted-imports':['error',{'patterns':[...relativeImportRestrictions,...packageRestriction,...testRestriction]}]}},{'files':[folders['src']+'**/*'],'rules':{'no-restricted-imports':['error',{'patterns':[...relativeImportRestrictions,...tsMorphRestriction,...nextRestriction,...packageRestriction,...testRestriction]}]}},{'files':['**/*.{ts}'],'ignores':['**/use*','**/*context*','**/*provider*','**/*hooks*'],'rules':{'no-restricted-imports':['error',{'patterns':[...relativeImportRestrictions,...reactRestriction,...nextRestriction,...packageRestriction,...testRestriction]}],'no-restricted-syntax':['error',{'selector':'Identifier[name=\x27React\x27],\x20TSQualifiedName[left.name=\x27React\x27]','message':'Using\x20React\x20is\x20allowed\x20only\x20in\x20.tsx\x20files'}]}},{'files':['**/*.{js,jsx,ts,tsx}'],'plugins':{'github':_0x466e47,'@next/next':_0x29155c,'custom-eslint-rules':customRulesPlugin},'rules':{'@next/next/no-sync-scripts':'error','github/no-blur':'error','github/async-currenttarget':'error','github/no-useless-passive':'error','github/require-passive-events':'error','github/no-inner-html':'error','github/no-innerText':'error','github/unescaped-html-literal':'error','no-warning-comments':['error',{'terms':['todo\x20fd','fd\x20todo','todo'],'location':'anywhere'}],'custom-eslint-rules/no-eslint-disable-without-approved':'error','custom-eslint-rules/no-delays-in-ui-tests':'error','custom-eslint-rules/must-use-plural-in-function-names-if-returns-array':'error','custom-eslint-rules/must-use-s-ending-for-natural-plurals':'error','custom-eslint-rules/must-create-assert-functions-in-asserts-files':'error','custom-eslint-rules/no-import-from-temp-dev':'error','custom-eslint-rules/must-mark-external-imports-as-internal':'error','custom-eslint-rules/no-use-conditional-logic-in-test-assertions':'error','custom-eslint-rules/must-use-alt-to-describe-images':'error','custom-eslint-rules/must-use-plural-names-of-files-for-arrays':'error'}},{'files':['**/*.{js,jsx}'],'plugins':{'custom-eslint-rules':customRulesPlugin},'rules':{'custom-eslint-rules/must-use-typescript':'error'}},{'files':['**/*.{js,ts}'],'ignores':['**/*.tsx','**/*.funcs.ts','**/*.funcs.tsx'],'plugins':{'github':_0x466e47,'custom-eslint-rules':customRulesPlugin},'rules':{'custom-eslint-rules/no-long-filter-map':'error','custom-eslint-rules/filename-kebab-case':'error','github/filenames-match-regex':['error','^[a-z]+(?:[-\x5c.][a-z]+)*(?:2)?(?:\x5c.[a-z]+)*$']}},{'files':['**/*.{js,jsx,ts,tsx}'],'ignores':['fd/fd-toolbox/time/datetimes.ts'],'plugins':{'custom-eslint-rules':customRulesPlugin},'rules':{'custom-eslint-rules/no-new-date':'error'}},{'files':['**/*.tsx'],'plugins':{'custom-eslint-rules':customRulesPlugin},'rules':{'@typescript-eslint/naming-convention':['error',{'selector':'import','format':['camelCase','PascalCase']},{'selector':'variable','format':['camelCase','PascalCase']},{'selector':'typeLike','format':['camelCase','PascalCase']},{'selector':'class','format':['PascalCase']},{'selector':'interface','format':['PascalCase']},{'selector':['property','typeProperty'],'modifiers':['requiresQuotes'],'format':null},{'selector':['property','typeProperty'],'filter':{'regex':'^\x5cd+$','match':!![]},'format':null},{'selector':['property','typeProperty'],'filter':{'regex':'__','match':!![]},'format':null},{'selector':['property','typeProperty'],'filter':{'regex':'^[A-Z][A-Za-z0-9]*_[A-Za-z0-9_]+$','match':!![]},'format':null},{'selector':['property','typeProperty'],'format':['camelCase','snake_case','PascalCase','UPPER_CASE'],'leadingUnderscore':'allow'},{'selector':'function','format':['camelCase','PascalCase']}],'complexity':'off','custom-eslint-rules/max-lines-per-function':['error',{'maxLines':0x12c}],'@stylistic/max-len':['error',{'code':0x1f4}],'sonarjs/function-return-type':'off','custom-eslint-rules/no-conflicting-props':'error','custom-eslint-rules/must-use-function-for-component':'error','custom-eslint-rules/must-use-interface-for-props':'error','custom-eslint-rules/must-clean-up-event-listeners':'error','react/no-array-index-key':'error','custom-eslint-rules/use-on-prefix':'error','custom-eslint-rules/no-px-in-tailwind':'error','custom-eslint-rules/no-default-props':'error','custom-eslint-rules/must-not-use-important':'error','custom-eslint-rules/no-untyped-objects-between-components':'error'}},{'files':['**/*-props.ts'],'plugins':{'custom-eslint-rules':customRulesPlugin},'rules':{'custom-eslint-rules/must-use-nameof-for-props':'error'}},{'files':['**/*.spec.ts'],'plugins':{'custom-eslint-rules':customRulesPlugin},'rules':{'custom-eslint-rules/must-use-test-comments':'error','custom-eslint-rules/must-use-example-domain':'error','custom-eslint-rules/no-delays-in-ui-tests':'error','custom-eslint-rules/must-get-elements-in-tests-only-by-id':'error','custom-eslint-rules/must-not-use-page-directly':'error','custom-eslint-rules/must-not-use-po-in-assert-functions':'error','custom-eslint-rules/must-use-filename-in-assert-functions':'error','custom-eslint-rules/max-lines-per-function':'off','custom-eslint-rules/must-name-ui-tests-component-condition-expected-result':'error','custom-eslint-rules/must-separate-unrelated-tests-into-different-files':'error'}},{'files':['**/package.json'],'languageOptions':{'parser':_0x56962b},'plugins':{'custom-eslint-rules':customRulesPlugin},'rules':{'custom-eslint-rules/must-use-strict-dependency-version':'error'}},{'files':['**/*.jsx','**/*.tsx'],'rules':{'no-restricted-imports':['error',{'patterns':[...relativeImportRestrictions,...nextRestriction,...packageRestriction,...testRestriction],'paths':[{'name':'react','importNames':['useCallback','useMemo','forwardRef'],'message':noRestrictedSyntaxMessages['reactApi']}]}],'no-restricted-syntax':['error',{'selector':'CallExpression[callee.name=\x22useCallback\x22]','message':noRestrictedSyntaxMessages['reactApi']},{'selector':'CallExpression[callee.name=\x22useMemo\x22]','message':noRestrictedSyntaxMessages['reactApi']},{'selector':'CallExpression[callee.name=\x22forwardRef\x22]','message':noRestrictedSyntaxMessages['reactApi']}]}}]);

export { baseConfig as default, nextRestriction, packageRestriction, reactRestriction, relativeImportRestrictions, testRestriction, tsMorphRestriction };
