@yunarch/config-web 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{FlatConfigComposer as H}from"eslint-flat-config-utils";import U from"@eslint/js";import X from"eslint-plugin-unused-imports";import C from"globals";var W=["**/node_modules/","**/dist/","**/out/","**/output","**/.output","**/build/","**/*.min.*","**/package-lock.json","**/yarn.lock","**/.yarn/","**/.yarnrc.yml","**/.pnp.*","**/.pnp","**/.pnp.js","**/.pnp.cjs","**/bun.lock","**/bun.lockb","**/pnpm-lock.yaml","**/.vite-inspect","**/.vitepress/cache","**/vite.config.*.timestamp-*","**/*.log","**/npm-debug.log*","**/yarn-debug.log*","**/yarn-error.log*","**/coverage/","**/.nyc_output/","**/__snapshots__","**/.vscode/","**/.idea/","**/.cache","**/.nuxt","**/.next","**/.svelte-kit","**/.vercel","**/.changeset","**/.turbo/","**/.DS_Store","**/Thumbs.db","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/mockServiceWorker.js","**/CHANGELOG*","**/LICENSE*"];function j(e={},r,t){let o=e.linterOptions??{};return[{name:"yunarch/base/ignores",ignores:[...W,...r??[]]},{name:"yunarch/base/setup",languageOptions:{ecmaVersion:2022,globals:{...C.browser,...C.es2021,...C.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{...o,reportUnusedDisableDirectives:t?!1:o.reportUnusedDisableDirectives??!0}},{name:"yunarch/base/rules",plugins:{"unused-imports":X},rules:{...U.configs.recommended.rules,"array-callback-return":["error",{allowImplicit:!0}],"block-scoped-var":"error",camelcase:["error",{allow:["^UNSAFE_"],ignoreDestructuring:!1,properties:"never"}],curly:["error","multi-line","consistent"],"default-case-last":"error",eqeqeq:"error","func-names":["error","as-needed"],"grouped-accessor-pairs":"error","max-lines":["warn",300],"max-params":["warn",4],"new-cap":["error",{capIsNew:!1}],"no-alert":"error","no-array-constructor":"error","no-bitwise":"error","no-caller":"error","no-console":"error","no-constant-binary-expression":"error","no-constructor-return":"error","no-else-return":"warn","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":["error",{allow:["!!","+"]}],"no-implied-eval":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"warn","no-multi-assign":"error","no-nested-ternary":"error","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-octal-escape":"error","no-param-reassign":"error","no-promise-executor-return":"error","no-proto":"error","no-return-assign":"error","no-script-url":"error","no-self-compare":"error","no-sequences":"error","no-template-curly-in-string":"error","no-undef-init":"warn","no-unneeded-ternary":"error","no-unreachable-loop":"error","no-unused-expressions":"error","no-unused-vars":["error",{args:"none",caughtErrors:"none",ignoreRestSiblings:!0,vars:"all"}],"no-useless-call":"error","no-useless-computed-key":"warn","no-useless-concat":"error","no-useless-rename":"warn","no-useless-return":"warn","no-var":"error","no-void":["error",{allowAsStatement:!0}],"object-shorthand":"warn","prefer-const":"warn","prefer-named-capture-group":"error","prefer-numeric-literals":"error","prefer-object-has-own":"error","prefer-object-spread":"warn","prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"prefer-regex-literals":"error","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"warn","symbol-description":"error","unused-imports/no-unused-imports":"error","unused-imports/no-unused-vars":["error",{args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0,vars:"all",varsIgnorePattern:"^_"}],yoda:"warn"}}]}import J from"eslint-config-prettier";import K from"eslint-plugin-oxlint";var y="**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}",p="{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}",S="**/*.d.{ts,cts,mts}",u="**/*.{ts,cts,mts}",m="**/*.{tsx,ctsx,mtsx}",h="**/*.astro/*.ts",T="**/*.md",_=[`**/__tests__/**/*.${p}`,`**/*.spec.${p}`,`**/*.test.${p}`,`**/*.bench.${p}`,`**/*.benchmark.${p}`];function F(e){let{oxlint:r}=e;return[{name:"yunarch/disables/cli",files:[`**/scripts/${y}`,`**/tasks/${y}`,`**/bin/${y}`,`**/bin.${p}`,`**/cli/${y}`,`**/cli.${p}`],rules:{"@typescript-eslint/no-floating-promises":"off","no-console":"off","unicorn/no-process-exit":"off"}},{name:"yunarch/disables/dts",files:[S],rules:{"@typescript-eslint/consistent-indexed-object-style":"off","import/no-duplicates":"off","no-restricted-syntax":"off","unused-imports/no-unused-vars":"off"}},{name:"yunarch/disables/config-files",files:[`**/*.config.${p}`,`**/*.config.*.${p}`],rules:{"no-console":"off","@typescript-eslint/explicit-function-return-type":"off"}},{name:"yunarch/disables/prettier",rules:{...J.rules}},...r?.oxlintConfigPath?K.buildFromOxlintConfigFile(r.oxlintConfigPath):[]]}import{createTypeScriptImportResolver as M}from"eslint-import-resolver-typescript";import{createNodeResolver as V,importX as O}from"eslint-plugin-import-x";function I(){return[{name:"yunarch/import/rules",plugins:{import:O},rules:{...O.flatConfigs.recommended.rules,"import/first":"error","import/newline-after-import":["error",{count:1}],"import/no-absolute-path":"error","import/no-amd":"error","import/no-cycle":["error",{ignoreExternal:!1,maxDepth:3}],"import/no-duplicates":["error",{"prefer-inline":!0}],"import/no-dynamic-require":"error","import/no-mutable-exports":"error","import/no-relative-packages":"error","import/no-self-import":"error","import/no-useless-path-segments":"error"},settings:{"import-x/resolver-next":[V()]}},{name:"yunarch/import/typescript/rules",files:[u,m],rules:{...O.flatConfigs.typescript.rules},settings:{"import-x/resolver-next":[M()]}}]}import v,{jsdoc as R}from"eslint-plugin-jsdoc";function E(){return[R({name:"yunarch/jsdoc/rules",config:"flat/recommended-error",rules:{"jsdoc/check-param-names":["error",{checkDestructured:!1}],"jsdoc/lines-before-block":["error",{lines:0}],"jsdoc/require-hyphen-before-param-description":["error","always"],"jsdoc/require-param":["error",{checkDestructured:!1,enableRestElementFixer:!1}],"jsdoc/require-throws":"error","jsdoc/tag-lines":["error","any",{startLines:1}]}}),R({name:"yunarch/jsdoc/typescript/rules",files:[u,m],config:"flat/recommended-typescript-error",rules:{...v.configs["flat/contents-typescript-error"].rules,...v.configs["flat/logical-typescript-error"].rules,...v.configs["flat/stylistic-typescript-error"].rules,"jsdoc/require-hyphen-before-param-description":["error","always"],"jsdoc/require-param":["error",{checkDestructured:!1,enableRestElementFixer:!1}],"jsdoc/require-throws":"error"}})]}import Q from"eslint-plugin-perfectionist";function A(){return[{name:"yunarch/perfectionist/rules",plugins:{perfectionist:Q},rules:{"perfectionist/sort-exports":["error",{order:"asc",type:"natural"}],"perfectionist/sort-imports":["error",{groups:["builtin","external","internal",["parent","sibling","index"],"side-effect","object","unknown"],newlinesBetween:"never",order:"asc",type:"natural"}],"perfectionist/sort-named-exports":["error",{order:"asc",type:"natural"}],"perfectionist/sort-named-imports":["error",{groupKind:"values-first",order:"asc",type:"natural"}],"import/order":"off","import-x/order":"off","sort-imports":"off"}}]}async function l(e){let r=await e;return typeof r=="object"&&r&&"default"in r?r.default:r}async function G(e,r){let t=r.isTypescriptEnabled,o=t&&r.isTypeAware,s=e===!0||e.enableStrictRules,[c,b,x]=await Promise.all([l(import("@eslint-react/eslint-plugin")),l(import("eslint-plugin-react-hooks")),l(import("eslint-plugin-react-refresh"))]),f=c.configs.all.plugins;return[{name:"yunarch/react/setup",plugins:{"@eslint-react":f["@eslint-react"],"@eslint-react/dom":f["@eslint-react/dom"],"@eslint-react/hooks-extra":f["@eslint-react/hooks-extra"],"@eslint-react/naming-convention":f["@eslint-react/naming-convention"],"@eslint-react/web-api":f["@eslint-react/web-api"],"react-hooks":b,"react-refresh":x}},{name:"yunarch/react/rules",files:[y],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}},sourceType:"module"},rules:{...c.configs.recommended.rules,...s?c.configs.strict.rules:{},...b.configs.recommended.rules,...x.configs.recommended.rules}},...t?[{name:"yunarch/react/typescript/rules",files:[u,m],ignores:[`${T}/**`,h],languageOptions:{parserOptions:{projectService:!0}},rules:{...c.configs["recommended-typescript"].rules,...s?c.configs["strict-typescript"].rules:{},...o?{...c.configs["recommended-type-checked"].rules,...s?c.configs["strict-type-checked"].rules:{}}:{}}}]:[]]}async function P(e){let r=e===!0||e.enableQuery,t=e===!0||e.enableRouter,o=[];if(r){let s=await l(import("@tanstack/eslint-plugin-query"));o.push({name:"yunarch/tanstack/query/rules",plugins:{"@tanstack/query":s},rules:{...s.configs["flat/recommended"].at(0)?.rules}})}if(t){let s=await l(import("@tanstack/eslint-plugin-router"));o.push({name:"yunarch/tanstack/router/rules",plugins:{"@tanstack/router":s},rules:{...s.configs["flat/recommended"].at(0)?.rules}})}return o}import k from"@vitest/eslint-plugin";function L(e){let r=e===!0||e.enableTypeTesting;return[{name:"yunarch/test/setup",plugins:{vitest:k},...r?{settings:{vitest:{typecheck:!0}},languageOptions:{globals:{...k.environments.env.globals}}}:{}},{name:"yunarch/test/rules",files:[..._],rules:{...k.configs.recommended.rules,"vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/prefer-hooks-in-order":"error","vitest/prefer-lowercase-title":"error"}}]}import g from"typescript-eslint";function B(e,r,t){return{name:e,files:r,...t.ignores?{ignores:t.ignores}:{},languageOptions:{parser:g.parser,parserOptions:{extraFileExtensions:t.extraFileExtensions?.map(o=>`.${o}`),sourceType:"module",...t.tsconfigPath?{projectService:{allowDefaultProject:["./*.js"],defaultProject:t.tsconfigPath},tsconfigRootDir:process.cwd()}:{},...t.parserOptions}}}}function D(e,r=[]){let t=[u,m],o=e.filesTypeAware??[u,m],s=e.ignoresTypeAware??[`${T}/**`,h];return[{name:"yunarch/typescript/setup",plugins:{"@typescript-eslint":g.plugin}},B("yunarch/typescript/parser",t,{ignores:void 0,extraFileExtensions:r,parserOptions:e.parserOptions}),...e.tsconfigPath?[B("yunarch/typescript/parser/type-aware",o,{ignores:s,extraFileExtensions:r,parserOptions:e.parserOptions,tsconfigPath:e.tsconfigPath})]:[],{name:"yunarch/typescript/rules",files:t,rules:{...g.configs.eslintRecommended.rules,...g.configs.strict.at(-1)?.rules,...g.configs.stylistic.at(-1)?.rules,"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description"}],"@typescript-eslint/consistent-type-definitions":"off","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"inline-type-imports",prefer:"type-imports"}],"@typescript-eslint/default-param-last":"error","@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/method-signature-style":["error","property"],"@typescript-eslint/naming-convention":["error",{format:["PascalCase"],selector:["typeLike"]},{format:["UPPER_CASE"],selector:["enumMember"]},{custom:{match:!1,regex:"^I[A-Z]|^(Interface|Props|State)$"},format:["PascalCase"],selector:"interface"}],"@typescript-eslint/no-dupe-class-members":"error","@typescript-eslint/no-empty-object-type":["error",{allowInterfaces:"always"}],"@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-loop-func":"error","@typescript-eslint/no-redeclare":["error",{builtinGlobals:!1}],"@typescript-eslint/no-shadow":"error","@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":["error",{classes:!1,functions:!1,variables:!0}],"@typescript-eslint/no-useless-empty-export":"warn","@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0,allowBoolean:!0}],"@typescript-eslint/unified-signatures":["error",{ignoreDifferentlyNamedParameters:!0,ignoreOverloadsWithDifferentJSDoc:!0}]}},...e.tsconfigPath&&!e.disableTypeAware?[{name:"yunarch/typescript/rules/type-aware",files:o,ignores:s,rules:{...g.configs.strictTypeCheckedOnly.at(-1)?.rules,...g.configs.stylisticTypeCheckedOnly.at(-1)?.rules,"@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:{attributes:!1}}],"@typescript-eslint/require-array-sort-compare":["error",{ignoreStringArrays:!0}],"@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0,allowBoolean:!0}],"@typescript-eslint/switch-exhaustiveness-check":"warn"}}]:[]]}import N from"eslint-plugin-unicorn";function $(){return[{name:"yunarch/unicorn/rules",plugins:{unicorn:N},rules:{...N.configs.recommended.rules,"unicorn/filename-case":["error",{cases:{camelCase:!0,kebabCase:!0,pascalCase:!0}}],"unicorn/no-array-reduce":"off","unicorn/no-null":"off","unicorn/prefer-number-properties":["error",{checkInfinity:!0,checkNaN:!0}],"unicorn/prefer-top-level-await":"warn","unicorn/prevent-abbreviations":"off","unicorn/no-useless-undefined":["error",{checkArguments:!1}]}}]}function Z(e={},...r){let{gitignore:t=!0,ignores:o,extraFileExtensions:s,import:c=!0,jsdoc:b=!0,unicorn:x=!0,oxlint:f}=e,q=!!f,a=[];t&&(typeof t=="boolean"?a.push(l(import("eslint-config-flat-gitignore")).then(w=>[w({name:"yunarch/gitignore",strict:!1})])):a.push(l(import("eslint-config-flat-gitignore")).then(w=>[w({name:"yunarch/gitignore",...t})]))),a.push(j(e.base,o,q)),e.typescript&&a.push(D(e.typescript===!0?{}:e.typescript,s)),c&&a.push(I()),b&&a.push(E()),x&&a.push($()),e.test&&a.push(L(e.test)),e.tanstack&&a.push(P(e.tanstack)),e.react&&a.push(G(e.react,{isTypescriptEnabled:!!e.typescript,isTypeAware:typeof e.typescript=="object"&&!!e.typescript.tsconfigPath&&!e.typescript.disableTypeAware})),a.push(A(),F({oxlint:f}));let d=new H;return d=d.append(...a,...r),d=d.renamePlugins({"import-x":"import"}),d}export{Z as config};
1
+ import{FlatConfigComposer as H}from"eslint-flat-config-utils";import U from"@eslint/js";import X from"eslint-plugin-unused-imports";import C from"globals";var W=["**/node_modules/","**/dist/","**/out/","**/output","**/.output","**/build/","**/*.min.*","**/package-lock.json","**/yarn.lock","**/.yarn/","**/.yarnrc.yml","**/.pnp.*","**/.pnp","**/.pnp.js","**/.pnp.cjs","**/bun.lock","**/bun.lockb","**/pnpm-lock.yaml","**/.vite-inspect","**/.vitepress/cache","**/vite.config.*.timestamp-*","**/*.log","**/npm-debug.log*","**/yarn-debug.log*","**/yarn-error.log*","**/coverage/","**/.nyc_output/","**/__snapshots__","**/.vscode/","**/.idea/","**/.cache","**/.nuxt","**/.next","**/.svelte-kit","**/.vercel","**/.changeset","**/.turbo/","**/.DS_Store","**/Thumbs.db","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/mockServiceWorker.js","**/CHANGELOG*","**/LICENSE*"];function j(e={},r,t){let o=e.linterOptions??{};return[{name:"yunarch/base/ignores",ignores:[...W,...r??[]]},{name:"yunarch/base/setup",languageOptions:{ecmaVersion:2022,globals:{...C.browser,...C.es2021,...C.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{...o,reportUnusedDisableDirectives:t?!1:o.reportUnusedDisableDirectives??!0}},{name:"yunarch/base/rules",plugins:{"unused-imports":X},rules:{...U.configs.recommended.rules,"array-callback-return":["error",{allowImplicit:!0}],"block-scoped-var":"error",camelcase:["error",{allow:["^UNSAFE_"],ignoreDestructuring:!1,properties:"never"}],curly:["error","multi-line","consistent"],"default-case-last":"error",eqeqeq:"error","func-names":["error","as-needed"],"grouped-accessor-pairs":"error","max-lines":["warn",300],"max-params":["warn",4],"new-cap":["error",{capIsNew:!1}],"no-alert":"error","no-array-constructor":"error","no-bitwise":"error","no-caller":"error","no-console":"error","no-constant-binary-expression":"error","no-constructor-return":"error","no-else-return":"warn","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":["error",{allow:["!!","+"]}],"no-implied-eval":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"warn","no-multi-assign":"error","no-nested-ternary":"error","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-octal-escape":"error","no-param-reassign":"error","no-promise-executor-return":"error","no-proto":"error","no-return-assign":"error","no-script-url":"error","no-self-compare":"error","no-sequences":"error","no-template-curly-in-string":"error","no-undef-init":"warn","no-unneeded-ternary":"error","no-unreachable-loop":"error","no-unused-expressions":"error","no-unused-vars":["error",{args:"none",caughtErrors:"none",ignoreRestSiblings:!0,vars:"all"}],"no-useless-call":"error","no-useless-computed-key":"warn","no-useless-concat":"error","no-useless-rename":"warn","no-useless-return":"warn","no-var":"error","no-void":["error",{allowAsStatement:!0}],"object-shorthand":"warn","prefer-const":"warn","prefer-named-capture-group":"error","prefer-numeric-literals":"error","prefer-object-has-own":"error","prefer-object-spread":"warn","prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"prefer-regex-literals":"error","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"warn","symbol-description":"error","unused-imports/no-unused-imports":"error","unused-imports/no-unused-vars":["error",{args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0,vars:"all",varsIgnorePattern:"^_"}],yoda:"warn"}}]}import J from"eslint-config-prettier";import M from"eslint-plugin-oxlint";var y="**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}",p="{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}",S="**/*.d.{ts,cts,mts}",u="**/*.{ts,cts,mts}",m="**/*.{tsx,ctsx,mtsx}",h="**/*.astro/*.ts",T="**/*.md",_=[`**/__tests__/**/*.${p}`,`**/*.spec.${p}`,`**/*.test.${p}`,`**/*.bench.${p}`,`**/*.benchmark.${p}`];function F(e){let{oxlint:r}=e;return[{name:"yunarch/disables/cli",files:[`**/scripts/${y}`,`**/tasks/${y}`,`**/bin/${y}`,`**/bin.${p}`,`**/cli/${y}`,`**/cli.${p}`],rules:{"@typescript-eslint/no-floating-promises":"off","no-console":"off","unicorn/no-process-exit":"off"}},{name:"yunarch/disables/dts",files:[S],rules:{"@typescript-eslint/consistent-indexed-object-style":"off","import/no-duplicates":"off","no-restricted-syntax":"off","unused-imports/no-unused-vars":"off"}},{name:"yunarch/disables/config-files",files:[`**/*.config.${p}`,`**/*.config.*.${p}`],rules:{"no-console":"off","@typescript-eslint/explicit-function-return-type":"off"}},{name:"yunarch/disables/prettier",rules:{...J.rules}},...r?.oxlintConfigPath?M.buildFromOxlintConfigFile(r.oxlintConfigPath):[]]}import{createTypeScriptImportResolver as V}from"eslint-import-resolver-typescript";import{createNodeResolver as K,importX as O}from"eslint-plugin-import-x";function I(){return[{name:"yunarch/import/rules",plugins:{import:O},rules:{...O.flatConfigs.recommended.rules,"import/first":"error","import/newline-after-import":["error",{count:1}],"import/no-absolute-path":"error","import/no-amd":"error","import/no-cycle":["error",{ignoreExternal:!1,maxDepth:3}],"import/no-duplicates":["error",{"prefer-inline":!0}],"import/no-dynamic-require":"error","import/no-mutable-exports":"error","import/no-relative-packages":"error","import/no-self-import":"error","import/no-useless-path-segments":"error"},settings:{"import-x/resolver-next":[K()]}},{name:"yunarch/import/typescript/rules",files:[u,m],rules:{...O.flatConfigs.typescript.rules},settings:{"import-x/resolver-next":[V()]}}]}import v,{jsdoc as R}from"eslint-plugin-jsdoc";function E(){return[R({name:"yunarch/jsdoc/rules",config:"flat/recommended-error",rules:{"jsdoc/check-param-names":["error",{checkDestructured:!1}],"jsdoc/lines-before-block":["error",{lines:0}],"jsdoc/require-hyphen-before-param-description":["error","always"],"jsdoc/require-param":["error",{checkDestructured:!1,enableRestElementFixer:!1}],"jsdoc/require-throws":"error","jsdoc/tag-lines":["error","any",{startLines:1}]}}),R({name:"yunarch/jsdoc/typescript/rules",files:[u,m],config:"flat/recommended-typescript-error",rules:{...v.configs["flat/contents-typescript-error"].rules,...v.configs["flat/logical-typescript-error"].rules,...v.configs["flat/stylistic-typescript-error"].rules,"jsdoc/require-hyphen-before-param-description":["error","always"],"jsdoc/require-param":["error",{checkDestructured:!1,enableRestElementFixer:!1}],"jsdoc/require-throws":"error"}})]}import Q from"eslint-plugin-perfectionist";function A(){return[{name:"yunarch/perfectionist/rules",plugins:{perfectionist:Q},rules:{"perfectionist/sort-exports":["error",{order:"asc",type:"natural"}],"perfectionist/sort-imports":["error",{groups:["builtin","external","internal",["parent","sibling","index"],"side-effect","unknown"],newlinesBetween:0,order:"asc",type:"natural"}],"perfectionist/sort-named-exports":["error",{order:"asc",type:"natural"}],"perfectionist/sort-named-imports":["error",{groups:["value-import","type-import"],order:"asc",type:"natural"}],"import/order":"off","import-x/order":"off","sort-imports":"off"}}]}async function l(e){let r=await e;return typeof r=="object"&&r&&"default"in r?r.default:r}async function G(e,r){let t=r.isTypescriptEnabled,o=t&&r.isTypeAware,s=e===!0||e.enableStrictRules,[c,b,x]=await Promise.all([l(import("@eslint-react/eslint-plugin")),l(import("eslint-plugin-react-hooks")),l(import("eslint-plugin-react-refresh"))]),f=c.configs.all.plugins;return[{name:"yunarch/react/setup",plugins:{"@eslint-react":f["@eslint-react"],"@eslint-react/dom":f["@eslint-react/dom"],"@eslint-react/hooks-extra":f["@eslint-react/hooks-extra"],"@eslint-react/naming-convention":f["@eslint-react/naming-convention"],"@eslint-react/web-api":f["@eslint-react/web-api"],"react-hooks":b,"react-refresh":x}},{name:"yunarch/react/rules",files:[y],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}},sourceType:"module"},rules:{...c.configs.recommended.rules,...s?c.configs.strict.rules:{},...b.configs.recommended.rules,...x.configs.recommended.rules}},...t?[{name:"yunarch/react/typescript/rules",files:[u,m],ignores:[`${T}/**`,h],languageOptions:{parserOptions:{projectService:!0}},rules:{...c.configs["recommended-typescript"].rules,...s?c.configs["strict-typescript"].rules:{},...o?{...c.configs["recommended-type-checked"].rules,...s?c.configs["strict-type-checked"].rules:{}}:{}}}]:[]]}async function P(e){let r=e===!0||e.enableQuery,t=e===!0||e.enableRouter,o=[];if(r){let s=await l(import("@tanstack/eslint-plugin-query"));o.push({name:"yunarch/tanstack/query/rules",plugins:{"@tanstack/query":s},rules:{...s.configs["flat/recommended"].at(0)?.rules}})}if(t){let s=await l(import("@tanstack/eslint-plugin-router"));o.push({name:"yunarch/tanstack/router/rules",plugins:{"@tanstack/router":s},rules:{...s.configs["flat/recommended"].at(0)?.rules}})}return o}import k from"@vitest/eslint-plugin";function L(e){let r=e===!0||e.enableTypeTesting;return[{name:"yunarch/test/setup",plugins:{vitest:k},...r?{settings:{vitest:{typecheck:!0}},languageOptions:{globals:{...k.environments.env.globals}}}:{}},{name:"yunarch/test/rules",files:[..._],rules:{...k.configs.recommended.rules,"vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/prefer-hooks-in-order":"error","vitest/prefer-lowercase-title":"error"}}]}import g from"typescript-eslint";function B(e,r,t){return{name:e,files:r,...t.ignores?{ignores:t.ignores}:{},languageOptions:{parser:g.parser,parserOptions:{extraFileExtensions:t.extraFileExtensions?.map(o=>`.${o}`),sourceType:"module",...t.tsconfigPath?{projectService:{allowDefaultProject:["./*.js"],defaultProject:t.tsconfigPath},tsconfigRootDir:process.cwd()}:{},...t.parserOptions}}}}function D(e,r=[]){let t=[u,m],o=e.filesTypeAware??[u,m],s=e.ignoresTypeAware??[`${T}/**`,h];return[{name:"yunarch/typescript/setup",plugins:{"@typescript-eslint":g.plugin}},B("yunarch/typescript/parser",t,{ignores:void 0,extraFileExtensions:r,parserOptions:e.parserOptions}),...e.tsconfigPath?[B("yunarch/typescript/parser/type-aware",o,{ignores:s,extraFileExtensions:r,parserOptions:e.parserOptions,tsconfigPath:e.tsconfigPath})]:[],{name:"yunarch/typescript/rules",files:t,rules:{...g.configs.eslintRecommended.rules,...g.configs.strict.at(-1)?.rules,...g.configs.stylistic.at(-1)?.rules,"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description"}],"@typescript-eslint/consistent-type-definitions":"off","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"inline-type-imports",prefer:"type-imports"}],"@typescript-eslint/default-param-last":"error","@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/method-signature-style":["error","property"],"@typescript-eslint/naming-convention":["error",{format:["PascalCase"],selector:["typeLike"]},{format:["UPPER_CASE"],selector:["enumMember"]},{custom:{match:!1,regex:"^I[A-Z]|^(Interface|Props|State)$"},format:["PascalCase"],selector:"interface"}],"@typescript-eslint/no-dupe-class-members":"error","@typescript-eslint/no-empty-object-type":["error",{allowInterfaces:"always"}],"@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-loop-func":"error","@typescript-eslint/no-redeclare":["error",{builtinGlobals:!1}],"@typescript-eslint/no-shadow":"error","@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":["error",{classes:!1,functions:!1,variables:!0}],"@typescript-eslint/no-useless-empty-export":"warn","@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0,allowBoolean:!0}],"@typescript-eslint/unified-signatures":["error",{ignoreDifferentlyNamedParameters:!0,ignoreOverloadsWithDifferentJSDoc:!0}]}},...e.tsconfigPath&&!e.disableTypeAware?[{name:"yunarch/typescript/rules/type-aware",files:o,ignores:s,rules:{...g.configs.strictTypeCheckedOnly.at(-1)?.rules,...g.configs.stylisticTypeCheckedOnly.at(-1)?.rules,"@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:{attributes:!1}}],"@typescript-eslint/require-array-sort-compare":["error",{ignoreStringArrays:!0}],"@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0,allowBoolean:!0}],"@typescript-eslint/switch-exhaustiveness-check":"warn"}}]:[]]}import N from"eslint-plugin-unicorn";function $(){return[{name:"yunarch/unicorn/rules",plugins:{unicorn:N},rules:{...N.configs.recommended.rules,"unicorn/filename-case":["error",{cases:{camelCase:!0,kebabCase:!0,pascalCase:!0}}],"unicorn/no-array-reduce":"off","unicorn/no-null":"off","unicorn/prefer-number-properties":["error",{checkInfinity:!0,checkNaN:!0}],"unicorn/prefer-top-level-await":"warn","unicorn/prevent-abbreviations":"off","unicorn/no-useless-undefined":["error",{checkArguments:!1}]}}]}function Z(e={},...r){let{gitignore:t=!0,ignores:o,extraFileExtensions:s,import:c=!0,jsdoc:b=!0,unicorn:x=!0,oxlint:f}=e,q=!!f,a=[];t&&(typeof t=="boolean"?a.push(l(import("eslint-config-flat-gitignore")).then(w=>[w({name:"yunarch/gitignore",strict:!1})])):a.push(l(import("eslint-config-flat-gitignore")).then(w=>[w({name:"yunarch/gitignore",...t})]))),a.push(j(e.base,o,q)),e.typescript&&a.push(D(e.typescript===!0?{}:e.typescript,s)),c&&a.push(I()),b&&a.push(E()),x&&a.push($()),e.test&&a.push(L(e.test)),e.tanstack&&a.push(P(e.tanstack)),e.react&&a.push(G(e.react,{isTypescriptEnabled:!!e.typescript,isTypeAware:typeof e.typescript=="object"&&!!e.typescript.tsconfigPath&&!e.typescript.disableTypeAware})),a.push(A(),F({oxlint:f}));let d=new H;return d=d.append(...a,...r),d=d.renamePlugins({"import-x":"import"}),d}export{Z as config};
@@ -0,0 +1 @@
1
+ {"printWidth":80,"tabWidth":2,"useTabs":false,"semi":true,"singleQuote":true,"arrowParens":"always","trailingComma":"es5","bracketSpacing":true,"bracketSameLine":false,"proseWrap":"preserve","endOfLine":"lf","quoteProps":"as-needed","singleAttributePerLine":false,"requirePragma":false,"insertPragma":false,"checkIgnorePragma":true,"jsxSingleQuote":false,"htmlWhitespaceSensitivity":"css","embeddedLanguageFormatting":"auto","experimentalSortPackageJson":false,"ignorePatterns":[]}
@@ -1 +1 @@
1
- {"ignorePatterns":["**/node_modules/","**/dist/","**/out/","**/output","**/.output","**/build/","**/*.min.*","**/package-lock.json","**/yarn.lock","**/.yarn/","**/.yarnrc.yml","**/.pnp.*","**/.pnp","**/.pnp.js","**/.pnp.cjs","**/bun.lock","**/bun.lockb","**/pnpm-lock.yaml","**/.vite-inspect","**/.vitepress/cache","**/vite.config.*.timestamp-*","**/*.log","**/npm-debug.log*","**/yarn-debug.log*","**/yarn-error.log*","**/coverage/","**/.nyc_output/","**/__snapshots__","**/.vscode/","**/.idea/","**/.cache","**/.nuxt","**/.next","**/.svelte-kit","**/.vercel","**/.changeset","**/.turbo/","**/.DS_Store","**/Thumbs.db","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/mockServiceWorker.js","**/CHANGELOG*","**/LICENSE*"],"plugins":["eslint","typescript","import","jsdoc","unicorn","vitest","react"],"rules":{"constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-undef":"error","no-unexpected-multiline":0,"no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":["error",{"args":"none","caughtErrors":"none","ignoreRestSiblings":true,"vars":"all"}],"no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error","array-callback-return":["error",{"allowImplicit":true}],"block-scoped-var":"error","curly":0,"default-case-last":"error","eqeqeq":"error","func-names":["error","as-needed"],"grouped-accessor-pairs":"error","max-lines":["warn",300],"max-params":["warn",4],"new-cap":["error",{"capIsNew":false}],"no-alert":"error","no-array-constructor":"error","no-bitwise":"error","no-caller":"error","no-console":"error","no-constructor-return":"error","no-else-return":"warn","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"warn","no-multi-assign":"error","no-nested-ternary":"off","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-param-reassign":"error","no-proto":"error","no-return-assign":"error","no-script-url":"error","no-self-compare":"error","no-template-curly-in-string":"error","no-unneeded-ternary":"error","no-unused-expressions":"error","no-useless-call":"error","no-useless-computed-key":"warn","no-useless-concat":"error","no-useless-rename":"warn","no-var":"error","no-void":["error",{"allowAsStatement":true}],"prefer-numeric-literals":"error","prefer-object-has-own":"error","prefer-object-spread":"warn","prefer-promise-reject-errors":["error",{"allowEmptyReject":true}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"warn","symbol-description":"error","yoda":"warn","import/named":"error","import/namespace":"error","import/default":"error","import/export":"error","import/no-named-as-default":"warn","import/no-named-as-default-member":"warn","import/no-duplicates":["error",{"prefer-inline":true}],"import/first":"error","import/no-absolute-path":"error","import/no-amd":"error","import/no-cycle":["error",{"ignoreExternal":false,"maxDepth":3}],"import/no-dynamic-require":"error","import/no-mutable-exports":"error","import/no-self-import":"error","jsdoc/check-access":"error","jsdoc/check-property-names":"error","jsdoc/check-tag-names":"error","jsdoc/empty-tags":"error","jsdoc/implements-on-classes":"error","jsdoc/no-defaults":"error","jsdoc/require-param":["error",{"checkDestructured":false,"enableRestElementFixer":false}],"jsdoc/require-param-description":"error","jsdoc/require-param-name":"error","jsdoc/require-param-type":"error","jsdoc/require-property":"error","jsdoc/require-property-description":"error","jsdoc/require-property-name":"error","jsdoc/require-property-type":"error","jsdoc/require-returns":"error","jsdoc/require-returns-description":"error","jsdoc/require-returns-type":"error","jsdoc/require-yields":"error","no-negated-condition":"off","unicorn/catch-error-name":"error","unicorn/consistent-assert":"error","unicorn/consistent-date-clone":"error","unicorn/consistent-empty-array-spread":"error","unicorn/consistent-existence-index-check":"error","unicorn/consistent-function-scoping":"error","unicorn/empty-brace-spaces":"off","unicorn/error-message":"error","unicorn/escape-case":"error","unicorn/explicit-length-check":"error","unicorn/filename-case":["error",{"cases":{"camelCase":true,"kebabCase":true,"pascalCase":true}}],"unicorn/new-for-builtins":"error","unicorn/no-abusive-eslint-disable":"error","unicorn/no-accessor-recursion":"error","unicorn/no-anonymous-default-export":"error","unicorn/no-array-callback-reference":"error","unicorn/no-array-for-each":"error","unicorn/no-array-method-this-argument":"error","unicorn/no-array-reduce":"off","unicorn/no-array-reverse":"error","unicorn/no-array-sort":"error","unicorn/no-await-expression-member":"error","unicorn/no-await-in-promise-methods":"error","unicorn/no-console-spaces":"error","unicorn/no-document-cookie":"error","unicorn/no-empty-file":"error","unicorn/no-hex-escape":"error","unicorn/no-instanceof-builtins":"error","unicorn/no-invalid-fetch-options":"error","unicorn/no-invalid-remove-event-listener":"error","unicorn/no-lonely-if":"error","unicorn/no-magic-array-flat-depth":"error","unicorn/no-negated-condition":"error","unicorn/no-negation-in-equality-check":"error","unicorn/no-nested-ternary":"off","unicorn/no-new-array":"error","unicorn/no-new-buffer":"error","unicorn/no-null":"off","unicorn/no-object-as-default-parameter":"error","unicorn/no-process-exit":"error","unicorn/no-single-promise-in-promise-methods":"error","unicorn/no-static-only-class":"error","unicorn/no-thenable":"error","unicorn/no-this-assignment":"error","unicorn/no-typeof-undefined":"error","unicorn/no-unnecessary-array-flat-depth":"error","unicorn/no-unnecessary-array-splice-count":"error","unicorn/no-unnecessary-await":"error","unicorn/no-unnecessary-slice-end":"error","unicorn/no-unreadable-array-destructuring":"error","unicorn/no-unreadable-iife":"error","unicorn/no-useless-error-capture-stack-trace":"error","unicorn/no-useless-fallback-in-spread":"error","unicorn/no-useless-length-check":"error","unicorn/no-useless-promise-resolve-reject":"error","unicorn/no-useless-spread":"error","unicorn/no-useless-switch-case":"error","unicorn/no-useless-undefined":["error",{"checkArguments":false}],"unicorn/no-zero-fractions":"error","unicorn/number-literal-case":"off","unicorn/numeric-separators-style":"error","unicorn/prefer-add-event-listener":"error","unicorn/prefer-array-find":"error","unicorn/prefer-array-flat":"error","unicorn/prefer-array-flat-map":"error","unicorn/prefer-array-index-of":"error","unicorn/prefer-array-some":"error","unicorn/prefer-at":"error","unicorn/prefer-blob-reading-methods":"error","unicorn/prefer-class-fields":"error","unicorn/prefer-classlist-toggle":"error","unicorn/prefer-code-point":"error","unicorn/prefer-date-now":"error","unicorn/prefer-dom-node-append":"error","unicorn/prefer-dom-node-dataset":"error","unicorn/prefer-dom-node-remove":"error","unicorn/prefer-dom-node-text-content":"error","unicorn/prefer-event-target":"error","unicorn/prefer-global-this":"error","unicorn/prefer-includes":"error","unicorn/prefer-logical-operator-over-ternary":"error","unicorn/prefer-math-min-max":"error","unicorn/prefer-math-trunc":"error","unicorn/prefer-modern-dom-apis":"error","unicorn/prefer-modern-math-apis":"error","unicorn/prefer-native-coercion-functions":"error","unicorn/prefer-negative-index":"error","unicorn/prefer-node-protocol":"error","unicorn/prefer-number-properties":["error",{"checkInfinity":true,"checkNaN":true}],"unicorn/prefer-object-from-entries":"error","unicorn/prefer-optional-catch-binding":"error","unicorn/prefer-prototype-methods":"error","unicorn/prefer-query-selector":"error","unicorn/prefer-reflect-apply":"error","unicorn/prefer-regexp-test":"error","unicorn/prefer-set-has":"error","unicorn/prefer-set-size":"error","unicorn/prefer-spread":"error","unicorn/prefer-string-raw":"error","unicorn/prefer-string-replace-all":"error","unicorn/prefer-string-slice":"error","unicorn/prefer-string-starts-ends-with":"error","unicorn/prefer-string-trim-start-end":"error","unicorn/prefer-structured-clone":"error","unicorn/prefer-top-level-await":"warn","unicorn/prefer-type-error":"error","unicorn/require-array-join-separator":"error","unicorn/require-module-specifiers":"error","unicorn/require-number-to-fixed-digits-argument":"error","unicorn/require-post-message-target-origin":"off","unicorn/switch-case-braces":"error","unicorn/text-encoding-identifier-case":"error","unicorn/throw-new-error":"error","sort-imports":"off"},"overrides":[{"files":["**/*.{ts,cts,mts}","**/*.{tsx,ctsx,mtsx}"],"rules":{"constructor-super":"off","getter-return":"off","no-class-assign":"off","no-const-assign":"off","no-dupe-class-members":"off","no-dupe-keys":"off","no-func-assign":"off","no-import-assign":"off","no-new-native-nonconstructor":"off","no-obj-calls":"off","no-redeclare":"off","no-setter-return":"off","no-this-before-super":"off","no-undef":"off","no-unreachable":"off","no-unsafe-negation":"off","no-var":"error","no-with":"off","prefer-rest-params":"error","prefer-spread":"error","@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description"}],"no-array-constructor":"off","@typescript-eslint/no-array-constructor":"error","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"error","@typescript-eslint/no-empty-object-type":["error",{"allowInterfaces":"always"}],"@typescript-eslint/no-explicit-any":"error","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-extraneous-class":"error","@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unsafe-function-type":"error","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":"error","no-unused-vars":"off","@typescript-eslint/no-unused-vars":"off","no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":"error","@typescript-eslint/no-wrapper-object-types":"error","@typescript-eslint/prefer-as-const":"error","@typescript-eslint/prefer-literal-enum-member":"error","@typescript-eslint/prefer-namespace-keyword":"error","@typescript-eslint/triple-slash-reference":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":"error","@typescript-eslint/ban-tslint-comment":"error","@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-indexed-object-style":"error","@typescript-eslint/consistent-type-definitions":"off","@typescript-eslint/no-confusing-non-null-assertion":"error","no-empty-function":"off","@typescript-eslint/no-empty-function":"error","@typescript-eslint/no-inferrable-types":"error","@typescript-eslint/prefer-for-of":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/consistent-type-imports":["error",{"disallowTypeAnnotations":false,"fixStyle":"inline-type-imports","prefer":"type-imports"}],"@typescript-eslint/default-param-last":"error","@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/no-dupe-class-members":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-redeclare":["error",{"builtinGlobals":false}],"@typescript-eslint/no-useless-empty-export":"warn"}},{"files":["**/*.{ts,cts,mts}","**/*.{tsx,ctsx,mtsx}"],"rules":{"no-throw-literal":"off","prefer-promise-reject-errors":"off","require-await":"off"}},{"files":["**/*.{ts,cts,mts}","**/*.{tsx,ctsx,mtsx}"],"rules":{"import/named":"off"}},{"files":["**/*.{ts,cts,mts}","**/*.{tsx,ctsx,mtsx}"],"rules":{"jsdoc/check-access":"error","jsdoc/check-property-names":"error","jsdoc/check-tag-names":"error","jsdoc/empty-tags":"error","jsdoc/implements-on-classes":"error","jsdoc/no-defaults":"error","jsdoc/require-param":["error",{"checkDestructured":false,"enableRestElementFixer":false}],"jsdoc/require-param-description":"error","jsdoc/require-param-name":"error","jsdoc/require-param-type":"off","jsdoc/require-property":"error","jsdoc/require-property-description":"error","jsdoc/require-property-name":"error","jsdoc/require-property-type":"off","jsdoc/require-returns":"error","jsdoc/require-returns-description":"error","jsdoc/require-returns-type":"off","jsdoc/require-yields":"error"}},{"files":["**/__tests__/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.spec.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.test.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.bench.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.benchmark.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}"],"rules":{"vitest/expect-expect":"error","vitest/no-commented-out-tests":"error","vitest/no-identical-title":"error","vitest/no-import-node-test":"error","vitest/require-local-test-context-for-concurrent-snapshots":"error","vitest/valid-describe-callback":"error","vitest/valid-expect":"error","vitest/consistent-test-it":["error",{"fn":"it","withinDescribe":"it"}],"vitest/prefer-hooks-in-order":"error","vitest/prefer-lowercase-title":"error"}},{"files":["**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}"],"rules":{"react/jsx-no-comment-textnodes":"warn","react/jsx-no-duplicate-props":"warn","react/no-array-index-key":"warn","react/no-direct-mutation-state":"error","react/no-string-refs":"error","react/no-children-prop":"error","react-hooks/rules-of-hooks":"error","react-hooks/exhaustive-deps":"warn"}},{"files":["**/*.{ts,cts,mts}","**/*.{tsx,ctsx,mtsx}"],"rules":{"react/jsx-no-comment-textnodes":"warn","react/jsx-no-duplicate-props":"off","react/no-array-index-key":"warn","react/no-direct-mutation-state":"error","react/no-string-refs":"error","react/jsx-no-undef":"off","react/no-children-prop":"error"}},{"files":["**/scripts/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/tasks/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/bin/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/bin.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/cli/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/cli.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}"],"rules":{"no-console":"off","unicorn/no-process-exit":"off"}},{"files":["**/*.d.{ts,cts,mts}"],"rules":{"@typescript-eslint/consistent-indexed-object-style":"off","import/no-duplicates":"off"}},{"files":["**/*.config.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.config.*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}"],"rules":{"no-console":"off","@typescript-eslint/explicit-function-return-type":"off"}}]}
1
+ {"plugins":["import","jsdoc","unicorn"],"categories":{"correctness":"off"},"env":{"builtin":true,"browser":true,"es2024":true,"node":true},"ignorePatterns":["**/node_modules","**/.pnp","**/.pnp.js","**/coverage","**/.nyc_output","**/.DS_Store","**/*.pem","**/npm-debug.*","**/npm-debug.log*","**/yarn-debug.log*","**/yarn-error.log*","**/.pnpm-debug.log*","**/logs","**/*.log","**/.turbo","**/.expo/","**/dist/","**/*.jks","**/*.p8","**/*.p12","**/*.key","**/*.mobileprovision","**/*.orig.*","**/web-build/","**/expo-env.d.ts","**/.pnp.*",".yarn/*","!.yarn/cache","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","**/.env*","!**/.env.example","**/.dockerfile.env","**/.env.local","**/.env.development.local","**/.env.test.local","**/.env.production.local","**/.envrc.local","**/.eslintcache","**/.eslint-config-inspector","**/pids","**/*.pid","**/*.seed","**/*.pid.lock","**/.vercel","**/.next/","**/out/","**/build","**/.swc","**/*.tsbuildinfo","**/mockServiceWorker.js","src/**/eslint/typegen.d.ts","**/node_modules/","**/output","**/.output","**/build/","**/*.min.*","**/package-lock.json","**/yarn.lock","**/.yarn/","**/.yarnrc.yml","**/.pnp.cjs","**/bun.lock","**/bun.lockb","**/pnpm-lock.yaml","**/.vite-inspect","**/.vitepress/cache","**/vite.config.*.timestamp-*","**/coverage/","**/.nyc_output/","**/__snapshots__","**/.vscode/","**/.idea/","**/.cache","**/.nuxt","**/.next","**/.svelte-kit","**/.changeset","**/.turbo/","**/Thumbs.db","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/CHANGELOG*","**/LICENSE*"],"globals":{"suite":"writable","test":"writable","describe":"writable","it":"writable","expectTypeOf":"writable","assertType":"writable","expect":"writable","assert":"writable","chai":"writable","vitest":"writable","vi":"writable","beforeAll":"writable","afterAll":"writable","beforeEach":"writable","afterEach":"writable","onTestFailed":"writable","onTestFinished":"writable"},"rules":{"constructor-super":"error","for-direction":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":["error",{"args":"none","caughtErrors":"none","ignoreRestSiblings":true,"vars":"all"}],"no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error","array-callback-return":["error",{"allowImplicit":true}],"block-scoped-var":"error","default-case-last":"error","eqeqeq":"error","func-names":["error","as-needed"],"grouped-accessor-pairs":"error","max-lines":["warn",300],"max-params":["warn",4],"new-cap":["error",{"capIsNew":false}],"no-alert":"error","no-array-constructor":"error","no-bitwise":"error","no-caller":"error","no-console":"error","no-constructor-return":"error","no-else-return":"warn","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":["error",{"allow":["!!","+"]}],"no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"warn","no-multi-assign":"error","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-param-reassign":"error","no-promise-executor-return":"error","no-proto":"error","no-return-assign":"error","no-script-url":"error","no-self-compare":"error","no-sequences":"error","no-template-curly-in-string":"error","no-unneeded-ternary":"error","no-unused-expressions":"error","no-useless-call":"error","no-useless-computed-key":"warn","no-useless-concat":"error","no-useless-rename":"warn","no-useless-return":"warn","no-var":"error","no-void":["error",{"allowAsStatement":true}],"prefer-numeric-literals":"error","prefer-object-has-own":"error","prefer-object-spread":"warn","prefer-promise-reject-errors":["error",{"allowEmptyReject":true}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"warn","symbol-description":"error","yoda":"warn","import/namespace":"error","import/default":"error","import/no-named-as-default":"warn","import/no-named-as-default-member":"warn","import/no-duplicates":["error",{"prefer-inline":true}],"import/first":"error","import/no-absolute-path":"error","import/no-amd":"error","import/no-cycle":["error",{"ignoreExternal":false,"maxDepth":3}],"import/no-dynamic-require":"error","import/no-mutable-exports":"error","import/no-self-import":"error","jsdoc/check-access":"error","jsdoc/check-property-names":"error","jsdoc/check-tag-names":"error","jsdoc/empty-tags":"error","jsdoc/implements-on-classes":"error","jsdoc/no-defaults":"error","jsdoc/require-param":["error",{"checkDestructured":false,"enableRestElementFixer":false}],"jsdoc/require-param-description":"error","jsdoc/require-param-name":"error","jsdoc/require-param-type":"error","jsdoc/require-property":"error","jsdoc/require-property-description":"error","jsdoc/require-property-name":"error","jsdoc/require-property-type":"error","jsdoc/require-returns":"error","jsdoc/require-returns-description":"error","jsdoc/require-returns-type":"error","jsdoc/require-yields":"error","unicorn/catch-error-name":"error","unicorn/consistent-assert":"error","unicorn/consistent-date-clone":"error","unicorn/consistent-empty-array-spread":"error","unicorn/consistent-existence-index-check":"error","unicorn/consistent-function-scoping":"error","unicorn/error-message":"error","unicorn/escape-case":"error","unicorn/explicit-length-check":"error","unicorn/filename-case":["error",{"cases":{"camelCase":true,"kebabCase":true,"pascalCase":true}}],"unicorn/new-for-builtins":"error","unicorn/no-abusive-eslint-disable":"error","unicorn/no-accessor-recursion":"error","unicorn/no-anonymous-default-export":"error","unicorn/no-array-callback-reference":"error","unicorn/no-array-for-each":"error","unicorn/no-array-method-this-argument":"error","unicorn/no-array-reverse":"error","unicorn/no-array-sort":"error","unicorn/no-await-expression-member":"error","unicorn/no-await-in-promise-methods":"error","unicorn/no-console-spaces":"error","unicorn/no-document-cookie":"error","unicorn/no-empty-file":"error","unicorn/no-hex-escape":"error","unicorn/no-immediate-mutation":"error","unicorn/no-instanceof-builtins":"error","unicorn/no-invalid-fetch-options":"error","unicorn/no-invalid-remove-event-listener":"error","unicorn/no-lonely-if":"error","unicorn/no-magic-array-flat-depth":"error","unicorn/no-negated-condition":"error","unicorn/no-negation-in-equality-check":"error","unicorn/no-new-array":"error","unicorn/no-new-buffer":"error","unicorn/no-object-as-default-parameter":"error","unicorn/no-process-exit":"error","unicorn/no-single-promise-in-promise-methods":"error","unicorn/no-static-only-class":"error","unicorn/no-thenable":"error","unicorn/no-this-assignment":"error","unicorn/no-typeof-undefined":"error","unicorn/no-unnecessary-array-flat-depth":"error","unicorn/no-unnecessary-array-splice-count":"error","unicorn/no-unnecessary-await":"error","unicorn/no-unnecessary-slice-end":"error","unicorn/no-unreadable-array-destructuring":"error","unicorn/no-unreadable-iife":"error","unicorn/no-useless-collection-argument":"error","unicorn/no-useless-error-capture-stack-trace":"error","unicorn/no-useless-fallback-in-spread":"error","unicorn/no-useless-length-check":"error","unicorn/no-useless-promise-resolve-reject":"error","unicorn/no-useless-spread":"error","unicorn/no-useless-switch-case":"error","unicorn/no-useless-undefined":["error",{"checkArguments":false}],"unicorn/no-zero-fractions":"error","unicorn/numeric-separators-style":"error","unicorn/prefer-add-event-listener":"error","unicorn/prefer-array-find":"error","unicorn/prefer-array-flat":"error","unicorn/prefer-array-flat-map":"error","unicorn/prefer-array-index-of":"error","unicorn/prefer-array-some":"error","unicorn/prefer-at":"error","unicorn/prefer-bigint-literals":"error","unicorn/prefer-blob-reading-methods":"error","unicorn/prefer-class-fields":"error","unicorn/prefer-classlist-toggle":"error","unicorn/prefer-code-point":"error","unicorn/prefer-date-now":"error","unicorn/prefer-default-parameters":"error","unicorn/prefer-dom-node-append":"error","unicorn/prefer-dom-node-dataset":"error","unicorn/prefer-dom-node-remove":"error","unicorn/prefer-dom-node-text-content":"error","unicorn/prefer-event-target":"error","unicorn/prefer-global-this":"error","unicorn/prefer-includes":"error","unicorn/prefer-keyboard-event-key":"error","unicorn/prefer-logical-operator-over-ternary":"error","unicorn/prefer-math-min-max":"error","unicorn/prefer-math-trunc":"error","unicorn/prefer-modern-dom-apis":"error","unicorn/prefer-modern-math-apis":"error","unicorn/prefer-native-coercion-functions":"error","unicorn/prefer-negative-index":"error","unicorn/prefer-node-protocol":"error","unicorn/prefer-number-properties":["error",{"checkInfinity":true,"checkNaN":true}],"unicorn/prefer-object-from-entries":"error","unicorn/prefer-optional-catch-binding":"error","unicorn/prefer-prototype-methods":"error","unicorn/prefer-query-selector":"error","unicorn/prefer-reflect-apply":"error","unicorn/prefer-regexp-test":"error","unicorn/prefer-response-static-json":"error","unicorn/prefer-set-has":"error","unicorn/prefer-set-size":"error","unicorn/prefer-spread":"error","unicorn/prefer-string-raw":"error","unicorn/prefer-string-replace-all":"error","unicorn/prefer-string-slice":"error","unicorn/prefer-string-starts-ends-with":"error","unicorn/prefer-string-trim-start-end":"error","unicorn/prefer-structured-clone":"error","unicorn/prefer-top-level-await":"warn","unicorn/prefer-type-error":"error","unicorn/require-array-join-separator":"error","unicorn/require-module-attributes":"error","unicorn/require-module-specifiers":"error","unicorn/require-number-to-fixed-digits-argument":"error","unicorn/switch-case-braces":"error","unicorn/text-encoding-identifier-case":"error","unicorn/throw-new-error":"error"},"overrides":[{"files":["**/*.{ts,cts,mts}","**/*.{tsx,ctsx,mtsx}"],"rules":{"constructor-super":"off","no-class-assign":"off","no-const-assign":"off","no-dupe-keys":"off","no-func-assign":"off","no-import-assign":"off","no-new-native-nonconstructor":"off","no-obj-calls":"off","no-redeclare":["error",{"builtinGlobals":false}],"no-setter-return":"off","no-this-before-super":"off","no-unsafe-negation":"off","no-with":"off","@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description"}],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"error","@typescript-eslint/no-empty-object-type":["error",{"allowInterfaces":"always"}],"@typescript-eslint/no-explicit-any":"error","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-extraneous-class":"error","@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unsafe-function-type":"error","no-unused-vars":"off","no-useless-constructor":"error","@typescript-eslint/no-wrapper-object-types":"error","@typescript-eslint/prefer-as-const":"error","@typescript-eslint/prefer-literal-enum-member":"error","@typescript-eslint/prefer-namespace-keyword":"error","@typescript-eslint/triple-slash-reference":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":"error","@typescript-eslint/ban-tslint-comment":"error","@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-indexed-object-style":"error","@typescript-eslint/consistent-type-definitions":"off","@typescript-eslint/no-confusing-non-null-assertion":"error","no-empty-function":"error","@typescript-eslint/no-inferrable-types":"error","@typescript-eslint/prefer-for-of":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/consistent-type-imports":["error",{"disallowTypeAnnotations":false,"fixStyle":"inline-type-imports","prefer":"type-imports"}],"@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-useless-empty-export":"warn","@typescript-eslint/restrict-template-expressions":["error",{"allowNumber":true,"allowBoolean":true}],"default-param-last":"error","no-loop-func":"error","@typescript-eslint/await-thenable":"error","@typescript-eslint/no-array-delete":"error","@typescript-eslint/no-base-to-string":"error","@typescript-eslint/no-confusing-void-expression":"error","@typescript-eslint/no-deprecated":"error","@typescript-eslint/no-duplicate-type-constituents":"error","@typescript-eslint/no-floating-promises":"error","@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-implied-eval":"error","@typescript-eslint/no-meaningless-void-operator":"error","@typescript-eslint/no-misused-promises":["error",{"checksVoidReturn":{"attributes":false}}],"@typescript-eslint/no-misused-spread":"error","@typescript-eslint/no-mixed-enums":"error","@typescript-eslint/no-redundant-type-constituents":"error","@typescript-eslint/no-unnecessary-boolean-literal-compare":"error","@typescript-eslint/no-unnecessary-template-expression":"error","@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-enum-comparison":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/no-unsafe-unary-minus":"error","no-throw-literal":"off","@typescript-eslint/only-throw-error":"error","prefer-promise-reject-errors":"off","@typescript-eslint/prefer-promise-reject-errors":"error","@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/related-getter-setter-pairs":"error","require-await":"off","@typescript-eslint/require-await":"error","@typescript-eslint/restrict-plus-operands":["error",{"allowAny":false,"allowBoolean":false,"allowNullish":false,"allowNumberAndString":false,"allowRegExp":false}],"@typescript-eslint/return-await":["error","error-handling-correctness-only"],"@typescript-eslint/unbound-method":"error","@typescript-eslint/use-unknown-in-catch-callback-variable":"error","@typescript-eslint/non-nullable-type-assertion-style":"error","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/require-array-sort-compare":["error",{"ignoreStringArrays":true}],"@typescript-eslint/switch-exhaustiveness-check":"warn","jsdoc/require-param":["error",{"checkDestructured":false,"enableRestElementFixer":false}],"jsdoc/require-param-type":"off","jsdoc/require-property-type":"off","jsdoc/require-returns-type":"off"}},{"files":["**/*.{ts,cts,mts}","**/*.{tsx,ctsx,mtsx}"],"plugins":["typescript"]},{"files":["**/__tests__/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.spec.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.test.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.bench.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.benchmark.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}"],"rules":{"vitest/expect-expect":"error","vitest/no-conditional-expect":"error","vitest/no-disabled-tests":"warn","vitest/no-focused-tests":"error","vitest/no-commented-out-tests":"error","vitest/no-identical-title":"error","vitest/no-import-node-test":"error","vitest/no-interpolation-in-snapshots":"error","vitest/no-mocks-import":"error","vitest/no-standalone-expect":"error","vitest/no-unneeded-async-expect-function":"error","vitest/require-local-test-context-for-concurrent-snapshots":"error","vitest/valid-describe-callback":"error","vitest/valid-expect":"error","vitest/consistent-test-it":["error",{"fn":"it","withinDescribe":"it"}],"vitest/prefer-hooks-in-order":"error","vitest/prefer-lowercase-title":"error"},"plugins":["vitest"]},{"files":["**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}"],"rules":{"react-hooks/rules-of-hooks":"error","react-hooks/exhaustive-deps":"warn","react/only-export-components":["error",{}]},"plugins":["react"]},{"files":["**/scripts/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/tasks/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/bin/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/bin.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/cli/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/cli.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}"],"rules":{"@typescript-eslint/no-floating-promises":"off","no-console":"off","unicorn/no-process-exit":"off"},"plugins":["typescript"]},{"files":["**/*.d.{ts,cts,mts}"],"rules":{"@typescript-eslint/consistent-indexed-object-style":"off","import/no-duplicates":"off"},"plugins":["typescript"]},{"files":["**/*.config.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.config.*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}"],"rules":{"no-console":"off","@typescript-eslint/explicit-function-return-type":"off"},"plugins":["typescript"]}]}
@@ -12,15 +12,16 @@ type ObjectEntry<Base> = [keyof Base, Base[keyof Base]];
12
12
  type ArrayEntry<Base extends readonly unknown[]> = [number, Base[number]];
