@ncontiero/eslint-config 6.3.0-beta.7 → 6.3.0-beta.8

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +6688 -6688
  2. package/dist/index.js +1 -1
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import Fe from"eslint-plugin-command/config";function E(){return[{...Fe(),name:"ncontiero/command/rules"}]}import{default as A}from"@eslint-community/eslint-plugin-eslint-comments";import{default as j}from"eslint-plugin-antfu";import{default as N}from"eslint-plugin-de-morgan";import{default as M}from"eslint-plugin-import-x";import{default as q}from"eslint-plugin-n";import{default as J}from"eslint-plugin-perfectionist";import{default as P}from"eslint-plugin-unicorn";import{default as U}from"eslint-plugin-unused-imports";function K(){return[{name:"ncontiero/comments/rules",plugins:{"eslint-comments":A},rules:{"eslint-comments/disable-enable-pair":["error",{allowWholeFile:!0}],"eslint-comments/no-aggregating-enable":"error","eslint-comments/no-duplicate-disable":"error","eslint-comments/no-unlimited-disable":"error","eslint-comments/no-unused-enable":"error"}}]}function $(){return[{...N.configs.recommended,name:"ncontiero/de-morgan"}]}var w="?([cm])[jt]s?(x)",l="**/*.?([cm])[jt]s?(x)",F="**/*.?([cm])js",nr="**/*.?([cm])jsx",d="**/*.?([cm])ts",O="**/*.?([cm])tsx",b="**/*.?([cm])?(j|t)sx",Te="**/*.{c,le,sc}ss",sr="**/*.css",ir="**/*.{p,post}css",ar="**/*.less",pr="**/*.scss",T="**/*.json",L="**/*.json5",H="**/*.jsonc",y="**/*.md",W="**/*.md/*.md",R="**/*.y?(a)ml",Q="**/*.toml",V="**/*.htm?(l)",X=`${y}/${l}`,Y=[F,d,b,V],cr=[l,Te,T,L,y,R,V],Le="**/node_modules",Re="**/dist",De=["**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/bun.lockb"],z=[Le,Re,...De,"**/output","**/coverage","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/fixtures","**/.git","**/.vitepress/cache","**/.nuxt","**/.next","**/.vercel","**/.contentlayer","**/.changeset","**/.idea","**/.cache","**/.output","**/.vite-inspect","**/.yarn","**/next-env.d.ts","**/.nitro","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts"];function Z(e=[]){return[{ignores:[...z,...e],name:"ncontiero/global-ignores"}]}function ee(e={}){let{nextJs:r=!1}=e;return[{name:"ncontiero/imports/rules",plugins:{antfu:j,import:M},rules:{"antfu/import-dedupe":"error","import/first":"error","import/newline-after-import":["error",{count:1}],"import/no-default-export":"error","import/no-duplicates":"error","import/no-mutable-exports":"error","import/no-named-default":"error","import/no-self-import":"error","import/no-webpack-loader-syntax":"error"}},{files:[`**/*config*.${w}`,`**/{views,pages,routes,middleware,plugins,api,app}/${l}`,r?"{,src/}middleware.{ts,js}":"","**/{index,vite,esbuild,rollup,rolldown,webpack,rspack}.ts","**/*.d.ts",`${y}/**`,"**/.prettierrc*"],name:"ncontiero/imports/allow-default-export",rules:{"import/no-default-export":"off"}}]}import D from"globals";var k=["ForInStatement","LabeledStatement","WithStatement"];function re(e={}){let{overrides:r={}}=e;return[{languageOptions:{ecmaVersion:"latest",globals:{...D.browser,...D.es2026,...D.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:"latest",sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:!0},name:"ncontiero/javascript/rules",plugins:{antfu:j,"unused-imports":U},rules:{"array-callback-return":"error","block-scoped-var":"error","constructor-super":"error","dot-notation":"warn",eqeqeq:["error","smart"],"for-direction":"error","getter-return":"error","no-alert":"warn","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-console":["warn",{allow:["warn","error"]}],"no-const-assign":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"warn","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-duplicate-imports":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-empty-character-class":"error","no-empty-pattern":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":["warn",{commentPattern:"break[\\s\\w]*omitted"}],"no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-inner-declarations":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-lonely-if":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-multi-str":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-octal":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-restricted-syntax":["error",...k],"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":"error","no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-labels":"error","no-unused-vars":"off","no-useless-backreference":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-constructor":"error","no-useless-escape":"error","no-useless-rename":"error","no-var":"error","no-void":"error","no-with":"error","object-shorthand":["error","always",{avoidQuotes:!0,ignoreConstructors:!1}],"prefer-arrow-callback":["error",{allowNamedFunctions:!1,allowUnboundThis:!0}],"prefer-const":["warn",{destructuring:"all",ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","require-await":"error","require-yield":"error","unicode-bom":["error","never"],"unused-imports/no-unused-imports":"warn","unused-imports/no-unused-vars":["error",{args:"after-used",ignoreRestSiblings:!0}],"use-isnan":["error",{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":["error",{requireStringLiterals:!0}],"vars-on-top":"error",...r}},{files:[`**/{scripts,cli}/${l}`,`**/cli.${w}`],name:"ncontiero/javascript/cli-rules",rules:{"no-console":"off"}},{files:[`**/*.{test,spec}.${w}`],name:"ncontiero/javascript/test-rules",rules:{"no-unused-expressions":"off","unicorn/consistent-function-scoping":"off"}}]}import{isPackageExists as oe}from"local-pkg";var _e=oe("@ncontiero/eslint-config"),te={meta:{name:"parser-plain"},parseForESLint:e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:"Program"},scopeManager:null,services:{isPlain:!0},visitorKeys:{Program:[]}})};async function hr(...e){return(await Promise.all(e)).flat()}async function o(e){let r=await e;return r.default||r}function ne(e){if(process.env.CI||!process.stdout.isTTY||!_e)return;let r=e.filter(t=>t&&!oe(t));if(r.length!==0)throw new Error(`This package(s) are required for this config: ${r.join(", ")}. Please install them.`)}async function se(...e){let r=[],n=(await Promise.all(e)).flat();return r=[...r,...n],r}function vr(e){return Array.isArray(e)?e:[e]}async function ie(){return[{name:"ncontiero/jsdoc/rules",plugins:{jsdoc:await o(import("eslint-plugin-jsdoc"))},rules:{"jsdoc/check-access":"warn","jsdoc/check-param-names":"warn","jsdoc/check-property-names":"warn","jsdoc/check-types":"warn","jsdoc/empty-tags":"warn","jsdoc/implements-on-classes":"warn","jsdoc/no-defaults":"warn","jsdoc/no-multi-asterisks":"warn","jsdoc/require-param-name":"warn","jsdoc/require-property":"warn","jsdoc/require-property-description":"warn","jsdoc/require-property-name":"warn","jsdoc/require-returns-check":"warn","jsdoc/require-returns-description":"warn","jsdoc/require-yields-check":"warn"}}]}async function ae(e={}){let{files:r=[T,L,H],overrides:t={},style:n=!0}=e,{indent:s=2}=typeof n=="boolean"?{}:n,[a,p]=await Promise.all([o(import("eslint-plugin-jsonc")),o(import("jsonc-eslint-parser"))]);return[{name:"ncontiero/jsonc/setup",plugins:{jsonc:a}},{files:r,languageOptions:{parser:p},name:"ncontiero/jsonc/rules",rules:{...a.configs["recommended-with-jsonc"].rules,"jsonc/array-bracket-spacing":["error","never"],"jsonc/comma-style":["error","last"],"jsonc/indent":["error",s],"jsonc/key-spacing":["error",{afterColon:!0,beforeColon:!1}],"jsonc/object-curly-newline":["error",{consistent:!0,multiline:!0}],"jsonc/object-curly-spacing":["error","always"],"jsonc/object-property-newline":["error",{allowAllPropertiesOnSameLine:!0}],"jsonc/quote-props":"off","jsonc/quotes":"off",...t}}]}import{mergeProcessors as Be,processorPassThrough as Ge}from"eslint-merge-processors";async function pe(e={}){let{files:r=[y],overrides:t={}}=e,n=await o(import("@eslint/markdown"));return[{name:"ncontiero/markdown/setup",plugins:{markdown:n}},{files:r,ignores:[W],name:"ncontiero/markdown/processor",processor:Be([n.processors.markdown,Ge])},{files:r,languageOptions:{parser:te},name:"ncontiero/markdown/parser"},{files:[X],languageOptions:{parserOptions:{ecmaFeatures:{impliedStrict:!0}}},name:"ncontiero/markdown/rules",rules:{"@typescript-eslint/comma-dangle":"off","@typescript-eslint/consistent-type-imports":"off","@typescript-eslint/no-extraneous-class":"off","@typescript-eslint/no-namespace":"off","@typescript-eslint/no-redeclare":"off","@typescript-eslint/no-require-imports":"off","@typescript-eslint/no-unused-expressions":"off","@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":"off","import/newline-after-import":"off","no-alert":"off","no-console":"off","no-restricted-imports":"off","no-undef":"off","no-unused-expressions":"off","no-unused-vars":"off","node/prefer-global/buffer":"off","node/prefer-global/process":"off","unused-imports/no-unused-imports":"off","unused-imports/no-unused-vars":"off",...t}}]}async function ce(e={}){let{files:r=[b],overrides:t={}}=e,n=await o(import("@next/eslint-plugin-next"));return[{files:r,name:"ncontiero/nextjs/rules",plugins:{nextjs:n},rules:{"nextjs/google-font-display":["warn"],"nextjs/google-font-preconnect":["warn"],"nextjs/inline-script-id":["error"],"nextjs/next-script-for-ga":["warn"],"nextjs/no-assign-module-variable":["error"],"nextjs/no-async-client-component":"warn","nextjs/no-before-interactive-script-outside-document":["warn"],"nextjs/no-css-tags":["warn"],"nextjs/no-document-import-in-page":["error"],"nextjs/no-duplicate-head":["error"],"nextjs/no-head-element":["warn"],"nextjs/no-head-import-in-document":["error"],"nextjs/no-html-link-for-pages":["warn"],"nextjs/no-img-element":["warn"],"nextjs/no-page-custom-font":["warn"],"nextjs/no-script-component-in-head":["error"],"nextjs/no-styled-jsx-in-document":["warn"],"nextjs/no-sync-scripts":["warn"],"nextjs/no-title-in-document-head":["warn"],"nextjs/no-typos":["warn"],"nextjs/no-unwanted-polyfillio":["warn"],...t}}]}function le(){return[{name:"ncontiero/node/rules",plugins:{node:q},rules:{"node/handle-callback-err":["error","^(err|error)$"],"node/no-deprecated-api":"error","node/no-exports-assign":"error","node/no-new-require":"error","node/no-path-concat":"error","node/no-unsupported-features/es-builtins":"error","node/no-unsupported-features/es-syntax":"error","node/no-unsupported-features/node-builtins":"error","node/prefer-global/console":["error","always"],"node/prefer-global/process":["error","always"],"node/prefer-global/url":["error","always"],"node/prefer-global/url-search-params":["error","always"],"node/process-exit-as-throw":"error"}}]}function me(){return[{name:"ncontiero/perfectionist/rules",plugins:{perfectionist:J},rules:{"perfectionist/sort-exports":["warn",{type:"natural"}],"perfectionist/sort-imports":["warn",{customGroups:{type:{react:["^react$","^react-(?!.*.css$).+"]},value:{react:["^react$","^react-(?!.*.css$).+"]}},groups:["side-effect-style","style","type","internal-type",["parent-type","sibling-type","index-type"],"builtin","react","external","internal",["parent","sibling","index"],"object","unknown"],internalPattern:["^[~@#]/.*"],newlinesBetween:"ignore",type:"natural"}],"perfectionist/sort-named-exports":["warn",{groupKind:"types-first"}],"perfectionist/sort-named-imports":["warn",{groupKind:"types-first"}]}}]}async function ue(e={}){return[{name:"ncontiero/prettier/setup",plugins:{prettier:await o(import("eslint-plugin-prettier"))}},{files:[l],name:"ncontiero/prettier/disables",rules:{"antfu/consistent-list-newline":"off","arrow-body-style":"off",curly:"off","no-unexpected-multiline":"off","prefer-arrow-callback":"off","unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}},{files:[l],name:"ncontiero/prettier/rules",rules:{"prettier/prettier":["warn",e]}}]}async function fe(){return[{...(await o(import("eslint-plugin-promise"))).configs["flat/recommended"],name:"ncontiero/promise/setup"},{name:"ncontiero/promise/rules",rules:{"promise/always-return":["error",{ignoreLastCallback:!0}],"promise/no-multiple-resolved":"warn"}}]}import{isPackageExists as _}from"local-pkg";var Ee=["vite"],Ae=["@react-router/node","@react-router/react","@react-router/serve","@react-router/dev"],Ne=["next"];async function de(e={}){let{files:r=[b],overrides:t={},reactQuery:n,typescript:s}=e;n&&ne(["@tanstack/eslint-plugin-query"]);let[a,p,u,S]=await Promise.all([o(import("eslint-plugin-jsx-a11y")),o(import("eslint-plugin-react")),o(import("eslint-plugin-react-hooks")),o(import("eslint-plugin-react-refresh"))]),g=Ee.some(c=>_(c)),x=Ae.some(c=>_(c)),v=Ne.some(c=>_(c));return[{files:r,name:"ncontiero/react/setup",plugins:{"jsx-a11y":a,react:p,"react-hooks":u,"react-refresh":S},settings:{react:{version:"detect"}}},n?{...(await o(import("@tanstack/eslint-plugin-query"))).configs["flat/recommended"][0],name:"ncontiero/tanstack-query"}:{},{files:r,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"ncontiero/react/rules",rules:{"react-hooks/component-hook-factories":"warn","react-hooks/error-boundaries":"warn","react-hooks/exhaustive-deps":"warn","react-hooks/globals":"warn","react-hooks/immutability":"warn","react-hooks/incompatible-library":"warn","react-hooks/preserve-manual-memoization":"warn","react-hooks/purity":"warn","react-hooks/refs":"warn","react-hooks/rules-of-hooks":"error","react-hooks/set-state-in-effect":"warn","react-hooks/set-state-in-render":"warn","react-hooks/static-components":"warn","react-hooks/unsupported-syntax":"warn","react-hooks/use-memo":"warn","react-refresh/only-export-components":["warn",{allowConstantExport:g,allowExportNames:[...v?["experimental_ppr","dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...x?["meta","links","headers","loader","action","clientLoader","clientAction","handle","shouldRevalidate"]:[]]}],"react/boolean-prop-naming":["off",{rule:"^(is|has|are|can|should|did|will)[A-Z]([A-Za-z0-9])+",validateNested:!0}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/display-name":["error",{ignoreTranspilerName:!1}],"react/hook-use-state":["error"],"react/iframe-missing-sandbox":["error"],"react/jsx-boolean-value":["error","never"],"react/jsx-filename-extension":["warn",{extensions:[".tsx"]}],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["error",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-key":["error",{checkFragmentShorthand:!0,checkKeyMustBeforeSpread:!0,warnOnDuplicates:!0}],"react/jsx-no-bind":["error",{allowArrowFunctions:!0}],"react/jsx-no-comment-textnodes":"error","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":["error"],"react/jsx-no-leaked-render":["error"],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{forms:!0,links:!0,warnOnSpreadAttributes:!0}],"react/jsx-no-undef":"error","react/jsx-no-useless-fragment":"error","react/jsx-uses-react":"error","react/jsx-uses-vars":"error","react/no-access-state-in-setstate":"error","react/no-array-index-key":"error","react/no-arrow-function-lifecycle":"error","react/no-children-prop":"error","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":"error","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"error","react/no-find-dom-node":"error","react/no-invalid-html-attribute":"error","react/no-is-mounted":"error","react/no-namespace":"error","react/no-object-type-as-default-prop":"error","react/no-redundant-should-component-update":"error","react/no-render-return-value":"error","react/no-string-refs":["error",{noTemplateLiterals:!0}],"react/no-this-in-sfc":["error"],"react/no-typos":["error"],"react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unstable-nested-components":["error"],"react/no-unused-class-component-methods":["error"],"react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":["error"],"react/no-will-update-set-state":["error"],"react/prefer-es6-class":["error","always"],"react/prefer-exact-props":["error"],"react/prefer-read-only-props":["error"],"react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":["error",{customValidators:[],ignore:[],skipUndeclared:!1}],"react/react-in-jsx-scope":"off","react/require-render-return":"error","react/self-closing-comp":["error",{component:!0,html:!0}],"react/sort-default-props":["error"],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","property assignment"],"react/style-prop-object":["error",{allow:["FormattedNumber"]}],"react/void-dom-elements-no-children":["error"],...s?{"react/jsx-no-undef":"off","react/prop-types":"off"}:{},"jsx-a11y/alt-text":["warn",{area:[],elements:["img","object","area",'input[type="image"]'],img:[],'input[type="image"]':[],object:[]}],"jsx-a11y/anchor-has-content":["warn",{components:[]}],"jsx-a11y/anchor-is-valid":["warn",{aspects:["noHref","invalidHref","preferButton"],components:["Link"],specialLink:["to"]}],"jsx-a11y/aria-activedescendant-has-tabindex":["warn"],"jsx-a11y/aria-props":["warn"],"jsx-a11y/aria-proptypes":["warn"],"jsx-a11y/aria-role":["warn",{ignoreNonDOM:!1}],"jsx-a11y/aria-unsupported-elements":["warn"],"jsx-a11y/autocomplete-valid":["off",{inputComponents:[]}],"jsx-a11y/click-events-have-key-events":["warn"],"jsx-a11y/control-has-associated-label":["warn",{controlComponents:[],depth:5,ignoreElements:["audio","canvas","embed","input","textarea","tr","video"],ignoreRoles:["grid","listbox","menu","menubar","radiogroup","row","tablist","toolbar","tree","treegrid"],labelAttributes:["label"]}],"jsx-a11y/heading-has-content":["warn",{components:[""]}],"jsx-a11y/html-has-lang":["warn"],"jsx-a11y/iframe-has-title":["warn"],"jsx-a11y/img-redundant-alt":["warn"],"jsx-a11y/interactive-supports-focus":["warn"],"jsx-a11y/label-has-associated-control":"warn","jsx-a11y/lang":["warn"],"jsx-a11y/media-has-caption":["warn",{audio:[],track:[],video:[]}],"jsx-a11y/mouse-events-have-key-events":["warn"],"jsx-a11y/no-access-key":["warn"],"jsx-a11y/no-autofocus":["warn",{ignoreNonDOM:!0}],"jsx-a11y/no-distracting-elements":["warn",{elements:["marquee","blink"]}],"jsx-a11y/no-interactive-element-to-noninteractive-role":["warn",{tr:["none","presentation"]}],"jsx-a11y/no-noninteractive-element-interactions":["warn",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/no-noninteractive-element-to-interactive-role":["warn",{li:["menuitem","option","row","tab","treeitem"],ol:["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"],table:["grid"],td:["gridcell"],ul:["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"]}],"jsx-a11y/no-noninteractive-tabindex":["warn",{roles:["tabpanel"],tags:[]}],"jsx-a11y/no-redundant-roles":["warn"],"jsx-a11y/no-static-element-interactions":["off",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/role-has-required-aria-props":["warn"],"jsx-a11y/role-supports-aria-props":["warn"],"jsx-a11y/scope":["warn"],"jsx-a11y/tabindex-no-positive":["warn"],...t}}]}import{configs as Me}from"eslint-plugin-regexp";function ye(e={}){let r=Me["flat/recommended"],t={...r.rules,...e.overrides};return[{...r,name:"ncontiero/regexp/rules",rules:t}]}function ge(){return[{files:["**/package.json"],name:"ncontiero/sort/package-json",rules:{"jsonc/sort-array-values":["error",{order:{type:"asc"},pathPattern:"^files$"}],"jsonc/sort-keys":["error",{order:["publisher","name","displayName","type","version","private","packageManager","description","author","contributors","license","funding","homepage","repository","bugs","keywords","categories","sideEffects","imports","exports","main","module","unpkg","jsdelivr","browser","types","typesVersions","bin","icon","files","directories","publishConfig","scripts","peerDependencies","peerDependenciesMeta","optionalDependencies","dependencies","devDependencies","engines","prisma","config","pnpm","overrides","resolutions","husky","lint-staged","eslintConfig","prettier"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"},{order:["types","require","import","default"],pathPattern:"^exports.*$"},{order:{type:"asc"},pathPattern:"^(?:resolutions|overrides|pnpm.overrides)$"},{order:{type:"asc"},pathPattern:"^workspaces\\.catalog$"},{order:{type:"asc"},pathPattern:"^workspaces\\.catalogs\\.[^.]+$"}]}}]}function xe(){return[{files:["**/[jt]sconfig.json","**/[jt]sconfig.*.json"],name:"ncontiero/sort/tsconfig",rules:{"jsonc/sort-keys":["error",{order:["extends","compilerOptions","references","files","include","exclude"],pathPattern:"^$"},{order:["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","jsx","jsxFactory","jsxFragmentFactory","jsxImportSource","lib","moduleDetection","noLib","reactNamespace","useDefineForClassFields","emitDecoratorMetadata","experimentalDecorators","libReplacement","baseUrl","rootDir","rootDirs","customConditions","module","moduleResolution","moduleSuffixes","noResolve","paths","resolveJsonModule","resolvePackageJsonExports","resolvePackageJsonImports","typeRoots","types","allowArbitraryExtensions","allowImportingTsExtensions","allowUmdGlobalAccess","allowJs","checkJs","maxNodeModuleJsDepth","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","declaration","declarationDir","declarationMap","downlevelIteration","emitBOM","emitDeclarationOnly","importHelpers","importsNotUsedAsValues","inlineSourceMap","inlineSources","isolatedDeclarations","mapRoot","newLine","noEmit","noEmitHelpers","noEmitOnError","outDir","outFile","preserveConstEnums","preserveValueImports","removeComments","sourceMap","sourceRoot","stripInternal","allowSyntheticDefaultImports","esModuleInterop","forceConsistentCasingInFileNames","isolatedModules","preserveSymlinks","verbatimModuleSyntax","erasableSyntaxOnly","skipDefaultLibCheck","skipLibCheck"],pathPattern:"^compilerOptions$"}]}}]}import C from"path";async function we(e={}){let{overrides:r={}}=e,t=p=>C.isAbsolute(p)?p:C.resolve(process.cwd(),p),n=t(e.cssGlobalPath??C.join("src","app","globals.css")),s=t(e.configPath??C.join("tailwind.config.ts"));return[{name:"ncontiero/tailwindcss/setup",plugins:{tailwindcss:await o(import("eslint-plugin-better-tailwindcss"))},settings:{tailwindcss:{entryPoint:n,tailwindConfig:s}}},{files:Y,name:"ncontiero/tailwindcss/rules",rules:{"tailwindcss/enforce-consistent-class-order":"warn","tailwindcss/enforce-consistent-important-position":"warn","tailwindcss/enforce-consistent-line-wrapping":["warn",{group:"never",preferSingleLine:!0,printWidth:120}],"tailwindcss/enforce-consistent-variable-syntax":"error","tailwindcss/enforce-shorthand-classes":"warn","tailwindcss/no-conflicting-classes":"error","tailwindcss/no-deprecated-classes":"error","tailwindcss/no-duplicate-classes":"error","tailwindcss/no-restricted-classes":"error","tailwindcss/no-unknown-classes":"warn","tailwindcss/no-unnecessary-whitespace":"warn",...r}}]}async function Oe(e={}){let{files:r=[Q],overrides:t={},style:n=!0}=e,{indent:s=2}=typeof n=="boolean"?{}:n,[a,p]=await Promise.all([o(import("eslint-plugin-toml")),o(import("toml-eslint-parser"))]);return[{name:"ncontiero/toml/setup",plugins:{toml:a}},{files:r,languageOptions:{parser:p},name:"ncontiero/toml/rules",rules:{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"off","toml/comma-style":"error","toml/indent":["error",s],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error","unicorn/filename-case":"off",...t}}]}async function be(e={}){let{files:r=[d,O],overrides:t={},parserOptions:n={}}=e,[s,a]=await Promise.all([o(import("@typescript-eslint/eslint-plugin")),o(import("@typescript-eslint/parser"))]);return[{name:"ncontiero/typescript/setup",plugins:{"@typescript-eslint":s}},{files:r,languageOptions:{parser:a,parserOptions:{sourceType:"module",...n}},name:"ncontiero/typescript/parser"},{files:r,name:"ncontiero/typescript/rules",rules:{...s.configs["eslint-recommended"].overrides[0].rules,...s.configs.recommended.rules,"@typescript-eslint/ban-ts-comment":["error",{"ts-ignore":"allow-with-description"}],"@typescript-eslint/consistent-type-assertions":["error",{assertionStyle:"as",objectLiteralTypeAssertions:"allow-as-parameter"}],"@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"inline-type-imports"}],"@typescript-eslint/method-signature-style":["error","property"],"@typescript-eslint/no-empty-object-type":["error",{allowInterfaces:"always"}],"@typescript-eslint/no-explicit-any":"off","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-non-null-assertion":"off","@typescript-eslint/no-redeclare":"error","@typescript-eslint/no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!1,allowTernary:!0,enforceForJSX:!0}],"@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-useless-constructor":"error","@typescript-eslint/no-wrapper-object-types":"error","@typescript-eslint/prefer-as-const":"warn","@typescript-eslint/prefer-literal-enum-member":["error",{allowBitwiseExpressions:!0}],"no-restricted-syntax":["error",...k,"TSEnumDeclaration[const=true]"],...t}},{files:["**/*.d.ts"],name:"ncontiero/typescript/dts-rules",rules:{"eslint-comments/no-unlimited-disable":"off","import/no-duplicates":"off","no-restricted-syntax":["error",...k],"unused-imports/no-unused-vars":"off"}},{files:[F,"**/*.cjs"],name:"ncontiero/typescript/cjs-rules",rules:{"@typescript-eslint/no-require-imports":"off"}}]}function he(e={}){let{allRecommended:r,overrides:t={},regexp:n=!1}=e;return[{name:"ncontiero/unicorn/rules",plugins:{unicorn:P},rules:{...r?P.configs.recommended.rules:{"unicorn/better-regex":n?"off":"error","unicorn/catch-error-name":"error","unicorn/consistent-date-clone":"error","unicorn/consistent-empty-array-spread":"error","unicorn/consistent-existence-index-check":"error","unicorn/consistent-function-scoping":"error","unicorn/custom-error-definition":"error","unicorn/error-message":"error","unicorn/escape-case":"error","unicorn/explicit-length-check":"error","unicorn/new-for-builtins":"error","unicorn/no-array-callback-reference":"error","unicorn/no-array-method-this-argument":"error","unicorn/no-await-in-promise-methods":"error","unicorn/no-console-spaces":"error","unicorn/no-for-loop":"error","unicorn/no-hex-escape":"error","unicorn/no-instanceof-builtins":"error","unicorn/no-invalid-remove-event-listener":"error","unicorn/no-lonely-if":"error","unicorn/no-negation-in-equality-check":"error","unicorn/no-new-array":"error","unicorn/no-new-buffer":"error","unicorn/no-single-promise-in-promise-methods":"error","unicorn/no-static-only-class":"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-zero-fractions":"error","unicorn/number-literal-case":"error","unicorn/prefer-add-event-listener":"error","unicorn/prefer-array-find":"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-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-includes":"error","unicorn/prefer-keyboard-event-key":"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-negative-index":"error","unicorn/prefer-node-protocol":"error","unicorn/prefer-number-properties":"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-single-call":"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-type-error":"error","unicorn/throw-new-error":"error"},...t}}]}async function ve(e={}){let{files:r=[R],overrides:t={},style:n=!0}=e,{indent:s=2,quotes:a="double"}=typeof n=="boolean"?{}:n,[p,u]=await Promise.all([o(import("eslint-plugin-yml")),o(import("yaml-eslint-parser"))]);return[{name:"ncontiero/yml/setup",plugins:{yml:p}},{files:r,languageOptions:{parser:u},name:"ncontiero/yml/rules",rules:{"yml/block-mapping":"error","yml/block-mapping-question-indicator-newline":"error","yml/block-sequence":"error","yml/block-sequence-hyphen-indicator-newline":"error","yml/flow-mapping-curly-newline":"error","yml/flow-mapping-curly-spacing":"error","yml/flow-sequence-bracket-newline":"error","yml/flow-sequence-bracket-spacing":"error","yml/indent":["error",s],"yml/key-spacing":"error","yml/no-empty-document":"error","yml/no-empty-key":"error","yml/no-empty-sequence-entry":"error","yml/no-irregular-whitespace":"error","yml/no-tab-indent":"error","yml/plain-scalar":"error","yml/quotes":["error",{avoidEscape:!1,prefer:a}],"yml/spaced-comment":"error","yml/vue-custom-block/no-parsing-error":"error",...t}},{files:["pnpm-workspace.yaml"],name:"ncontiero/yml/pnpm-workspace",rules:{"yml/sort-keys":["error",{order:["packages","overrides","patchedDependencies","hoistPattern","catalog","catalogs","allowedDeprecatedVersions","allowNonAppliedPatches","allowUnusedPatches","configDependencies","ignoredBuiltDependencies","ignoredOptionalDependencies","ignorePatchFailures","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","packageExtensions","peerDependencyRules","supportedArchitectures"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:".*"}]}}]}import{isPackageExists as h}from"local-pkg";var je=!!((process.env.VSCODE_PID||process.env.VSCODE_CWD||process.env.NVIM||process.env.JETBRAINS_IDE||process.env.VIM)&&!process.env.CI),ke=h("typescript"),Ce=h("react"),Se=h("next"),Ie=h("tailwindcss"),Pe=h("@tanstack/react-query");var qe=["name","languageOptions","linterOptions","processor","plugins","rules","settings"];function B(e,r){return typeof e[r]=="boolean"?{}:e[r]||{}}function m(e,r){let t=B(e,r);return{...("overrides"in e?e.overrides:{})?.[r],..."overrides"in t?t.overrides:{}}}function Je(e){return"tabWidth"in e||"singleQuote"in e||"semi"in e?{indent:e.tabWidth||2,quotes:e.singleQuote?"single":"double",semi:e.semi??!0}:!1}function Ko(e={},...r){let{gitignore:t=!0,isInEditor:n=je,nextjs:s=Se,react:a=Ce,reactQuery:p=Pe,regexp:u=!0,tailwindcss:S=Ie,typescript:g=ke,unicorn:x=!0}=e,v=typeof e.prettier=="object"?e.prettier:{},c=Je(v),i=[];if(t&&(typeof t!="boolean"?i.push(o(import("eslint-config-flat-gitignore")).then(f=>[f({name:"ncontiero/gitignore",...t})])):i.push(o(import("eslint-config-flat-gitignore")).then(f=>[f({name:"ncontiero/gitignore",strict:!1})]))),g||(e.ignores?e.ignores.push(d,O):e.ignores=[d,O]),i.push(Z(e.ignores),re({overrides:m(e,"javascript")}),K(),ie(),ee({nextJs:!!s}),le(),fe(),E(),me(),$()),x&&i.push(he(x===!0?{regexp:!!u}:x)),g&&i.push(be({...B(e,"typescript"),overrides:m(e,"typescript")})),(e.jsonc??!0)&&i.push(ae({overrides:m(e,"jsonc"),style:c}),ge(),xe()),(e.yaml??!0)&&i.push(ve({overrides:m(e,"yaml"),style:c})),(e.toml??!0)&&i.push(Oe({overrides:m(e,"toml"),style:c})),(e.markdown??!0)&&i.push(pe({overrides:m(e,"markdown")})),u&&i.push(ye(typeof u=="boolean"?{}:u)),a&&i.push(de({overrides:m(e,"react"),reactQuery:!!p,typescript:!!g})),s&&i.push(ce({overrides:m(e,"nextjs")})),S&&i.push(we({isInEditor:n,...B(e,"tailwindcss"),overrides:m(e,"tailwindcss")})),(e.prettier??!0)&&i.push(ue(v)),"files"in e)throw new Error('[@ncontiero/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');let G=qe.reduce((f,I)=>(I in e&&(f[I]=e[I]),f),{});return Object.keys(G).length>0&&i.push([G]),se(...i,...r)}export{cr as GLOB_ALL_SRC,sr as GLOB_CSS,Re as GLOB_DIST,z as GLOB_EXCLUDE,V as GLOB_HTML,F as GLOB_JS,T as GLOB_JSON,L as GLOB_JSON5,H as GLOB_JSONC,nr as GLOB_JSX,ar as GLOB_LESS,De as GLOB_LOCKFILE,y as GLOB_MARKDOWN,X as GLOB_MARKDOWN_CODE,W as GLOB_MARKDOWN_IN_MARKDOWN,Le as GLOB_NODE_MODULES,ir as GLOB_POSTCSS,b as GLOB_REACT,pr as GLOB_SCSS,l as GLOB_SRC,w as GLOB_SRC_EXT,Te as GLOB_STYLE,Y as GLOB_TAILWINDCSS,Q as GLOB_TOML,d as GLOB_TS,O as GLOB_TSX,R as GLOB_YAML,hr as combine,E as command,K as comments,se as composer,$ as deMorgan,ne as ensurePackages,m as getOverrides,Se as hasNextJs,Ce as hasReact,Ie as hasTailwind,Pe as hasTanStackReactQuery,ke as hasTypeScript,Z as ignores,ee as imports,o as interopDefault,je as isInEditorEnv,re as javascript,ie as jsdoc,ae as jsonc,pe as markdown,Ko as ncontiero,ce as nextJs,le as node,te as parserPlain,me as perfectionist,ue as prettier,fe as promise,de as react,ye as regexp,B as resolveSubOptions,k as restrictedSyntaxJs,ge as sortPackageJson,xe as sortTsconfig,we as tailwindcss,vr as toArray,Oe as toml,be as typescript,he as unicorn,ve as yml};
1
+ import Fe from"eslint-plugin-command/config";function E(){return[{...Fe(),name:"ncontiero/command/rules"}]}import{default as A}from"@eslint-community/eslint-plugin-eslint-comments";import{default as j}from"eslint-plugin-antfu";import{default as N}from"eslint-plugin-de-morgan";import{default as M}from"eslint-plugin-import-x";import{default as q}from"eslint-plugin-n";import{default as J}from"eslint-plugin-perfectionist";import{default as P}from"eslint-plugin-unicorn";import{default as U}from"eslint-plugin-unused-imports";function K(){return[{name:"ncontiero/comments/rules",plugins:{"eslint-comments":A},rules:{"eslint-comments/disable-enable-pair":["error",{allowWholeFile:!0}],"eslint-comments/no-aggregating-enable":"error","eslint-comments/no-duplicate-disable":"error","eslint-comments/no-unlimited-disable":"error","eslint-comments/no-unused-enable":"error"}}]}function $(){return[{...N.configs.recommended,name:"ncontiero/de-morgan"}]}var w="?([cm])[jt]s?(x)",l="**/*.?([cm])[jt]s?(x)",F="**/*.?([cm])js",nr="**/*.?([cm])jsx",d="**/*.?([cm])ts",O="**/*.?([cm])tsx",b="**/*.?([cm])?(j|t)sx",Te="**/*.{c,le,sc}ss",sr="**/*.css",ir="**/*.{p,post}css",ar="**/*.less",pr="**/*.scss",T="**/*.json",L="**/*.json5",H="**/*.jsonc",y="**/*.md",W="**/*.md/*.md",R="**/*.y?(a)ml",Q="**/*.toml",V="**/*.htm?(l)",X=`${y}/${l}`,Y=[F,d,b,V],cr=[l,Te,T,L,y,R,V],Le="**/node_modules",Re="**/dist",De=["**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/bun.lockb"],z=[Le,Re,...De,"**/output","**/coverage","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/fixtures","**/.git","**/.vitepress/cache","**/.nuxt","**/.next","**/.vercel","**/.contentlayer","**/.changeset","**/.idea","**/.cache","**/.output","**/.vite-inspect","**/.yarn","**/next-env.d.ts","**/.nitro","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts"];function Z(e=[]){return[{ignores:[...z,...e],name:"ncontiero/global-ignores"}]}function ee(e={}){let{nextJs:r=!1}=e;return[{name:"ncontiero/imports/rules",plugins:{antfu:j,import:M},rules:{"antfu/import-dedupe":"error","import/first":"error","import/newline-after-import":["error",{count:1}],"import/no-default-export":"error","import/no-duplicates":"error","import/no-mutable-exports":"error","import/no-named-default":"error","import/no-self-import":"error","import/no-webpack-loader-syntax":"error"}},{files:[`**/*config*.${w}`,`**/{views,pages,routes,middleware,plugins,api,app}/${l}`,r?"{,src/}middleware.{ts,js}":"","**/{index,vite,esbuild,rollup,rolldown,webpack,rspack}.ts","**/*.d.ts",`${y}/**`,"**/.prettierrc*"],name:"ncontiero/imports/allow-default-export",rules:{"import/no-default-export":"off"}}]}import D from"globals";var k=["ForInStatement","LabeledStatement","WithStatement"];function re(e={}){let{overrides:r={}}=e;return[{languageOptions:{ecmaVersion:"latest",globals:{...D.browser,...D.es2026,...D.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:"latest",sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:!0},name:"ncontiero/javascript/rules",plugins:{antfu:j,"unused-imports":U},rules:{"array-callback-return":"error","block-scoped-var":"error","constructor-super":"error","dot-notation":"warn",eqeqeq:["error","smart"],"for-direction":"error","getter-return":"error","no-alert":"warn","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-console":["warn",{allow:["warn","error"]}],"no-const-assign":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"warn","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-duplicate-imports":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-empty-character-class":"error","no-empty-pattern":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":["warn",{commentPattern:"break[\\s\\w]*omitted"}],"no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-inner-declarations":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-lonely-if":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-multi-str":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-octal":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-restricted-syntax":["error",...k],"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":"error","no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-labels":"error","no-unused-vars":"off","no-useless-backreference":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-constructor":"error","no-useless-escape":"error","no-useless-rename":"error","no-var":"error","no-void":"error","no-with":"error","object-shorthand":["error","always",{avoidQuotes:!0,ignoreConstructors:!1}],"prefer-arrow-callback":["error",{allowNamedFunctions:!1,allowUnboundThis:!0}],"prefer-const":["warn",{destructuring:"all",ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","require-await":"error","require-yield":"error","unicode-bom":["error","never"],"unused-imports/no-unused-imports":"warn","unused-imports/no-unused-vars":["error",{args:"after-used",ignoreRestSiblings:!0}],"use-isnan":["error",{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":["error",{requireStringLiterals:!0}],"vars-on-top":"error",...r}},{files:[`**/{scripts,cli}/${l}`,`**/cli.${w}`],name:"ncontiero/javascript/cli-rules",rules:{"no-console":"off"}},{files:[`**/*.{test,spec}.${w}`],name:"ncontiero/javascript/test-rules",rules:{"no-unused-expressions":"off","unicorn/consistent-function-scoping":"off"}}]}import{isPackageExists as oe}from"local-pkg";var _e=oe("@ncontiero/eslint-config"),te={meta:{name:"parser-plain"},parseForESLint:e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:"Program"},scopeManager:null,services:{isPlain:!0},visitorKeys:{Program:[]}})};async function hr(...e){return(await Promise.all(e)).flat()}async function o(e){let r=await e;return r.default||r}function ne(e){if(process.env.CI||!process.stdout.isTTY||!_e)return;let r=e.filter(t=>t&&!oe(t));if(r.length!==0)throw new Error(`This package(s) are required for this config: ${r.join(", ")}. Please install them.`)}async function se(...e){let r=[],n=(await Promise.all(e)).flat();return r=[...r,...n],r}function vr(e){return Array.isArray(e)?e:[e]}async function ie(){return[{name:"ncontiero/jsdoc/rules",plugins:{jsdoc:await o(import("eslint-plugin-jsdoc"))},rules:{"jsdoc/check-access":"warn","jsdoc/check-param-names":"warn","jsdoc/check-property-names":"warn","jsdoc/check-types":"warn","jsdoc/empty-tags":"warn","jsdoc/implements-on-classes":"warn","jsdoc/no-defaults":"warn","jsdoc/no-multi-asterisks":"warn","jsdoc/require-param-name":"warn","jsdoc/require-property":"warn","jsdoc/require-property-description":"warn","jsdoc/require-property-name":"warn","jsdoc/require-returns-check":"warn","jsdoc/require-returns-description":"warn","jsdoc/require-yields-check":"warn"}}]}async function ae(e={}){let{files:r=[T,L,H],overrides:t={},style:n=!0}=e,{indent:s=2}=typeof n=="boolean"?{}:n,[a,p]=await Promise.all([o(import("eslint-plugin-jsonc")),o(import("jsonc-eslint-parser"))]);return[{name:"ncontiero/jsonc/setup",plugins:{jsonc:a}},{files:r,languageOptions:{parser:p},name:"ncontiero/jsonc/rules",rules:{...a.configs["recommended-with-jsonc"].rules,"jsonc/array-bracket-spacing":["error","never"],"jsonc/comma-style":["error","last"],"jsonc/indent":["error",s],"jsonc/key-spacing":["error",{afterColon:!0,beforeColon:!1}],"jsonc/object-curly-newline":["error",{consistent:!0,multiline:!0}],"jsonc/object-curly-spacing":["error","always"],"jsonc/object-property-newline":["error",{allowAllPropertiesOnSameLine:!0}],"jsonc/quote-props":"off","jsonc/quotes":"off",...t}}]}import{mergeProcessors as Be,processorPassThrough as Ge}from"eslint-merge-processors";async function pe(e={}){let{files:r=[y],overrides:t={}}=e,n=await o(import("@eslint/markdown"));return[{name:"ncontiero/markdown/setup",plugins:{markdown:n}},{files:r,ignores:[W],name:"ncontiero/markdown/processor",processor:Be([n.processors.markdown,Ge])},{files:r,languageOptions:{parser:te},name:"ncontiero/markdown/parser"},{files:[X],languageOptions:{parserOptions:{ecmaFeatures:{impliedStrict:!0}}},name:"ncontiero/markdown/rules",rules:{"@typescript-eslint/comma-dangle":"off","@typescript-eslint/consistent-type-imports":"off","@typescript-eslint/no-extraneous-class":"off","@typescript-eslint/no-namespace":"off","@typescript-eslint/no-redeclare":"off","@typescript-eslint/no-require-imports":"off","@typescript-eslint/no-unused-expressions":"off","@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":"off","import/newline-after-import":"off","no-alert":"off","no-console":"off","no-restricted-imports":"off","no-undef":"off","no-unused-expressions":"off","no-unused-vars":"off","node/prefer-global/buffer":"off","node/prefer-global/process":"off","unused-imports/no-unused-imports":"off","unused-imports/no-unused-vars":"off",...t}}]}async function ce(e={}){let{files:r=[b],overrides:t={}}=e,n=await o(import("@next/eslint-plugin-next"));return[{files:r,name:"ncontiero/nextjs/rules",plugins:{nextjs:n},rules:{"nextjs/google-font-display":["warn"],"nextjs/google-font-preconnect":["warn"],"nextjs/inline-script-id":["error"],"nextjs/next-script-for-ga":["warn"],"nextjs/no-assign-module-variable":["error"],"nextjs/no-async-client-component":"warn","nextjs/no-before-interactive-script-outside-document":["warn"],"nextjs/no-css-tags":["warn"],"nextjs/no-document-import-in-page":["error"],"nextjs/no-duplicate-head":["error"],"nextjs/no-head-element":["warn"],"nextjs/no-head-import-in-document":["error"],"nextjs/no-html-link-for-pages":["warn"],"nextjs/no-img-element":["warn"],"nextjs/no-page-custom-font":["warn"],"nextjs/no-script-component-in-head":["error"],"nextjs/no-styled-jsx-in-document":["warn"],"nextjs/no-sync-scripts":["warn"],"nextjs/no-title-in-document-head":["warn"],"nextjs/no-typos":["warn"],"nextjs/no-unwanted-polyfillio":["warn"],...t}}]}function le(){return[{name:"ncontiero/node/rules",plugins:{node:q},rules:{"node/handle-callback-err":["error","^(err|error)$"],"node/no-deprecated-api":"error","node/no-exports-assign":"error","node/no-new-require":"error","node/no-path-concat":"error","node/no-unsupported-features/es-builtins":"error","node/no-unsupported-features/es-syntax":"error","node/no-unsupported-features/node-builtins":"error","node/prefer-global/console":["error","always"],"node/prefer-global/process":["error","always"],"node/prefer-global/url":["error","always"],"node/prefer-global/url-search-params":["error","always"],"node/process-exit-as-throw":"error"}}]}function me(){return[{name:"ncontiero/perfectionist/rules",plugins:{perfectionist:J},rules:{"perfectionist/sort-exports":["warn",{type:"natural"}],"perfectionist/sort-imports":["warn",{customGroups:{type:{react:["^react$","^react-(?!.*.css$).+"]},value:{react:["^react$","^react-(?!.*.css$).+"]}},groups:["side-effect-style","style","type","internal-type",["parent-type","sibling-type","index-type"],"builtin","react","external","internal",["parent","sibling","index"],"object","unknown"],internalPattern:["^[~@#]/.*"],newlinesBetween:"ignore",type:"natural"}],"perfectionist/sort-named-exports":["warn",{groupKind:"types-first"}],"perfectionist/sort-named-imports":["warn",{groupKind:"types-first"}]}}]}async function ue(e={}){return[{name:"ncontiero/prettier/setup",plugins:{prettier:await o(import("eslint-plugin-prettier"))}},{files:[l],name:"ncontiero/prettier/disables",rules:{"antfu/consistent-list-newline":"off","arrow-body-style":"off",curly:"off","no-unexpected-multiline":"off","prefer-arrow-callback":"off","unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}},{files:[l],name:"ncontiero/prettier/rules",rules:{"prettier/prettier":["warn",e]}}]}async function fe(){return[{...(await o(import("eslint-plugin-promise"))).configs["flat/recommended"],name:"ncontiero/promise/setup"},{name:"ncontiero/promise/rules",rules:{"promise/always-return":["error",{ignoreLastCallback:!0}],"promise/no-multiple-resolved":"warn"}}]}import{isPackageExists as _}from"local-pkg";var Ee=["vite"],Ae=["@react-router/node","@react-router/react","@react-router/serve","@react-router/dev"],Ne=["next"];async function de(e={}){let{files:r=[b],overrides:t={},reactQuery:n,typescript:s}=e;n&&ne(["@tanstack/eslint-plugin-query"]);let[a,p,u,S]=await Promise.all([o(import("eslint-plugin-jsx-a11y")),o(import("eslint-plugin-react")),o(import("eslint-plugin-react-hooks")),o(import("eslint-plugin-react-refresh"))]),g=Ee.some(c=>_(c)),x=Ae.some(c=>_(c)),v=Ne.some(c=>_(c));return[{files:r,name:"ncontiero/react/setup",plugins:{"jsx-a11y":a,react:p,"react-hooks":u,"react-refresh":S},settings:{react:{version:"detect"}}},n?{...(await o(import("@tanstack/eslint-plugin-query"))).configs["flat/recommended"][0],name:"ncontiero/tanstack-query"}:{},{files:r,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"ncontiero/react/rules",rules:{"react-hooks/component-hook-factories":"warn","react-hooks/error-boundaries":"warn","react-hooks/exhaustive-deps":"warn","react-hooks/globals":"warn","react-hooks/immutability":"warn","react-hooks/incompatible-library":"warn","react-hooks/preserve-manual-memoization":"warn","react-hooks/purity":"warn","react-hooks/refs":"warn","react-hooks/rules-of-hooks":"error","react-hooks/set-state-in-effect":"warn","react-hooks/set-state-in-render":"warn","react-hooks/static-components":"warn","react-hooks/unsupported-syntax":"warn","react-hooks/use-memo":"warn","react-refresh/only-export-components":["warn",{allowConstantExport:g,allowExportNames:[...v?["experimental_ppr","dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...x?["meta","links","headers","loader","action","clientLoader","clientAction","handle","shouldRevalidate"]:[]]}],"react/boolean-prop-naming":["off",{rule:"^(is|has|are|can|should|did|will)[A-Z]([A-Za-z0-9])+",validateNested:!0}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/display-name":["error",{ignoreTranspilerName:!1}],"react/hook-use-state":["error"],"react/iframe-missing-sandbox":["error"],"react/jsx-boolean-value":["error","never"],"react/jsx-filename-extension":["warn",{extensions:[".tsx"]}],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["error",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-key":["error",{checkFragmentShorthand:!0,checkKeyMustBeforeSpread:!0,warnOnDuplicates:!0}],"react/jsx-no-bind":["error",{allowArrowFunctions:!0}],"react/jsx-no-comment-textnodes":"error","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":["error"],"react/jsx-no-leaked-render":["error"],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{forms:!0,links:!0,warnOnSpreadAttributes:!0}],"react/jsx-no-undef":"error","react/jsx-no-useless-fragment":"error","react/jsx-uses-react":"error","react/jsx-uses-vars":"error","react/no-access-state-in-setstate":"error","react/no-array-index-key":"error","react/no-arrow-function-lifecycle":"error","react/no-children-prop":"error","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":"error","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"error","react/no-find-dom-node":"error","react/no-invalid-html-attribute":"error","react/no-is-mounted":"error","react/no-namespace":"error","react/no-object-type-as-default-prop":"error","react/no-redundant-should-component-update":"error","react/no-render-return-value":"error","react/no-string-refs":["error",{noTemplateLiterals:!0}],"react/no-this-in-sfc":["error"],"react/no-typos":["error"],"react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unstable-nested-components":["error"],"react/no-unused-class-component-methods":["error"],"react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":["error"],"react/no-will-update-set-state":["error"],"react/prefer-es6-class":["error","always"],"react/prefer-exact-props":["error"],"react/prefer-read-only-props":["error"],"react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":["error",{customValidators:[],ignore:[],skipUndeclared:!1}],"react/react-in-jsx-scope":"off","react/require-render-return":"error","react/self-closing-comp":["error",{component:!0,html:!0}],"react/sort-default-props":["error"],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","property assignment"],"react/style-prop-object":["error",{allow:["FormattedNumber"]}],"react/void-dom-elements-no-children":["error"],...s?{"react/jsx-no-undef":"off","react/prop-types":"off"}:{},"jsx-a11y/alt-text":["warn",{area:[],elements:["img","object","area",'input[type="image"]'],img:[],'input[type="image"]':[],object:[]}],"jsx-a11y/anchor-has-content":["warn",{components:[]}],"jsx-a11y/anchor-is-valid":["warn",{aspects:["noHref","invalidHref","preferButton"],components:["Link"],specialLink:["to"]}],"jsx-a11y/aria-activedescendant-has-tabindex":["warn"],"jsx-a11y/aria-props":["warn"],"jsx-a11y/aria-proptypes":["warn"],"jsx-a11y/aria-role":["warn",{ignoreNonDOM:!1}],"jsx-a11y/aria-unsupported-elements":["warn"],"jsx-a11y/autocomplete-valid":["off",{inputComponents:[]}],"jsx-a11y/click-events-have-key-events":["warn"],"jsx-a11y/control-has-associated-label":["warn",{controlComponents:[],depth:5,ignoreElements:["audio","canvas","embed","input","textarea","tr","video"],ignoreRoles:["grid","listbox","menu","menubar","radiogroup","row","tablist","toolbar","tree","treegrid"],labelAttributes:["label"]}],"jsx-a11y/heading-has-content":["warn",{components:[""]}],"jsx-a11y/html-has-lang":["warn"],"jsx-a11y/iframe-has-title":["warn"],"jsx-a11y/img-redundant-alt":["warn"],"jsx-a11y/interactive-supports-focus":["warn"],"jsx-a11y/label-has-associated-control":"warn","jsx-a11y/lang":["warn"],"jsx-a11y/media-has-caption":["warn",{audio:[],track:[],video:[]}],"jsx-a11y/mouse-events-have-key-events":["warn"],"jsx-a11y/no-access-key":["warn"],"jsx-a11y/no-autofocus":["warn",{ignoreNonDOM:!0}],"jsx-a11y/no-distracting-elements":["warn",{elements:["marquee","blink"]}],"jsx-a11y/no-interactive-element-to-noninteractive-role":["warn",{tr:["none","presentation"]}],"jsx-a11y/no-noninteractive-element-interactions":["warn",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/no-noninteractive-element-to-interactive-role":["warn",{li:["menuitem","option","row","tab","treeitem"],ol:["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"],table:["grid"],td:["gridcell"],ul:["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"]}],"jsx-a11y/no-noninteractive-tabindex":["warn",{roles:["tabpanel"],tags:[]}],"jsx-a11y/no-redundant-roles":["warn"],"jsx-a11y/no-static-element-interactions":["off",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/role-has-required-aria-props":["warn"],"jsx-a11y/role-supports-aria-props":["warn"],"jsx-a11y/scope":["warn"],"jsx-a11y/tabindex-no-positive":["warn"],...t}}]}import{configs as Me}from"eslint-plugin-regexp";function ye(e={}){let r=Me["flat/recommended"],t={...r.rules,...e.overrides};return[{...r,name:"ncontiero/regexp/rules",rules:t}]}function ge(){return[{files:["**/package.json"],name:"ncontiero/sort/package-json",rules:{"jsonc/sort-array-values":["error",{order:{type:"asc"},pathPattern:"^files$"}],"jsonc/sort-keys":["error",{order:["publisher","name","displayName","type","version","private","packageManager","description","author","contributors","license","funding","homepage","repository","bugs","keywords","categories","sideEffects","imports","exports","main","module","unpkg","jsdelivr","browser","types","typesVersions","bin","icon","files","directories","publishConfig","scripts","peerDependencies","peerDependenciesMeta","optionalDependencies","dependencies","devDependencies","engines","prisma","config","pnpm","overrides","resolutions","husky","lint-staged","eslintConfig","prettier"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"},{order:["types","require","import","default"],pathPattern:"^exports.*$"},{order:{type:"asc"},pathPattern:"^(?:resolutions|overrides|pnpm.overrides)$"},{order:{type:"asc"},pathPattern:"^workspaces\\.catalog$"},{order:{type:"asc"},pathPattern:"^workspaces\\.catalogs\\.[^.]+$"}]}}]}function xe(){return[{files:["**/[jt]sconfig.json","**/[jt]sconfig.*.json"],name:"ncontiero/sort/tsconfig",rules:{"jsonc/sort-keys":["error",{order:["extends","compilerOptions","references","files","include","exclude"],pathPattern:"^$"},{order:["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","jsx","jsxFactory","jsxFragmentFactory","jsxImportSource","lib","moduleDetection","noLib","reactNamespace","useDefineForClassFields","emitDecoratorMetadata","experimentalDecorators","libReplacement","baseUrl","rootDir","rootDirs","customConditions","module","moduleResolution","moduleSuffixes","noResolve","paths","resolveJsonModule","resolvePackageJsonExports","resolvePackageJsonImports","typeRoots","types","allowArbitraryExtensions","allowImportingTsExtensions","allowUmdGlobalAccess","allowJs","checkJs","maxNodeModuleJsDepth","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","declaration","declarationDir","declarationMap","downlevelIteration","emitBOM","emitDeclarationOnly","importHelpers","importsNotUsedAsValues","inlineSourceMap","inlineSources","isolatedDeclarations","mapRoot","newLine","noEmit","noEmitHelpers","noEmitOnError","outDir","outFile","preserveConstEnums","preserveValueImports","removeComments","sourceMap","sourceRoot","stripInternal","allowSyntheticDefaultImports","esModuleInterop","forceConsistentCasingInFileNames","isolatedModules","preserveSymlinks","verbatimModuleSyntax","erasableSyntaxOnly","skipDefaultLibCheck","skipLibCheck"],pathPattern:"^compilerOptions$"}]}}]}import C from"path";async function we(e={}){let{overrides:r={}}=e,t=p=>C.isAbsolute(p)?p:C.resolve(process.cwd(),p),n=t(e.cssGlobalPath??C.join("src","app","globals.css")),s=t(e.configPath??C.join("tailwind.config.ts"));return[{name:"ncontiero/tailwindcss/setup",plugins:{"better-tailwindcss":await o(import("eslint-plugin-better-tailwindcss"))},settings:{"better-tailwindcss":{entryPoint:n,tailwindConfig:s}}},{files:Y,name:"ncontiero/tailwindcss/rules",rules:{"better-tailwindcss/enforce-consistent-class-order":"warn","better-tailwindcss/enforce-consistent-important-position":"warn","better-tailwindcss/enforce-consistent-line-wrapping":["warn",{group:"never",preferSingleLine:!0,printWidth:120}],"better-tailwindcss/enforce-consistent-variable-syntax":"error","better-tailwindcss/enforce-shorthand-classes":"warn","better-tailwindcss/no-conflicting-classes":"error","better-tailwindcss/no-deprecated-classes":"error","better-tailwindcss/no-duplicate-classes":"error","better-tailwindcss/no-restricted-classes":"error","better-tailwindcss/no-unknown-classes":"warn","better-tailwindcss/no-unnecessary-whitespace":"warn",...r}}]}async function Oe(e={}){let{files:r=[Q],overrides:t={},style:n=!0}=e,{indent:s=2}=typeof n=="boolean"?{}:n,[a,p]=await Promise.all([o(import("eslint-plugin-toml")),o(import("toml-eslint-parser"))]);return[{name:"ncontiero/toml/setup",plugins:{toml:a}},{files:r,languageOptions:{parser:p},name:"ncontiero/toml/rules",rules:{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"off","toml/comma-style":"error","toml/indent":["error",s],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error","unicorn/filename-case":"off",...t}}]}async function be(e={}){let{files:r=[d,O],overrides:t={},parserOptions:n={}}=e,[s,a]=await Promise.all([o(import("@typescript-eslint/eslint-plugin")),o(import("@typescript-eslint/parser"))]);return[{name:"ncontiero/typescript/setup",plugins:{"@typescript-eslint":s}},{files:r,languageOptions:{parser:a,parserOptions:{sourceType:"module",...n}},name:"ncontiero/typescript/parser"},{files:r,name:"ncontiero/typescript/rules",rules:{...s.configs["eslint-recommended"].overrides[0].rules,...s.configs.recommended.rules,"@typescript-eslint/ban-ts-comment":["error",{"ts-ignore":"allow-with-description"}],"@typescript-eslint/consistent-type-assertions":["error",{assertionStyle:"as",objectLiteralTypeAssertions:"allow-as-parameter"}],"@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"inline-type-imports"}],"@typescript-eslint/method-signature-style":["error","property"],"@typescript-eslint/no-empty-object-type":["error",{allowInterfaces:"always"}],"@typescript-eslint/no-explicit-any":"off","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-non-null-assertion":"off","@typescript-eslint/no-redeclare":"error","@typescript-eslint/no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!1,allowTernary:!0,enforceForJSX:!0}],"@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-useless-constructor":"error","@typescript-eslint/no-wrapper-object-types":"error","@typescript-eslint/prefer-as-const":"warn","@typescript-eslint/prefer-literal-enum-member":["error",{allowBitwiseExpressions:!0}],"no-restricted-syntax":["error",...k,"TSEnumDeclaration[const=true]"],...t}},{files:["**/*.d.ts"],name:"ncontiero/typescript/dts-rules",rules:{"eslint-comments/no-unlimited-disable":"off","import/no-duplicates":"off","no-restricted-syntax":["error",...k],"unused-imports/no-unused-vars":"off"}},{files:[F,"**/*.cjs"],name:"ncontiero/typescript/cjs-rules",rules:{"@typescript-eslint/no-require-imports":"off"}}]}function he(e={}){let{allRecommended:r,overrides:t={},regexp:n=!1}=e;return[{name:"ncontiero/unicorn/rules",plugins:{unicorn:P},rules:{...r?P.configs.recommended.rules:{"unicorn/better-regex":n?"off":"error","unicorn/catch-error-name":"error","unicorn/consistent-date-clone":"error","unicorn/consistent-empty-array-spread":"error","unicorn/consistent-existence-index-check":"error","unicorn/consistent-function-scoping":"error","unicorn/custom-error-definition":"error","unicorn/error-message":"error","unicorn/escape-case":"error","unicorn/explicit-length-check":"error","unicorn/new-for-builtins":"error","unicorn/no-array-callback-reference":"error","unicorn/no-array-method-this-argument":"error","unicorn/no-await-in-promise-methods":"error","unicorn/no-console-spaces":"error","unicorn/no-for-loop":"error","unicorn/no-hex-escape":"error","unicorn/no-instanceof-builtins":"error","unicorn/no-invalid-remove-event-listener":"error","unicorn/no-lonely-if":"error","unicorn/no-negation-in-equality-check":"error","unicorn/no-new-array":"error","unicorn/no-new-buffer":"error","unicorn/no-single-promise-in-promise-methods":"error","unicorn/no-static-only-class":"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-zero-fractions":"error","unicorn/number-literal-case":"error","unicorn/prefer-add-event-listener":"error","unicorn/prefer-array-find":"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-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-includes":"error","unicorn/prefer-keyboard-event-key":"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-negative-index":"error","unicorn/prefer-node-protocol":"error","unicorn/prefer-number-properties":"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-single-call":"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-type-error":"error","unicorn/throw-new-error":"error"},...t}}]}async function ve(e={}){let{files:r=[R],overrides:t={},style:n=!0}=e,{indent:s=2,quotes:a="double"}=typeof n=="boolean"?{}:n,[p,u]=await Promise.all([o(import("eslint-plugin-yml")),o(import("yaml-eslint-parser"))]);return[{name:"ncontiero/yml/setup",plugins:{yml:p}},{files:r,languageOptions:{parser:u},name:"ncontiero/yml/rules",rules:{"yml/block-mapping":"error","yml/block-mapping-question-indicator-newline":"error","yml/block-sequence":"error","yml/block-sequence-hyphen-indicator-newline":"error","yml/flow-mapping-curly-newline":"error","yml/flow-mapping-curly-spacing":"error","yml/flow-sequence-bracket-newline":"error","yml/flow-sequence-bracket-spacing":"error","yml/indent":["error",s],"yml/key-spacing":"error","yml/no-empty-document":"error","yml/no-empty-key":"error","yml/no-empty-sequence-entry":"error","yml/no-irregular-whitespace":"error","yml/no-tab-indent":"error","yml/plain-scalar":"error","yml/quotes":["error",{avoidEscape:!1,prefer:a}],"yml/spaced-comment":"error","yml/vue-custom-block/no-parsing-error":"error",...t}},{files:["pnpm-workspace.yaml"],name:"ncontiero/yml/pnpm-workspace",rules:{"yml/sort-keys":["error",{order:["packages","overrides","patchedDependencies","hoistPattern","catalog","catalogs","allowedDeprecatedVersions","allowNonAppliedPatches","allowUnusedPatches","configDependencies","ignoredBuiltDependencies","ignoredOptionalDependencies","ignorePatchFailures","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","packageExtensions","peerDependencyRules","supportedArchitectures"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:".*"}]}}]}import{isPackageExists as h}from"local-pkg";var je=!!((process.env.VSCODE_PID||process.env.VSCODE_CWD||process.env.NVIM||process.env.JETBRAINS_IDE||process.env.VIM)&&!process.env.CI),ke=h("typescript"),Ce=h("react"),Se=h("next"),Ie=h("tailwindcss"),Pe=h("@tanstack/react-query");var qe=["name","languageOptions","linterOptions","processor","plugins","rules","settings"];function B(e,r){return typeof e[r]=="boolean"?{}:e[r]||{}}function m(e,r){let t=B(e,r);return{...("overrides"in e?e.overrides:{})?.[r],..."overrides"in t?t.overrides:{}}}function Je(e){return"tabWidth"in e||"singleQuote"in e||"semi"in e?{indent:e.tabWidth||2,quotes:e.singleQuote?"single":"double",semi:e.semi??!0}:!1}function Ko(e={},...r){let{gitignore:t=!0,isInEditor:n=je,nextjs:s=Se,react:a=Ce,reactQuery:p=Pe,regexp:u=!0,tailwindcss:S=Ie,typescript:g=ke,unicorn:x=!0}=e,v=typeof e.prettier=="object"?e.prettier:{},c=Je(v),i=[];if(t&&(typeof t!="boolean"?i.push(o(import("eslint-config-flat-gitignore")).then(f=>[f({name:"ncontiero/gitignore",...t})])):i.push(o(import("eslint-config-flat-gitignore")).then(f=>[f({name:"ncontiero/gitignore",strict:!1})]))),g||(e.ignores?e.ignores.push(d,O):e.ignores=[d,O]),i.push(Z(e.ignores),re({overrides:m(e,"javascript")}),K(),ie(),ee({nextJs:!!s}),le(),fe(),E(),me(),$()),x&&i.push(he(x===!0?{regexp:!!u}:x)),g&&i.push(be({...B(e,"typescript"),overrides:m(e,"typescript")})),(e.jsonc??!0)&&i.push(ae({overrides:m(e,"jsonc"),style:c}),ge(),xe()),(e.yaml??!0)&&i.push(ve({overrides:m(e,"yaml"),style:c})),(e.toml??!0)&&i.push(Oe({overrides:m(e,"toml"),style:c})),(e.markdown??!0)&&i.push(pe({overrides:m(e,"markdown")})),u&&i.push(ye(typeof u=="boolean"?{}:u)),a&&i.push(de({overrides:m(e,"react"),reactQuery:!!p,typescript:!!g})),s&&i.push(ce({overrides:m(e,"nextjs")})),S&&i.push(we({isInEditor:n,...B(e,"tailwindcss"),overrides:m(e,"tailwindcss")})),(e.prettier??!0)&&i.push(ue(v)),"files"in e)throw new Error('[@ncontiero/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');let G=qe.reduce((f,I)=>(I in e&&(f[I]=e[I]),f),{});return Object.keys(G).length>0&&i.push([G]),se(...i,...r)}export{cr as GLOB_ALL_SRC,sr as GLOB_CSS,Re as GLOB_DIST,z as GLOB_EXCLUDE,V as GLOB_HTML,F as GLOB_JS,T as GLOB_JSON,L as GLOB_JSON5,H as GLOB_JSONC,nr as GLOB_JSX,ar as GLOB_LESS,De as GLOB_LOCKFILE,y as GLOB_MARKDOWN,X as GLOB_MARKDOWN_CODE,W as GLOB_MARKDOWN_IN_MARKDOWN,Le as GLOB_NODE_MODULES,ir as GLOB_POSTCSS,b as GLOB_REACT,pr as GLOB_SCSS,l as GLOB_SRC,w as GLOB_SRC_EXT,Te as GLOB_STYLE,Y as GLOB_TAILWINDCSS,Q as GLOB_TOML,d as GLOB_TS,O as GLOB_TSX,R as GLOB_YAML,hr as combine,E as command,K as comments,se as composer,$ as deMorgan,ne as ensurePackages,m as getOverrides,Se as hasNextJs,Ce as hasReact,Ie as hasTailwind,Pe as hasTanStackReactQuery,ke as hasTypeScript,Z as ignores,ee as imports,o as interopDefault,je as isInEditorEnv,re as javascript,ie as jsdoc,ae as jsonc,pe as markdown,Ko as ncontiero,ce as nextJs,le as node,te as parserPlain,me as perfectionist,ue as prettier,fe as promise,de as react,ye as regexp,B as resolveSubOptions,k as restrictedSyntaxJs,ge as sortPackageJson,xe as sortTsconfig,we as tailwindcss,vr as toArray,Oe as toml,be as typescript,he as unicorn,ve as yml};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ncontiero/eslint-config",
3
3
  "type": "module",
4
- "version": "6.3.0-beta.7",
4
+ "version": "6.3.0-beta.8",
5
5
  "packageManager": "pnpm@10.18.0",
6
6
  "description": "Nicolas's ESLint config.",
7
7
  "author": {