13
13
  type SetEntry<Base> = Base extends Set<infer V> ? [V, V] : never;
14
14
  type MapEntry<Base> = Base extends Map<infer K, infer V> ? [K, V] : never;
15
- type Entry<BaseType> = BaseType extends Map<unknown, unknown>
16
- ? MapEntry<BaseType>
17
- : BaseType extends Set<unknown>
18
- ? SetEntry<BaseType>
19
- : BaseType extends readonly unknown[]
20
- ? ArrayEntry<BaseType>
21
- : BaseType extends object
22
- ? ObjectEntry<BaseType>
23
- : never;
15
+ type Entry<BaseType> =
16
+ BaseType extends Map<unknown, unknown>
17
+ ? MapEntry<BaseType>
18
+ : BaseType extends Set<unknown>
19
+ ? SetEntry<BaseType>
20
+ : BaseType extends readonly unknown[]
21
+ ? ArrayEntry<BaseType>
22
+ : BaseType extends object
23
+ ? ObjectEntry<BaseType>
24
+ : never;
24
25
 
25
26
  /**
26
27
  * Utility type to make `Object.entries` type-safe.
@@ -40,9 +41,7 @@ type IsUnion<T, U extends T = T> = T extends unknown
40
41
  : false;
41
42
  type IfUnion<T, Yes, No> = true extends IsUnion<T> ? Yes : No;
42
43
  type UnionToIntersection<U> = (
43
- U extends unknown
44
- ? (k: U) => void
45
- : never
44
+ U extends unknown ? (k: U) => void : never
46
45
  ) extends (k: infer I) => void
47
46
  ? I
48
47
  : never;
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
- "version": "0.6.1",
4
3
  "name": "@yunarch/config-web",
4
+ "version": "0.7.0",
5
5
  "description": "Shared configurations for web projects.",
6
6
  "license": "MIT",
7
7
  "keywords": [
8
8
  "config",
9
9
  "eslint",
10
+ "oxfmt",
10
11
  "oxlint",
11
12
  "prettier",
12
- "biome",
13
- "typescript",
14
- "tooling"
13
+ "tooling",
14
+ "typescript"
15
15
  ],
16
16
  "author": {
17
17
  "name": "Adrian Lopez Gonzalez",
@@ -24,10 +24,7 @@
24
24
  "bugs": {
25
25
  "url": "https://github.com/yunarch/config-web/issues"
26
26
  },
27
- "engines": {
28
- "bun": ">=1",
29
- "node": ">=22"
30
- },
27
+ "type": "module",
31
28
  "sideEffects": false,
32
29
  "files": [
33
30
  "README.md",
@@ -43,55 +40,58 @@
43
40
  "exports": {
44
41
  ".": "./dist/index.js",
45
42
  "./prettier": "./dist/config.prettier.js",
43
+ "./oxfmt": "./dist/config.oxfmt.json",
44
+ "./oxlint": "./dist/config.oxlint.json",
46
45
  "./eslint": {
47
46
  "types": "./dist/config.eslint.d.ts",
48
47
  "default": "./dist/config.eslint.js"
49
48
  },
50
- "./oxlint": "./dist/config.oxlint.json",
51
- "./biome": "./dist/config.biome.json",
52
49
  "./tsconfig-base": "./dist/config.tsconfig-base.json",
53
- "./ts-reset.d.ts": "./dist/ts/reset.d.ts",
54
- "./ts-utils.d.ts": "./dist/ts/utils.d.ts"
50
+ "./ts-reset.d.ts": "./dist/reset.d.ts",
51
+ "./ts-utils.d.ts": "./dist/utils.d.ts"
52
+ },
53
+ "publishConfig": {
54
+ "access": "public"
55
55
  },
56
- "type": "module",
57
56
  "scripts": {
58
- "postinstall": "husky && bun run gen",
57
+ "prepare": "husky && bun run gen",
59
58
  "bun-run-all": "bun run ./src/cli/bun-run-all/bun-run-all.cli.ts",
60
- "gen": "bun run bun-run-all gen:cli-docs gen:eslint-typegen gen:oxlint-compatgen gen:biome-compatgen",
59
+ "gen": "bun run bun-run-all gen:cli-docs gen:eslint-typegen gen:oxlint-compatgen gen:oxfmt-compatgen",
61
60
  "gen:cli-docs": "bun run ./scripts/cli-docsgen.ts",
62
61
  "gen:eslint-typegen": "bun run ./scripts/eslint-typegen.ts",
63
- "gen:oxlint-compatgen": "bun run ./scripts/oxlint-compatgen.ts && biome format --write ./src/config.oxlint.jsonc",
64
- "gen:biome-compatgen": "bun run ./scripts/biome-compatgen.ts && biome format --write ./src/config.biome.jsonc",
62
+ "gen:oxlint-compatgen": "bun run ./scripts/oxlint-compatgen.ts && oxfmt format --write ./src/linters/config.oxlint.jsonc",
63
+ "gen:oxfmt-compatgen": "bun run ./scripts/oxfmt-compatgen.ts && oxfmt format --write ./src/formatters/config.oxfmt.jsonc",
65
64
  "lint": "bun run bun-run-all lint:code lint:ts -t",
66
- "lint:code": "oxlint && eslint .",
65
+ "lint:code": "oxlint --type-aware && eslint .",
67
66
  "lint:ts": "tsc --noEmit",
68
67
  "lint:inspect": "bunx @eslint/config-inspector --config eslint.config.ts",
69
- "format": "biome format && prettier \"**/*.{html,md,yaml,yml}\" --check",
70
- "format:all": "biome format --write && prettier \"**/*.{html,md,yaml,yml}\" --write",
71
- "format:mocks": "biome format --write ./tests/__mocks__",
72
- "clean": "rimraf dist coverage .turbo",
68
+ "format": "oxfmt format --check ./",
69
+ "format:all": "oxfmt format --write ./",
70
+ "format:mocks": "oxfmt format --write ./tests/__mocks__",
71
+ "clean": "rimraf dist tmp tmp-oxfmt",
73
72
  "build": "bun run gen && tsup",
74
73
  "tests": "vitest --typecheck run",
75
74
  "tests:watch": "vitest --typecheck watch",
75
+ "tests:dist": "bun run build && TEST_DIST=true vitest --typecheck run && bun run clean",
76
76
  "release": "bun run build && TEST_DIST=true bunx bumpp"
77
77
  },
78
78
  "peerDependencies": {
79
- "@biomejs/biome": ">= 2 || < 3",
80
79
  "prettier": ">= 3 || < 4",
81
80
  "eslint": ">=9.5.0 || < 10",
82
- "oxlint": ">=0.16.2 || < 2",
81
+ "oxfmt": ">=0.24.0 || < 1",
82
+ "oxlint": ">=1.42.0 || < 2",
83
83
  "msw": ">=2 || < 3"
84
84
  },
85
85
  "peerDependenciesMeta": {
86
- "@biomejs/biome": {
87
- "optional": true
88
- },
89
86
  "prettier": {
90
87
  "optional": true
91
88
  },
92
89
  "eslint": {
93
90
  "optional": true
94
91
  },
92
+ "oxfmt": {
93
+ "optional": true
94
+ },
95
95
  "oxlint": {
96
96
  "optional": true
97
97
  },
@@ -100,53 +100,56 @@
100
100
  }
101
101
  },
102
102
  "dependencies": {
103
- "commander": "14.0.2",
104
- "ora": "9.0.0",
103
+ "commander": "14.0.3",
104
+ "ora": "9.1.0",
105
105
  "fast-glob": "3.3.3",
106
- "@inquirer/confirm": "5.1.20",
107
- "@inquirer/select": "4.4.1",
108
- "@total-typescript/ts-reset": "0.6.1",
109
- "globals": "16.5.0",
110
- "eslint-flat-config-utils": "2.1.4",
106
+ "@inquirer/confirm": "6.0.4",
107
+ "@inquirer/select": "5.0.4",
108
+ "globals": "17.3.0",
109
+ "eslint-flat-config-utils": "3.0.0",
111
110
  "eslint-config-flat-gitignore": "2.1.0",
112
111
  "eslint-import-resolver-typescript": "4.4.4",
113
- "@eslint/js": "9.39.1",
114
- "typescript-eslint": "8.46.3",
112
+ "@eslint/js": "9.39.2",
113
+ "typescript-eslint": "8.54.0",
115
114
  "eslint-plugin-unicorn": "62.0.0",
116
- "eslint-plugin-perfectionist": "4.15.1",
115
+ "eslint-plugin-perfectionist": "5.4.0",
117
116
  "eslint-plugin-import-x": "4.16.1",
118
117
  "eslint-plugin-unused-imports": "4.3.0",
119
- "eslint-plugin-jsdoc": "61.1.12",
118
+ "eslint-plugin-jsdoc": "62.5.0",
120
119
  "eslint-config-prettier": "10.1.8",
121
- "eslint-plugin-oxlint": "1.26.0",
122
- "@eslint-react/eslint-plugin": "2.3.1",
120
+ "eslint-plugin-oxlint": "1.43.0",
121
+ "@eslint-react/eslint-plugin": "2.9.0",
123
122
  "eslint-plugin-react-hooks": "7.0.1",
124
- "eslint-plugin-react-refresh": "0.4.24",
125
- "@tanstack/eslint-plugin-query": "5.91.2",
126
- "@tanstack/eslint-plugin-router": "1.133.19",
127
- "@vitest/eslint-plugin": "1.4.2"
123
+ "eslint-plugin-react-refresh": "0.5.0",
124
+ "@tanstack/eslint-plugin-query": "5.91.4",
125
+ "@tanstack/eslint-plugin-router": "1.155.0",
126
+ "@vitest/eslint-plugin": "1.6.6",
127
+ "@total-typescript/ts-reset": "0.6.1"
128
128
  },
129
129
  "devDependencies": {
130
- "@commitlint/cli": "20.1.0",
131
- "@commitlint/config-conventional": "20.0.0",
132
- "prettier": "3.6.2",
133
- "@biomejs/biome": "2.3.4",
134
- "oxlint": "1.26.0",
135
- "eslint": "9.39.1",
130
+ "@commitlint/cli": "20.4.1",
131
+ "@commitlint/config-conventional": "20.4.1",
132
+ "prettier": "3.8.1",
133
+ "eslint": "9.39.2",
136
134
  "eslint-typegen": "2.3.0",
135
+ "oxfmt": "0.28.0",
136
+ "oxlint": "1.43.0",
137
+ "oxlint-tsgolint": "0.11.4",
138
+ "@oxlint/migrate": "1.42.0",
137
139
  "husky": "9.1.7",
138
- "lint-staged": "16.2.6",
139
- "rimraf": "6.1.0",
140
- "vitest": "4.0.8",
141
- "msw": "2.12.1",
140
+ "lint-staged": "16.2.7",
141
+ "rimraf": "6.1.2",
142
+ "vitest": "4.0.18",
143
+ "msw": "2.12.7",
142
144
  "jsonc-parser": "3.3.1",
143
- "tsup": "8.5.0",
145
+ "tsup": "8.5.1",
144
146
  "typescript": "5.9.3",
145
- "@types/node": "24.10.0",
146
- "@types/bun": "1.3.2"
147
+ "@types/node": "25.2.0",
148
+ "@types/bun": "1.3.8"
147
149
  },
148
- "packageManager": "bun@1.3.2",
149
- "publishConfig": {
150
- "access": "public"
150
+ "packageManager": "bun@1.3.8",
151
+ "engines": {
152
+ "bun": ">=1",
153
+ "node": ">=22"
151
154
  }
152
155
  }
@@ -1 +0,0 @@
1
- import{execFile as c}from"child_process";import{promisify as p,styleText as t,types as l}from"util";import{Command as u}from"commander";import y from"ora";var h=p(c);async function P(r){let{command:e,name:n,options:m}=r,o=y(n);o.spinner=m?.spinner??"aesthetic";let a=Date.now();o.start();try{let s=l.isPromise(e)?await e:await e();return o.succeed(m?.showTime?`${t("dim",`${Date.now()-a}ms`)} ${n}`:void 0),await new Promise(i=>{setTimeout(i,0)}),s}catch(s){let i=s;throw o.fail(t("red",i.stderr??i.message??"")),s}}function b(){let r=new u;return r.configureHelp({styleTitle:e=>t("bold",e),styleCommandText:e=>t("cyan",e),styleCommandDescription:e=>t("magenta",e),styleDescriptionText:e=>t("italic",e),styleOptionText:e=>t("green",e),styleArgumentText:e=>t("yellow",e),styleSubcommandText:e=>t("blue",e)}).configureOutput({outputError:(e,n)=>{n(t("red",e))}}),r}export{h as a,P as b,b as c};
@@ -1 +0,0 @@
1
- {"formatter":{"enabled":true,"includes":["**","!**/node_modules/","!**/dist/","!**/out/","!**/output","!**/.output","!**/build/","!**/*.min.*","!**/package-lock.json","!**/yarn.lock","!**/.yarn/","!**/.yarnrc.yml","!**/.pnp.*","!**/.pnp","!**/.pnp.js","!**/.pnp.cjs","!**/bun.lock","!**/bun.lockb","!**/pnpm-lock.yaml","!**/.vite-inspect","!**/.vitepress/cache","!**/vite.config.*.timestamp-*","!**/*.log","!**/npm-debug.log*","!**/yarn-debug.log*","!**/yarn-error.log*","!**/coverage/","!**/.nyc_output/","!**/__snapshots__","!**/.vscode/","!**/.idea/","!**/.cache","!**/.nuxt","!**/.next","!**/.svelte-kit","!**/.vercel","!**/.changeset","!**/.turbo/","!**/.DS_Store","!**/Thumbs.db","!**/temp","!**/.temp","!**/tmp","!**/.tmp","!**/.history","!**/mockServiceWorker.js","!**/CHANGELOG*","!**/LICENSE*"],"useEditorconfig":false,"formatWithErrors":false,"lineWidth":80,"indentWidth":2,"indentStyle":"space","bracketSpacing":true,"bracketSameLine":false,"lineEnding":"lf","attributePosition":"auto"},"javascript":{"formatter":{"semicolons":"always","quoteStyle":"single","arrowParentheses":"always","trailingCommas":"es5","quoteProperties":"asNeeded","jsxQuoteStyle":"double"}},"linter":{"enabled":false,"includes":["!**/node_modules/","!**/dist/","!**/out/","!**/output","!**/.output","!**/build/","!**/*.min.*","!**/package-lock.json","!**/yarn.lock","!**/.yarn/","!**/.yarnrc.yml","!**/.pnp.*","!**/.pnp","!**/.pnp.js","!**/.pnp.cjs","!**/bun.lock","!**/bun.lockb","!**/pnpm-lock.yaml","!**/.vite-inspect","!**/.vitepress/cache","!**/vite.config.*.timestamp-*","!**/*.log","!**/npm-debug.log*","!**/yarn-debug.log*","!**/yarn-error.log*","!**/coverage/","!**/.nyc_output/","!**/__snapshots__","!**/.vscode/","!**/.idea/","!**/.cache","!**/.nuxt","!**/.next","!**/.svelte-kit","!**/.vercel","!**/.changeset","!**/.turbo/","!**/.DS_Store","!**/Thumbs.db","!**/temp","!**/.temp","!**/tmp","!**/.tmp","!**/.history","!**/mockServiceWorker.js","!**/CHANGELOG*","!**/LICENSE*"]},"overrides":[{"includes":["**/package.json"],"formatter":{"indentStyle":"space"}}],"assist":{"actions":{"source":{"organizeImports":"off"}}}}
File without changes