@anolilab/eslint-config 17.0.1 → 17.0.2
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.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +4 -1
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## @anolilab/eslint-config [17.0.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@17.0.1...@anolilab/eslint-config@17.0.2) (2025-12-11)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* enhance pnpm support in ESLint configuration ([fba4049](https://github.com/anolilab/javascript-style-guide/commit/fba404919a8516e3abfb79c86d3d118ac039eedf))
|
|
6
|
+
|
|
1
7
|
## @anolilab/eslint-config [17.0.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@17.0.0...@anolilab/eslint-config@17.0.1) (2025-12-11)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/dist/index.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";var je=Object.create;var ee=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var ke=Object.getOwnPropertyNames;var Pe=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty;var v=(e,r)=>ee(e,"name",{value:r,configurable:!0});var Oe=(e,r,o,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of ke(r))!Ce.call(e,t)&&t!==o&&ee(e,t,{get:()=>r[t],enumerable:!(s=ve(r,t))||s.enumerable});return e};var i=(e,r,o)=>(o=e!=null?je(Pe(e)):{},Oe(r||!e||!e.__esModule?ee(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const fe=require("node:path"),g=require("@visulima/package"),De=require("eslint-flat-config-utils"),Q=require("semver"),n=require("./packem_shared/getFilesGlobs-DUUiSUKd.cjs"),de=require("@visulima/tsconfig"),_e=require("globals"),pe=require("eslint-merge-processors"),Se=require("@visulima/fs"),Fe=require("@visulima/fs/yaml"),ue=require("@eslint/compat"),Ee=require("eslint-plugin-regexp"),qe=require("node:url"),Ae=require("confusing-browser-globals");var re=typeof document<"u"?document.currentScript:null;const me=v(e=>e&&typeof e=="object"&&"default"in e?e.default:e,"_interopDefaultCompat"),B=me(_e),Ie=me(Ae),G={"dot-notation":"off","no-empty-function":"off","no-implied-eval":"off","no-loop-func":"off","no-magic-numbers":"off","no-new-func":"off","no-redeclare":"off","no-return-await":"off","no-throw-literal":"off","no-unused-expressions":"off",strict:"off"},Te=n.createConfig("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/best-practices/rules",rules:{"accessor-pairs":"off","array-callback-return":["error",{allowImplicit:!0}],"block-scoped-var":"error","class-methods-use-this":["error",{exceptMethods:[]}],complexity:["off",11],"consistent-return":"error",curly:["error","multi-line"],"default-case":["error",{commentPattern:"^no default$"}],"default-case-last":"error","default-param-last":"error","dot-location":["error","property"],"dot-notation":["error",{allowKeywords:!0}],eqeqeq:["error","always",{null:"ignore"}],"grouped-accessor-pairs":"error","guard-for-in":"error","max-classes-per-file":["error",1],"no-alert":"error","no-caller":"error","no-case-declarations":"error","no-constructor-return":"error","no-div-regex":"off","no-else-return":["error",{allowElseIf:!1}],"no-empty-function":["error",{allow:["arrowFunctions","functions","methods"]}],"no-empty-pattern":"error","no-empty-static-block":"error","no-eq-null":"off","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-fallthrough":"error","no-floating-decimal":"error","no-global-assign":["error",{exceptions:[]}],"no-implicit-coercion":["off",{allow:[],boolean:!1,number:!0,string:!0}],"no-implicit-globals":"off","no-implied-eval":"error","no-invalid-this":"off","no-iterator":"error","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-loop-func":"error","no-magic-numbers":["off",{detectObjects:!1,enforceConst:!0,ignore:[],ignoreArrayIndexes:!0}],"no-multi-spaces":["error",{ignoreEOLComments:!1}],"no-multi-str":"error","no-native-reassign":"off","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-octal":"error","no-octal-escape":"error","no-param-reassign":["error",{ignorePropertyModificationsFor:["acc","accumulator","e","ctx","context","req","request","res","response","$scope","staticContext"],props:!0}],"no-proto":"error","no-redeclare":"error","no-restricted-properties":["error",{message:"arguments.callee is deprecated",object:"arguments",property:"callee"},{message:"Please use Number.isFinite instead",object:"global",property:"isFinite"},{message:"Please use Number.isFinite instead",object:"self",property:"isFinite"},{message:"Please use Number.isFinite instead",object:"window",property:"isFinite"},{message:"Please use Number.isNaN instead",object:"global",property:"isNaN"},{message:"Please use Number.isNaN instead",object:"self",property:"isNaN"},{message:"Please use Number.isNaN instead",object:"window",property:"isNaN"},{message:"Please use Object.defineProperty instead.",property:"__defineGetter__"},{message:"Please use Object.defineProperty instead.",property:"__defineSetter__"},{message:"Use the exponentiation operator (**) instead.",object:"Math",property:"pow"},{message:"Use `Number.isNaN` instead.",object:"globalThis",property:"isNaN"},{message:"Use `Number.isFinite` instead.",object:"globalThis",property:"isFinite"},{message:"Use `Number.parseFloat` instead.",object:"globalThis",property:"parseFloat"},{message:"Use `Number.parseInt` instead.",object:"globalThis",property:"parseInt"},{message:"Use `Number.parseFloat` instead.",object:"window",property:"parseFloat"},{message:"Use `Number.parseInt` instead.",object:"window",property:"parseInt"},{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:"__proto__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupGetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupSetter__"}],"no-return-assign":["error","always"],"no-return-await":"error","no-script-url":"error","no-self-assign":["error",{props:!0}],"no-self-compare":"error","no-sequences":"error","no-throw-literal":"error","no-unmodified-loop-condition":"off","no-unused-expressions":["error",{allowShortCircuit:!1,allowTaggedTemplates:!1,allowTernary:!1}],"no-unused-labels":"error","no-useless-call":"off","no-useless-catch":"error","no-useless-concat":"error","no-useless-escape":"error","no-useless-return":"error","no-void":"error","no-warning-comments":["off",{location:"start",terms:["todo","fixme","xxx","@todo"]}],"no-with":"error","prefer-named-capture-group":"off","prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"prefer-regex-literals":"off",radix:"error","require-await":"off","require-unicode-regexp":"off","vars-on-top":"error","wrap-iife":["error","outside",{functionPrototypeMethods:!1}],yoda:"error"}},{files:n.getFilesGlobs("ts"),name:"anolilab/best-practices/ts-rules",rules:G}]}),Ne={"for-direction":"error","getter-return":["error",{allowImplicit:!0}],"no-async-promise-executor":"error","no-await-in-loop":"error","no-compare-neg-zero":"error","no-cond-assign":["error","always"],"no-console":"warn","no-constant-condition":"warn","no-control-regex":"off","no-debugger":"error","no-dupe-args":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-func-assign":"error","no-import-assign":"error","no-inner-declarations":"error","no-invalid-regexp":"off","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-negated-in-lhs":"off","no-new-native-nonconstructor":"error","no-obj-calls":"error","no-promise-executor-return":"error","no-prototype-builtins":"error","no-regex-spaces":"off","no-setter-return":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-unexpected-multiline":"error","no-unreachable":"error","no-unreachable-loop":"off","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":["error",{disallowArithmeticOperators:!0}],"no-useless-backreference":"error","require-atomic-updates":"off","use-isnan":"error","valid-jsdoc":"off","valid-typeof":["error",{requireStringLiterals:!0}]},Je=n.createConfig("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/errors/rules",rules:Ne},{files:n.getFilesGlobs("ts"),name:"anolilab/errors/ts-rules",rules:{"getter-return":"off","no-dupe-args":"off","no-dupe-keys":"off","no-extra-parens":"off","no-extra-semi":"off","no-func-assign":"off","no-obj-calls":"off","no-unreachable":"off","no-unsafe-negation":"off","space-infix-ops":"off","valid-typeof":"off"}}]});var Ue=Object.defineProperty,Le=v((e,r)=>Ue(e,"name",{value:r,configurable:!0}),"s$3");const ge=Le(e=>({"arrow-body-style":["error","as-needed",{requireReturnForObjectLiteral:!0}],"arrow-parens":["error","always"],"arrow-spacing":["error",{after:!0,before:!0}],"constructor-super":"error","generator-star-spacing":["error",{after:!0,before:!1}],"no-class-assign":"error","no-confusing-arrow":["error",{allowParens:!0}],"no-const-assign":"error","no-dupe-class-members":"error","no-duplicate-imports":"off","no-new-symbol":"error","no-restricted-exports":["error",{restrictDefaultExports:{defaultFrom:!1,direct:!1,named:!0,namedFrom:!1,namespaceFrom:!0},restrictedNamedExports:["then"]}],"no-restricted-imports":["error",{paths:[{message:"Lodash modularised (and lodash < 4.17.11) have CVE vulnerabilities. Please use tree-shakeable imports like lodash/xxx instead",name:"lodash.isequal"},{message:"Lodash modularised (and lodash < 4.17.11) have CVE vulnerabilities. Please use tree-shakeable imports like lodash/xxx instead",name:"lodash.uniqueId"},{message:"Lodash modularised (and lodash < 4.17.11) have CVE vulnerabilities. Please use tree-shakeable imports like lodash/xxx instead",name:"lodash.mergewith"},{message:"Lodash modularised (and lodash < 4.17.11) have CVE vulnerabilities. Please use tree-shakeable imports like lodash/xxx instead",name:"lodash.pick"},{name:"error"},{name:"domain"},{name:"freelist"},{name:"smalloc"},{name:"punycode"},{name:"sys"},{message:'Is legacy, npm version got deprecated, migrate to URLSearchParams as recommended or try "qs" as a package',name:"querystring"},{message:"Please use one of the following instead: chalk, kleur, ansi-colors, @colors/colors",name:"colors"},{message:"node v10.12 mkdir supports recursive option",name:"mkdirp"},{message:'Please use "@faker-js/faker" as a replacement',name:"faker"},{message:"Please use Object.assign or spread { ...obj }",name:"xtend"},{message:"Please use Object.assign or spread { ...obj }",name:"object-assign"},{message:"Please use Object.assign or spread { ...obj }",name:"extend-shallow"},{message:"node supports recursive option now",name:"rimraf"},{message:'just use "".padStart() and "".padEnd()',name:"pad-left"},{message:'just use "".padStart() and "".padEnd()',name:"pad-right"},{message:'just use "".padStart() and "".padEnd()',name:"left-pad"},{message:'just use "".padStart() and "".padEnd()',name:"right-pad"},{message:'just use "".padStart() and "".padEnd()',name:"pad"},{name:"safe-buffer"},{name:"safer-buffer"},{message:"just use [].flat() or some other polyfill",name:"array-flatten"},{message:"Been deprecated",name:"request"},{message:"use async/await instead",name:"co"},{message:"Please use TextDecoder instead",name:"windows-1252"},{message:"Please use TextDecoder instead",name:"string_decoder"},{message:"Please use array.prototype.flatMap instead",name:"concat-map"},{name:"buffer-alloc"}],patterns:["lodash.*"]}],"no-this-before-super":"error","no-useless-computed-key":"error","no-useless-constructor":"error","no-useless-rename":["error",{ignoreDestructuring:!1,ignoreExport:!1,ignoreImport:!1}],"no-var":"error","object-shorthand":["error","always",{avoidQuotes:!0,ignoreConstructors:!1}],"prefer-arrow-callback":["error",{allowNamedFunctions:!1,allowUnboundThis:!0}],"prefer-const":e?"off":["error",{destructuring:"any",ignoreReadBeforeAssign:!0}],"prefer-destructuring":["error",{AssignmentExpression:{array:!0,object:!1},VariableDeclarator:{array:!1,object:!0}},{enforceForRenamedProperties:!1}],"prefer-numeric-literals":"error","prefer-reflect":"off","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","require-yield":"error","rest-spread-spacing":["error","never"],"sort-imports":["off",{ignoreCase:!1,ignoreDeclarationSort:!1,ignoreMemberSort:!1,memberSyntaxSortOrder:["none","all","multiple","single"]}],"symbol-description":"error","template-curly-spacing":"error","yield-star-spacing":["error","after"]}),"es6Rules"),$e=n.createConfig("all",async(e,r)=>{const{files:o=r,isInEditor:s=!1}=e;return[{files:o,languageOptions:{parserOptions:{ecmaFeatures:{generators:!1,objectLiteralDuplicateProperties:!1},ecmaVersion:6,sourceType:"module"}},name:"anolilab/es6/rules",rules:ge(s)},{files:n.getFilesGlobs("ts"),name:"anolilab/es6/ts-rules",rules:{"constructor-super":"off","no-const-assign":"off","no-dupe-class-members":"off","no-new-symbol":"off","no-this-before-super":"off","no-useless-constructor":"off"}}]});var Re=Object.defineProperty,Me=v((e,r)=>Re(e,"name",{value:r,configurable:!0}),"o$1");const Ge=Me(async(e=[])=>[{ignores:["**/node_modules","**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/bun.lockb","**/.npmignore","**/output","**/coverage","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/.vitepress/cache","**/.nuxt","**/.next","**/.svelte-kit","**/.vercel","**/.changeset","**/.idea","**/.cache","**/.output","**/.vite-inspect","**/.yarn","**/vite.config.*.timestamp-*","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts","{tmp,temp}/**","**/*.min.js","**/dist/**","**/node_modules/**","**/vendor/**","**/.cache/**","**/.vitepress","**/CLAUDE.md","**/.claude","**/AI.md","**/AGENT.md","**/PROMPT.md","**/PROMPTING.md","**/.cursorrules","**/.cursorignore","**/.cursormem.json","**/.cursorhistory","**/copilot.json","**/copilot.config.json","**/copilot.md",...e],name:"anolilab/ignores"}],"ignores");var ze=Object.defineProperty,Ve=v((e,r)=>ze(e,"name",{value:r,configurable:!0}),"a$1");const l=Ve(async e=>{const r=await e;return r.default??r},"interopDefault"),We=n.createConfig("all",async(e,r)=>{const{files:o=r,lessOpinionated:s=!1,overrides:t,packageJson:a}=e,c=await l(import("eslint-plugin-antfu"));return[{files:o,name:"anolilab/antfu",plugins:{antfu:c},rules:{"antfu/consistent-chaining":"error","antfu/consistent-list-newline":"error","antfu/if-newline":"error","antfu/import-dedupe":"error","antfu/no-import-dist":"error","antfu/no-import-node-modules-by-path":"error","antfu/no-ts-export-equal":g.hasPackageJsonAnyDependency(a,["typescript"])?"error":"off","antfu/prefer-inline-type-import":"off","antfu/top-level-function":"off",...s?{curly:["error","all"]}:{"antfu/curly":"error","antfu/if-newline":"error"},...t}}]}),Be=n.createConfig("astro",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,[a,c,p]=await Promise.all([l(import("eslint-plugin-astro")),l(import("astro-eslint-parser")),l(import("@typescript-eslint/parser"))]);return[{name:"anolilab/astro/setup",plugins:{astro:a}},{files:o,languageOptions:{globals:a.environments.astro.globals,parser:c,parserOptions:{extraFileExtensions:[".astro"],parser:p},sourceType:"module"},name:"anolilab/astro/rules",processor:"astro/client-side-ts",rules:{"antfu/no-top-level-await":"off","astro/missing-client-only-directive-value":"error","astro/no-conflict-set-directives":"error","astro/no-deprecated-astro-canonicalurl":"error","astro/no-deprecated-astro-fetchcontent":"error","astro/no-deprecated-astro-resolve":"error","astro/no-deprecated-getentrybyslug":"error","astro/no-set-html-directive":"off","astro/no-unused-define-vars-in-style":"error","astro/semi":"off","astro/valid-compile":"error",...t?{"@stylistic/indent":"off","@stylistic/jsx-closing-tag-location":"off","@stylistic/jsx-one-expression-per-line":"off","@stylistic/no-multiple-empty-lines":"off"}:{},...s}}]}),Xe=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("@eslint-community/eslint-plugin-eslint-comments"));return[{files:o,linterOptions:{reportUnusedDisableDirectives:"error",reportUnusedInlineConfigs:"error"},name:"anolilab/eslint-comments/rules",plugins:{"eslint-comments":t},rules:{"eslint-comments/no-aggregating-enable":"error","eslint-comments/no-duplicate-disable":"error","eslint-comments/no-restricted-disable":"off","eslint-comments/no-unlimited-disable":"off","eslint-comments/no-unused-disable":"error","eslint-comments/no-unused-enable":"error","eslint-comments/no-use":"off","eslint-comments/require-description":"off",...s}}]}),He=n.createConfig("all",async(e,r)=>{const{files:o=r}=e,s=(await l(import("eslint-plugin-compat"))).configs["flat/recommended"];return s.files=o,[s]}),Ke=n.createConfig("css",async(e,r)=>{const{files:o=r,overrides:s,tailwind:t}=e,a=await l(import("@eslint/css"));let c;return t&&(c=await l(import("tailwind-csstree"))),[{files:o,language:"css/css",name:"anolilab/css/setup",plugins:{css:a},rules:{"@stylistic/indent":"off","css/no-duplicate-imports":"error","css/no-empty-blocks":"error","css/no-important":"error","css/no-invalid-at-rules":"error","css/no-invalid-properties":"error","css/use-baseline":"warn","css/use-layers":"error","no-irregular-whitespace":"off",...s},...t&&c?{languageOptions:{customSyntax:c.tailwind4,tolerant:!0}}:{}}]});var Qe=Object.defineProperty,Ye=v((e,r)=>Qe(e,"name",{value:r,configurable:!0}),"r$2");const D={meta:{name:"parser-plain"},parseForESLint:Ye(e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:"Program"},scopeManager:void 0,services:{isPlain:!0},visitorKeys:{Program:[]}}),"parseForESLint")};var Ze=Object.defineProperty,er=v((e,r)=>Ze(e,"name",{value:r,configurable:!0}),"l");const P=0,rr=er(async e=>{const{indent:r,jsx:o,overrides:s={},prettier:t,quotes:a,semi:c}={...ye,...e},p=await l(import("@stylistic/eslint-plugin")),u=p.configs.customize({indent:r,jsx:o,pluginName:"@stylistic",quotes:t?void 0:a,semi:t?!1:c});return[{name:"anolilab/stylistic/rules",plugins:{"@stylistic":p},rules:{...u.rules,"@stylistic/arrow-parens":"off","@stylistic/block-spacing":["error","always"],"@stylistic/brace-style":["error","1tbs",{allowSingleLine:!0}],"@stylistic/comma-dangle":["error",{arrays:"always-multiline",enums:"always-multiline",exports:"always-multiline",functions:"always-multiline",generics:"always-multiline",imports:"always-multiline",objects:"always-multiline",tuples:"always-multiline"}],"@stylistic/comma-spacing":["error",{after:!0,before:!1}],"@stylistic/function-call-spacing":["error","never"],"@stylistic/generator-star-spacing":["error",{after:!0,before:!1}],"@stylistic/indent":["error",r,{ArrayExpression:1,CallExpression:{arguments:1},flatTernaryExpressions:!1,FunctionDeclaration:{body:1,parameters:1},FunctionExpression:{body:1,parameters:1},ignoreComments:!1,ignoredNodes:["JSXElement","JSXElement > *","JSXAttribute","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXSpreadAttribute","JSXExpressionContainer","JSXOpeningElement","JSXClosingElement","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXText","JSXEmptyExpression","JSXSpreadChild"],ImportDeclaration:1,ObjectExpression:1,outerIIFEBody:1,SwitchCase:1,VariableDeclarator:1}],"@stylistic/key-spacing":["error",{afterColon:!0,beforeColon:!1}],"@stylistic/keyword-spacing":["error",{after:!0,before:!0,overrides:{case:{after:!0},return:{after:!0},throw:{after:!0}}}],"@stylistic/lines-around-comment":"off","@stylistic/lines-between-class-members":["error","always",{exceptAfterSingleLine:!1}],"@stylistic/member-delimiter-style":"error","@stylistic/no-extra-parens":["error","all",{conditionalAssign:!0,ignoreJSX:"all",nestedBinaryExpressions:!1,returnAssign:!1}],"@stylistic/no-extra-semi":"error","@stylistic/padding-line-between-statements":["error",{blankLine:"always",next:"*",prev:"directive"},{blankLine:"never",next:"directive",prev:"directive"},{blankLine:"always",next:"*",prev:["const","let","var"]},{blankLine:"any",next:["const","let","var"],prev:["const","let","var"]},{blankLine:"always",next:"return",prev:"*"},{blankLine:"always",next:["for","function","if","switch","try"],prev:"*"},{blankLine:"always",next:"*",prev:["for","function","if","switch","try"]}],"@stylistic/quote-props":["error","as-needed",{keywords:!1,numbers:!1,unnecessary:!0}],"@stylistic/space-before-blocks":"error","@stylistic/space-before-function-paren":["error",{anonymous:"always",asyncArrow:"always",named:"never"}],"@stylistic/space-infix-ops":"error","@stylistic/type-annotation-spacing":"error","@stylistic/yield-star-spacing":["error",{after:!0,before:!1}],...s,...t?{"@stylistic/array-bracket-newline":"off","@stylistic/array-bracket-spacing":"off","@stylistic/array-element-newline":"off","@stylistic/arrow-parens":"off","@stylistic/arrow-spacing":"off","@stylistic/block-spacing":"off","@stylistic/brace-style":"off","@stylistic/comma-dangle":"off","@stylistic/comma-spacing":"off","@stylistic/comma-style":"off","@stylistic/computed-property-spacing":"off","@stylistic/dot-location":"off","@stylistic/eol-last":"off","@stylistic/function-call-argument-newline":"off","@stylistic/function-call-spacing":"off","@stylistic/function-paren-newline":"off","@stylistic/generator-star-spacing":"off","@stylistic/implicit-arrow-linebreak":"off","@stylistic/indent":"off","@stylistic/indent-binary-ops":"off","@stylistic/js/array-bracket-newline":"off","@stylistic/js/array-bracket-spacing":"off","@stylistic/js/array-element-newline":"off","@stylistic/js/arrow-parens":"off","@stylistic/js/arrow-spacing":"off","@stylistic/js/block-spacing":"off","@stylistic/js/brace-style":"off","@stylistic/js/comma-dangle":"off","@stylistic/js/comma-spacing":"off","@stylistic/js/comma-style":"off","@stylistic/js/computed-property-spacing":"off","@stylistic/js/dot-location":"off","@stylistic/js/eol-last":"off","@stylistic/js/function-call-argument-newline":"off","@stylistic/js/function-call-spacing":"off","@stylistic/js/function-paren-newline":"off","@stylistic/js/generator-star-spacing":"off","@stylistic/js/implicit-arrow-linebreak":"off","@stylistic/js/indent":"off","@stylistic/js/jsx-quotes":"off","@stylistic/js/key-spacing":"off","@stylistic/js/keyword-spacing":"off","@stylistic/js/linebreak-style":"off","@stylistic/js/lines-around-comment":P,"@stylistic/js/max-len":P,"@stylistic/js/max-statements-per-line":"off","@stylistic/js/multiline-ternary":"off","@stylistic/js/new-parens":"off","@stylistic/js/newline-per-chained-call":"off","@stylistic/js/no-confusing-arrow":P,"@stylistic/js/no-extra-parens":"off","@stylistic/js/no-extra-semi":"off","@stylistic/js/no-floating-decimal":"off","@stylistic/js/no-mixed-operators":P,"@stylistic/js/no-mixed-spaces-and-tabs":"off","@stylistic/js/no-multi-spaces":"off","@stylistic/js/no-multiple-empty-lines":"off","@stylistic/js/no-tabs":P,"@stylistic/js/no-trailing-spaces":"off","@stylistic/js/no-whitespace-before-property":"off","@stylistic/js/nonblock-statement-body-position":"off","@stylistic/js/object-curly-newline":"off","@stylistic/js/object-curly-spacing":"off","@stylistic/js/object-property-newline":"off","@stylistic/js/one-var-declaration-per-line":"off","@stylistic/js/operator-linebreak":"off","@stylistic/js/padded-blocks":"off","@stylistic/js/quote-props":"off","@stylistic/js/quotes":P,"@stylistic/js/rest-spread-spacing":"off","@stylistic/js/semi":"off","@stylistic/js/semi-spacing":"off","@stylistic/js/semi-style":"off","@stylistic/js/space-before-blocks":"off","@stylistic/js/space-before-function-paren":"off","@stylistic/js/space-in-parens":"off","@stylistic/js/space-infix-ops":"off","@stylistic/js/space-unary-ops":"off","@stylistic/js/switch-colon-spacing":"off","@stylistic/js/template-curly-spacing":"off","@stylistic/js/template-tag-spacing":"off","@stylistic/js/wrap-iife":"off","@stylistic/js/wrap-regex":"off","@stylistic/js/yield-star-spacing":"off","@stylistic/jsx-child-element-spacing":"off","@stylistic/jsx-closing-bracket-location":"off","@stylistic/jsx-closing-tag-location":"off","@stylistic/jsx-curly-newline":"off","@stylistic/jsx-curly-spacing":"off","@stylistic/jsx-equals-spacing":"off","@stylistic/jsx-first-prop-new-line":"off","@stylistic/jsx-indent":"off","@stylistic/jsx-indent-props":"off","@stylistic/jsx-max-props-per-line":"off","@stylistic/jsx-newline":"off","@stylistic/jsx-one-expression-per-line":"off","@stylistic/jsx-props-no-multi-spaces":"off","@stylistic/jsx-quotes":"off","@stylistic/jsx-tag-spacing":"off","@stylistic/jsx-wrap-multilines":"off","@stylistic/jsx/jsx-child-element-spacing":"off","@stylistic/jsx/jsx-closing-bracket-location":"off","@stylistic/jsx/jsx-closing-tag-location":"off","@stylistic/jsx/jsx-curly-newline":"off","@stylistic/jsx/jsx-curly-spacing":"off","@stylistic/jsx/jsx-equals-spacing":"off","@stylistic/jsx/jsx-first-prop-new-line":"off","@stylistic/jsx/jsx-indent":"off","@stylistic/jsx/jsx-indent-props":"off","@stylistic/jsx/jsx-max-props-per-line":"off","@stylistic/key-spacing":"off","@stylistic/keyword-spacing":"off","@stylistic/linebreak-style":"off","@stylistic/lines-around-comment":P,"@stylistic/max-len":P,"@stylistic/max-statements-per-line":"off","@stylistic/member-delimiter-style":"off","@stylistic/multiline-ternary":"off","@stylistic/new-parens":"off","@stylistic/newline-per-chained-call":"off","@stylistic/no-confusing-arrow":P,"@stylistic/no-extra-parens":"off","@stylistic/no-extra-semi":"off","@stylistic/no-floating-decimal":"off","@stylistic/no-mixed-operators":P,"@stylistic/no-mixed-spaces-and-tabs":"off","@stylistic/no-multi-spaces":"off","@stylistic/no-multiple-empty-lines":"off","@stylistic/no-tabs":P,"@stylistic/no-trailing-spaces":"off","@stylistic/no-whitespace-before-property":"off","@stylistic/nonblock-statement-body-position":"off","@stylistic/object-curly-newline":"off","@stylistic/object-curly-spacing":"off","@stylistic/object-property-newline":"off","@stylistic/one-var-declaration-per-line":"off","@stylistic/operator-linebreak":"off","@stylistic/padded-blocks":"off","@stylistic/quote-props":"off","@stylistic/quotes":P,"@stylistic/rest-spread-spacing":"off","@stylistic/semi":"off","@stylistic/semi-spacing":"off","@stylistic/semi-style":"off","@stylistic/space-before-blocks":"off","@stylistic/space-before-function-paren":"off","@stylistic/space-in-parens":"off","@stylistic/space-infix-ops":"off","@stylistic/space-unary-ops":"off","@stylistic/switch-colon-spacing":"off","@stylistic/template-curly-spacing":"off","@stylistic/template-tag-spacing":"off","@stylistic/ts/block-spacing":"off","@stylistic/ts/brace-style":"off","@stylistic/ts/comma-dangle":"off","@stylistic/ts/comma-spacing":"off","@stylistic/ts/function-call-spacing":"off","@stylistic/ts/indent":"off","@stylistic/ts/key-spacing":"off","@stylistic/ts/keyword-spacing":"off","@stylistic/ts/lines-around-comment":P,"@stylistic/ts/member-delimiter-style":"off","@stylistic/ts/no-extra-parens":"off","@stylistic/ts/no-extra-semi":"off","@stylistic/ts/object-curly-spacing":"off","@stylistic/ts/quotes":P,"@stylistic/ts/semi":"off","@stylistic/ts/space-before-blocks":"off","@stylistic/ts/space-before-function-paren":"off","@stylistic/ts/space-infix-ops":"off","@stylistic/ts/type-annotation-spacing":"off","@stylistic/type-annotation-spacing":"off","@stylistic/type-generic-spacing":"off","@stylistic/type-named-tuple-spacing":"off","@stylistic/wrap-iife":"off","@stylistic/wrap-regex":"off","@stylistic/yield-star-spacing":"off"}:{}}}]},"stylistic"),ye={indent:4,jsx:!0,quotes:"double",semi:!0};var sr=Object.defineProperty,he=v((e,r)=>sr(e,"name",{value:r,configurable:!0}),"p$2");const E=he((e,r={})=>({...e,...r,plugins:[...r.plugins??[],...e.plugins??[]]}),"mergePrettierOptions"),or=he(async(e,r)=>{if(e.slidev&&e.markdown!==!0&&e.markdown!=="prettier")throw new Error("`slidev` option only works when `markdown` is enabled with `prettier`");const{indent:o,quotes:s,semi:t}={...ye,...r},a=Object.assign({endOfLine:"auto",printWidth:120,semi:t,singleQuote:s==="single",tabWidth:typeof o=="number"?o:2,trailingComma:"all",useTabs:o==="tab"},e.prettierOptions??{}),c={xmlQuoteAttributes:"double",xmlSelfClosingSpace:!0,xmlSortAttributesByKey:!1,xmlWhitespaceSensitivity:"ignore"},p={indentWidth:typeof o=="number"?o:2,quoteStyle:s==="single"?"preferSingle":"preferDouble",useTabs:o==="tab",...e.dprintOptions},u=[{name:"anolilab/formatter/setup",plugins:{format:await l(import("eslint-plugin-format"))}}];if(e.css&&u.push({files:[...n.getFilesGlobs("css"),...n.getFilesGlobs("postcss")],languageOptions:{parser:D},name:"anolilab/formatter/css",rules:{"format/prettier":["error",E(a,{parser:"css"})]}},{files:n.getFilesGlobs("scss"),languageOptions:{parser:D},name:"anolilab/formatter/scss",rules:{"format/prettier":["error",E(a,{parser:"scss"})]}},{files:n.getFilesGlobs("less"),languageOptions:{parser:D},name:"anolilab/formatter/less",rules:{"format/prettier":["error",E(a,{parser:"less"})]}}),e.html&&u.push({files:n.getFilesGlobs("html"),languageOptions:{parser:D},name:"anolilab/formatter/html",rules:{"format/prettier":["error",E(a,{parser:"html"})]}}),e.xml&&u.push({files:n.getFilesGlobs("xml"),languageOptions:{parser:D},name:"anolilab/formatter/xml",rules:{"format/prettier":["error",E({...c,...a},{parser:"xml",plugins:["@prettier/plugin-xml"]})]}}),e.svg&&u.push({files:n.getFilesGlobs("svg"),languageOptions:{parser:D},name:"anolilab/formatter/svg",rules:{"format/prettier":["error",E({...c,...a},{parser:"xml",plugins:["@prettier/plugin-xml"]})]}}),e.markdown){const b=e.markdown===!0?"prettier":e.markdown;let h=[];typeof e.slidev=="boolean"&&e.slidev?h=["**/slides.md"]:typeof e.slidev=="object"&&e.slidev.files&&(h=e.slidev.files),u.push({files:n.getFilesGlobs("markdown"),ignores:h,languageOptions:{parser:D},name:"anolilab/formatter/markdown",rules:{[`format/${b}`]:["error",b==="prettier"?E(a,{embeddedLanguageFormatting:"off",parser:"markdown"}):{...p,language:"markdown"}]}}),e.slidev&&u.push({files:h,languageOptions:{parser:D},name:"anolilab/formatter/slidev",rules:{"format/prettier":["error",E(a,{embeddedLanguageFormatting:"off",parser:"slidev",plugins:["prettier-plugin-slidev"]})]}})}return e.astro&&u.push({files:n.getFilesGlobs("astro"),languageOptions:{parser:D},name:"anolilab/formatter/astro",rules:{"format/prettier":["error",E(a,{parser:"astro",plugins:["prettier-plugin-astro"]})]}},{files:[...n.getFilesGlobs("astro"),...n.getFilesGlobs("astro_ts")],name:"anolilab/formatter/astro/disables",rules:{"@stylistic/arrow-parens":"off","@stylistic/block-spacing":"off","@stylistic/comma-dangle":"off","@stylistic/indent":"off","@stylistic/no-multi-spaces":"off","@stylistic/quotes":"off","@stylistic/semi":"off"}}),e.graphql&&u.push({files:n.getFilesGlobs("graphql"),languageOptions:{parser:D},name:"anolilab/formatter/graphql",rules:{"format/prettier":["error",E(a,{parser:"graphql"})]}}),u},"formatters"),tr=n.createConfig("html",async(e,r)=>{const{files:o=r,overrides:s,prettier:t,stylistic:a=!0}=e,{indent:c=4}=typeof a=="boolean"?{}:a,p=await l(import("eslint-plugin-html"));return[{files:o,name:"anolilab/html/setup",plugins:{html:p},rules:{"@html-eslint/indent":["error",c],"capitalized-comments":"off","spaced-comment":"off",...t?{"@html-eslint/element-newline":"off","@html-eslint/indent":"off","@html-eslint/no-extra-spacing-attrs":"off","@html-eslint/quotes":"off"}:{},...s},settings:{"html/indent":`+${c}`,"html/report-bad-indent":"error",...t?{"html/report-bad-indent":"off"}:{}}}]}),nr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,stylistic:a,tsconfigPath:c}=e,p=await l(import("eslint-plugin-import-x")),u=await l(import("@typescript-eslint/parser"));let b=!1;c!==void 0&&(b=de.readTsConfig(c).compilerOptions?.rewriteRelativeImportExtensions===!0);const h=[{name:"anolilab/imports/setup",plugins:{import:p}},{files:o,name:"anolilab/imports/rules",rules:{"import/consistent-type-specifier-style":["error","prefer-top-level"],"import/default":"off","import/dynamic-import-chunkname":["off",{importFunctions:[],webpackChunknameFormat:"[0-9a-zA-Z-_/.]+"}],"import/export":"error","import/exports-last":"error","import/extensions":b?"off":["error","ignorePackages",{checkTypeImports:c!==void 0,ignorePackages:!0,pattern:{...t.type==="module"?{cjs:"always",cts:"never",js:"always",json:"always",jsx:"always",mjs:"always",mts:"never",ts:"never",tsx:"never"}:{cjs:"never",cts:"never",js:"never",json:"always",jsx:"never",mjs:"never",mts:"never",ts:"never",tsx:"never"}}}],"import/first":"error","import/group-exports":"off","import/imports-first":"off","import/max-dependencies":["off",{max:10}],"import/named":"error","import/namespace":"off",...a?{"import/newline-after-import":["error",{count:1}]}:{},"import/no-absolute-path":"error","import/no-amd":"error","import/no-anonymous-default-export":["off",{allowAnonymousClass:!1,allowAnonymousFunction:!1,allowArray:!1,allowArrowFunction:!1,allowLiteral:!1,allowObject:!1}],"import/no-commonjs":t.type==="module"?["error",{allowPrimitiveModules:!0}]:"off","import/no-cycle":"off","import/no-default-export":"off","import/no-deprecated":"off","import/no-duplicates":"error","import/no-dynamic-require":"error","import/no-empty-named-blocks":"error","import/no-extraneous-dependencies":["error",{devDependencies:["test/**","tests/**","spec/**","**/scripts/**","**/fixture/**","**/__mocks__/**","**/examples/**","**/__{tests,mocks}__/**","test.{js,jsx,ts,tsx}","test-*.{js,jsx,ts,tsx}","**/*{.,_}{test,spec}.{js,jsx,ts,tsx}","**/jest.setup.js","**/gulpfile.js","**/gulpfile.*.js","**/Gruntfile{,.js}","**/protractor.conf.js","**/protractor.conf.*.js","**/karma.conf.js","**/.eslintrc.js","**/.eslintrc.cjs","**/.eslintrc.mjs","**/*.config.{js,cjs,mjs,ts,cts,mts}","**/.*.js","**/__tests__/**/*.?(c|m)[jt]s?(x)","**/?(*.){test,spec}.?(c|m)[jt]s?(x)","README.md"],optionalDependencies:!1}],"import/no-import-module-exports":[t.type==="module"?"off":"error",{exceptions:[]}],"import/no-internal-modules":["off",{allow:[]}],"import/no-mutable-exports":"error","import/no-named-as-default":"error","import/no-named-as-default-member":"error","import/no-named-default":"error","import/no-named-export":"off","import/no-namespace":"error","import/no-nodejs-modules":"off","import/no-relative-packages":"error","import/no-relative-parent-imports":"off","import/no-restricted-paths":"off","import/no-self-import":"error","import/no-unassigned-import":"off","import/no-unresolved":["error",{caseSensitive:!0,commonjs:!0}],"import/no-useless-path-segments":["error",{commonjs:!0,noUselessIndex:!1}],"import/no-webpack-loader-syntax":"error","import/order":"off","import/prefer-default-export":"error","import/unambiguous":"off",...s}},{files:n.getFilesGlobs("types"),name:"anolilab/imports/d.ts-rules",rules:{"import/no-duplicates":"off"}}];return g.hasPackageJsonAnyDependency(t,["react","react-dom"])&&h.push(p.flatConfigs.react),g.hasPackageJsonAnyDependency(t,["typescript"])&&h.push({files:n.getFilesGlobs("ts"),languageOptions:{ecmaVersion:"latest",parser:u,sourceType:"module"},name:"anolilab/import/ts-rules",rules:{"import/default":"off","import/export":"off","import/extensions":"off","import/named":"off","import/no-unresolved":"off"},settings:{"import/extensions":[...n.getFilesGlobs("js_and_ts"),...n.getFilesGlobs("jsx_and_tsx")].map(x=>x.replace("**/*","")),"import/external-module-folders":["node_modules","node_modules/@types"],"import/parsers":{"@typescript-eslint/parser":n.getFilesGlobs("ts").map(x=>x.replace("**/*",""))},...c?{"import/resolver":{node:!0,typescript:{alwaysTryTypes:!0,project:c}}}:{"import/resolver":{node:!0,typescript:!0}}}}),h}),ar=n.createConfig("js",async e=>{const{packageJson:r}=e,o=await l(import("@eslint/js"));return[{languageOptions:{ecmaVersion:"latest",globals:{...B.browser,...B.es2021,...B.node,document:"readonly",navigator:"readonly",window:"readonly",...r.type==="module"?{__dirname:"off",__filename:"off",exports:"off",require:"off"}:{__dirname:!0,__filename:!0,exports:!0,require:!0}},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:"latest",sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:!0},name:"anolilab/javascript/setup"},o.configs.recommended,{files:["**/*.cjs"],languageOptions:{globals:{__dirname:!0,__filename:!0,exports:!0,require:!0}}},{files:["**/*.mjs"],languageOptions:{globals:{__dirname:"off",__filename:"off",exports:"off",require:"off"}}}]}),ir=n.createConfig("js",async(e,r)=>{const{files:o=r,jsx:s=!1,overrides:t={},packageJson:a,silent:c,stylistic:p=!0,typescript:u}=e,b=await l(import("eslint-plugin-jsdoc")),h=g.hasPackageJsonAnyDependency(a,["eslint-plugin-tsdoc"]);h&&!c&&console.info(`
|
|
1
|
+
"use strict";var je=Object.create;var ee=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var ke=Object.getOwnPropertyNames;var Pe=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty;var v=(e,r)=>ee(e,"name",{value:r,configurable:!0});var Oe=(e,r,o,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of ke(r))!Ce.call(e,t)&&t!==o&&ee(e,t,{get:()=>r[t],enumerable:!(s=ve(r,t))||s.enumerable});return e};var i=(e,r,o)=>(o=e!=null?je(Pe(e)):{},Oe(r||!e||!e.__esModule?ee(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const fe=require("node:path"),g=require("@visulima/package"),De=require("eslint-flat-config-utils"),Q=require("semver"),n=require("./packem_shared/getFilesGlobs-DUUiSUKd.cjs"),de=require("@visulima/tsconfig"),_e=require("globals"),pe=require("eslint-merge-processors"),Se=require("@visulima/fs"),Fe=require("@visulima/fs/yaml"),ue=require("@eslint/compat"),Ee=require("eslint-plugin-regexp"),qe=require("node:url"),Ae=require("confusing-browser-globals");var re=typeof document<"u"?document.currentScript:null;const me=v(e=>e&&typeof e=="object"&&"default"in e?e.default:e,"_interopDefaultCompat"),X=me(_e),Ie=me(Ae),G={"dot-notation":"off","no-empty-function":"off","no-implied-eval":"off","no-loop-func":"off","no-magic-numbers":"off","no-new-func":"off","no-redeclare":"off","no-return-await":"off","no-throw-literal":"off","no-unused-expressions":"off",strict:"off"},Te=n.createConfig("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/best-practices/rules",rules:{"accessor-pairs":"off","array-callback-return":["error",{allowImplicit:!0}],"block-scoped-var":"error","class-methods-use-this":["error",{exceptMethods:[]}],complexity:["off",11],"consistent-return":"error",curly:["error","multi-line"],"default-case":["error",{commentPattern:"^no default$"}],"default-case-last":"error","default-param-last":"error","dot-location":["error","property"],"dot-notation":["error",{allowKeywords:!0}],eqeqeq:["error","always",{null:"ignore"}],"grouped-accessor-pairs":"error","guard-for-in":"error","max-classes-per-file":["error",1],"no-alert":"error","no-caller":"error","no-case-declarations":"error","no-constructor-return":"error","no-div-regex":"off","no-else-return":["error",{allowElseIf:!1}],"no-empty-function":["error",{allow:["arrowFunctions","functions","methods"]}],"no-empty-pattern":"error","no-empty-static-block":"error","no-eq-null":"off","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-fallthrough":"error","no-floating-decimal":"error","no-global-assign":["error",{exceptions:[]}],"no-implicit-coercion":["off",{allow:[],boolean:!1,number:!0,string:!0}],"no-implicit-globals":"off","no-implied-eval":"error","no-invalid-this":"off","no-iterator":"error","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-loop-func":"error","no-magic-numbers":["off",{detectObjects:!1,enforceConst:!0,ignore:[],ignoreArrayIndexes:!0}],"no-multi-spaces":["error",{ignoreEOLComments:!1}],"no-multi-str":"error","no-native-reassign":"off","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-octal":"error","no-octal-escape":"error","no-param-reassign":["error",{ignorePropertyModificationsFor:["acc","accumulator","e","ctx","context","req","request","res","response","$scope","staticContext"],props:!0}],"no-proto":"error","no-redeclare":"error","no-restricted-properties":["error",{message:"arguments.callee is deprecated",object:"arguments",property:"callee"},{message:"Please use Number.isFinite instead",object:"global",property:"isFinite"},{message:"Please use Number.isFinite instead",object:"self",property:"isFinite"},{message:"Please use Number.isFinite instead",object:"window",property:"isFinite"},{message:"Please use Number.isNaN instead",object:"global",property:"isNaN"},{message:"Please use Number.isNaN instead",object:"self",property:"isNaN"},{message:"Please use Number.isNaN instead",object:"window",property:"isNaN"},{message:"Please use Object.defineProperty instead.",property:"__defineGetter__"},{message:"Please use Object.defineProperty instead.",property:"__defineSetter__"},{message:"Use the exponentiation operator (**) instead.",object:"Math",property:"pow"},{message:"Use `Number.isNaN` instead.",object:"globalThis",property:"isNaN"},{message:"Use `Number.isFinite` instead.",object:"globalThis",property:"isFinite"},{message:"Use `Number.parseFloat` instead.",object:"globalThis",property:"parseFloat"},{message:"Use `Number.parseInt` instead.",object:"globalThis",property:"parseInt"},{message:"Use `Number.parseFloat` instead.",object:"window",property:"parseFloat"},{message:"Use `Number.parseInt` instead.",object:"window",property:"parseInt"},{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:"__proto__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupGetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupSetter__"}],"no-return-assign":["error","always"],"no-return-await":"error","no-script-url":"error","no-self-assign":["error",{props:!0}],"no-self-compare":"error","no-sequences":"error","no-throw-literal":"error","no-unmodified-loop-condition":"off","no-unused-expressions":["error",{allowShortCircuit:!1,allowTaggedTemplates:!1,allowTernary:!1}],"no-unused-labels":"error","no-useless-call":"off","no-useless-catch":"error","no-useless-concat":"error","no-useless-escape":"error","no-useless-return":"error","no-void":"error","no-warning-comments":["off",{location:"start",terms:["todo","fixme","xxx","@todo"]}],"no-with":"error","prefer-named-capture-group":"off","prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"prefer-regex-literals":"off",radix:"error","require-await":"off","require-unicode-regexp":"off","vars-on-top":"error","wrap-iife":["error","outside",{functionPrototypeMethods:!1}],yoda:"error"}},{files:n.getFilesGlobs("ts"),name:"anolilab/best-practices/ts-rules",rules:G}]}),Ne={"for-direction":"error","getter-return":["error",{allowImplicit:!0}],"no-async-promise-executor":"error","no-await-in-loop":"error","no-compare-neg-zero":"error","no-cond-assign":["error","always"],"no-console":"warn","no-constant-condition":"warn","no-control-regex":"off","no-debugger":"error","no-dupe-args":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-func-assign":"error","no-import-assign":"error","no-inner-declarations":"error","no-invalid-regexp":"off","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-negated-in-lhs":"off","no-new-native-nonconstructor":"error","no-obj-calls":"error","no-promise-executor-return":"error","no-prototype-builtins":"error","no-regex-spaces":"off","no-setter-return":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-unexpected-multiline":"error","no-unreachable":"error","no-unreachable-loop":"off","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":["error",{disallowArithmeticOperators:!0}],"no-useless-backreference":"error","require-atomic-updates":"off","use-isnan":"error","valid-jsdoc":"off","valid-typeof":["error",{requireStringLiterals:!0}]},Je=n.createConfig("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/errors/rules",rules:Ne},{files:n.getFilesGlobs("ts"),name:"anolilab/errors/ts-rules",rules:{"getter-return":"off","no-dupe-args":"off","no-dupe-keys":"off","no-extra-parens":"off","no-extra-semi":"off","no-func-assign":"off","no-obj-calls":"off","no-unreachable":"off","no-unsafe-negation":"off","space-infix-ops":"off","valid-typeof":"off"}}]});var Ue=Object.defineProperty,Le=v((e,r)=>Ue(e,"name",{value:r,configurable:!0}),"s$3");const ge=Le(e=>({"arrow-body-style":["error","as-needed",{requireReturnForObjectLiteral:!0}],"arrow-parens":["error","always"],"arrow-spacing":["error",{after:!0,before:!0}],"constructor-super":"error","generator-star-spacing":["error",{after:!0,before:!1}],"no-class-assign":"error","no-confusing-arrow":["error",{allowParens:!0}],"no-const-assign":"error","no-dupe-class-members":"error","no-duplicate-imports":"off","no-new-symbol":"error","no-restricted-exports":["error",{restrictDefaultExports:{defaultFrom:!1,direct:!1,named:!0,namedFrom:!1,namespaceFrom:!0},restrictedNamedExports:["then"]}],"no-restricted-imports":["error",{paths:[{message:"Lodash modularised (and lodash < 4.17.11) have CVE vulnerabilities. Please use tree-shakeable imports like lodash/xxx instead",name:"lodash.isequal"},{message:"Lodash modularised (and lodash < 4.17.11) have CVE vulnerabilities. Please use tree-shakeable imports like lodash/xxx instead",name:"lodash.uniqueId"},{message:"Lodash modularised (and lodash < 4.17.11) have CVE vulnerabilities. Please use tree-shakeable imports like lodash/xxx instead",name:"lodash.mergewith"},{message:"Lodash modularised (and lodash < 4.17.11) have CVE vulnerabilities. Please use tree-shakeable imports like lodash/xxx instead",name:"lodash.pick"},{name:"error"},{name:"domain"},{name:"freelist"},{name:"smalloc"},{name:"punycode"},{name:"sys"},{message:'Is legacy, npm version got deprecated, migrate to URLSearchParams as recommended or try "qs" as a package',name:"querystring"},{message:"Please use one of the following instead: chalk, kleur, ansi-colors, @colors/colors",name:"colors"},{message:"node v10.12 mkdir supports recursive option",name:"mkdirp"},{message:'Please use "@faker-js/faker" as a replacement',name:"faker"},{message:"Please use Object.assign or spread { ...obj }",name:"xtend"},{message:"Please use Object.assign or spread { ...obj }",name:"object-assign"},{message:"Please use Object.assign or spread { ...obj }",name:"extend-shallow"},{message:"node supports recursive option now",name:"rimraf"},{message:'just use "".padStart() and "".padEnd()',name:"pad-left"},{message:'just use "".padStart() and "".padEnd()',name:"pad-right"},{message:'just use "".padStart() and "".padEnd()',name:"left-pad"},{message:'just use "".padStart() and "".padEnd()',name:"right-pad"},{message:'just use "".padStart() and "".padEnd()',name:"pad"},{name:"safe-buffer"},{name:"safer-buffer"},{message:"just use [].flat() or some other polyfill",name:"array-flatten"},{message:"Been deprecated",name:"request"},{message:"use async/await instead",name:"co"},{message:"Please use TextDecoder instead",name:"windows-1252"},{message:"Please use TextDecoder instead",name:"string_decoder"},{message:"Please use array.prototype.flatMap instead",name:"concat-map"},{name:"buffer-alloc"}],patterns:["lodash.*"]}],"no-this-before-super":"error","no-useless-computed-key":"error","no-useless-constructor":"error","no-useless-rename":["error",{ignoreDestructuring:!1,ignoreExport:!1,ignoreImport:!1}],"no-var":"error","object-shorthand":["error","always",{avoidQuotes:!0,ignoreConstructors:!1}],"prefer-arrow-callback":["error",{allowNamedFunctions:!1,allowUnboundThis:!0}],"prefer-const":e?"off":["error",{destructuring:"any",ignoreReadBeforeAssign:!0}],"prefer-destructuring":["error",{AssignmentExpression:{array:!0,object:!1},VariableDeclarator:{array:!1,object:!0}},{enforceForRenamedProperties:!1}],"prefer-numeric-literals":"error","prefer-reflect":"off","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","require-yield":"error","rest-spread-spacing":["error","never"],"sort-imports":["off",{ignoreCase:!1,ignoreDeclarationSort:!1,ignoreMemberSort:!1,memberSyntaxSortOrder:["none","all","multiple","single"]}],"symbol-description":"error","template-curly-spacing":"error","yield-star-spacing":["error","after"]}),"es6Rules"),$e=n.createConfig("all",async(e,r)=>{const{files:o=r,isInEditor:s=!1}=e;return[{files:o,languageOptions:{parserOptions:{ecmaFeatures:{generators:!1,objectLiteralDuplicateProperties:!1},ecmaVersion:6,sourceType:"module"}},name:"anolilab/es6/rules",rules:ge(s)},{files:n.getFilesGlobs("ts"),name:"anolilab/es6/ts-rules",rules:{"constructor-super":"off","no-const-assign":"off","no-dupe-class-members":"off","no-new-symbol":"off","no-this-before-super":"off","no-useless-constructor":"off"}}]});var Re=Object.defineProperty,Me=v((e,r)=>Re(e,"name",{value:r,configurable:!0}),"o$1");const Ge=Me(async(e=[])=>[{ignores:["**/node_modules","**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/bun.lockb","**/.npmignore","**/output","**/coverage","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/.vitepress/cache","**/.nuxt","**/.next","**/.svelte-kit","**/.vercel","**/.changeset","**/.idea","**/.cache","**/.output","**/.vite-inspect","**/.yarn","**/vite.config.*.timestamp-*","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts","{tmp,temp}/**","**/*.min.js","**/dist/**","**/node_modules/**","**/vendor/**","**/.cache/**","**/.vitepress","**/CLAUDE.md","**/.claude","**/AI.md","**/AGENT.md","**/PROMPT.md","**/PROMPTING.md","**/.cursorrules","**/.cursorignore","**/.cursormem.json","**/.cursorhistory","**/copilot.json","**/copilot.config.json","**/copilot.md",...e],name:"anolilab/ignores"}],"ignores");var ze=Object.defineProperty,Ve=v((e,r)=>ze(e,"name",{value:r,configurable:!0}),"a$1");const l=Ve(async e=>{const r=await e;return r.default??r},"interopDefault"),We=n.createConfig("all",async(e,r)=>{const{files:o=r,lessOpinionated:s=!1,overrides:t,packageJson:a}=e,c=await l(import("eslint-plugin-antfu"));return[{files:o,name:"anolilab/antfu",plugins:{antfu:c},rules:{"antfu/consistent-chaining":"error","antfu/consistent-list-newline":"error","antfu/if-newline":"error","antfu/import-dedupe":"error","antfu/no-import-dist":"error","antfu/no-import-node-modules-by-path":"error","antfu/no-ts-export-equal":g.hasPackageJsonAnyDependency(a,["typescript"])?"error":"off","antfu/prefer-inline-type-import":"off","antfu/top-level-function":"off",...s?{curly:["error","all"]}:{"antfu/curly":"error","antfu/if-newline":"error"},...t}}]}),Be=n.createConfig("astro",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,[a,c,p]=await Promise.all([l(import("eslint-plugin-astro")),l(import("astro-eslint-parser")),l(import("@typescript-eslint/parser"))]);return[{name:"anolilab/astro/setup",plugins:{astro:a}},{files:o,languageOptions:{globals:a.environments.astro.globals,parser:c,parserOptions:{extraFileExtensions:[".astro"],parser:p},sourceType:"module"},name:"anolilab/astro/rules",processor:"astro/client-side-ts",rules:{"antfu/no-top-level-await":"off","astro/missing-client-only-directive-value":"error","astro/no-conflict-set-directives":"error","astro/no-deprecated-astro-canonicalurl":"error","astro/no-deprecated-astro-fetchcontent":"error","astro/no-deprecated-astro-resolve":"error","astro/no-deprecated-getentrybyslug":"error","astro/no-set-html-directive":"off","astro/no-unused-define-vars-in-style":"error","astro/semi":"off","astro/valid-compile":"error",...t?{"@stylistic/indent":"off","@stylistic/jsx-closing-tag-location":"off","@stylistic/jsx-one-expression-per-line":"off","@stylistic/no-multiple-empty-lines":"off"}:{},...s}}]}),Xe=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("@eslint-community/eslint-plugin-eslint-comments"));return[{files:o,linterOptions:{reportUnusedDisableDirectives:"error",reportUnusedInlineConfigs:"error"},name:"anolilab/eslint-comments/rules",plugins:{"eslint-comments":t},rules:{"eslint-comments/no-aggregating-enable":"error","eslint-comments/no-duplicate-disable":"error","eslint-comments/no-restricted-disable":"off","eslint-comments/no-unlimited-disable":"off","eslint-comments/no-unused-disable":"error","eslint-comments/no-unused-enable":"error","eslint-comments/no-use":"off","eslint-comments/require-description":"off",...s}}]}),He=n.createConfig("all",async(e,r)=>{const{files:o=r}=e,s=(await l(import("eslint-plugin-compat"))).configs["flat/recommended"];return s.files=o,[s]}),Ke=n.createConfig("css",async(e,r)=>{const{files:o=r,overrides:s,tailwind:t}=e,a=await l(import("@eslint/css"));let c;return t&&(c=await l(import("tailwind-csstree"))),[{files:o,language:"css/css",name:"anolilab/css/setup",plugins:{css:a},rules:{"@stylistic/indent":"off","css/no-duplicate-imports":"error","css/no-empty-blocks":"error","css/no-important":"error","css/no-invalid-at-rules":"error","css/no-invalid-properties":"error","css/use-baseline":"warn","css/use-layers":"error","no-irregular-whitespace":"off",...s},...t&&c?{languageOptions:{customSyntax:c.tailwind4,tolerant:!0}}:{}}]});var Qe=Object.defineProperty,Ye=v((e,r)=>Qe(e,"name",{value:r,configurable:!0}),"r$2");const D={meta:{name:"parser-plain"},parseForESLint:Ye(e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:"Program"},scopeManager:void 0,services:{isPlain:!0},visitorKeys:{Program:[]}}),"parseForESLint")};var Ze=Object.defineProperty,er=v((e,r)=>Ze(e,"name",{value:r,configurable:!0}),"l");const P=0,rr=er(async e=>{const{indent:r,jsx:o,overrides:s={},prettier:t,quotes:a,semi:c}={...ye,...e},p=await l(import("@stylistic/eslint-plugin")),u=p.configs.customize({indent:r,jsx:o,pluginName:"@stylistic",quotes:t?void 0:a,semi:t?!1:c});return[{name:"anolilab/stylistic/rules",plugins:{"@stylistic":p},rules:{...u.rules,"@stylistic/arrow-parens":"off","@stylistic/block-spacing":["error","always"],"@stylistic/brace-style":["error","1tbs",{allowSingleLine:!0}],"@stylistic/comma-dangle":["error",{arrays:"always-multiline",enums:"always-multiline",exports:"always-multiline",functions:"always-multiline",generics:"always-multiline",imports:"always-multiline",objects:"always-multiline",tuples:"always-multiline"}],"@stylistic/comma-spacing":["error",{after:!0,before:!1}],"@stylistic/function-call-spacing":["error","never"],"@stylistic/generator-star-spacing":["error",{after:!0,before:!1}],"@stylistic/indent":["error",r,{ArrayExpression:1,CallExpression:{arguments:1},flatTernaryExpressions:!1,FunctionDeclaration:{body:1,parameters:1},FunctionExpression:{body:1,parameters:1},ignoreComments:!1,ignoredNodes:["JSXElement","JSXElement > *","JSXAttribute","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXSpreadAttribute","JSXExpressionContainer","JSXOpeningElement","JSXClosingElement","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXText","JSXEmptyExpression","JSXSpreadChild"],ImportDeclaration:1,ObjectExpression:1,outerIIFEBody:1,SwitchCase:1,VariableDeclarator:1}],"@stylistic/key-spacing":["error",{afterColon:!0,beforeColon:!1}],"@stylistic/keyword-spacing":["error",{after:!0,before:!0,overrides:{case:{after:!0},return:{after:!0},throw:{after:!0}}}],"@stylistic/lines-around-comment":"off","@stylistic/lines-between-class-members":["error","always",{exceptAfterSingleLine:!1}],"@stylistic/member-delimiter-style":"error","@stylistic/no-extra-parens":["error","all",{conditionalAssign:!0,ignoreJSX:"all",nestedBinaryExpressions:!1,returnAssign:!1}],"@stylistic/no-extra-semi":"error","@stylistic/padding-line-between-statements":["error",{blankLine:"always",next:"*",prev:"directive"},{blankLine:"never",next:"directive",prev:"directive"},{blankLine:"always",next:"*",prev:["const","let","var"]},{blankLine:"any",next:["const","let","var"],prev:["const","let","var"]},{blankLine:"always",next:"return",prev:"*"},{blankLine:"always",next:["for","function","if","switch","try"],prev:"*"},{blankLine:"always",next:"*",prev:["for","function","if","switch","try"]}],"@stylistic/quote-props":["error","as-needed",{keywords:!1,numbers:!1,unnecessary:!0}],"@stylistic/space-before-blocks":"error","@stylistic/space-before-function-paren":["error",{anonymous:"always",asyncArrow:"always",named:"never"}],"@stylistic/space-infix-ops":"error","@stylistic/type-annotation-spacing":"error","@stylistic/yield-star-spacing":["error",{after:!0,before:!1}],...s,...t?{"@stylistic/array-bracket-newline":"off","@stylistic/array-bracket-spacing":"off","@stylistic/array-element-newline":"off","@stylistic/arrow-parens":"off","@stylistic/arrow-spacing":"off","@stylistic/block-spacing":"off","@stylistic/brace-style":"off","@stylistic/comma-dangle":"off","@stylistic/comma-spacing":"off","@stylistic/comma-style":"off","@stylistic/computed-property-spacing":"off","@stylistic/dot-location":"off","@stylistic/eol-last":"off","@stylistic/function-call-argument-newline":"off","@stylistic/function-call-spacing":"off","@stylistic/function-paren-newline":"off","@stylistic/generator-star-spacing":"off","@stylistic/implicit-arrow-linebreak":"off","@stylistic/indent":"off","@stylistic/indent-binary-ops":"off","@stylistic/js/array-bracket-newline":"off","@stylistic/js/array-bracket-spacing":"off","@stylistic/js/array-element-newline":"off","@stylistic/js/arrow-parens":"off","@stylistic/js/arrow-spacing":"off","@stylistic/js/block-spacing":"off","@stylistic/js/brace-style":"off","@stylistic/js/comma-dangle":"off","@stylistic/js/comma-spacing":"off","@stylistic/js/comma-style":"off","@stylistic/js/computed-property-spacing":"off","@stylistic/js/dot-location":"off","@stylistic/js/eol-last":"off","@stylistic/js/function-call-argument-newline":"off","@stylistic/js/function-call-spacing":"off","@stylistic/js/function-paren-newline":"off","@stylistic/js/generator-star-spacing":"off","@stylistic/js/implicit-arrow-linebreak":"off","@stylistic/js/indent":"off","@stylistic/js/jsx-quotes":"off","@stylistic/js/key-spacing":"off","@stylistic/js/keyword-spacing":"off","@stylistic/js/linebreak-style":"off","@stylistic/js/lines-around-comment":P,"@stylistic/js/max-len":P,"@stylistic/js/max-statements-per-line":"off","@stylistic/js/multiline-ternary":"off","@stylistic/js/new-parens":"off","@stylistic/js/newline-per-chained-call":"off","@stylistic/js/no-confusing-arrow":P,"@stylistic/js/no-extra-parens":"off","@stylistic/js/no-extra-semi":"off","@stylistic/js/no-floating-decimal":"off","@stylistic/js/no-mixed-operators":P,"@stylistic/js/no-mixed-spaces-and-tabs":"off","@stylistic/js/no-multi-spaces":"off","@stylistic/js/no-multiple-empty-lines":"off","@stylistic/js/no-tabs":P,"@stylistic/js/no-trailing-spaces":"off","@stylistic/js/no-whitespace-before-property":"off","@stylistic/js/nonblock-statement-body-position":"off","@stylistic/js/object-curly-newline":"off","@stylistic/js/object-curly-spacing":"off","@stylistic/js/object-property-newline":"off","@stylistic/js/one-var-declaration-per-line":"off","@stylistic/js/operator-linebreak":"off","@stylistic/js/padded-blocks":"off","@stylistic/js/quote-props":"off","@stylistic/js/quotes":P,"@stylistic/js/rest-spread-spacing":"off","@stylistic/js/semi":"off","@stylistic/js/semi-spacing":"off","@stylistic/js/semi-style":"off","@stylistic/js/space-before-blocks":"off","@stylistic/js/space-before-function-paren":"off","@stylistic/js/space-in-parens":"off","@stylistic/js/space-infix-ops":"off","@stylistic/js/space-unary-ops":"off","@stylistic/js/switch-colon-spacing":"off","@stylistic/js/template-curly-spacing":"off","@stylistic/js/template-tag-spacing":"off","@stylistic/js/wrap-iife":"off","@stylistic/js/wrap-regex":"off","@stylistic/js/yield-star-spacing":"off","@stylistic/jsx-child-element-spacing":"off","@stylistic/jsx-closing-bracket-location":"off","@stylistic/jsx-closing-tag-location":"off","@stylistic/jsx-curly-newline":"off","@stylistic/jsx-curly-spacing":"off","@stylistic/jsx-equals-spacing":"off","@stylistic/jsx-first-prop-new-line":"off","@stylistic/jsx-indent":"off","@stylistic/jsx-indent-props":"off","@stylistic/jsx-max-props-per-line":"off","@stylistic/jsx-newline":"off","@stylistic/jsx-one-expression-per-line":"off","@stylistic/jsx-props-no-multi-spaces":"off","@stylistic/jsx-quotes":"off","@stylistic/jsx-tag-spacing":"off","@stylistic/jsx-wrap-multilines":"off","@stylistic/jsx/jsx-child-element-spacing":"off","@stylistic/jsx/jsx-closing-bracket-location":"off","@stylistic/jsx/jsx-closing-tag-location":"off","@stylistic/jsx/jsx-curly-newline":"off","@stylistic/jsx/jsx-curly-spacing":"off","@stylistic/jsx/jsx-equals-spacing":"off","@stylistic/jsx/jsx-first-prop-new-line":"off","@stylistic/jsx/jsx-indent":"off","@stylistic/jsx/jsx-indent-props":"off","@stylistic/jsx/jsx-max-props-per-line":"off","@stylistic/key-spacing":"off","@stylistic/keyword-spacing":"off","@stylistic/linebreak-style":"off","@stylistic/lines-around-comment":P,"@stylistic/max-len":P,"@stylistic/max-statements-per-line":"off","@stylistic/member-delimiter-style":"off","@stylistic/multiline-ternary":"off","@stylistic/new-parens":"off","@stylistic/newline-per-chained-call":"off","@stylistic/no-confusing-arrow":P,"@stylistic/no-extra-parens":"off","@stylistic/no-extra-semi":"off","@stylistic/no-floating-decimal":"off","@stylistic/no-mixed-operators":P,"@stylistic/no-mixed-spaces-and-tabs":"off","@stylistic/no-multi-spaces":"off","@stylistic/no-multiple-empty-lines":"off","@stylistic/no-tabs":P,"@stylistic/no-trailing-spaces":"off","@stylistic/no-whitespace-before-property":"off","@stylistic/nonblock-statement-body-position":"off","@stylistic/object-curly-newline":"off","@stylistic/object-curly-spacing":"off","@stylistic/object-property-newline":"off","@stylistic/one-var-declaration-per-line":"off","@stylistic/operator-linebreak":"off","@stylistic/padded-blocks":"off","@stylistic/quote-props":"off","@stylistic/quotes":P,"@stylistic/rest-spread-spacing":"off","@stylistic/semi":"off","@stylistic/semi-spacing":"off","@stylistic/semi-style":"off","@stylistic/space-before-blocks":"off","@stylistic/space-before-function-paren":"off","@stylistic/space-in-parens":"off","@stylistic/space-infix-ops":"off","@stylistic/space-unary-ops":"off","@stylistic/switch-colon-spacing":"off","@stylistic/template-curly-spacing":"off","@stylistic/template-tag-spacing":"off","@stylistic/ts/block-spacing":"off","@stylistic/ts/brace-style":"off","@stylistic/ts/comma-dangle":"off","@stylistic/ts/comma-spacing":"off","@stylistic/ts/function-call-spacing":"off","@stylistic/ts/indent":"off","@stylistic/ts/key-spacing":"off","@stylistic/ts/keyword-spacing":"off","@stylistic/ts/lines-around-comment":P,"@stylistic/ts/member-delimiter-style":"off","@stylistic/ts/no-extra-parens":"off","@stylistic/ts/no-extra-semi":"off","@stylistic/ts/object-curly-spacing":"off","@stylistic/ts/quotes":P,"@stylistic/ts/semi":"off","@stylistic/ts/space-before-blocks":"off","@stylistic/ts/space-before-function-paren":"off","@stylistic/ts/space-infix-ops":"off","@stylistic/ts/type-annotation-spacing":"off","@stylistic/type-annotation-spacing":"off","@stylistic/type-generic-spacing":"off","@stylistic/type-named-tuple-spacing":"off","@stylistic/wrap-iife":"off","@stylistic/wrap-regex":"off","@stylistic/yield-star-spacing":"off"}:{}}}]},"stylistic"),ye={indent:4,jsx:!0,quotes:"double",semi:!0};var sr=Object.defineProperty,he=v((e,r)=>sr(e,"name",{value:r,configurable:!0}),"p$2");const E=he((e,r={})=>({...e,...r,plugins:[...r.plugins??[],...e.plugins??[]]}),"mergePrettierOptions"),or=he(async(e,r)=>{if(e.slidev&&e.markdown!==!0&&e.markdown!=="prettier")throw new Error("`slidev` option only works when `markdown` is enabled with `prettier`");const{indent:o,quotes:s,semi:t}={...ye,...r},a=Object.assign({endOfLine:"auto",printWidth:120,semi:t,singleQuote:s==="single",tabWidth:typeof o=="number"?o:2,trailingComma:"all",useTabs:o==="tab"},e.prettierOptions??{}),c={xmlQuoteAttributes:"double",xmlSelfClosingSpace:!0,xmlSortAttributesByKey:!1,xmlWhitespaceSensitivity:"ignore"},p={indentWidth:typeof o=="number"?o:2,quoteStyle:s==="single"?"preferSingle":"preferDouble",useTabs:o==="tab",...e.dprintOptions},u=[{name:"anolilab/formatter/setup",plugins:{format:await l(import("eslint-plugin-format"))}}];if(e.css&&u.push({files:[...n.getFilesGlobs("css"),...n.getFilesGlobs("postcss")],languageOptions:{parser:D},name:"anolilab/formatter/css",rules:{"format/prettier":["error",E(a,{parser:"css"})]}},{files:n.getFilesGlobs("scss"),languageOptions:{parser:D},name:"anolilab/formatter/scss",rules:{"format/prettier":["error",E(a,{parser:"scss"})]}},{files:n.getFilesGlobs("less"),languageOptions:{parser:D},name:"anolilab/formatter/less",rules:{"format/prettier":["error",E(a,{parser:"less"})]}}),e.html&&u.push({files:n.getFilesGlobs("html"),languageOptions:{parser:D},name:"anolilab/formatter/html",rules:{"format/prettier":["error",E(a,{parser:"html"})]}}),e.xml&&u.push({files:n.getFilesGlobs("xml"),languageOptions:{parser:D},name:"anolilab/formatter/xml",rules:{"format/prettier":["error",E({...c,...a},{parser:"xml",plugins:["@prettier/plugin-xml"]})]}}),e.svg&&u.push({files:n.getFilesGlobs("svg"),languageOptions:{parser:D},name:"anolilab/formatter/svg",rules:{"format/prettier":["error",E({...c,...a},{parser:"xml",plugins:["@prettier/plugin-xml"]})]}}),e.markdown){const b=e.markdown===!0?"prettier":e.markdown;let h=[];typeof e.slidev=="boolean"&&e.slidev?h=["**/slides.md"]:typeof e.slidev=="object"&&e.slidev.files&&(h=e.slidev.files),u.push({files:n.getFilesGlobs("markdown"),ignores:h,languageOptions:{parser:D},name:"anolilab/formatter/markdown",rules:{[`format/${b}`]:["error",b==="prettier"?E(a,{embeddedLanguageFormatting:"off",parser:"markdown"}):{...p,language:"markdown"}]}}),e.slidev&&u.push({files:h,languageOptions:{parser:D},name:"anolilab/formatter/slidev",rules:{"format/prettier":["error",E(a,{embeddedLanguageFormatting:"off",parser:"slidev",plugins:["prettier-plugin-slidev"]})]}})}return e.astro&&u.push({files:n.getFilesGlobs("astro"),languageOptions:{parser:D},name:"anolilab/formatter/astro",rules:{"format/prettier":["error",E(a,{parser:"astro",plugins:["prettier-plugin-astro"]})]}},{files:[...n.getFilesGlobs("astro"),...n.getFilesGlobs("astro_ts")],name:"anolilab/formatter/astro/disables",rules:{"@stylistic/arrow-parens":"off","@stylistic/block-spacing":"off","@stylistic/comma-dangle":"off","@stylistic/indent":"off","@stylistic/no-multi-spaces":"off","@stylistic/quotes":"off","@stylistic/semi":"off"}}),e.graphql&&u.push({files:n.getFilesGlobs("graphql"),languageOptions:{parser:D},name:"anolilab/formatter/graphql",rules:{"format/prettier":["error",E(a,{parser:"graphql"})]}}),u},"formatters"),tr=n.createConfig("html",async(e,r)=>{const{files:o=r,overrides:s,prettier:t,stylistic:a=!0}=e,{indent:c=4}=typeof a=="boolean"?{}:a,p=await l(import("eslint-plugin-html"));return[{files:o,name:"anolilab/html/setup",plugins:{html:p},rules:{"@html-eslint/indent":["error",c],"capitalized-comments":"off","spaced-comment":"off",...t?{"@html-eslint/element-newline":"off","@html-eslint/indent":"off","@html-eslint/no-extra-spacing-attrs":"off","@html-eslint/quotes":"off"}:{},...s},settings:{"html/indent":`+${c}`,"html/report-bad-indent":"error",...t?{"html/report-bad-indent":"off"}:{}}}]}),nr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,stylistic:a,tsconfigPath:c}=e,p=await l(import("eslint-plugin-import-x")),u=await l(import("@typescript-eslint/parser"));let b=!1;c!==void 0&&(b=de.readTsConfig(c).compilerOptions?.rewriteRelativeImportExtensions===!0);const h=[{name:"anolilab/imports/setup",plugins:{import:p}},{files:o,name:"anolilab/imports/rules",rules:{"import/consistent-type-specifier-style":["error","prefer-top-level"],"import/default":"off","import/dynamic-import-chunkname":["off",{importFunctions:[],webpackChunknameFormat:"[0-9a-zA-Z-_/.]+"}],"import/export":"error","import/exports-last":"error","import/extensions":b?"off":["error","ignorePackages",{checkTypeImports:c!==void 0,ignorePackages:!0,pattern:{...t.type==="module"?{cjs:"always",cts:"never",js:"always",json:"always",jsx:"always",mjs:"always",mts:"never",ts:"never",tsx:"never"}:{cjs:"never",cts:"never",js:"never",json:"always",jsx:"never",mjs:"never",mts:"never",ts:"never",tsx:"never"}}}],"import/first":"error","import/group-exports":"off","import/imports-first":"off","import/max-dependencies":["off",{max:10}],"import/named":"error","import/namespace":"off",...a?{"import/newline-after-import":["error",{count:1}]}:{},"import/no-absolute-path":"error","import/no-amd":"error","import/no-anonymous-default-export":["off",{allowAnonymousClass:!1,allowAnonymousFunction:!1,allowArray:!1,allowArrowFunction:!1,allowLiteral:!1,allowObject:!1}],"import/no-commonjs":t.type==="module"?["error",{allowPrimitiveModules:!0}]:"off","import/no-cycle":"off","import/no-default-export":"off","import/no-deprecated":"off","import/no-duplicates":"error","import/no-dynamic-require":"error","import/no-empty-named-blocks":"error","import/no-extraneous-dependencies":["error",{devDependencies:["test/**","tests/**","spec/**","**/scripts/**","**/fixture/**","**/__mocks__/**","**/examples/**","**/__{tests,mocks}__/**","test.{js,jsx,ts,tsx}","test-*.{js,jsx,ts,tsx}","**/*{.,_}{test,spec}.{js,jsx,ts,tsx}","**/jest.setup.js","**/gulpfile.js","**/gulpfile.*.js","**/Gruntfile{,.js}","**/protractor.conf.js","**/protractor.conf.*.js","**/karma.conf.js","**/.eslintrc.js","**/.eslintrc.cjs","**/.eslintrc.mjs","**/*.config.{js,cjs,mjs,ts,cts,mts}","**/.*.js","**/__tests__/**/*.?(c|m)[jt]s?(x)","**/?(*.){test,spec}.?(c|m)[jt]s?(x)","README.md"],optionalDependencies:!1}],"import/no-import-module-exports":[t.type==="module"?"off":"error",{exceptions:[]}],"import/no-internal-modules":["off",{allow:[]}],"import/no-mutable-exports":"error","import/no-named-as-default":"error","import/no-named-as-default-member":"error","import/no-named-default":"error","import/no-named-export":"off","import/no-namespace":"error","import/no-nodejs-modules":"off","import/no-relative-packages":"error","import/no-relative-parent-imports":"off","import/no-restricted-paths":"off","import/no-self-import":"error","import/no-unassigned-import":"off","import/no-unresolved":["error",{caseSensitive:!0,commonjs:!0}],"import/no-useless-path-segments":["error",{commonjs:!0,noUselessIndex:!1}],"import/no-webpack-loader-syntax":"error","import/order":"off","import/prefer-default-export":"error","import/unambiguous":"off",...s}},{files:n.getFilesGlobs("types"),name:"anolilab/imports/d.ts-rules",rules:{"import/no-duplicates":"off"}}];return g.hasPackageJsonAnyDependency(t,["react","react-dom"])&&h.push(p.flatConfigs.react),g.hasPackageJsonAnyDependency(t,["typescript"])&&h.push({files:n.getFilesGlobs("ts"),languageOptions:{ecmaVersion:"latest",parser:u,sourceType:"module"},name:"anolilab/import/ts-rules",rules:{"import/default":"off","import/export":"off","import/extensions":"off","import/named":"off","import/no-unresolved":"off"},settings:{"import/extensions":[...n.getFilesGlobs("js_and_ts"),...n.getFilesGlobs("jsx_and_tsx")].map(x=>x.replace("**/*","")),"import/external-module-folders":["node_modules","node_modules/@types"],"import/parsers":{"@typescript-eslint/parser":n.getFilesGlobs("ts").map(x=>x.replace("**/*",""))},...c?{"import/resolver":{node:!0,typescript:{alwaysTryTypes:!0,project:c}}}:{"import/resolver":{node:!0,typescript:!0}}}}),h}),ar=n.createConfig("js",async e=>{const{packageJson:r}=e,o=await l(import("@eslint/js"));return[{languageOptions:{ecmaVersion:"latest",globals:{...X.browser,...X.es2021,...X.node,document:"readonly",navigator:"readonly",window:"readonly",...r.type==="module"?{__dirname:"off",__filename:"off",exports:"off",require:"off"}:{__dirname:!0,__filename:!0,exports:!0,require:!0}},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:"latest",sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:!0},name:"anolilab/javascript/setup"},o.configs.recommended,{files:["**/*.cjs"],languageOptions:{globals:{__dirname:!0,__filename:!0,exports:!0,require:!0}}},{files:["**/*.mjs"],languageOptions:{globals:{__dirname:"off",__filename:"off",exports:"off",require:"off"}}}]}),ir=n.createConfig("js",async(e,r)=>{const{files:o=r,jsx:s=!1,overrides:t={},packageJson:a,silent:c,stylistic:p=!0,typescript:u}=e,b=await l(import("eslint-plugin-jsdoc")),h=g.hasPackageJsonAnyDependency(a,["eslint-plugin-tsdoc"]);h&&!c&&console.info(`
|
|
2
2
|
Found eslint-plugin-tsdoc as dependency, disabling the jsdoc rules for *.ts and *.tsx files.`);const x=["remarks","openapi","link"],O=["openapi"],k=[{name:"anolilab/jsdoc/setup",plugins:{jsdoc:b}},{files:o,name:"anolilab/jsdoc/js-rules",rules:{...b.configs["flat/recommended-error"].rules,"jsdoc/check-indentation":["error",{excludeTags:O}],"jsdoc/check-tag-names":["error",{definedTags:x,jsxTags:s}],...t,...p?{"jsdoc/check-alignment":"warn","jsdoc/multiline-blocks":"warn"}:{}}}];return u&&!h&&k.push({files:n.getFilesGlobs("ts"),name:"anolilab/jsdoc/ts-rules",rules:{...b.configs["flat/contents-typescript-error"].rules,...b.configs["flat/logical-typescript-error"].rules,...b.configs["flat/stylistic-typescript-error"].rules,"jsdoc/check-indentation":["error",{excludeTags:O}],"jsdoc/check-tag-names":["error",{definedTags:x,jsxTags:s}],...t,...p?{"jsdoc/check-alignment":"warn","jsdoc/multiline-blocks":"warn"}:{}}}),k});var lr=Object.defineProperty,cr=v((e,r)=>lr(e,"name",{value:r,configurable:!0}),"r$1");const pr=cr(async e=>{const{overrides:r,packageJson:o,prettier:s,silent:t,stylistic:a=!0}=e,{indent:c=4}=typeof a=="boolean"?{}:a,p=await l(import("eslint-plugin-jsonc")),u=g.hasPackageJsonAnyDependency(o,["sort-package-json"]);return u&&!t&&console.info(`
|
|
3
3
|
@anolilab/eslint-config found "sort-package-json" package.
|
|
4
4
|
|
|
5
5
|
Following rules are disabled: jsonc/sort-keys for all package.json files.
|
|
6
6
|
`),[...p.configs["flat/base"],{files:["**/*.json5"],name:"anolilab/jsonc/json5-rules",rules:p.configs["recommended-with-json5"].rules},{files:["**/*.jsonc"],name:"anolilab/jsonc/jsonc-rules",rules:p.configs["recommended-with-jsonc"].rules},{files:["**/*.json"],name:"anolilab/jsonc/json-rules",rules:p.configs["recommended-with-json"].rules},{files:["package.json","**/package.json"],name:"anolilab/jsonc/package.json-rules",rules:{"jsonc/sort-array-values":u?"off":["error",{order:{type:"asc"},pathPattern:"^files$"}],"jsonc/sort-keys":u?"off":["error",{order:["$schema","name","displayName","version","private","description","categories","keywords","homepage","bugs","repository","funding","license","qna","author","maintainers","contributors","publisher","sideEffects","type","imports","exports","main","svelte","umd:main","jsdelivr","unpkg","module","source","jsnext:main","browser","react-native","types","typesVersions","typings","style","example","examplestyle","assets","bin","man","directories","files","workspaces","binary","scripts","betterScripts","contributes","activationEvents","husky","simple-git-hooks","pre-commit","commitlint","lint-staged","nano-staged","config","nodemonConfig","browserify","babel","browserslist","xo","prettier","eslintConfig","eslintIgnore","npmpackagejsonlint","release","remarkConfig","stylelint","ava","jest","mocha","nyc","tap","oclif","resolutions","dependencies","devDependencies","dependenciesMeta","peerDependencies","peerDependenciesMeta","optionalDependencies","bundledDependencies","bundleDependencies","extensionPack","extensionDependencies","flat","packageManager","engines","engineStrict","volta","languageName","os","cpu","preferGlobal","publishConfig","icon","badges","galleryBanner","preview","markdown","pnpm"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"},{order:{type:"asc"},pathPattern:"^(?:resolutions|overrides|pnpm.overrides)$"},{order:{type:"asc"},pathPattern:String.raw`^workspaces\.catalog$`},{order:{type:"asc"},pathPattern:String.raw`^workspaces\.catalogs\.[^.]+$`},{order:["types","import","require","default"],pathPattern:"^exports.*$"},{order:["applypatch-msg","pre-applypatch","post-applypatch","pre-commit","pre-merge-commit","prepare-commit-msg","commit-msg","post-commit","pre-rebase","post-checkout","post-merge","pre-push","pre-receive","update","post-receive","post-update","push-to-checkout","pre-auto-gc","post-rewrite","sendemail-validate","fsmonitor-watchman","p4-pre-submit","post-index-chang"],pathPattern:"^(?:gitHooks|husky|simple-git-hooks)$"},{order:["build","preinstall","install","postinstall","lint",{order:{type:"asc"}}],pathPattern:"^scripts$"}]}},{files:["**/tsconfig.json","**/tsconfig.*.json"],name:"anolilab/jsonc/tsconfig-json",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","mapRoot","newLine","noEmit","noEmitHelpers","noEmitOnError","outDir","outFile","preserveConstEnums","preserveValueImports","removeComments","sourceMap","sourceRoot","stripInternal","allowSyntheticDefaultImports","esModuleInterop","forceConsistentCasingInFileNames","isolatedDeclarations","isolatedModules","preserveSymlinks","verbatimModuleSyntax","erasableSyntaxOnly","skipDefaultLibCheck","skipLibCheck"],pathPattern:"^compilerOptions$"}]}},{files:["**/renovate.json"],rules:{...p.configs["recommended-with-jsonc"].rules,"jsonc/comma-dangle":["error","never"],"jsonc/no-comments":"off"}},...s?p.configs["flat/prettier"]:[],{files:["**/*.json","**/*.jsonc","**/*.json5"],rules:{...a?{"jsonc/array-bracket-spacing":["error","never"],"jsonc/comma-dangle":["error","never"],"jsonc/comma-style":["error","last"],"jsonc/indent":["error",c],"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":"error","jsonc/quotes":"error"}:{},...r}}]},"jsonc"),fr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-jsx-a11y"));return[{files:o,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/jsx-a11y/setup",plugins:{"jsx-a11y":t},rules:{"jsx-a11y/accessible-emoji":"off","jsx-a11y/alt-text":["error",{area:[],elements:["img","object","area",'input[type="image"]'],img:[],'input[type="image"]':[],object:[]}],"jsx-a11y/anchor-has-content":["error",{components:[]}],"jsx-a11y/anchor-is-valid":["error",{aspects:["noHref","invalidHref","preferButton"],components:["A","LinkTo","Link"],specialLink:["to"]}],"jsx-a11y/aria-activedescendant-has-tabindex":"error","jsx-a11y/aria-props":"error","jsx-a11y/aria-proptypes":"error","jsx-a11y/aria-role":["error",{ignoreNonDOM:!1}],"jsx-a11y/aria-unsupported-elements":"error","jsx-a11y/autocomplete-valid":["off",{inputComponents:[]}],"jsx-a11y/click-events-have-key-events":"error","jsx-a11y/control-has-associated-label":["error",{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":["error",{components:[""]}],"jsx-a11y/html-has-lang":"error","jsx-a11y/iframe-has-title":"error","jsx-a11y/img-redundant-alt":"error","jsx-a11y/interactive-supports-focus":"error","jsx-a11y/label-has-associated-control":["error",{assert:"both",controlComponents:[],depth:25,labelAttributes:[],labelComponents:[]}],"jsx-a11y/lang":"error","jsx-a11y/media-has-caption":["error",{audio:[],track:[],video:[]}],"jsx-a11y/mouse-events-have-key-events":"error","jsx-a11y/no-access-key":"error","jsx-a11y/no-autofocus":["error",{ignoreNonDOM:!0}],"jsx-a11y/no-distracting-elements":["error",{elements:["marquee","blink"]}],"jsx-a11y/no-interactive-element-to-noninteractive-role":["error",{tr:["none","presentation"]}],"jsx-a11y/no-noninteractive-element-interactions":["error",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/no-noninteractive-element-to-interactive-role":["error",{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":["error",{roles:["tabpanel"],tags:[]}],"jsx-a11y/no-onchange":"off","jsx-a11y/no-redundant-roles":"error","jsx-a11y/no-static-element-interactions":["error",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/role-has-required-aria-props":"error","jsx-a11y/role-supports-aria-props":"error","jsx-a11y/scope":"error","jsx-a11y/tabindex-no-positive":"error",...s}}]}),dr=n.createConfig("markdown",async(e,r)=>{const{componentExts:o=[],files:s=r,overrides:t}=e,[a,c]=await Promise.all([l(import("typescript-eslint")),l(import("@eslint/markdown"))]),p=a.configs.disableTypeChecked.rules;return[{name:"anolilab/markdown/setup",plugins:{markdown:c}},{files:s,ignores:n.getFilesGlobs("markdown_in_markdown"),name:"anolilab/markdown/processor",processor:pe.mergeProcessors([c.processors.markdown,pe.processorPassThrough])},{files:s,languageOptions:{parser:D},name:"anolilab/markdown/parser",rules:c.configs.recommended[0].rules},{files:["**/*.md","**/*.md/**/*.?([cm])[jt]s?(x)","**/*.md/**/*.json",...o.map(u=>`**/*.md/**/*.${u}`)],languageOptions:{parserOptions:{ecmaFeatures:{impliedStrict:!0}}},name:"anolilab/markdown/disabled",rules:{"@stylistic/comma-dangle":"off","@stylistic/eol-last":"off","@stylistic/prefer-global/process":"off","@stylistic/quote-props":"off","@stylistic/semi":"off","@typescript-eslint/no-unused-expressions":"off","antfu/no-top-level-await":"off","import/newline-after-import":"off","no-alert":"off","no-console":"off","no-labels":"off","no-lone-blocks":"off","no-restricted-syntax":"off","no-undef":"off","no-unused-expressions":"off","no-unused-labels":"off","no-unused-vars":"off",...p,"no-for-of-array/no-for-of-array":"off","unicode-bom":"off","unicorn/prefer-module":"off","unicorn/prefer-string-raw":"off","unused-imports/no-unused-imports":"off","unused-imports/no-unused-vars":"off",...t}}]});var ur=Object.defineProperty,mr=v((e,r)=>ur(e,"name",{value:r,configurable:!0}),"s");const gr=mr(async e=>{const r=await l(import("eslint-plugin-no-secrets"));return[{files:["*","*/**"],ignores:["package.json","**/package.json","package-lock.json","**/package-lock.json","tsconfig.json","**/tsconfig.json"],languageOptions:{ecmaVersion:6},name:"anolilab/no-secrets",plugins:{"no-secrets":r},rules:{"no-secrets/no-secrets":"error",...e.overrides}}]},"noSecrets"),yr=n.createConfig("js",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-no-unsanitized"));return[{files:o,name:"anolilab/no-unsanitized/setup",plugins:{"no-unsanitized":t},rules:{"no-unsanitized/method":"error","no-unsanitized/property":"error",...s}}]}),hr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await l(import("eslint-plugin-n")),c=t.engines?.node,p=c?Q.minVersion(c)?.version:void 0;return[{name:"anolilab/node/setup",plugins:{n:a}},{files:o,name:"anolilab/node/rules",rules:{...a.configs.recommended.rules,"global-require":"error","n/callback-return":"off","n/file-extension-in-import":"off","n/handle-callback-err":"off","n/no-extraneous-import":"off","n/no-extraneous-require":"off","n/no-missing-import":"off","n/no-missing-require":"off","n/no-mixed-requires":["error",{allowCall:!0,grouping:!0}],"n/no-new-require":"error","n/no-process-env":"off","n/no-process-exit":"off","n/no-restricted-modules":"off","n/no-sync":"off","n/no-unpublished-bin":"error","n/process-exit-as-throw":"error","no-buffer-constructor":"error","no-path-concat":"error",...p?{"n/no-unsupported-features/es-builtins":["error",{version:p}],"n/no-unsupported-features/es-syntax":["error",{ignores:["modules"],version:p}],"n/no-unsupported-features/node-builtins":["error",{version:p}]}:{},...s}}]}),br=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await l(import("eslint-plugin-perfectionist"));return g.hasPackageJsonAnyDependency(t,["eslint-plugin-typescript-sort-keys"])&&console.warn(`
|
|
7
7
|
Please remove "eslint-plugin-typescript-sort-keys" from your package.json, it conflicts with "eslint-plugin-perfectionist".
|
|
8
|
-
`),[{name:"anolilab/perfectionist/setup",plugins:{perfectionist:a}},{files:o,name:"anolilab/perfectionist/rules",rules:{...a.configs["recommended-natural"].rules,"perfectionist/sort-imports":"off","perfectionist/sort-modules":"off","perfectionist/sort-named-exports":"off","perfectionist/sort-named-imports":"off","perfectionist/sort-union-types":"off",...s}},{files:n.getFilesGlobs("ts"),name:"anolilab/perfectionist/typescript",rules:{"perfectionist/sort-classes":"off"}},{files:n.getFilesGlobs("postcss"),name:"anolilab/perfectionist/postcss",rules:{"perfectionist/sort-objects":"off"}}]}),xr=n.createConfig("e2e",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-playwright"));return[{files:o,plugins:{playwright:t},rules:{...t.configs.recommended.rules,...s}}]});var wr=Object.defineProperty,jr=v((e,r)=>wr(e,"name",{value:r,configurable:!0}),"n$3");const vr=jr(async()=>{const e=await Se.findUp("pnpm-workspace.yaml");if(!e)return!1;try{const r=await Fe.readYaml(e);return"catalog"in r||"catalogs"in r}catch{return!1}},"detectCatalogUsage"),kr=n.createConfig("all",async e=>{const{catalogs:r=await vr(),isInEditor:o=!1}=e,[s,t,a]=await Promise.all([l(import("yaml-eslint-parser")),l(import("eslint-plugin-pnpm")),l(import("jsonc-eslint-parser"))]);return[{files:["package.json","**/package.json"],languageOptions:{parser:a},name:"anolilab/pnpm/package-json",plugins:{pnpm:t},rules:{...r?{"pnpm/json-enforce-catalog":["error",{autofix:!o}]}:{},"pnpm/json-prefer-workspace-settings":["error",{autofix:!o}],"pnpm/json-valid-catalog":["error",{autofix:!o}]}},{files:["pnpm-workspace.yaml"],languageOptions:{parser:s},name:"anolilab/pnpm/pnpm-workspace-yaml",plugins:{pnpm:t},rules:{"pnpm/yaml-enforce-settings":["error",{settings:{catalogMode:"prefer",cleanupUnusedCatalogs:!0,shellEmulator:!0,trustPolicy:"no-downgrade"}}],"pnpm/yaml-no-duplicate-catalog-item":"error","pnpm/yaml-no-unused-catalog-item":"error"}},{files:["pnpm-workspace.yaml"],name:"anolilab/yaml/pnpm-workspace",rules:{"yaml/sort-keys":["error",{order:["cacheDir","catalogMode","cleanupUnusedCatalogs","dedupeDirectDeps","deployAllFiles","enablePrePostScripts","engineStrict","extendNodePath","hoist","hoistPattern","hoistWorkspacePackages","ignoreCompatibilityDb","ignoreDepScripts","ignoreScripts","ignoreWorkspaceRootCheck","managePackageManagerVersions","minimumReleaseAge","minimumReleaseAgeExclude","modulesDir","nodeLinker","nodeVersion","optimisticRepeatInstall","packageManagerStrict","packageManagerStrictVersion","preferSymlinkedExecutables","preferWorkspacePackages","publicHoistPattern","registrySupportsTimeField","requiredScripts","resolutionMode","savePrefix","scriptShell","shamefullyHoist","shellEmulator","stateDir","supportedArchitectures","symlink","tag","trustPolicy","trustPolicyExclude","updateNotifier","packages","overrides","patchedDependencies","catalog","catalogs","allowedDeprecatedVersions","allowNonAppliedPatches","configDependencies","ignoredBuiltDependencies","ignoredOptionalDependencies","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","packageExtensions","peerDependencyRules"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:".*"}]}}]}),Pr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-promise"));return[{files:o,name:"anolilab/promise/rules",plugins:{promise:t},rules:{...ue.fixupPluginRules(t?.configs["flat/recommended"].rules),"promise/prefer-await-to-callbacks":"off","promise/prefer-await-to-then":"off",...s}}]}),oe={allow:["__DEV__","__STORYBOOK_CLIENT_API__","__STORYBOOK_ADDONS_CHANNEL__","__STORYBOOK_STORY_STORE__"],allowAfterSuper:!1,allowAfterThis:!1,enforceInMethodNames:!0},be={"array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off",camelcase:["error",{ignoreDestructuring:!1,properties:"never"}],"capitalized-comments":["off","never",{block:{ignoreConsecutiveComments:!0,ignoreInlineComments:!0,ignorePattern:".*"},line:{ignoreConsecutiveComments:!0,ignoreInlineComments:!0,ignorePattern:".*"}}],"comma-style":"off","computed-property-spacing":"off","consistent-this":"off","default-param-last":["error"],"eol-last":"off","func-name-matching":["off","always",{considerPropertyDescriptor:!0,includeCommonJSModuleExports:!1}],"func-names":["error","as-needed"],"func-style":["error","expression"],"function-call-argument-newline":"off","function-paren-newline":"off","id-blacklist":"error","id-denylist":"off","id-length":"off","id-match":"off","implicit-arrow-linebreak":"off","jsx-quotes":"off","line-comment-position":"off","linebreak-style":"off","lines-around-directive":["error",{after:"always",before:"always"}],"max-depth":["off",4],"max-len":"off","max-lines":["off",{max:300,skipBlankLines:!0,skipComments:!0}],"max-lines-per-function":["off",{IIFEs:!0,max:50,skipBlankLines:!0,skipComments:!0}],"max-nested-callbacks":"off","max-params":["off",3],"max-statements":["off",10],"max-statements-per-line":"off","multiline-comment-style":"off","multiline-ternary":"off","new-cap":["error",{capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"],newIsCap:!0,newIsCapExceptions:[]}],"new-parens":"off","newline-after-var":"off","newline-before-return":"off","newline-per-chained-call":"off","no-array-constructor":"error","no-bitwise":"error","no-continue":"off","no-inline-comments":"off","no-lonely-if":"error","no-mixed-operators":["error",{allowSamePrecedence:!1,groups:[["%","**"],["%","+"],["%","-"],["%","*"],["%","/"],["/","*"],["&","|","<<",">>",">>>"],["==","!=","===","!=="],["&&","||"],["in","instanceof"]]}],"no-mixed-spaces-and-tabs":"off","no-multi-assign":["error"],"no-multiple-empty-lines":"off","no-negated-condition":"off","no-nested-ternary":"error","no-new-object":"error","no-plusplus":"error","no-restricted-syntax":["error",{message:"for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",selector:"ForInStatement"},{message:"Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",selector:"LabeledStatement"},{message:"`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",selector:"WithStatement"},{message:"`useMemo` with an empty dependency array can't provide a stable reference, use `useRef` instead.",selector:"CallExpression[callee.name=useMemo][arguments.1.type=ArrayExpression][arguments.1.elements.length=0]"},{message:"Use `.key` instead of `.keyCode`",selector:"MemberExpression > .property[type=Identifier][name=keyCode]"},{message:"Do not use full-width tilde. Use wave dash instead.",selector:":matches(Literal[value=/~/],TemplateElement[value.raw=/~/])"},{message:"Use `.toString()` instead of template literal if you want to convert a value to string.",selector:'TemplateLiteral[quasis.0.value.raw=""][quasis.1.tail=true][quasis.1.value.raw=""]'}],"no-spaced-func":"off","no-tabs":"off","no-ternary":"off","no-trailing-spaces":"off","no-underscore-dangle":["error",oe],"no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var":["error","never"],"one-var-declaration-per-line":"off","operator-assignment":["error","always"],"operator-linebreak":"off","padded-blocks":"off","padding-line-between-statements":"off","prefer-exponentiation-operator":"error","prefer-object-spread":"error","quote-props":"off",quotes:"off","require-jsdoc":"off","rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","sort-keys":"off","sort-vars":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-infix-ops":"off","space-unary-ops":"off","spaced-comment":"off","switch-colon-spacing":"off","template-tag-spacing":"off","unicode-bom":["error","never"],"wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off"},Cr=n.createConfig("all",async(e,r)=>{const{files:o=r,prettier:s}=e;return[{files:o,name:"anolilab/style/rules",rules:{...be,"quote-props":"off",...s?{"array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off","arrow-parens":"off","arrow-spacing":"off","block-spacing":"off","brace-style":"off","comma-dangle":"off","comma-spacing":"off","comma-style":"off","computed-property-spacing":"off",curly:0,"dot-location":"off","eol-last":"off","func-call-spacing":"off","function-call-argument-newline":"off","function-paren-newline":"off","generator-star-spacing":"off","implicit-arrow-linebreak":"off",indent:"off","jsx-quotes":"off","key-spacing":"off","keyword-spacing":"off","linebreak-style":"off","lines-around-comment":0,"max-len":0,"max-statements-per-line":"off","multiline-ternary":"off","new-parens":"off","newline-per-chained-call":"off","no-confusing-arrow":0,"no-extra-parens":"off","no-extra-semi":"off","no-floating-decimal":"off","no-mixed-operators":0,"no-mixed-spaces-and-tabs":"off","no-multi-spaces":"off","no-multiple-empty-lines":"off","no-tabs":0,"no-trailing-spaces":"off","no-unexpected-multiline":0,"no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var-declaration-per-line":"off","operator-linebreak":"off","padded-blocks":"off",quotes:0,"rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-unary-ops":"off","switch-colon-spacing":"off","template-curly-spacing":"off","template-tag-spacing":"off","wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off"}:{}}},{files:n.getFilesGlobs("ts"),name:"anolilab/style/ts-rules",rules:{"brace-style":"off",camelcase:"off","comma-dangle":"off","comma-spacing":"off","func-call-spacing":"off",indent:"off","keyword-spacing":"off","lines-between-class-members":"off","no-array-constructor":"off",quotes:"off",semi:"off","space-before-function-paren":"off"}}]}),Or=["vite"],Dr=["@remix-run/node","@remix-run/react","@remix-run/serve","@remix-run/dev"],_r=["next"],Sr=["@react-router/node","@react-router/react","@react-router/serve","@react-router/dev"],Fr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,filesTypeAware:s=n.getFilesGlobs("ts"),overrides:t,packageJson:a,prettier:c,reactCompiler:p,silent:u,stylistic:b=!0,tsconfigPath:h}=e,x=[...n.getFilesGlobs("astro"),...n.getFilesGlobs("markdown"),...n.getFilesGlobs("js"),...n.getFilesGlobs("jsx"),"**/*.json","**/*.jsonc",...e.ignoresTypeAware??[]];let{isTypeAware:O=!0}=e;O=O&&h!==void 0;const{indent:k=4}=typeof b=="boolean"?{}:b,$={"react-x/no-leaked-conditional-rendering":"error","react-x/no-unused-props":"error","react-x/prefer-read-only-props":"error"},[R,q,N,_,A,S]=await Promise.all([l(import("@eslint-react/eslint-plugin")),l(import("eslint-plugin-react")),l(import("eslint-plugin-react-hooks")),l(import("eslint-plugin-react-refresh")),l(import("eslint-plugin-react-perf")),l(import("eslint-plugin-react-you-might-not-need-an-effect"))]),W=g.hasPackageJsonAnyDependency(a,Or),J=g.hasPackageJsonAnyDependency(a,Dr),z=g.hasPackageJsonAnyDependency(a,_r),I=g.hasPackageJsonAnyDependency(a,Sr),{plugins:T}=R.configs.all;let F=a.dependencies?.react??a.devDependencies?.react,j=!1;if(F!==void 0){const C=Q.parse(F);C!==null&&(F=`${C.major}.${C.minor}`,u||console.info(`
|
|
8
|
+
`),[{name:"anolilab/perfectionist/setup",plugins:{perfectionist:a}},{files:o,name:"anolilab/perfectionist/rules",rules:{...a.configs["recommended-natural"].rules,"perfectionist/sort-imports":"off","perfectionist/sort-modules":"off","perfectionist/sort-named-exports":"off","perfectionist/sort-named-imports":"off","perfectionist/sort-union-types":"off",...s}},{files:n.getFilesGlobs("ts"),name:"anolilab/perfectionist/typescript",rules:{"perfectionist/sort-classes":"off"}},{files:n.getFilesGlobs("postcss"),name:"anolilab/perfectionist/postcss",rules:{"perfectionist/sort-objects":"off"}}]}),xr=n.createConfig("e2e",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-playwright"));return[{files:o,plugins:{playwright:t},rules:{...t.configs.recommended.rules,...s}}]});var wr=Object.defineProperty,jr=v((e,r)=>wr(e,"name",{value:r,configurable:!0}),"n$3");const vr=jr(async()=>{const e=await Se.findUp("pnpm-workspace.yaml");if(!e)return!1;try{const r=await Fe.readYaml(e);return"catalog"in r||"catalogs"in r}catch{return!1}},"detectCatalogUsage"),kr=n.createConfig("all",async e=>{const{catalogs:r=await vr(),isInEditor:o=!1}=e,[s,t,a]=await Promise.all([l(import("yaml-eslint-parser")),l(import("eslint-plugin-pnpm")),l(import("jsonc-eslint-parser"))]);return[{files:["package.json","**/package.json"],languageOptions:{parser:a},name:"anolilab/pnpm/package-json",plugins:{pnpm:t},rules:{...r?{"pnpm/json-enforce-catalog":["error",{autofix:!o}]}:{},"pnpm/json-prefer-workspace-settings":["error",{autofix:!o}],"pnpm/json-valid-catalog":["error",{autofix:!o}]}},{files:["pnpm-workspace.yaml"],languageOptions:{parser:s},name:"anolilab/pnpm/pnpm-workspace-yaml",plugins:{pnpm:t},rules:{"pnpm/yaml-enforce-settings":["error",{settings:{catalogMode:"prefer",cleanupUnusedCatalogs:!0,shellEmulator:!0,trustPolicy:"no-downgrade"}}],"pnpm/yaml-no-duplicate-catalog-item":"error","pnpm/yaml-no-unused-catalog-item":"error"}},{files:["pnpm-workspace.yaml"],name:"anolilab/yaml/pnpm-workspace",rules:{"yaml/sort-keys":["error",{order:["cacheDir","catalogMode","cleanupUnusedCatalogs","dedupeDirectDeps","deployAllFiles","enablePrePostScripts","engineStrict","extendNodePath","hoist","hoistPattern","hoistWorkspacePackages","ignoreCompatibilityDb","ignoreDepScripts","ignoreScripts","ignoreWorkspaceRootCheck","managePackageManagerVersions","minimumReleaseAge","minimumReleaseAgeExclude","modulesDir","nodeLinker","nodeVersion","optimisticRepeatInstall","packageManagerStrict","packageManagerStrictVersion","preferSymlinkedExecutables","preferWorkspacePackages","publicHoistPattern","registrySupportsTimeField","requiredScripts","resolutionMode","savePrefix","scriptShell","shamefullyHoist","shellEmulator","stateDir","supportedArchitectures","symlink","tag","trustPolicy","trustPolicyExclude","updateNotifier","packages","overrides","patchedDependencies","catalog","catalogs","allowedDeprecatedVersions","allowNonAppliedPatches","configDependencies","ignoredBuiltDependencies","ignoredOptionalDependencies","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","packageExtensions","peerDependencyRules"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:".*"}]}}]}),Pr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-promise"));return[{files:o,name:"anolilab/promise/rules",plugins:{promise:t},rules:{...ue.fixupPluginRules(t?.configs["flat/recommended"].rules),"promise/prefer-await-to-callbacks":"off","promise/prefer-await-to-then":"off",...s}}]}),oe={allow:["__DEV__","__STORYBOOK_CLIENT_API__","__STORYBOOK_ADDONS_CHANNEL__","__STORYBOOK_STORY_STORE__"],allowAfterSuper:!1,allowAfterThis:!1,enforceInMethodNames:!0},be={"array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off",camelcase:["error",{ignoreDestructuring:!1,properties:"never"}],"capitalized-comments":["off","never",{block:{ignoreConsecutiveComments:!0,ignoreInlineComments:!0,ignorePattern:".*"},line:{ignoreConsecutiveComments:!0,ignoreInlineComments:!0,ignorePattern:".*"}}],"comma-style":"off","computed-property-spacing":"off","consistent-this":"off","default-param-last":["error"],"eol-last":"off","func-name-matching":["off","always",{considerPropertyDescriptor:!0,includeCommonJSModuleExports:!1}],"func-names":["error","as-needed"],"func-style":["error","expression"],"function-call-argument-newline":"off","function-paren-newline":"off","id-blacklist":"error","id-denylist":"off","id-length":"off","id-match":"off","implicit-arrow-linebreak":"off","jsx-quotes":"off","line-comment-position":"off","linebreak-style":"off","lines-around-directive":["error",{after:"always",before:"always"}],"max-depth":["off",4],"max-len":"off","max-lines":["off",{max:300,skipBlankLines:!0,skipComments:!0}],"max-lines-per-function":["off",{IIFEs:!0,max:50,skipBlankLines:!0,skipComments:!0}],"max-nested-callbacks":"off","max-params":["off",3],"max-statements":["off",10],"max-statements-per-line":"off","multiline-comment-style":"off","multiline-ternary":"off","new-cap":["error",{capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"],newIsCap:!0,newIsCapExceptions:[]}],"new-parens":"off","newline-after-var":"off","newline-before-return":"off","newline-per-chained-call":"off","no-array-constructor":"error","no-bitwise":"error","no-continue":"off","no-inline-comments":"off","no-lonely-if":"error","no-mixed-operators":["error",{allowSamePrecedence:!1,groups:[["%","**"],["%","+"],["%","-"],["%","*"],["%","/"],["/","*"],["&","|","<<",">>",">>>"],["==","!=","===","!=="],["&&","||"],["in","instanceof"]]}],"no-mixed-spaces-and-tabs":"off","no-multi-assign":["error"],"no-multiple-empty-lines":"off","no-negated-condition":"off","no-nested-ternary":"error","no-new-object":"error","no-plusplus":"error","no-restricted-syntax":["error",{message:"for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",selector:"ForInStatement"},{message:"Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",selector:"LabeledStatement"},{message:"`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",selector:"WithStatement"},{message:"`useMemo` with an empty dependency array can't provide a stable reference, use `useRef` instead.",selector:"CallExpression[callee.name=useMemo][arguments.1.type=ArrayExpression][arguments.1.elements.length=0]"},{message:"Use `.key` instead of `.keyCode`",selector:"MemberExpression > .property[type=Identifier][name=keyCode]"},{message:"Do not use full-width tilde. Use wave dash instead.",selector:":matches(Literal[value=/~/],TemplateElement[value.raw=/~/])"},{message:"Use `.toString()` instead of template literal if you want to convert a value to string.",selector:'TemplateLiteral[quasis.0.value.raw=""][quasis.1.tail=true][quasis.1.value.raw=""]'}],"no-spaced-func":"off","no-tabs":"off","no-ternary":"off","no-trailing-spaces":"off","no-underscore-dangle":["error",oe],"no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var":["error","never"],"one-var-declaration-per-line":"off","operator-assignment":["error","always"],"operator-linebreak":"off","padded-blocks":"off","padding-line-between-statements":"off","prefer-exponentiation-operator":"error","prefer-object-spread":"error","quote-props":"off",quotes:"off","require-jsdoc":"off","rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","sort-keys":"off","sort-vars":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-infix-ops":"off","space-unary-ops":"off","spaced-comment":"off","switch-colon-spacing":"off","template-tag-spacing":"off","unicode-bom":["error","never"],"wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off"},Cr=n.createConfig("all",async(e,r)=>{const{files:o=r,prettier:s}=e;return[{files:o,name:"anolilab/style/rules",rules:{...be,"quote-props":"off",...s?{"array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off","arrow-parens":"off","arrow-spacing":"off","block-spacing":"off","brace-style":"off","comma-dangle":"off","comma-spacing":"off","comma-style":"off","computed-property-spacing":"off",curly:0,"dot-location":"off","eol-last":"off","func-call-spacing":"off","function-call-argument-newline":"off","function-paren-newline":"off","generator-star-spacing":"off","implicit-arrow-linebreak":"off",indent:"off","jsx-quotes":"off","key-spacing":"off","keyword-spacing":"off","linebreak-style":"off","lines-around-comment":0,"max-len":0,"max-statements-per-line":"off","multiline-ternary":"off","new-parens":"off","newline-per-chained-call":"off","no-confusing-arrow":0,"no-extra-parens":"off","no-extra-semi":"off","no-floating-decimal":"off","no-mixed-operators":0,"no-mixed-spaces-and-tabs":"off","no-multi-spaces":"off","no-multiple-empty-lines":"off","no-tabs":0,"no-trailing-spaces":"off","no-unexpected-multiline":0,"no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var-declaration-per-line":"off","operator-linebreak":"off","padded-blocks":"off",quotes:0,"rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-unary-ops":"off","switch-colon-spacing":"off","template-curly-spacing":"off","template-tag-spacing":"off","wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off"}:{}}},{files:n.getFilesGlobs("ts"),name:"anolilab/style/ts-rules",rules:{"brace-style":"off",camelcase:"off","comma-dangle":"off","comma-spacing":"off","func-call-spacing":"off",indent:"off","keyword-spacing":"off","lines-between-class-members":"off","no-array-constructor":"off",quotes:"off",semi:"off","space-before-function-paren":"off"}}]}),Or=["vite"],Dr=["@remix-run/node","@remix-run/react","@remix-run/serve","@remix-run/dev"],_r=["next"],Sr=["@react-router/node","@react-router/react","@react-router/serve","@react-router/dev"],Fr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,filesTypeAware:s=n.getFilesGlobs("ts"),overrides:t,packageJson:a,prettier:c,reactCompiler:p,silent:u,stylistic:b=!0,tsconfigPath:h}=e,x=[...n.getFilesGlobs("astro"),...n.getFilesGlobs("markdown"),...n.getFilesGlobs("js"),...n.getFilesGlobs("jsx"),"**/*.json","**/*.jsonc",...e.ignoresTypeAware??[]];let{isTypeAware:O=!0}=e;O=O&&h!==void 0;const{indent:k=4}=typeof b=="boolean"?{}:b,$={"react-x/no-leaked-conditional-rendering":"error","react-x/no-unused-props":"error","react-x/prefer-read-only-props":"error"},[R,q,N,_,A,S]=await Promise.all([l(import("@eslint-react/eslint-plugin")),l(import("eslint-plugin-react")),l(import("eslint-plugin-react-hooks")),l(import("eslint-plugin-react-refresh")),l(import("eslint-plugin-react-perf")),l(import("eslint-plugin-react-you-might-not-need-an-effect"))]),B=g.hasPackageJsonAnyDependency(a,Or),J=g.hasPackageJsonAnyDependency(a,Dr),z=g.hasPackageJsonAnyDependency(a,_r),I=g.hasPackageJsonAnyDependency(a,Sr),{plugins:T}=R.configs.all;let F=a.dependencies?.react??a.devDependencies?.react,j=!1;if(F!==void 0){const C=Q.parse(F);C!==null&&(F=`${C.major}.${C.minor}`,u||console.info(`
|
|
9
9
|
@anolilab/eslint-config found the version ${F} of react in your dependencies, this version ${F} will be used to setup the "eslint-plugin-react"
|
|
10
10
|
`)),C?.major&&C.major>=19&&(j=!0)}let U=!1;if(h!==void 0){const C=de.readTsConfig(h);C.compilerOptions!==void 0&&(C.compilerOptions.jsx==="react-jsx"||C.compilerOptions.jsx==="react-jsxdev")&&(U=!0,u||console.info(`@anolilab/eslint-config found react jsx-runtime.
|
|
11
11
|
|
|
12
12
|
Following rules are disabled: "react/jsx-uses-react" and "react/react-in-jsx-scope".
|
|
13
13
|
If you dont use the new react jsx-runtime in you project, please enable it manually.
|
|
14
14
|
`))}j=j&&p!==!1;let M;return j&&(console.info(`@anolilab/eslint-config enabling react-compiler plugin
|
|
15
|
-
`),M=await l(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:q,"react-dom":T["@eslint-react/dom"],"react-hooks":N,"react-hooks-extra":T["@eslint-react/hooks-extra"],"react-naming-convention":T["@eslint-react/naming-convention"],"react-perf":A,"react-refresh":_,"react-web-api":T["@eslint-react/web-api"],"react-x":T["@eslint-react"],"react-you-might-not-need-an-effect":S,...j&&M?M.configs.recommended.plugins:{}}},{files:o,languageOptions:{globals:{...B.browser},parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{...R.configs["disable-conflict-eslint-plugin-react"]?.rules,"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":["error",{...oe,allow:[...oe.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-naming-convention/component-name":"error","react-naming-convention/context-name":"error","react-naming-convention/filename":"off","react-naming-convention/use-state":"error","react-refresh/only-export-components":["error",{allowConstantExport:W,allowExportNames:[...z?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...J||I?["meta","links","headers","loader","action","clientLoader","clientAction","handle","shouldRevalidate"]:[]]}],"react-web-api/no-leaked-event-listener":"error","react-web-api/no-leaked-interval":"error","react-web-api/no-leaked-resize-observer":"error","react-web-api/no-leaked-timeout":"error","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-shorthand-boolean":"error","react-x/jsx-shorthand-fragment":"error","react-x/jsx-uses-react":U?"off":"error","react-x/jsx-uses-vars":"error","react-x/no-access-state-in-setstate":"error","react-x/no-array-index-key":"error","react-x/no-children-count":"error","react-x/no-children-for-each":"error","react-x/no-children-map":"error","react-x/no-children-only":"error","react-x/no-children-prop":"off","react-x/no-children-to-array":"error","react-x/no-class-component":"off","react-x/no-clone-element":"error","react-x/no-component-will-mount":"error","react-x/no-component-will-receive-props":"error","react-x/no-component-will-update":"error","react-x/no-context-provider":"error","react-x/no-create-ref":"error","react-x/no-default-props":"error","react-x/no-direct-mutation-state":"error","react-x/no-duplicate-key":"error","react-x/no-forward-ref":"error","react-x/no-implicit-key":"error","react-x/no-missing-component-display-name":"off","react-x/no-missing-context-display-name":"off","react-x/no-missing-key":"error","react-x/no-misused-capture-owner-stack":"off","react-x/no-nested-component-definitions":"error","react-x/no-nested-lazy-component-declarations":"error","react-x/no-prop-types":"error","react-x/no-redundant-should-component-update":"error","react-x/no-set-state-in-component-did-mount":"error","react-x/no-set-state-in-component-did-update":"error","react-x/no-set-state-in-component-will-update":"error","react-x/no-string-refs":"error","react-x/no-unnecessary-use-callback":"error","react-x/no-unnecessary-use-memo":"error","react-x/no-unsafe-component-will-mount":"error","react-x/no-unsafe-component-will-receive-props":"error","react-x/no-unsafe-component-will-update":"error","react-x/no-unstable-context-value":"error","react-x/no-unstable-default-props":"error","react-x/no-unused-class-component-members":"error","react-x/no-unused-state":"error","react-x/no-use-context":"error","react-x/no-useless-forward-ref":"error","react-x/no-useless-fragment":"off","react-x/prefer-destructuring-assignment":"off","react-x/prefer-read-only-props":"off","react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["error",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",k,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",k],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"off","react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"off","react/jsx-no-useless-fragment":"off","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":"off","react/jsx-uses-vars":"off","react/no-access-state-in-setstate":"off","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"off","react/no-children-prop":"off","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"off","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"off","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"off","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"off","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":"off","react/react-in-jsx-scope":U?"off":"error","react/require-default-props":"off","react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","static public field"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...j&&M?{"react-compiler/react-compiler":"error","react-hooks/component-hook-factories":"error","react-hooks/config":"error","react-hooks/error-boundaries":"error","react-hooks/gating":"error","react-hooks/globals":"error","react-hooks/immutability":"error","react-hooks/incompatible-library":"warn","react-hooks/preserve-manual-memoization":"error","react-hooks/purity":"error","react-hooks/refs":"error","react-hooks/set-state-in-effect":"error","react-hooks/set-state-in-render":"error","react-hooks/static-components":"error","react-hooks/unsupported-syntax":"warn","react-hooks/use-memo":"error"}:{},...A.configs.flat.recommended.rules,...S.configs.recommended.rules,...U?q?.configs.flat?.["jsx-runtime"]?.rules:{},...c?{"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off"}:{},...t},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:F??"detect"},"react-x":{version:F??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}},...U?q.configs.flat["jsx-runtime"].languageOptions.parserOptions:{}},name:"anolilab/react/jsx",rules:{"react-x/naming-convention/filename-extension":["error","as-needed"],"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"off","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"},settings:{extensions:[".jsx"]}},{files:["**/*.tsx"],name:"anolilab/react/tsx",rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:n.getFilesGlobs("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...O?[{files:s,ignores:x,name:"anolilab/react/type-aware-rules",rules:{...$}}]:[]]}),Er=n.createConfig("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,a=Ee.configs["flat/recommended"],c={...a.rules};if(s==="warn")for(const p in c)c[p]==="error"&&(c[p]="warn");return[{...a,files:o,name:"anolilab/regexp/rules",rules:{...c,...t}}]}),qr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-simple-import-sort"));return[{files:o,name:"anolilab/simple-import-sort",plugins:{"simple-import-sort":t},rules:{"simple-import-sort/exports":"error","simple-import-sort/imports":"error",...s}}]}),Ar=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-sonarjs"));return[{name:"anolilab/sonarjs/plugin",plugins:{sonarjs:t}},{files:o,name:"anolilab/sonarjs/rules",rules:{...t.configs.recommended.rules,"sonarjs/file-name-differ-from-class":"error","sonarjs/no-collapsible-if":"error","sonarjs/no-nested-template-literals":"off","sonarjs/no-tab":"error","sonarjs/todo-tag":"off",...s}},{files:n.getFilesGlobs("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:n.getFilesGlobs("js"),languageOptions:{ecmaVersion:"latest"},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off","sonarjs/public-static-readonly":"off"}}]}),Ir=n.createConfig("storybook",async e=>{const{overrides:r}=e,o=[...(await l(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),Tr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await l(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),Nr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),Jr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),Ur=n.createConfig("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await l(import("eslint-plugin-testing-library")),c=g.hasPackageJsonAnyDependency(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":a},rules:{...a.configs["flat/dom"].rules,...c?a.configs["flat/react"].rules:{},...s}}]}),Lr=n.createConfig("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:a=2}=typeof t=="boolean"?{}:t,[c,p]=await Promise.all([l(import("eslint-plugin-toml")),l(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:p},name:"anolilab/toml",plugins:{toml:c},rules:{...t?{"@stylistic/spaced-comment":"off"}:{},"toml/comma-style":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error",...t?{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"error","toml/indent":["error",a==="tab"?2:a],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error"}:{},...s}}]}),$r=n.createConfig("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),te={"init-declarations":"off","no-catch-shadow":"off","no-delete-var":"error","no-label-var":"error","no-restricted-globals":["error",{message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",name:"isFinite"},{message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",name:"isNaN"},...Ie.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":"off","no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Rr=n.createConfig("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:te},{files:n.getFilesGlobs("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Mr=Object.defineProperty,Gr=v((e,r)=>Mr(e,"name",{value:r,configurable:!0}),"w");const zr=n.createConfig("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:a,overridesTypeAware:c,parserOptions:p,prettier:u}=e,b=be,h=ge(t),[x,O]=await Promise.all([l(import("typescript-eslint")),l(import("eslint-plugin-no-for-of-array"))]);let k;p?.erasableSyntaxOnly&&(k=await l(import("eslint-plugin-erasable-syntax-only")));const $=e.filesTypeAware??n.getFilesGlobs("ts"),R=[...n.getFilesGlobs("astro"),...n.getFilesGlobs("markdown"),...n.getFilesGlobs("markdown_inline_js_jsx"),...n.getFilesGlobs("js"),...n.getFilesGlobs("jsx"),"**/*.json","**/*.jsonc",...e.ignoresTypeAware??[]],{tsconfigPath:q}=e;let{isTypeAware:N=!0}=e;N=N&&q!==void 0;const _=Gr((S,W,J)=>{const z=fe.dirname(qe.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:re&&re.tagName.toUpperCase()==="SCRIPT"&&re.src||new URL("index.cjs",document.baseURI).href));return{files:[...W,...o.map(I=>`**/*.${I}`)],...J?{ignores:J}:{},languageOptions:{parser:x.parser,parserOptions:{extraFileExtensions:o.map(I=>`.${I}`),sourceType:"module",...S?{projectService:!0,tsconfigRootDir:z}:{},...p}},name:`anolilab/typescript/${S?"type-aware-parser":"parser"}`}},"makeParser"),A=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":x.plugin,"no-for-of-array":O,...k?k.configs.recommended.plugins:{}}},...N?[_(!1,s),_(!0,$,R)]:[_(!1,s)],...x.configs.strict];return N&&A.push(...x.configs.strictTypeCheckedOnly,{files:[...$,...o.map(S=>`**/*.${S}`)],name:"anolilab/typescript/rules-type-aware",rules:{"@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-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error",...c}},{files:n.getFilesGlobs("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),A.push({files:s,name:"anolilab/typescript/rules",rules:{"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-ts-comment":["error",{minimumDescriptionLength:3,"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":"allow-with-description","ts-nocheck":!0}],"@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/method-signature-style":"error","@typescript-eslint/naming-convention":["error",{format:["camelCase","PascalCase","UPPER_CASE"],selector:"variable"},{format:["camelCase","PascalCase"],selector:"function"},{format:["PascalCase"],selector:"typeLike"}],"@typescript-eslint/no-array-constructor":b["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":h["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":G["no-empty-function"],"@typescript-eslint/no-explicit-any":["error",{fixToUnknown:!1,ignoreRestArgs:!0}],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-loop-func":G["no-loop-func"],"@typescript-eslint/no-magic-numbers":G["no-magic-numbers"],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redeclare":G["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":te["no-shadow"],"@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unused-expressions":G["no-unused-expressions"],"@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":te["no-use-before-define"],"@typescript-eslint/no-useless-constructor":h["no-useless-constructor"],"@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"off","@typescript-eslint/prefer-ts-expect-error":"off","@typescript-eslint/return-await":G["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":b["space-infix-ops"],...k?k.configs.recommended.rules:{},...a,...u?{"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":0,"@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/quotes":0,"@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"}:{}}}),A}),Vr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:a,stylistic:c=!0}=e,{indent:p=4}=typeof c=="boolean"?{}:c,u=await l(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:B.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:u}},{files:o,name:"anolilab/unicorn/rules",rules:{...u.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/import-style":["error",{styles:{"node:path":{named:!0},"node:util":{named:!0},path:{named:!0},util:{named:!0}}}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","unicorn/no-nested-ternary":"off","unicorn/no-useless-undefined":"off","unicorn/prefer-at":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":t.type==="module"?"error":"off","unicorn/prefer-node-protocol":"error","unicorn/prefer-ternary":["error","only-single-line"],"unicorn/prevent-abbreviations":["error",{allowList:{i:!0,j:!0},replacements:{args:!1,dev:!1,dist:!1,env:!1,params:!1,pkg:!1,prop:!1,props:!1,ref:!1,src:!1,utils:!1}}],...a?{"unicorn/empty-brace-spaces":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}:{"unicorn/template-indent":["error",{indent:p}]},...s}},{files:["tsconfig.dev.json","tsconfig.prod.json"],name:"anolilab/unicorn/tsconfig-overrides",rules:{"unicorn/prevent-abbreviations":"off"}},{files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],name:"anolilab/unicorn/ts-overrides",rules:{"unicorn/import-style":"off"}}]});var Wr=Object.defineProperty,Br=v((e,r)=>Wr(e,"name",{value:r,configurable:!0}),"n$2");const Xr=Br(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await l(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Hr=n.createConfig("all",async(e,r)=>{const{files:o=r,isInEditor:s,overrides:t}=e,a=await l(import("eslint-plugin-unused-imports"));return[{files:o,name:"anolilab/unused-imports/rules",plugins:{"unused-imports":a},rules:{"@typescript-eslint/no-unused-vars":"off","no-unused-vars":"off","unused-imports/no-unused-imports":s?"off":"error","unused-imports/no-unused-vars":[s?"warn":"error",{args:"after-used",argsIgnorePattern:"^_",vars:"all",varsIgnorePattern:"^_"}],...t}}]}),Kr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-validate-jsx-nesting"));return[{files:o,name:"anolilab/validate-jsx-nesting/setup",plugins:{"validate-jsx-nesting":t},rules:{"validate-jsx-nesting/no-invalid-jsx-nesting":"error",...s}}]}),Qr={suite:!0,test:!0,chai:!0,describe:!0,it:!0,expectTypeOf:!0,assertType:!0,expect:!0,assert:!0,vitest:!0,vi:!0,beforeAll:!0,afterAll:!0,beforeEach:!0,afterEach:!0,onTestFailed:!0,onTestFinished:!0};let se;const Yr=n.createConfig("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:a,tsconfigPath:c}=e,[p,u]=await Promise.all([l(import("@vitest/eslint-plugin")),l(import("eslint-plugin-no-only-tests"))]);return se=se??{...p,rules:{...p.rules,...u.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:se}},{files:o,...c?{...p.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Qr}},name:"anolilab/vitest/rules",rules:{...p.configs.all.rules,...p.configs.recommended.rules,"@typescript-eslint/explicit-function-return-type":"off","antfu/no-top-level-await":"off","n/prefer-global/process":"off","no-unused-expressions":"off","vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/max-expects":"off","vitest/no-hooks":"off","vitest/no-mocks-import":"off","vitest/no-only-tests":s?"off":"error","vitest/no-restricted-vi-methods":"off","vitest/no-standalone-expect":"error","vitest/valid-expect":["error",{alwaysAwait:!0,maxArgs:2,minArgs:1}],"vitest/valid-title":"off",...t,...a?{"vitest/padding-around-after-all-blocks":"off","vitest/padding-around-after-each-blocks":"off","vitest/padding-around-all":"off","vitest/padding-around-before-all-blocks":"off","vitest/padding-around-before-each-blocks":"off","vitest/padding-around-describe-blocks":"off","vitest/padding-around-expect-blocks":"off","vitest/padding-around-test-blocks":"off"}:{}}}]}),Zr=n.createConfig("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:a=!0}=e,{indent:c=4,quotes:p="double"}=typeof a=="boolean"?{}:a,[u,b]=await Promise.all([l(import("eslint-plugin-yml")),l(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:b},name:"anolilab/yaml",plugins:{yaml:u},rules:{"@stylistic/spaced-comment":"off","yaml/block-mapping":"error","yaml/block-sequence":"error","yaml/no-empty-key":"error","yaml/no-empty-sequence-entry":"error","yaml/no-irregular-whitespace":"error","yaml/plain-scalar":"error","yaml/vue-custom-block/no-parsing-error":"error",...a?{"yaml/block-mapping-question-indicator-newline":"error","yaml/block-sequence-hyphen-indicator-newline":"error","yaml/flow-mapping-curly-newline":"error","yaml/flow-mapping-curly-spacing":"error","yaml/flow-sequence-bracket-newline":"error","yaml/flow-sequence-bracket-spacing":"error","yaml/indent":[t?"off":"error",c==="tab"?2:c],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:p==="backtick"?"single":p}],"yaml/spaced-comment":"error"}:{},...t?u.configs.prettier.rules:{},...s}}]}),es=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ue.fixupPluginRules(t)},rules:{...t.configs.all.rules,...s}}]}),rs=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var ss=Object.defineProperty,os=v((e,r)=>ss(e,"name",{value:r,configurable:!0}),"e$1");const ts=os(()=>!!(process.env.GIT_PARAMS??process.env.VSCODE_GIT_COMMAND??process.env.npm_lifecycle_script?.startsWith("lint-staged")??!1),"isInGitHooksOrLintStaged");var ns=Object.defineProperty,as=v((e,r)=>ns(e,"name",{value:r,configurable:!0}),"e");const is=as(()=>process.env.CI||ts()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var ls=Object.defineProperty,X=v((e,r)=>ls(e,"name",{value:r,configurable:!0}),"f");const cs=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],H=X((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),d=X((e,r)=>{const o=H(e,r);return{..."overrides"in o?o.overrides:{}}},"getOverrides"),y=X((e,r)=>{const o=H(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),ps=X(async(e={},...r)=>{if("files"in e)throw new Error('[@anolilab/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.');const o=e.cwd??process.cwd(),s=await g.parsePackageJson(fe.join(o,"package.json"),{resolveCatalogs:!0}),t=s.packageManager?.startsWith("pnpm"),a=g.hasPackageJsonAnyDependency(s,["prettier"]),c=g.hasPackageJsonAnyDependency(s,["@anolilab/eslint-config"]),p=g.hasPackageJsonAnyDependency(s,["react","react-dom"]),u=s.dependencies?.react??s.devDependencies?.react;let b=!1;if(u!==void 0){const f=Q.parse(u);f?.major&&f.major>=19&&(b=!0)}let h=!1,x=!1;const O=s.dependencies?.tailwindcss??s.devDependencies?.tailwindcss;if(O){const f=Q.parse(O);f?.major&&f.major<=3&&(h=!0),f?.major&&f.major>=4&&(x=!0)}const{astro:k=g.hasPackageJsonAnyDependency(s,["astro"]),componentExts:$=[],css:R=g.hasPackageJsonAnyDependency(s,["postcss","cssnano"]),gitignore:q=!0,html:N=!1,jsx:_=g.hasPackageJsonAnyDependency(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||p,lodash:A=g.hasPackageJsonAnyDependency(s,["lodash","underscore","lodash-es","@types/lodash","lodash.chunk","lodash.compact","lodash.concat","lodash.difference","lodash.differenceby","lodash.differencewith","lodash.drop","lodash.dropright","lodash.droprightwhile","lodash.dropwhile","lodash.fill","lodash.findindex","lodash.findlastindex","lodash.flatten","lodash.flattendeep","lodash.flattendepth","lodash.frompairs","lodash.head","lodash.indexof","lodash.initial","lodash.intersection","lodash.intersectionby","lodash.intersectionwith","lodash.join","lodash.last","lodash.lastindexof","lodash.nth","lodash.pull","lodash.pullall","lodash.pullallby","lodash.pullallwith","lodash.pullat","lodash.remove","lodash.reverse","lodash.slice","lodash.sortedindex","lodash.sortedindexby","lodash.sortedindexof","lodash.sortedlastindex","lodash.sortedlastindexby","lodash.sortedlastindexof","lodash.sorteduniq","lodash.sorteduniqby","lodash.tail","lodash.take","lodash.takeright","lodash.takerightwhile","lodash.takewhile","lodash.union","lodash.unionby","lodash.unionwith","lodash.uniq","lodash.uniqby","lodash.uniqwith","lodash.unzip","lodash.unzipwith","lodash.without","lodash.xor","lodash.xorby","lodash.xorwith","lodash.zip","lodash.zipobject","lodash.zipobjectdeep","lodash.zipwith","lodash.countby","lodash.every","lodash.filter","lodash.find","lodash.findlast","lodash.flatmap","lodash.flatmapdeep","lodash.flatmapdepth","lodash.foreach","lodash.foreachright","lodash.groupby","lodash.includes","lodash.invokemap","lodash.keyby","lodash.map","lodash.orderby","lodash.partition","lodash.reduce","lodash.reduceright","lodash.reject","lodash.sample","lodash.samplesize","lodash.shuffle","lodash.size","lodash.some","lodash.sortby","lodash.now","lodash.after","lodash.ary","lodash.before","lodash.bind","lodash.bindkey","lodash.curry","lodash.curryright","lodash.debounce","lodash.defer","lodash.delay","lodash.flip","lodash.memoize","lodash.negate","lodash.once","lodash.overargs","lodash.partial","lodash.partialright","lodash.rearg","lodash.rest","lodash.spread","lodash.throttle","lodash.unary","lodash.wrap","lodash.castarray","lodash.clone","lodash.clonedeep","lodash.clonedeepwith","lodash.clonewith","lodash.conformsto","lodash.eq","lodash.gt","lodash.gte","lodash.isarguments","lodash.isarray","lodash.isarraybuffer","lodash.isarraylike","lodash.isarraylikeobject","lodash.isboolean","lodash.isbuffer","lodash.isdate","lodash.iselement","lodash.isempty","lodash.isequal","lodash.isequalwith","lodash.iserror","lodash.isfinite","lodash.isfunction","lodash.isinteger","lodash.islength","lodash.ismap","lodash.ismatch","lodash.ismatchwith","lodash.isnan","lodash.isnative","lodash.isnil","lodash.isnull","lodash.isnumber","lodash.isobject","lodash.isobjectlike","lodash.isplainobject","lodash.isregexp","lodash.issafeinteger","lodash.isset","lodash.isstring","lodash.issymbol","lodash.istypedarray","lodash.isundefined","lodash.isweakmap","lodash.isweakset","lodash.lt","lodash.lte","lodash.toarray","lodash.tofinite","lodash.tointeger","lodash.tolength","lodash.tonumber","lodash.toplainobject","lodash.tosafeinteger","lodash.tostring","lodash.add","lodash.ceil","lodash.divide","lodash.floor","lodash.max","lodash.maxby","lodash.mean","lodash.meanby","lodash.min","lodash.minby","lodash.multiply","lodash.round","lodash.subtract","lodash.sum","lodash.sumby","lodash.clamp","lodash.inrange","lodash.random","lodash.assign","lodash.assignin","lodash.assigninwith","lodash.assignwith","lodash.at","lodash.create","lodash.defaults","lodash.defaultsdeep","lodash.findkey","lodash.findlastkey","lodash.forin","lodash.forinright","lodash.forown","lodash.forownright","lodash.functions","lodash.functionsin","lodash.get","lodash.has","lodash.hasin","lodash.invert","lodash.invertby","lodash.invoke","lodash.keys","lodash.keysin","lodash.mapkeys","lodash.mapvalues","lodash.merge","lodash.mergewith","lodash.omit","lodash.omitby","lodash.pick","lodash.pickby","lodash.result","lodash.set","lodash.setwith","lodash.topairs","lodash.topairsin","lodash.transform","lodash.unset","lodash.update","lodash.updatewith","lodash.values","lodash.valuesin","lodash.chain","lodash.tap","lodash.thru","lodash.camelcase","lodash.capitalize","lodash.deburr","lodash.endswith","lodash.escape","lodash.escaperegexp","lodash.kebabcase","lodash.lowercase","lodash.lowerfirst","lodash.pad","lodash.padend","lodash.padstart","lodash.parseint","lodash.repeat","lodash.replace","lodash.snakecase","lodash.split","lodash.startcase","lodash.startswith","lodash.template","lodash.tolower","lodash.toupper","lodash.trim","lodash.trimend","lodash.trimstart","lodash.truncate","lodash.unescape","lodash.uppercase","lodash.upperfirst","lodash.words","lodash.attempt","lodash.bindall","lodash.cond","lodash.conforms","lodash.constant","lodash.defaultto","lodash.flow","lodash.flowright","lodash.identity","lodash.iteratee","lodash.matches","lodash.matchesproperty","lodash.method","lodash.methodof","lodash.mixin","lodash.noconflict","lodash.noop","lodash.ntharg","lodash.over","lodash.overevery","lodash.oversome","lodash.property","lodash.propertyof","lodash.range","lodash.rangeright","lodash.runincontext","lodash.stubarray","lodash.stubfalse","lodash.stubobject","lodash.stubstring","lodash.stubtrue","lodash.times","lodash.topath","lodash.uniqueid"]),playwright:S=g.hasPackageJsonAnyDependency(s,["playwright","eslint-plugin-playwright"]),pnpm:W=t,react:J=p||g.hasPackageJsonAnyDependency(s,["eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"]),reactCompiler:z=b,regexp:I=!0,silent:T=!1,storybook:F=g.hasPackageJsonAnyDependency(s,["storybook","eslint-plugin-storybook"]),tailwindcss:j=h||x,tanstackQuery:U=g.hasPackageJsonAnyDependency(s,["@tanstack/react-query"]),tanstackRouter:M=g.hasPackageJsonAnyDependency(s,["@tanstack/react-router"]),testingLibrary:C=g.hasPackageJsonAnyDependency(s,["@testing-library/dom","@testing-library/react"]),tsdoc:ne=!1,typescript:ae=g.hasPackageJsonAnyDependency(s,["typescript"]),unicorn:xe=!0,unocss:ie=!1,vitest:we=g.hasPackageJsonAnyDependency(s,["vitest"]),zod:le=g.hasPackageJsonAnyDependency(s,["zod"])}=e;if(c){let f=[];le&&f.push("eslint-plugin-zod"),ie&&f.push("@unocss/eslint-plugin"),U&&f.push("@tanstack/eslint-plugin-query"),M&&f.push("@tanstack/eslint-plugin-router"),(R||j)&&(f.push("@eslint/css"),(j&&x||j==="v4")&&f.push("tailwind-csstree")),(j&&h||j==="v3")&&f.push("eslint-plugin-tailwindcss"),F&&f.push("eslint-plugin-storybook"),J&&f.push("eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),J&&z&&f.push("eslint-plugin-react-compiler"),C&&f.push("eslint-plugin-testing-library"),_&&f.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),A&&f.push("eslint-plugin-you-dont-need-lodash-underscore"),ne&&f.push("eslint-plugin-tsdoc"),e.formatters&&f.push("eslint-plugin-format"),S&&f.push("eslint-plugin-playwright"),k&&(f.push("eslint-plugin-astro","astro-eslint-parser"),typeof e.formatters=="object"&&e.formatters.astro&&f.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters.markdown&&e.formatters.slidev&&f.push("prettier-plugin-slidev"),(e.formatters.xml||e.formatters.svg)&&f.push("@prettier/plugin-xml")),f=f.filter(Boolean),f.length>0&&await g.ensurePackages(s,f,"devDependencies",{confirm:{message:X(V=>`@anolilab/eslint-config requires the following ${V.length===1?"package":"packages"} to be installed:
|
|
15
|
+
`),M=await l(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:q,"react-dom":T["@eslint-react/dom"],"react-hooks":N,"react-hooks-extra":T["@eslint-react/hooks-extra"],"react-naming-convention":T["@eslint-react/naming-convention"],"react-perf":A,"react-refresh":_,"react-web-api":T["@eslint-react/web-api"],"react-x":T["@eslint-react"],"react-you-might-not-need-an-effect":S,...j&&M?M.configs.recommended.plugins:{}}},{files:o,languageOptions:{globals:{...X.browser},parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{...R.configs["disable-conflict-eslint-plugin-react"]?.rules,"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":["error",{...oe,allow:[...oe.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-naming-convention/component-name":"error","react-naming-convention/context-name":"error","react-naming-convention/filename":"off","react-naming-convention/use-state":"error","react-refresh/only-export-components":["error",{allowConstantExport:B,allowExportNames:[...z?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...J||I?["meta","links","headers","loader","action","clientLoader","clientAction","handle","shouldRevalidate"]:[]]}],"react-web-api/no-leaked-event-listener":"error","react-web-api/no-leaked-interval":"error","react-web-api/no-leaked-resize-observer":"error","react-web-api/no-leaked-timeout":"error","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-shorthand-boolean":"error","react-x/jsx-shorthand-fragment":"error","react-x/jsx-uses-react":U?"off":"error","react-x/jsx-uses-vars":"error","react-x/no-access-state-in-setstate":"error","react-x/no-array-index-key":"error","react-x/no-children-count":"error","react-x/no-children-for-each":"error","react-x/no-children-map":"error","react-x/no-children-only":"error","react-x/no-children-prop":"off","react-x/no-children-to-array":"error","react-x/no-class-component":"off","react-x/no-clone-element":"error","react-x/no-component-will-mount":"error","react-x/no-component-will-receive-props":"error","react-x/no-component-will-update":"error","react-x/no-context-provider":"error","react-x/no-create-ref":"error","react-x/no-default-props":"error","react-x/no-direct-mutation-state":"error","react-x/no-duplicate-key":"error","react-x/no-forward-ref":"error","react-x/no-implicit-key":"error","react-x/no-missing-component-display-name":"off","react-x/no-missing-context-display-name":"off","react-x/no-missing-key":"error","react-x/no-misused-capture-owner-stack":"off","react-x/no-nested-component-definitions":"error","react-x/no-nested-lazy-component-declarations":"error","react-x/no-prop-types":"error","react-x/no-redundant-should-component-update":"error","react-x/no-set-state-in-component-did-mount":"error","react-x/no-set-state-in-component-did-update":"error","react-x/no-set-state-in-component-will-update":"error","react-x/no-string-refs":"error","react-x/no-unnecessary-use-callback":"error","react-x/no-unnecessary-use-memo":"error","react-x/no-unsafe-component-will-mount":"error","react-x/no-unsafe-component-will-receive-props":"error","react-x/no-unsafe-component-will-update":"error","react-x/no-unstable-context-value":"error","react-x/no-unstable-default-props":"error","react-x/no-unused-class-component-members":"error","react-x/no-unused-state":"error","react-x/no-use-context":"error","react-x/no-useless-forward-ref":"error","react-x/no-useless-fragment":"off","react-x/prefer-destructuring-assignment":"off","react-x/prefer-read-only-props":"off","react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["error",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",k,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",k],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"off","react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"off","react/jsx-no-useless-fragment":"off","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":"off","react/jsx-uses-vars":"off","react/no-access-state-in-setstate":"off","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"off","react/no-children-prop":"off","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"off","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"off","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"off","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"off","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":"off","react/react-in-jsx-scope":U?"off":"error","react/require-default-props":"off","react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","static public field"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...j&&M?{"react-compiler/react-compiler":"error","react-hooks/component-hook-factories":"error","react-hooks/config":"error","react-hooks/error-boundaries":"error","react-hooks/gating":"error","react-hooks/globals":"error","react-hooks/immutability":"error","react-hooks/incompatible-library":"warn","react-hooks/preserve-manual-memoization":"error","react-hooks/purity":"error","react-hooks/refs":"error","react-hooks/set-state-in-effect":"error","react-hooks/set-state-in-render":"error","react-hooks/static-components":"error","react-hooks/unsupported-syntax":"warn","react-hooks/use-memo":"error"}:{},...A.configs.flat.recommended.rules,...S.configs.recommended.rules,...U?q?.configs.flat?.["jsx-runtime"]?.rules:{},...c?{"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off"}:{},...t},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:F??"detect"},"react-x":{version:F??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}},...U?q.configs.flat["jsx-runtime"].languageOptions.parserOptions:{}},name:"anolilab/react/jsx",rules:{"react-x/naming-convention/filename-extension":["error","as-needed"],"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"off","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"},settings:{extensions:[".jsx"]}},{files:["**/*.tsx"],name:"anolilab/react/tsx",rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:n.getFilesGlobs("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...O?[{files:s,ignores:x,name:"anolilab/react/type-aware-rules",rules:{...$}}]:[]]}),Er=n.createConfig("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,a=Ee.configs["flat/recommended"],c={...a.rules};if(s==="warn")for(const p in c)c[p]==="error"&&(c[p]="warn");return[{...a,files:o,name:"anolilab/regexp/rules",rules:{...c,...t}}]}),qr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-simple-import-sort"));return[{files:o,name:"anolilab/simple-import-sort",plugins:{"simple-import-sort":t},rules:{"simple-import-sort/exports":"error","simple-import-sort/imports":"error",...s}}]}),Ar=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-sonarjs"));return[{name:"anolilab/sonarjs/plugin",plugins:{sonarjs:t}},{files:o,name:"anolilab/sonarjs/rules",rules:{...t.configs.recommended.rules,"sonarjs/file-name-differ-from-class":"error","sonarjs/no-collapsible-if":"error","sonarjs/no-nested-template-literals":"off","sonarjs/no-tab":"error","sonarjs/todo-tag":"off",...s}},{files:n.getFilesGlobs("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:n.getFilesGlobs("js"),languageOptions:{ecmaVersion:"latest"},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off","sonarjs/public-static-readonly":"off"}}]}),Ir=n.createConfig("storybook",async e=>{const{overrides:r}=e,o=[...(await l(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),Tr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await l(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),Nr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),Jr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),Ur=n.createConfig("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await l(import("eslint-plugin-testing-library")),c=g.hasPackageJsonAnyDependency(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":a},rules:{...a.configs["flat/dom"].rules,...c?a.configs["flat/react"].rules:{},...s}}]}),Lr=n.createConfig("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:a=2}=typeof t=="boolean"?{}:t,[c,p]=await Promise.all([l(import("eslint-plugin-toml")),l(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:p},name:"anolilab/toml",plugins:{toml:c},rules:{...t?{"@stylistic/spaced-comment":"off"}:{},"toml/comma-style":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error",...t?{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"error","toml/indent":["error",a==="tab"?2:a],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error"}:{},...s}}]}),$r=n.createConfig("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),te={"init-declarations":"off","no-catch-shadow":"off","no-delete-var":"error","no-label-var":"error","no-restricted-globals":["error",{message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",name:"isFinite"},{message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",name:"isNaN"},...Ie.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":"off","no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Rr=n.createConfig("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:te},{files:n.getFilesGlobs("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Mr=Object.defineProperty,Gr=v((e,r)=>Mr(e,"name",{value:r,configurable:!0}),"w");const zr=n.createConfig("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:a,overridesTypeAware:c,parserOptions:p,prettier:u}=e,b=be,h=ge(t),[x,O]=await Promise.all([l(import("typescript-eslint")),l(import("eslint-plugin-no-for-of-array"))]);let k;p?.erasableSyntaxOnly&&(k=await l(import("eslint-plugin-erasable-syntax-only")));const $=e.filesTypeAware??n.getFilesGlobs("ts"),R=[...n.getFilesGlobs("astro"),...n.getFilesGlobs("markdown"),...n.getFilesGlobs("markdown_inline_js_jsx"),...n.getFilesGlobs("js"),...n.getFilesGlobs("jsx"),"**/*.json","**/*.jsonc",...e.ignoresTypeAware??[]],{tsconfigPath:q}=e;let{isTypeAware:N=!0}=e;N=N&&q!==void 0;const _=Gr((S,B,J)=>{const z=fe.dirname(qe.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:re&&re.tagName.toUpperCase()==="SCRIPT"&&re.src||new URL("index.cjs",document.baseURI).href));return{files:[...B,...o.map(I=>`**/*.${I}`)],...J?{ignores:J}:{},languageOptions:{parser:x.parser,parserOptions:{extraFileExtensions:o.map(I=>`.${I}`),sourceType:"module",...S?{projectService:!0,tsconfigRootDir:z}:{},...p}},name:`anolilab/typescript/${S?"type-aware-parser":"parser"}`}},"makeParser"),A=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":x.plugin,"no-for-of-array":O,...k?k.configs.recommended.plugins:{}}},...N?[_(!1,s),_(!0,$,R)]:[_(!1,s)],...x.configs.strict];return N&&A.push(...x.configs.strictTypeCheckedOnly,{files:[...$,...o.map(S=>`**/*.${S}`)],name:"anolilab/typescript/rules-type-aware",rules:{"@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-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error",...c}},{files:n.getFilesGlobs("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),A.push({files:s,name:"anolilab/typescript/rules",rules:{"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-ts-comment":["error",{minimumDescriptionLength:3,"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":"allow-with-description","ts-nocheck":!0}],"@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/method-signature-style":"error","@typescript-eslint/naming-convention":["error",{format:["camelCase","PascalCase","UPPER_CASE"],selector:"variable"},{format:["camelCase","PascalCase"],selector:"function"},{format:["PascalCase"],selector:"typeLike"}],"@typescript-eslint/no-array-constructor":b["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":h["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":G["no-empty-function"],"@typescript-eslint/no-explicit-any":["error",{fixToUnknown:!1,ignoreRestArgs:!0}],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-loop-func":G["no-loop-func"],"@typescript-eslint/no-magic-numbers":G["no-magic-numbers"],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redeclare":G["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":te["no-shadow"],"@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unused-expressions":G["no-unused-expressions"],"@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":te["no-use-before-define"],"@typescript-eslint/no-useless-constructor":h["no-useless-constructor"],"@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"off","@typescript-eslint/prefer-ts-expect-error":"off","@typescript-eslint/return-await":G["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":b["space-infix-ops"],...k?k.configs.recommended.rules:{},...a,...u?{"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":0,"@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/quotes":0,"@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"}:{}}}),A}),Vr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:a,stylistic:c=!0}=e,{indent:p=4}=typeof c=="boolean"?{}:c,u=await l(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:X.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:u}},{files:o,name:"anolilab/unicorn/rules",rules:{...u.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/import-style":["error",{styles:{"node:path":{named:!0},"node:util":{named:!0},path:{named:!0},util:{named:!0}}}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","unicorn/no-nested-ternary":"off","unicorn/no-useless-undefined":"off","unicorn/prefer-at":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":t.type==="module"?"error":"off","unicorn/prefer-node-protocol":"error","unicorn/prefer-ternary":["error","only-single-line"],"unicorn/prevent-abbreviations":["error",{allowList:{i:!0,j:!0},replacements:{args:!1,dev:!1,dist:!1,env:!1,params:!1,pkg:!1,prop:!1,props:!1,ref:!1,src:!1,utils:!1}}],...a?{"unicorn/empty-brace-spaces":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}:{"unicorn/template-indent":["error",{indent:p}]},...s}},{files:["tsconfig.dev.json","tsconfig.prod.json"],name:"anolilab/unicorn/tsconfig-overrides",rules:{"unicorn/prevent-abbreviations":"off"}},{files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],name:"anolilab/unicorn/ts-overrides",rules:{"unicorn/import-style":"off"}}]});var Wr=Object.defineProperty,Br=v((e,r)=>Wr(e,"name",{value:r,configurable:!0}),"n$2");const Xr=Br(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await l(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Hr=n.createConfig("all",async(e,r)=>{const{files:o=r,isInEditor:s,overrides:t}=e,a=await l(import("eslint-plugin-unused-imports"));return[{files:o,name:"anolilab/unused-imports/rules",plugins:{"unused-imports":a},rules:{"@typescript-eslint/no-unused-vars":"off","no-unused-vars":"off","unused-imports/no-unused-imports":s?"off":"error","unused-imports/no-unused-vars":[s?"warn":"error",{args:"after-used",argsIgnorePattern:"^_",vars:"all",varsIgnorePattern:"^_"}],...t}}]}),Kr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-validate-jsx-nesting"));return[{files:o,name:"anolilab/validate-jsx-nesting/setup",plugins:{"validate-jsx-nesting":t},rules:{"validate-jsx-nesting/no-invalid-jsx-nesting":"error",...s}}]}),Qr={suite:!0,test:!0,chai:!0,describe:!0,it:!0,expectTypeOf:!0,assertType:!0,expect:!0,assert:!0,vitest:!0,vi:!0,beforeAll:!0,afterAll:!0,beforeEach:!0,afterEach:!0,onTestFailed:!0,onTestFinished:!0};let se;const Yr=n.createConfig("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:a,tsconfigPath:c}=e,[p,u]=await Promise.all([l(import("@vitest/eslint-plugin")),l(import("eslint-plugin-no-only-tests"))]);return se=se??{...p,rules:{...p.rules,...u.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:se}},{files:o,...c?{...p.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Qr}},name:"anolilab/vitest/rules",rules:{...p.configs.all.rules,...p.configs.recommended.rules,"@typescript-eslint/explicit-function-return-type":"off","antfu/no-top-level-await":"off","n/prefer-global/process":"off","no-unused-expressions":"off","vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/max-expects":"off","vitest/no-hooks":"off","vitest/no-mocks-import":"off","vitest/no-only-tests":s?"off":"error","vitest/no-restricted-vi-methods":"off","vitest/no-standalone-expect":"error","vitest/valid-expect":["error",{alwaysAwait:!0,maxArgs:2,minArgs:1}],"vitest/valid-title":"off",...t,...a?{"vitest/padding-around-after-all-blocks":"off","vitest/padding-around-after-each-blocks":"off","vitest/padding-around-all":"off","vitest/padding-around-before-all-blocks":"off","vitest/padding-around-before-each-blocks":"off","vitest/padding-around-describe-blocks":"off","vitest/padding-around-expect-blocks":"off","vitest/padding-around-test-blocks":"off"}:{}}}]}),Zr=n.createConfig("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:a=!0}=e,{indent:c=4,quotes:p="double"}=typeof a=="boolean"?{}:a,[u,b]=await Promise.all([l(import("eslint-plugin-yml")),l(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:b},name:"anolilab/yaml",plugins:{yaml:u},rules:{"@stylistic/spaced-comment":"off","yaml/block-mapping":"error","yaml/block-sequence":"error","yaml/no-empty-key":"error","yaml/no-empty-sequence-entry":"error","yaml/no-irregular-whitespace":"error","yaml/plain-scalar":"error","yaml/vue-custom-block/no-parsing-error":"error",...a?{"yaml/block-mapping-question-indicator-newline":"error","yaml/block-sequence-hyphen-indicator-newline":"error","yaml/flow-mapping-curly-newline":"error","yaml/flow-mapping-curly-spacing":"error","yaml/flow-sequence-bracket-newline":"error","yaml/flow-sequence-bracket-spacing":"error","yaml/indent":[t?"off":"error",c==="tab"?2:c],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:p==="backtick"?"single":p}],"yaml/spaced-comment":"error"}:{},...t?u.configs.prettier.rules:{},...s}}]}),es=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ue.fixupPluginRules(t)},rules:{...t.configs.all.rules,...s}}]}),rs=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var ss=Object.defineProperty,os=v((e,r)=>ss(e,"name",{value:r,configurable:!0}),"e$1");const ts=os(()=>!!(process.env.GIT_PARAMS??process.env.VSCODE_GIT_COMMAND??process.env.npm_lifecycle_script?.startsWith("lint-staged")??!1),"isInGitHooksOrLintStaged");var ns=Object.defineProperty,as=v((e,r)=>ns(e,"name",{value:r,configurable:!0}),"e");const is=as(()=>process.env.CI||ts()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var ls=Object.defineProperty,H=v((e,r)=>ls(e,"name",{value:r,configurable:!0}),"f");const cs=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],W=H((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),d=H((e,r)=>{const o=W(e,r);return{..."overrides"in o?o.overrides:{}}},"getOverrides"),y=H((e,r)=>{const o=W(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),ps=H(async(e={},...r)=>{if("files"in e)throw new Error('[@anolilab/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.');const o=e.cwd??process.cwd(),s=await g.parsePackageJson(fe.join(o,"package.json"),{resolveCatalogs:!0}),t=s.packageManager?.startsWith("pnpm"),a=g.hasPackageJsonAnyDependency(s,["prettier"]),c=g.hasPackageJsonAnyDependency(s,["@anolilab/eslint-config"]),p=g.hasPackageJsonAnyDependency(s,["react","react-dom"]),u=s.dependencies?.react??s.devDependencies?.react;let b=!1;if(u!==void 0){const f=Q.parse(u);f?.major&&f.major>=19&&(b=!0)}let h=!1,x=!1;const O=s.dependencies?.tailwindcss??s.devDependencies?.tailwindcss;if(O){const f=Q.parse(O);f?.major&&f.major<=3&&(h=!0),f?.major&&f.major>=4&&(x=!0)}const{astro:k=g.hasPackageJsonAnyDependency(s,["astro"]),componentExts:$=[],css:R=g.hasPackageJsonAnyDependency(s,["postcss","cssnano"]),gitignore:q=!0,html:N=!1,jsx:_=g.hasPackageJsonAnyDependency(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||p,lodash:A=g.hasPackageJsonAnyDependency(s,["lodash","underscore","lodash-es","@types/lodash","lodash.chunk","lodash.compact","lodash.concat","lodash.difference","lodash.differenceby","lodash.differencewith","lodash.drop","lodash.dropright","lodash.droprightwhile","lodash.dropwhile","lodash.fill","lodash.findindex","lodash.findlastindex","lodash.flatten","lodash.flattendeep","lodash.flattendepth","lodash.frompairs","lodash.head","lodash.indexof","lodash.initial","lodash.intersection","lodash.intersectionby","lodash.intersectionwith","lodash.join","lodash.last","lodash.lastindexof","lodash.nth","lodash.pull","lodash.pullall","lodash.pullallby","lodash.pullallwith","lodash.pullat","lodash.remove","lodash.reverse","lodash.slice","lodash.sortedindex","lodash.sortedindexby","lodash.sortedindexof","lodash.sortedlastindex","lodash.sortedlastindexby","lodash.sortedlastindexof","lodash.sorteduniq","lodash.sorteduniqby","lodash.tail","lodash.take","lodash.takeright","lodash.takerightwhile","lodash.takewhile","lodash.union","lodash.unionby","lodash.unionwith","lodash.uniq","lodash.uniqby","lodash.uniqwith","lodash.unzip","lodash.unzipwith","lodash.without","lodash.xor","lodash.xorby","lodash.xorwith","lodash.zip","lodash.zipobject","lodash.zipobjectdeep","lodash.zipwith","lodash.countby","lodash.every","lodash.filter","lodash.find","lodash.findlast","lodash.flatmap","lodash.flatmapdeep","lodash.flatmapdepth","lodash.foreach","lodash.foreachright","lodash.groupby","lodash.includes","lodash.invokemap","lodash.keyby","lodash.map","lodash.orderby","lodash.partition","lodash.reduce","lodash.reduceright","lodash.reject","lodash.sample","lodash.samplesize","lodash.shuffle","lodash.size","lodash.some","lodash.sortby","lodash.now","lodash.after","lodash.ary","lodash.before","lodash.bind","lodash.bindkey","lodash.curry","lodash.curryright","lodash.debounce","lodash.defer","lodash.delay","lodash.flip","lodash.memoize","lodash.negate","lodash.once","lodash.overargs","lodash.partial","lodash.partialright","lodash.rearg","lodash.rest","lodash.spread","lodash.throttle","lodash.unary","lodash.wrap","lodash.castarray","lodash.clone","lodash.clonedeep","lodash.clonedeepwith","lodash.clonewith","lodash.conformsto","lodash.eq","lodash.gt","lodash.gte","lodash.isarguments","lodash.isarray","lodash.isarraybuffer","lodash.isarraylike","lodash.isarraylikeobject","lodash.isboolean","lodash.isbuffer","lodash.isdate","lodash.iselement","lodash.isempty","lodash.isequal","lodash.isequalwith","lodash.iserror","lodash.isfinite","lodash.isfunction","lodash.isinteger","lodash.islength","lodash.ismap","lodash.ismatch","lodash.ismatchwith","lodash.isnan","lodash.isnative","lodash.isnil","lodash.isnull","lodash.isnumber","lodash.isobject","lodash.isobjectlike","lodash.isplainobject","lodash.isregexp","lodash.issafeinteger","lodash.isset","lodash.isstring","lodash.issymbol","lodash.istypedarray","lodash.isundefined","lodash.isweakmap","lodash.isweakset","lodash.lt","lodash.lte","lodash.toarray","lodash.tofinite","lodash.tointeger","lodash.tolength","lodash.tonumber","lodash.toplainobject","lodash.tosafeinteger","lodash.tostring","lodash.add","lodash.ceil","lodash.divide","lodash.floor","lodash.max","lodash.maxby","lodash.mean","lodash.meanby","lodash.min","lodash.minby","lodash.multiply","lodash.round","lodash.subtract","lodash.sum","lodash.sumby","lodash.clamp","lodash.inrange","lodash.random","lodash.assign","lodash.assignin","lodash.assigninwith","lodash.assignwith","lodash.at","lodash.create","lodash.defaults","lodash.defaultsdeep","lodash.findkey","lodash.findlastkey","lodash.forin","lodash.forinright","lodash.forown","lodash.forownright","lodash.functions","lodash.functionsin","lodash.get","lodash.has","lodash.hasin","lodash.invert","lodash.invertby","lodash.invoke","lodash.keys","lodash.keysin","lodash.mapkeys","lodash.mapvalues","lodash.merge","lodash.mergewith","lodash.omit","lodash.omitby","lodash.pick","lodash.pickby","lodash.result","lodash.set","lodash.setwith","lodash.topairs","lodash.topairsin","lodash.transform","lodash.unset","lodash.update","lodash.updatewith","lodash.values","lodash.valuesin","lodash.chain","lodash.tap","lodash.thru","lodash.camelcase","lodash.capitalize","lodash.deburr","lodash.endswith","lodash.escape","lodash.escaperegexp","lodash.kebabcase","lodash.lowercase","lodash.lowerfirst","lodash.pad","lodash.padend","lodash.padstart","lodash.parseint","lodash.repeat","lodash.replace","lodash.snakecase","lodash.split","lodash.startcase","lodash.startswith","lodash.template","lodash.tolower","lodash.toupper","lodash.trim","lodash.trimend","lodash.trimstart","lodash.truncate","lodash.unescape","lodash.uppercase","lodash.upperfirst","lodash.words","lodash.attempt","lodash.bindall","lodash.cond","lodash.conforms","lodash.constant","lodash.defaultto","lodash.flow","lodash.flowright","lodash.identity","lodash.iteratee","lodash.matches","lodash.matchesproperty","lodash.method","lodash.methodof","lodash.mixin","lodash.noconflict","lodash.noop","lodash.ntharg","lodash.over","lodash.overevery","lodash.oversome","lodash.property","lodash.propertyof","lodash.range","lodash.rangeright","lodash.runincontext","lodash.stubarray","lodash.stubfalse","lodash.stubobject","lodash.stubstring","lodash.stubtrue","lodash.times","lodash.topath","lodash.uniqueid"]),playwright:S=g.hasPackageJsonAnyDependency(s,["playwright","eslint-plugin-playwright"]),pnpm:B=t,react:J=p||g.hasPackageJsonAnyDependency(s,["eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"]),reactCompiler:z=b,regexp:I=!0,silent:T=!1,storybook:F=g.hasPackageJsonAnyDependency(s,["storybook","eslint-plugin-storybook"]),tailwindcss:j=h||x,tanstackQuery:U=g.hasPackageJsonAnyDependency(s,["@tanstack/react-query"]),tanstackRouter:M=g.hasPackageJsonAnyDependency(s,["@tanstack/react-router"]),testingLibrary:C=g.hasPackageJsonAnyDependency(s,["@testing-library/dom","@testing-library/react"]),tsdoc:ne=!1,typescript:ae=g.hasPackageJsonAnyDependency(s,["typescript"]),unicorn:xe=!0,unocss:ie=!1,vitest:we=g.hasPackageJsonAnyDependency(s,["vitest"]),zod:le=g.hasPackageJsonAnyDependency(s,["zod"])}=e;if(c){let f=[];le&&f.push("eslint-plugin-zod"),ie&&f.push("@unocss/eslint-plugin"),U&&f.push("@tanstack/eslint-plugin-query"),M&&f.push("@tanstack/eslint-plugin-router"),(R||j)&&(f.push("@eslint/css"),(j&&x||j==="v4")&&f.push("tailwind-csstree")),(j&&h||j==="v3")&&f.push("eslint-plugin-tailwindcss"),F&&f.push("eslint-plugin-storybook"),J&&f.push("eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),J&&z&&f.push("eslint-plugin-react-compiler"),C&&f.push("eslint-plugin-testing-library"),_&&f.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),A&&f.push("eslint-plugin-you-dont-need-lodash-underscore"),ne&&f.push("eslint-plugin-tsdoc"),e.formatters&&f.push("eslint-plugin-format"),S&&f.push("eslint-plugin-playwright"),k&&(f.push("eslint-plugin-astro","astro-eslint-parser"),typeof e.formatters=="object"&&e.formatters.astro&&f.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters.markdown&&e.formatters.slidev&&f.push("prettier-plugin-slidev"),(e.formatters.xml||e.formatters.svg)&&f.push("@prettier/plugin-xml")),f=f.filter(Boolean),f.length>0&&await g.ensurePackages(s,f,"devDependencies",{confirm:{message:H(V=>`@anolilab/eslint-config requires the following ${V.length===1?"package":"packages"} to be installed:
|
|
16
16
|
|
|
17
17
|
"${V.join(`"
|
|
18
18
|
"`)}"
|
|
19
19
|
|
|
20
|
-
for the ESLint configurations to work correctly. Do you want to install ${f.length===1?"it":"them"} now?`,"message")}})}let{isInEditor:L}=e;(L===void 0||!L)&&(L=is(),L&&console.log("[@anolilab/eslint-config] Detected running in editor, some rules are disabled."));let w={};e.stylistic===!1?w=!1:typeof e.stylistic=="object"&&(w=e.stylistic),w&&!("jsx"in w)&&(w.jsx=_);const m=[];q&&(typeof q=="boolean"?m.push(l(import("eslint-config-flat-gitignore")).then(f=>[f({name:"anolilab/gitignore",strict:!1})])):m.push(l(import("eslint-config-flat-gitignore")).then(f=>[f({name:"anolilab/gitignore",...q})])));const K=
|
|
20
|
+
for the ESLint configurations to work correctly. Do you want to install ${f.length===1?"it":"them"} now?`,"message")}})}let{isInEditor:L}=e;(L===void 0||!L)&&(L=is(),L&&console.log("[@anolilab/eslint-config] Detected running in editor, some rules are disabled."));let w={};e.stylistic===!1?w=!1:typeof e.stylistic=="object"&&(w=e.stylistic),w&&!("jsx"in w)&&(w.jsx=_);const m=[];q&&(typeof q=="boolean"?m.push(l(import("eslint-config-flat-gitignore")).then(f=>[f({name:"anolilab/gitignore",strict:!1})])):m.push(l(import("eslint-config-flat-gitignore")).then(f=>[f({name:"anolilab/gitignore",...q})])));const K=W(e,"typescript"),Y="tsconfigPath"in K?K.tsconfigPath:void 0;if(m.push(Ge(e.ignores),ar({packageJson:s}),Te({}),Je({}),Cr({prettier:a}),$e({isInEditor:L}),Rr({}),Hr({files:y(e,"unusedImports"),isInEditor:L,overrides:d(e,"unusedImports")}),Xe({files:y(e,"comments"),overrides:d(e,"comments")}),hr({files:y(e,"node"),overrides:d(e,"node"),packageJson:s}),ir({files:y(e,"jsdoc"),jsx:_,overrides:d(e,"jsdoc"),packageJson:s,silent:T,stylistic:w,typescript:ae}),nr({cwd:o,files:y(e,"imports"),overrides:d(e,"imports"),packageJson:s,stylistic:w,tsconfigPath:Y}),qr({files:y(e,"simpleImportSort"),overrides:d(e,"simpleImportSort")}),We({files:y(e,"antfu"),lessOpinionated:e.lessOpinionated,overrides:d(e,"antfu"),packageJson:s}),gr({overrides:d(e,"noSecrets")}),yr({overrides:d(e,"noUnsanitized")}),Pr({files:y(e,"promise"),overrides:d(e,"promise")}),Ar({files:y(e,"sonarjs"),overrides:d(e,"sonarjs")}),br({files:y(e,"perfectionist"),overrides:d(e,"perfectionist"),packageJson:s})),s.browserlist!==void 0&&m.push(He({files:y(e,"compat")})),xe&&m.push(Vr({files:y(e,"unicorn"),overrides:d(e,"unicorn"),packageJson:s,prettier:a,stylistic:w})),A&&m.push(es({files:y(e,"lodash"),overrides:d(e,"lodash")})),_&&m.push([{files:n.getFilesGlobs("jsx_and_tsx"),languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/jsx/setup"}],fr({files:y(e,"jsx-a11y"),overrides:d(e,"jsx-a11y")}),Kr({files:y(e,"validateJsxNesting"),overrides:d(e,"validateJsxNesting")})),ae&&m.push(zr({...K,componentExts:$,overrides:d(e,"typescript"),prettier:a})),w&&m.push(rr({...w,overrides:d(e,"stylistic")})),I&&m.push(Er(typeof I=="boolean"?{}:I)),we&&m.push(Yr({files:y(e,"vitest"),isInEditor:L,overrides:d(e,"vitest"),prettier:a,tsconfigPath:Y})),C&&m.push(Ur({files:y(e,"testingLibrary"),overrides:d(e,"testingLibrary"),packageJson:s})),S&&m.push(xr({files:y(e,"playwright"),overrides:d(e,"playwright")})),F&&m.push(Ir({overrides:d(e,"storybook")})),(R||j)&&m.push(Ke({files:y(e,"css"),overrides:d(e,"css"),tailwind:j!==!1})),(j&&h||j==="v3")&&m.push(Tr({overrides:d(e,"tailwindcss")})),U&&m.push(Nr({files:y(e,"tanstackQuery"),overrides:d(e,"tanstackQuery")})),M&&m.push(Jr({files:y(e,"tanstackRouter"),overrides:d(e,"tanstackRouter")})),N&&m.push(tr({files:y(e,"html"),overrides:d(e,"html"),prettier:a,stylistic:w})),le&&m.push(rs({files:y(e,"zod"),overrides:d(e,"zod")})),ne&&m.push($r({files:y(e,"tsdoc"),overrides:d(e,"tsdoc")})),J&&m.push(Fr({...K,overrides:d(e,"react"),packageJson:s,reactCompiler:z,silent:T,tsconfigPath:Y})),ie&&m.push(Xr({...W(e,"unocss"),overrides:d(e,"unocss")})),k&&m.push(Be({files:y(e,"astro"),overrides:d(e,"astro"),stylistic:w})),(e.jsonc??!0)&&m.push(pr({overrides:d(e,"jsonc"),packageJson:s,prettier:a,silent:T,stylistic:w})),(e.toml??!0)&&m.push(Lr({files:y(e,"toml"),overrides:d(e,"toml"),stylistic:w})),(e.markdown??!0)&&m.push(dr({componentExts:$,files:y(e,"markdown"),overrides:d(e,"markdown")})),(e.yaml??!0)&&m.push(Zr({files:y(e,"yaml"),overrides:d(e,"yaml"),prettier:a,stylistic:w})),B&&m.push(kr({...W(e,"pnpm"),isInEditor:L,overrides:d(e,"pnpm")})),e.formatters){const f=g.hasPackageJsonAnyDependency(s,["@prettier/plugin-xml"]);m.push(or({astro:g.hasPackageJsonAnyDependency(s,["prettier-plugin-astro"]),css:!0,graphql:!0,html:!0,markdown:!0,slidev:g.hasPackageJsonAnyDependency(s,["@slidev/cli"]),svg:f,xml:f,...typeof e.formatters=="object"?e.formatters:{}},typeof w=="object"?w:{}))}const ce=cs.reduce((f,V)=>(V in e&&(f[V]=e[V]),f),{});Object.keys(ce).length>0&&m.push([ce]);let Z=new De.FlatConfigComposer;return Z=Z.append(...m,...r),Z},"createConfig");exports.getFilesGlobs=n.getFilesGlobs;exports.createConfig=ps;exports.getFiles=y;exports.getOverrides=d;exports.resolveSubOptions=W;
|
package/dist/index.d.cts
CHANGED
|
@@ -17459,7 +17459,7 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsSilentConsole
|
|
|
17459
17459
|
noUnsanitized?: OptionsOverrides;
|
|
17460
17460
|
perfectionist?: OptionsFiles & OptionsOverrides;
|
|
17461
17461
|
playwright?: boolean | (OptionsFiles & OptionsOverrides);
|
|
17462
|
-
pnpm?: boolean | OptionsOverrides;
|
|
17462
|
+
pnpm?: boolean | (OptionsOverrides & OptionsPnpm);
|
|
17463
17463
|
promise?: OptionsFiles & OptionsOverrides;
|
|
17464
17464
|
react?: boolean | (OptionsFiles & OptionsOverrides);
|
|
17465
17465
|
reactCompiler?: boolean;
|
|
@@ -17519,6 +17519,9 @@ interface OptionsIsInEditor {
|
|
|
17519
17519
|
interface OptionsOverrides {
|
|
17520
17520
|
overrides?: TypedFlatConfigItem["rules"];
|
|
17521
17521
|
}
|
|
17522
|
+
interface OptionsPnpm {
|
|
17523
|
+
catalogs?: boolean;
|
|
17524
|
+
}
|
|
17522
17525
|
interface OptionsPackageJson {
|
|
17523
17526
|
packageJson: NormalizedPackageJson;
|
|
17524
17527
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -17459,7 +17459,7 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsSilentConsole
|
|
|
17459
17459
|
noUnsanitized?: OptionsOverrides;
|
|
17460
17460
|
perfectionist?: OptionsFiles & OptionsOverrides;
|
|
17461
17461
|
playwright?: boolean | (OptionsFiles & OptionsOverrides);
|
|
17462
|
-
pnpm?: boolean | OptionsOverrides;
|
|
17462
|
+
pnpm?: boolean | (OptionsOverrides & OptionsPnpm);
|
|
17463
17463
|
promise?: OptionsFiles & OptionsOverrides;
|
|
17464
17464
|
react?: boolean | (OptionsFiles & OptionsOverrides);
|
|
17465
17465
|
reactCompiler?: boolean;
|
|
@@ -17519,6 +17519,9 @@ interface OptionsIsInEditor {
|
|
|
17519
17519
|
interface OptionsOverrides {
|
|
17520
17520
|
overrides?: TypedFlatConfigItem["rules"];
|
|
17521
17521
|
}
|
|
17522
|
+
interface OptionsPnpm {
|
|
17523
|
+
catalogs?: boolean;
|
|
17524
|
+
}
|
|
17522
17525
|
interface OptionsPackageJson {
|
|
17523
17526
|
packageJson: NormalizedPackageJson;
|
|
17524
17527
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -17459,7 +17459,7 @@ interface OptionsConfig extends OptionsComponentExtensions, OptionsSilentConsole
|
|
|
17459
17459
|
noUnsanitized?: OptionsOverrides;
|
|
17460
17460
|
perfectionist?: OptionsFiles & OptionsOverrides;
|
|
17461
17461
|
playwright?: boolean | (OptionsFiles & OptionsOverrides);
|
|
17462
|
-
pnpm?: boolean | OptionsOverrides;
|
|
17462
|
+
pnpm?: boolean | (OptionsOverrides & OptionsPnpm);
|
|
17463
17463
|
promise?: OptionsFiles & OptionsOverrides;
|
|
17464
17464
|
react?: boolean | (OptionsFiles & OptionsOverrides);
|
|
17465
17465
|
reactCompiler?: boolean;
|
|
@@ -17519,6 +17519,9 @@ interface OptionsIsInEditor {
|
|
|
17519
17519
|
interface OptionsOverrides {
|
|
17520
17520
|
overrides?: TypedFlatConfigItem["rules"];
|
|
17521
17521
|
}
|
|
17522
|
+
interface OptionsPnpm {
|
|
17523
|
+
catalogs?: boolean;
|
|
17524
|
+
}
|
|
17522
17525
|
interface OptionsPackageJson {
|
|
17523
17526
|
packageJson: NormalizedPackageJson;
|
|
17524
17527
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -14,9 +14,9 @@ Please remove "eslint-plugin-typescript-sort-keys" from your package.json, it co
|
|
|
14
14
|
Following rules are disabled: "react/jsx-uses-react" and "react/react-in-jsx-scope".
|
|
15
15
|
If you dont use the new react jsx-runtime in you project, please enable it manually.
|
|
16
16
|
`))}j=j&&l!==!1;let J;return j&&(console.info(`@anolilab/eslint-config enabling react-compiler plugin
|
|
17
|
-
`),J=await a(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:I,"react-dom":F["@eslint-react/dom"],"react-hooks":A,"react-hooks-extra":F["@eslint-react/hooks-extra"],"react-naming-convention":F["@eslint-react/naming-convention"],"react-perf":T,"react-refresh":E,"react-web-api":F["@eslint-react/web-api"],"react-x":F["@eslint-react"],"react-you-might-not-need-an-effect":_,...j&&J?J.configs.recommended.plugins:{}}},{files:o,languageOptions:{globals:{...G.browser},parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{...R.configs["disable-conflict-eslint-plugin-react"]?.rules,"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":["error",{...re,allow:[...re.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-naming-convention/component-name":"error","react-naming-convention/context-name":"error","react-naming-convention/filename":"off","react-naming-convention/use-state":"error","react-refresh/only-export-components":["error",{allowConstantExport:B,allowExportNames:[...V?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...U||N?["meta","links","headers","loader","action","clientLoader","clientAction","handle","shouldRevalidate"]:[]]}],"react-web-api/no-leaked-event-listener":"error","react-web-api/no-leaked-interval":"error","react-web-api/no-leaked-resize-observer":"error","react-web-api/no-leaked-timeout":"error","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-shorthand-boolean":"error","react-x/jsx-shorthand-fragment":"error","react-x/jsx-uses-react":$?"off":"error","react-x/jsx-uses-vars":"error","react-x/no-access-state-in-setstate":"error","react-x/no-array-index-key":"error","react-x/no-children-count":"error","react-x/no-children-for-each":"error","react-x/no-children-map":"error","react-x/no-children-only":"error","react-x/no-children-prop":"off","react-x/no-children-to-array":"error","react-x/no-class-component":"off","react-x/no-clone-element":"error","react-x/no-component-will-mount":"error","react-x/no-component-will-receive-props":"error","react-x/no-component-will-update":"error","react-x/no-context-provider":"error","react-x/no-create-ref":"error","react-x/no-default-props":"error","react-x/no-direct-mutation-state":"error","react-x/no-duplicate-key":"error","react-x/no-forward-ref":"error","react-x/no-implicit-key":"error","react-x/no-missing-component-display-name":"off","react-x/no-missing-context-display-name":"off","react-x/no-missing-key":"error","react-x/no-misused-capture-owner-stack":"off","react-x/no-nested-component-definitions":"error","react-x/no-nested-lazy-component-declarations":"error","react-x/no-prop-types":"error","react-x/no-redundant-should-component-update":"error","react-x/no-set-state-in-component-did-mount":"error","react-x/no-set-state-in-component-did-update":"error","react-x/no-set-state-in-component-will-update":"error","react-x/no-string-refs":"error","react-x/no-unnecessary-use-callback":"error","react-x/no-unnecessary-use-memo":"error","react-x/no-unsafe-component-will-mount":"error","react-x/no-unsafe-component-will-receive-props":"error","react-x/no-unsafe-component-will-update":"error","react-x/no-unstable-context-value":"error","react-x/no-unstable-default-props":"error","react-x/no-unused-class-component-members":"error","react-x/no-unused-state":"error","react-x/no-use-context":"error","react-x/no-useless-forward-ref":"error","react-x/no-useless-fragment":"off","react-x/prefer-destructuring-assignment":"off","react-x/prefer-read-only-props":"off","react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["error",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",k,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",k],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"off","react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"off","react/jsx-no-useless-fragment":"off","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":"off","react/jsx-uses-vars":"off","react/no-access-state-in-setstate":"off","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"off","react/no-children-prop":"off","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"off","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"off","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"off","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"off","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":"off","react/react-in-jsx-scope":$?"off":"error","react/require-default-props":"off","react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","static public field"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...j&&J?{"react-compiler/react-compiler":"error","react-hooks/component-hook-factories":"error","react-hooks/config":"error","react-hooks/error-boundaries":"error","react-hooks/gating":"error","react-hooks/globals":"error","react-hooks/immutability":"error","react-hooks/incompatible-library":"warn","react-hooks/preserve-manual-memoization":"error","react-hooks/purity":"error","react-hooks/refs":"error","react-hooks/set-state-in-effect":"error","react-hooks/set-state-in-render":"error","react-hooks/static-components":"error","react-hooks/unsupported-syntax":"warn","react-hooks/use-memo":"error"}:{},...T.configs.flat.recommended.rules,..._.configs.recommended.rules,...$?I?.configs.flat?.["jsx-runtime"]?.rules:{},...i?{"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off"}:{},...t},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:D??"detect"},"react-x":{version:D??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}},...$?I.configs.flat["jsx-runtime"].languageOptions.parserOptions:{}},name:"anolilab/react/jsx",rules:{"react-x/naming-convention/filename-extension":["error","as-needed"],"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"off","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"},settings:{extensions:[".jsx"]}},{files:["**/*.tsx"],name:"anolilab/react/tsx",rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:p("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...C?[{files:s,ignores:x,name:"anolilab/react/type-aware-rules",rules:{...M}}]:[]]}),Cr=f("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,n=Se["flat/recommended"],i={...n.rules};if(s==="warn")for(const l in i)i[l]==="error"&&(i[l]="warn");return[{...n,files:o,name:"anolilab/regexp/rules",rules:{...i,...t}}]}),Sr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-simple-import-sort"));return[{files:o,name:"anolilab/simple-import-sort",plugins:{"simple-import-sort":t},rules:{"simple-import-sort/exports":"error","simple-import-sort/imports":"error",...s}}]}),Er=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-sonarjs"));return[{name:"anolilab/sonarjs/plugin",plugins:{sonarjs:t}},{files:o,name:"anolilab/sonarjs/rules",rules:{...t.configs.recommended.rules,"sonarjs/file-name-differ-from-class":"error","sonarjs/no-collapsible-if":"error","sonarjs/no-nested-template-literals":"off","sonarjs/no-tab":"error","sonarjs/todo-tag":"off",...s}},{files:p("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:p("js"),languageOptions:{ecmaVersion:"latest"},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off","sonarjs/public-static-readonly":"off"}}]}),_r=f("storybook",async e=>{const{overrides:r}=e,o=[...(await a(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),Dr=f("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await a(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),qr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),Ir=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),Tr=f("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,n=await a(import("eslint-plugin-testing-library")),i=y(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":n},rules:{...n.configs["flat/dom"].rules,...i?n.configs["flat/react"].rules:{},...s}}]}),Nr=f("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:n=2}=typeof t=="boolean"?{}:t,[i,l]=await Promise.all([a(import("eslint-plugin-toml")),a(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:l},name:"anolilab/toml",plugins:{toml:i},rules:{...t?{"@stylistic/spaced-comment":"off"}:{},"toml/comma-style":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error",...t?{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"error","toml/indent":["error",n==="tab"?2:n],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error"}:{},...s}}]}),Fr=f("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),se={"init-declarations":"off","no-catch-shadow":"off","no-delete-var":"error","no-label-var":"error","no-restricted-globals":["error",{message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",name:"isFinite"},{message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",name:"isNaN"},..._e.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":"off","no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Ar=f("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:se},{files:p("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Ur=Object.defineProperty,$r=v((e,r)=>Ur(e,"name",{value:r,configurable:!0}),"w");const Lr=f("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:n,overridesTypeAware:i,parserOptions:l,prettier:d}=e,b=ue,h=pe(t),[x,C]=await Promise.all([a(import("typescript-eslint")),a(import("eslint-plugin-no-for-of-array"))]);let k;l?.erasableSyntaxOnly&&(k=await a(import("eslint-plugin-erasable-syntax-only")));const M=e.filesTypeAware??p("ts"),R=[...p("astro"),...p("markdown"),...p("markdown_inline_js_jsx"),...p("js"),...p("jsx"),"**/*.json","**/*.jsonc",...e.ignoresTypeAware??[]],{tsconfigPath:I}=e;let{isTypeAware:A=!0}=e;A=A&&I!==void 0;const E=$r((_,B,U)=>{const V=he(Ee(import.meta.url));return{files:[...B,...o.map(N=>`**/*.${N}`)],...U?{ignores:U}:{},languageOptions:{parser:x.parser,parserOptions:{extraFileExtensions:o.map(N=>`.${N}`),sourceType:"module",..._?{projectService:!0,tsconfigRootDir:V}:{},...l}},name:`anolilab/typescript/${_?"type-aware-parser":"parser"}`}},"makeParser"),T=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":x.plugin,"no-for-of-array":C,...k?k.configs.recommended.plugins:{}}},...A?[E(!1,s),E(!0,M,R)]:[E(!1,s)],...x.configs.strict];return A&&T.push(...x.configs.strictTypeCheckedOnly,{files:[...M,...o.map(_=>`**/*.${_}`)],name:"anolilab/typescript/rules-type-aware",rules:{"@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-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error",...i}},{files:p("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),T.push({files:s,name:"anolilab/typescript/rules",rules:{"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-ts-comment":["error",{minimumDescriptionLength:3,"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":"allow-with-description","ts-nocheck":!0}],"@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/method-signature-style":"error","@typescript-eslint/naming-convention":["error",{format:["camelCase","PascalCase","UPPER_CASE"],selector:"variable"},{format:["camelCase","PascalCase"],selector:"function"},{format:["PascalCase"],selector:"typeLike"}],"@typescript-eslint/no-array-constructor":b["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":h["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":z["no-empty-function"],"@typescript-eslint/no-explicit-any":["error",{fixToUnknown:!1,ignoreRestArgs:!0}],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-loop-func":z["no-loop-func"],"@typescript-eslint/no-magic-numbers":z["no-magic-numbers"],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redeclare":z["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":se["no-shadow"],"@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unused-expressions":z["no-unused-expressions"],"@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":se["no-use-before-define"],"@typescript-eslint/no-useless-constructor":h["no-useless-constructor"],"@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"off","@typescript-eslint/prefer-ts-expect-error":"off","@typescript-eslint/return-await":z["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":b["space-infix-ops"],...k?k.configs.recommended.rules:{},...n,...d?{"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":0,"@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/quotes":0,"@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"}:{}}}),T}),Mr=f("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:n,stylistic:i=!0}=e,{indent:l=4}=typeof i=="boolean"?{}:i,d=await a(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:G.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:d}},{files:o,name:"anolilab/unicorn/rules",rules:{...d.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/import-style":["error",{styles:{"node:path":{named:!0},"node:util":{named:!0},path:{named:!0},util:{named:!0}}}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","unicorn/no-nested-ternary":"off","unicorn/no-useless-undefined":"off","unicorn/prefer-at":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":t.type==="module"?"error":"off","unicorn/prefer-node-protocol":"error","unicorn/prefer-ternary":["error","only-single-line"],"unicorn/prevent-abbreviations":["error",{allowList:{i:!0,j:!0},replacements:{args:!1,dev:!1,dist:!1,env:!1,params:!1,pkg:!1,prop:!1,props:!1,ref:!1,src:!1,utils:!1}}],...n?{"unicorn/empty-brace-spaces":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}:{"unicorn/template-indent":["error",{indent:l}]},...s}},{files:["tsconfig.dev.json","tsconfig.prod.json"],name:"anolilab/unicorn/tsconfig-overrides",rules:{"unicorn/prevent-abbreviations":"off"}},{files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],name:"anolilab/unicorn/ts-overrides",rules:{"unicorn/import-style":"off"}}]});var Rr=Object.defineProperty,Jr=v((e,r)=>Rr(e,"name",{value:r,configurable:!0}),"n$2");const zr=Jr(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await a(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Vr=f("all",async(e,r)=>{const{files:o=r,isInEditor:s,overrides:t}=e,n=await a(import("eslint-plugin-unused-imports"));return[{files:o,name:"anolilab/unused-imports/rules",plugins:{"unused-imports":n},rules:{"@typescript-eslint/no-unused-vars":"off","no-unused-vars":"off","unused-imports/no-unused-imports":s?"off":"error","unused-imports/no-unused-vars":[s?"warn":"error",{args:"after-used",argsIgnorePattern:"^_",vars:"all",varsIgnorePattern:"^_"}],...t}}]}),Wr=f("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-validate-jsx-nesting"));return[{files:o,name:"anolilab/validate-jsx-nesting/setup",plugins:{"validate-jsx-nesting":t},rules:{"validate-jsx-nesting/no-invalid-jsx-nesting":"error",...s}}]}),Br={suite:!0,test:!0,chai:!0,describe:!0,it:!0,expectTypeOf:!0,assertType:!0,expect:!0,assert:!0,vitest:!0,vi:!0,beforeAll:!0,afterAll:!0,beforeEach:!0,afterEach:!0,onTestFailed:!0,onTestFinished:!0};let Z;const Gr=f("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:n,tsconfigPath:i}=e,[l,d]=await Promise.all([a(import("@vitest/eslint-plugin")),a(import("eslint-plugin-no-only-tests"))]);return Z=Z??{...l,rules:{...l.rules,...d.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:Z}},{files:o,...i?{...l.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Br}},name:"anolilab/vitest/rules",rules:{...l.configs.all.rules,...l.configs.recommended.rules,"@typescript-eslint/explicit-function-return-type":"off","antfu/no-top-level-await":"off","n/prefer-global/process":"off","no-unused-expressions":"off","vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/max-expects":"off","vitest/no-hooks":"off","vitest/no-mocks-import":"off","vitest/no-only-tests":s?"off":"error","vitest/no-restricted-vi-methods":"off","vitest/no-standalone-expect":"error","vitest/valid-expect":["error",{alwaysAwait:!0,maxArgs:2,minArgs:1}],"vitest/valid-title":"off",...t,...n?{"vitest/padding-around-after-all-blocks":"off","vitest/padding-around-after-each-blocks":"off","vitest/padding-around-all":"off","vitest/padding-around-before-all-blocks":"off","vitest/padding-around-before-each-blocks":"off","vitest/padding-around-describe-blocks":"off","vitest/padding-around-expect-blocks":"off","vitest/padding-around-test-blocks":"off"}:{}}}]}),Xr=f("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:n=!0}=e,{indent:i=4,quotes:l="double"}=typeof n=="boolean"?{}:n,[d,b]=await Promise.all([a(import("eslint-plugin-yml")),a(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:b},name:"anolilab/yaml",plugins:{yaml:d},rules:{"@stylistic/spaced-comment":"off","yaml/block-mapping":"error","yaml/block-sequence":"error","yaml/no-empty-key":"error","yaml/no-empty-sequence-entry":"error","yaml/no-irregular-whitespace":"error","yaml/plain-scalar":"error","yaml/vue-custom-block/no-parsing-error":"error",...n?{"yaml/block-mapping-question-indicator-newline":"error","yaml/block-sequence-hyphen-indicator-newline":"error","yaml/flow-mapping-curly-newline":"error","yaml/flow-mapping-curly-spacing":"error","yaml/flow-sequence-bracket-newline":"error","yaml/flow-sequence-bracket-spacing":"error","yaml/indent":[t?"off":"error",i==="tab"?2:i],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:l==="backtick"?"single":l}],"yaml/spaced-comment":"error"}:{},...t?d.configs.prettier.rules:{},...s}}]}),Hr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ce(t)},rules:{...t.configs.all.rules,...s}}]}),Kr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var Qr=Object.defineProperty,Yr=v((e,r)=>Qr(e,"name",{value:r,configurable:!0}),"e$1");const Zr=Yr(()=>!!(process.env.GIT_PARAMS??process.env.VSCODE_GIT_COMMAND??process.env.npm_lifecycle_script?.startsWith("lint-staged")??!1),"isInGitHooksOrLintStaged");var es=Object.defineProperty,rs=v((e,r)=>es(e,"name",{value:r,configurable:!0}),"e");const ss=rs(()=>process.env.CI||Zr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var os=Object.defineProperty,X=v((e,r)=>os(e,"name",{value:r,configurable:!0}),"f");const ts=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],K=X((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),u=X((e,r)=>{const o=K(e,r);return{..."overrides"in o?o.overrides:{}}},"getOverrides"),g=X((e,r)=>{const o=K(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),ws=X(async(e={},...r)=>{if("files"in e)throw new Error('[@anolilab/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.');const o=e.cwd??process.cwd(),s=await xe(be(o,"package.json"),{resolveCatalogs:!0}),t=s.packageManager?.startsWith("pnpm"),n=y(s,["prettier"]),i=y(s,["@anolilab/eslint-config"]),l=y(s,["react","react-dom"]),d=s.dependencies?.react??s.devDependencies?.react;let b=!1;if(d!==void 0){const c=ee(d);c?.major&&c.major>=19&&(b=!0)}let h=!1,x=!1;const C=s.dependencies?.tailwindcss??s.devDependencies?.tailwindcss;if(C){const c=ee(C);c?.major&&c.major<=3&&(h=!0),c?.major&&c.major>=4&&(x=!0)}const{astro:k=y(s,["astro"]),componentExts:M=[],css:R=y(s,["postcss","cssnano"]),gitignore:I=!0,html:A=!1,jsx:E=y(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||l,lodash:T=y(s,["lodash","underscore","lodash-es","@types/lodash","lodash.chunk","lodash.compact","lodash.concat","lodash.difference","lodash.differenceby","lodash.differencewith","lodash.drop","lodash.dropright","lodash.droprightwhile","lodash.dropwhile","lodash.fill","lodash.findindex","lodash.findlastindex","lodash.flatten","lodash.flattendeep","lodash.flattendepth","lodash.frompairs","lodash.head","lodash.indexof","lodash.initial","lodash.intersection","lodash.intersectionby","lodash.intersectionwith","lodash.join","lodash.last","lodash.lastindexof","lodash.nth","lodash.pull","lodash.pullall","lodash.pullallby","lodash.pullallwith","lodash.pullat","lodash.remove","lodash.reverse","lodash.slice","lodash.sortedindex","lodash.sortedindexby","lodash.sortedindexof","lodash.sortedlastindex","lodash.sortedlastindexby","lodash.sortedlastindexof","lodash.sorteduniq","lodash.sorteduniqby","lodash.tail","lodash.take","lodash.takeright","lodash.takerightwhile","lodash.takewhile","lodash.union","lodash.unionby","lodash.unionwith","lodash.uniq","lodash.uniqby","lodash.uniqwith","lodash.unzip","lodash.unzipwith","lodash.without","lodash.xor","lodash.xorby","lodash.xorwith","lodash.zip","lodash.zipobject","lodash.zipobjectdeep","lodash.zipwith","lodash.countby","lodash.every","lodash.filter","lodash.find","lodash.findlast","lodash.flatmap","lodash.flatmapdeep","lodash.flatmapdepth","lodash.foreach","lodash.foreachright","lodash.groupby","lodash.includes","lodash.invokemap","lodash.keyby","lodash.map","lodash.orderby","lodash.partition","lodash.reduce","lodash.reduceright","lodash.reject","lodash.sample","lodash.samplesize","lodash.shuffle","lodash.size","lodash.some","lodash.sortby","lodash.now","lodash.after","lodash.ary","lodash.before","lodash.bind","lodash.bindkey","lodash.curry","lodash.curryright","lodash.debounce","lodash.defer","lodash.delay","lodash.flip","lodash.memoize","lodash.negate","lodash.once","lodash.overargs","lodash.partial","lodash.partialright","lodash.rearg","lodash.rest","lodash.spread","lodash.throttle","lodash.unary","lodash.wrap","lodash.castarray","lodash.clone","lodash.clonedeep","lodash.clonedeepwith","lodash.clonewith","lodash.conformsto","lodash.eq","lodash.gt","lodash.gte","lodash.isarguments","lodash.isarray","lodash.isarraybuffer","lodash.isarraylike","lodash.isarraylikeobject","lodash.isboolean","lodash.isbuffer","lodash.isdate","lodash.iselement","lodash.isempty","lodash.isequal","lodash.isequalwith","lodash.iserror","lodash.isfinite","lodash.isfunction","lodash.isinteger","lodash.islength","lodash.ismap","lodash.ismatch","lodash.ismatchwith","lodash.isnan","lodash.isnative","lodash.isnil","lodash.isnull","lodash.isnumber","lodash.isobject","lodash.isobjectlike","lodash.isplainobject","lodash.isregexp","lodash.issafeinteger","lodash.isset","lodash.isstring","lodash.issymbol","lodash.istypedarray","lodash.isundefined","lodash.isweakmap","lodash.isweakset","lodash.lt","lodash.lte","lodash.toarray","lodash.tofinite","lodash.tointeger","lodash.tolength","lodash.tonumber","lodash.toplainobject","lodash.tosafeinteger","lodash.tostring","lodash.add","lodash.ceil","lodash.divide","lodash.floor","lodash.max","lodash.maxby","lodash.mean","lodash.meanby","lodash.min","lodash.minby","lodash.multiply","lodash.round","lodash.subtract","lodash.sum","lodash.sumby","lodash.clamp","lodash.inrange","lodash.random","lodash.assign","lodash.assignin","lodash.assigninwith","lodash.assignwith","lodash.at","lodash.create","lodash.defaults","lodash.defaultsdeep","lodash.findkey","lodash.findlastkey","lodash.forin","lodash.forinright","lodash.forown","lodash.forownright","lodash.functions","lodash.functionsin","lodash.get","lodash.has","lodash.hasin","lodash.invert","lodash.invertby","lodash.invoke","lodash.keys","lodash.keysin","lodash.mapkeys","lodash.mapvalues","lodash.merge","lodash.mergewith","lodash.omit","lodash.omitby","lodash.pick","lodash.pickby","lodash.result","lodash.set","lodash.setwith","lodash.topairs","lodash.topairsin","lodash.transform","lodash.unset","lodash.update","lodash.updatewith","lodash.values","lodash.valuesin","lodash.chain","lodash.tap","lodash.thru","lodash.camelcase","lodash.capitalize","lodash.deburr","lodash.endswith","lodash.escape","lodash.escaperegexp","lodash.kebabcase","lodash.lowercase","lodash.lowerfirst","lodash.pad","lodash.padend","lodash.padstart","lodash.parseint","lodash.repeat","lodash.replace","lodash.snakecase","lodash.split","lodash.startcase","lodash.startswith","lodash.template","lodash.tolower","lodash.toupper","lodash.trim","lodash.trimend","lodash.trimstart","lodash.truncate","lodash.unescape","lodash.uppercase","lodash.upperfirst","lodash.words","lodash.attempt","lodash.bindall","lodash.cond","lodash.conforms","lodash.constant","lodash.defaultto","lodash.flow","lodash.flowright","lodash.identity","lodash.iteratee","lodash.matches","lodash.matchesproperty","lodash.method","lodash.methodof","lodash.mixin","lodash.noconflict","lodash.noop","lodash.ntharg","lodash.over","lodash.overevery","lodash.oversome","lodash.property","lodash.propertyof","lodash.range","lodash.rangeright","lodash.runincontext","lodash.stubarray","lodash.stubfalse","lodash.stubobject","lodash.stubstring","lodash.stubtrue","lodash.times","lodash.topath","lodash.uniqueid"]),playwright:_=y(s,["playwright","eslint-plugin-playwright"]),pnpm:B=t,react:U=l||y(s,["eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"]),reactCompiler:V=b,regexp:N=!0,silent:F=!1,storybook:D=y(s,["storybook","eslint-plugin-storybook"]),tailwindcss:j=h||x,tanstackQuery:$=y(s,["@tanstack/react-query"]),tanstackRouter:J=y(s,["@tanstack/react-router"]),testingLibrary:O=y(s,["@testing-library/dom","@testing-library/react"]),tsdoc:oe=!1,typescript:te=y(s,["typescript"]),unicorn:me=!0,unocss:ne=!1,vitest:ye=y(s,["vitest"]),zod:ae=y(s,["zod"])}=e;if(i){let c=[];ae&&c.push("eslint-plugin-zod"),ne&&c.push("@unocss/eslint-plugin"),$&&c.push("@tanstack/eslint-plugin-query"),J&&c.push("@tanstack/eslint-plugin-router"),(R||j)&&(c.push("@eslint/css"),(j&&x||j==="v4")&&c.push("tailwind-csstree")),(j&&h||j==="v3")&&c.push("eslint-plugin-tailwindcss"),D&&c.push("eslint-plugin-storybook"),U&&c.push("eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),U&&V&&c.push("eslint-plugin-react-compiler"),O&&c.push("eslint-plugin-testing-library"),E&&c.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),T&&c.push("eslint-plugin-you-dont-need-lodash-underscore"),oe&&c.push("eslint-plugin-tsdoc"),e.formatters&&c.push("eslint-plugin-format"),_&&c.push("eslint-plugin-playwright"),k&&(c.push("eslint-plugin-astro","astro-eslint-parser"),typeof e.formatters=="object"&&e.formatters.astro&&c.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters.markdown&&e.formatters.slidev&&c.push("prettier-plugin-slidev"),(e.formatters.xml||e.formatters.svg)&&c.push("@prettier/plugin-xml")),c=c.filter(Boolean),c.length>0&&await we(s,c,"devDependencies",{confirm:{message:X(W=>`@anolilab/eslint-config requires the following ${W.length===1?"package":"packages"} to be installed:
|
|
17
|
+
`),J=await a(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:I,"react-dom":F["@eslint-react/dom"],"react-hooks":A,"react-hooks-extra":F["@eslint-react/hooks-extra"],"react-naming-convention":F["@eslint-react/naming-convention"],"react-perf":T,"react-refresh":E,"react-web-api":F["@eslint-react/web-api"],"react-x":F["@eslint-react"],"react-you-might-not-need-an-effect":_,...j&&J?J.configs.recommended.plugins:{}}},{files:o,languageOptions:{globals:{...G.browser},parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{...R.configs["disable-conflict-eslint-plugin-react"]?.rules,"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":["error",{...re,allow:[...re.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-naming-convention/component-name":"error","react-naming-convention/context-name":"error","react-naming-convention/filename":"off","react-naming-convention/use-state":"error","react-refresh/only-export-components":["error",{allowConstantExport:B,allowExportNames:[...V?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...U||N?["meta","links","headers","loader","action","clientLoader","clientAction","handle","shouldRevalidate"]:[]]}],"react-web-api/no-leaked-event-listener":"error","react-web-api/no-leaked-interval":"error","react-web-api/no-leaked-resize-observer":"error","react-web-api/no-leaked-timeout":"error","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-shorthand-boolean":"error","react-x/jsx-shorthand-fragment":"error","react-x/jsx-uses-react":$?"off":"error","react-x/jsx-uses-vars":"error","react-x/no-access-state-in-setstate":"error","react-x/no-array-index-key":"error","react-x/no-children-count":"error","react-x/no-children-for-each":"error","react-x/no-children-map":"error","react-x/no-children-only":"error","react-x/no-children-prop":"off","react-x/no-children-to-array":"error","react-x/no-class-component":"off","react-x/no-clone-element":"error","react-x/no-component-will-mount":"error","react-x/no-component-will-receive-props":"error","react-x/no-component-will-update":"error","react-x/no-context-provider":"error","react-x/no-create-ref":"error","react-x/no-default-props":"error","react-x/no-direct-mutation-state":"error","react-x/no-duplicate-key":"error","react-x/no-forward-ref":"error","react-x/no-implicit-key":"error","react-x/no-missing-component-display-name":"off","react-x/no-missing-context-display-name":"off","react-x/no-missing-key":"error","react-x/no-misused-capture-owner-stack":"off","react-x/no-nested-component-definitions":"error","react-x/no-nested-lazy-component-declarations":"error","react-x/no-prop-types":"error","react-x/no-redundant-should-component-update":"error","react-x/no-set-state-in-component-did-mount":"error","react-x/no-set-state-in-component-did-update":"error","react-x/no-set-state-in-component-will-update":"error","react-x/no-string-refs":"error","react-x/no-unnecessary-use-callback":"error","react-x/no-unnecessary-use-memo":"error","react-x/no-unsafe-component-will-mount":"error","react-x/no-unsafe-component-will-receive-props":"error","react-x/no-unsafe-component-will-update":"error","react-x/no-unstable-context-value":"error","react-x/no-unstable-default-props":"error","react-x/no-unused-class-component-members":"error","react-x/no-unused-state":"error","react-x/no-use-context":"error","react-x/no-useless-forward-ref":"error","react-x/no-useless-fragment":"off","react-x/prefer-destructuring-assignment":"off","react-x/prefer-read-only-props":"off","react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["error",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",k,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",k],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"off","react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"off","react/jsx-no-useless-fragment":"off","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":"off","react/jsx-uses-vars":"off","react/no-access-state-in-setstate":"off","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"off","react/no-children-prop":"off","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"off","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"off","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"off","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"off","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":"off","react/react-in-jsx-scope":$?"off":"error","react/require-default-props":"off","react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","static public field"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...j&&J?{"react-compiler/react-compiler":"error","react-hooks/component-hook-factories":"error","react-hooks/config":"error","react-hooks/error-boundaries":"error","react-hooks/gating":"error","react-hooks/globals":"error","react-hooks/immutability":"error","react-hooks/incompatible-library":"warn","react-hooks/preserve-manual-memoization":"error","react-hooks/purity":"error","react-hooks/refs":"error","react-hooks/set-state-in-effect":"error","react-hooks/set-state-in-render":"error","react-hooks/static-components":"error","react-hooks/unsupported-syntax":"warn","react-hooks/use-memo":"error"}:{},...T.configs.flat.recommended.rules,..._.configs.recommended.rules,...$?I?.configs.flat?.["jsx-runtime"]?.rules:{},...i?{"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off"}:{},...t},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:D??"detect"},"react-x":{version:D??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}},...$?I.configs.flat["jsx-runtime"].languageOptions.parserOptions:{}},name:"anolilab/react/jsx",rules:{"react-x/naming-convention/filename-extension":["error","as-needed"],"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"off","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"},settings:{extensions:[".jsx"]}},{files:["**/*.tsx"],name:"anolilab/react/tsx",rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:p("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...C?[{files:s,ignores:x,name:"anolilab/react/type-aware-rules",rules:{...M}}]:[]]}),Cr=f("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,n=Se["flat/recommended"],i={...n.rules};if(s==="warn")for(const l in i)i[l]==="error"&&(i[l]="warn");return[{...n,files:o,name:"anolilab/regexp/rules",rules:{...i,...t}}]}),Sr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-simple-import-sort"));return[{files:o,name:"anolilab/simple-import-sort",plugins:{"simple-import-sort":t},rules:{"simple-import-sort/exports":"error","simple-import-sort/imports":"error",...s}}]}),Er=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-sonarjs"));return[{name:"anolilab/sonarjs/plugin",plugins:{sonarjs:t}},{files:o,name:"anolilab/sonarjs/rules",rules:{...t.configs.recommended.rules,"sonarjs/file-name-differ-from-class":"error","sonarjs/no-collapsible-if":"error","sonarjs/no-nested-template-literals":"off","sonarjs/no-tab":"error","sonarjs/todo-tag":"off",...s}},{files:p("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:p("js"),languageOptions:{ecmaVersion:"latest"},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off","sonarjs/public-static-readonly":"off"}}]}),_r=f("storybook",async e=>{const{overrides:r}=e,o=[...(await a(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),Dr=f("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await a(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),qr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),Ir=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),Tr=f("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,n=await a(import("eslint-plugin-testing-library")),i=y(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":n},rules:{...n.configs["flat/dom"].rules,...i?n.configs["flat/react"].rules:{},...s}}]}),Nr=f("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:n=2}=typeof t=="boolean"?{}:t,[i,l]=await Promise.all([a(import("eslint-plugin-toml")),a(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:l},name:"anolilab/toml",plugins:{toml:i},rules:{...t?{"@stylistic/spaced-comment":"off"}:{},"toml/comma-style":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error",...t?{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"error","toml/indent":["error",n==="tab"?2:n],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error"}:{},...s}}]}),Fr=f("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),se={"init-declarations":"off","no-catch-shadow":"off","no-delete-var":"error","no-label-var":"error","no-restricted-globals":["error",{message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",name:"isFinite"},{message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",name:"isNaN"},..._e.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":"off","no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Ar=f("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:se},{files:p("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Ur=Object.defineProperty,$r=v((e,r)=>Ur(e,"name",{value:r,configurable:!0}),"w");const Lr=f("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:n,overridesTypeAware:i,parserOptions:l,prettier:d}=e,b=ue,h=pe(t),[x,C]=await Promise.all([a(import("typescript-eslint")),a(import("eslint-plugin-no-for-of-array"))]);let k;l?.erasableSyntaxOnly&&(k=await a(import("eslint-plugin-erasable-syntax-only")));const M=e.filesTypeAware??p("ts"),R=[...p("astro"),...p("markdown"),...p("markdown_inline_js_jsx"),...p("js"),...p("jsx"),"**/*.json","**/*.jsonc",...e.ignoresTypeAware??[]],{tsconfigPath:I}=e;let{isTypeAware:A=!0}=e;A=A&&I!==void 0;const E=$r((_,B,U)=>{const V=he(Ee(import.meta.url));return{files:[...B,...o.map(N=>`**/*.${N}`)],...U?{ignores:U}:{},languageOptions:{parser:x.parser,parserOptions:{extraFileExtensions:o.map(N=>`.${N}`),sourceType:"module",..._?{projectService:!0,tsconfigRootDir:V}:{},...l}},name:`anolilab/typescript/${_?"type-aware-parser":"parser"}`}},"makeParser"),T=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":x.plugin,"no-for-of-array":C,...k?k.configs.recommended.plugins:{}}},...A?[E(!1,s),E(!0,M,R)]:[E(!1,s)],...x.configs.strict];return A&&T.push(...x.configs.strictTypeCheckedOnly,{files:[...M,...o.map(_=>`**/*.${_}`)],name:"anolilab/typescript/rules-type-aware",rules:{"@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-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error",...i}},{files:p("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),T.push({files:s,name:"anolilab/typescript/rules",rules:{"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-ts-comment":["error",{minimumDescriptionLength:3,"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":"allow-with-description","ts-nocheck":!0}],"@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/method-signature-style":"error","@typescript-eslint/naming-convention":["error",{format:["camelCase","PascalCase","UPPER_CASE"],selector:"variable"},{format:["camelCase","PascalCase"],selector:"function"},{format:["PascalCase"],selector:"typeLike"}],"@typescript-eslint/no-array-constructor":b["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":h["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":z["no-empty-function"],"@typescript-eslint/no-explicit-any":["error",{fixToUnknown:!1,ignoreRestArgs:!0}],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-loop-func":z["no-loop-func"],"@typescript-eslint/no-magic-numbers":z["no-magic-numbers"],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redeclare":z["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":se["no-shadow"],"@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unused-expressions":z["no-unused-expressions"],"@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":se["no-use-before-define"],"@typescript-eslint/no-useless-constructor":h["no-useless-constructor"],"@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"off","@typescript-eslint/prefer-ts-expect-error":"off","@typescript-eslint/return-await":z["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":b["space-infix-ops"],...k?k.configs.recommended.rules:{},...n,...d?{"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":0,"@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/quotes":0,"@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"}:{}}}),T}),Mr=f("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:n,stylistic:i=!0}=e,{indent:l=4}=typeof i=="boolean"?{}:i,d=await a(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:G.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:d}},{files:o,name:"anolilab/unicorn/rules",rules:{...d.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/import-style":["error",{styles:{"node:path":{named:!0},"node:util":{named:!0},path:{named:!0},util:{named:!0}}}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","unicorn/no-nested-ternary":"off","unicorn/no-useless-undefined":"off","unicorn/prefer-at":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":t.type==="module"?"error":"off","unicorn/prefer-node-protocol":"error","unicorn/prefer-ternary":["error","only-single-line"],"unicorn/prevent-abbreviations":["error",{allowList:{i:!0,j:!0},replacements:{args:!1,dev:!1,dist:!1,env:!1,params:!1,pkg:!1,prop:!1,props:!1,ref:!1,src:!1,utils:!1}}],...n?{"unicorn/empty-brace-spaces":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}:{"unicorn/template-indent":["error",{indent:l}]},...s}},{files:["tsconfig.dev.json","tsconfig.prod.json"],name:"anolilab/unicorn/tsconfig-overrides",rules:{"unicorn/prevent-abbreviations":"off"}},{files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],name:"anolilab/unicorn/ts-overrides",rules:{"unicorn/import-style":"off"}}]});var Rr=Object.defineProperty,Jr=v((e,r)=>Rr(e,"name",{value:r,configurable:!0}),"n$2");const zr=Jr(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await a(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Vr=f("all",async(e,r)=>{const{files:o=r,isInEditor:s,overrides:t}=e,n=await a(import("eslint-plugin-unused-imports"));return[{files:o,name:"anolilab/unused-imports/rules",plugins:{"unused-imports":n},rules:{"@typescript-eslint/no-unused-vars":"off","no-unused-vars":"off","unused-imports/no-unused-imports":s?"off":"error","unused-imports/no-unused-vars":[s?"warn":"error",{args:"after-used",argsIgnorePattern:"^_",vars:"all",varsIgnorePattern:"^_"}],...t}}]}),Wr=f("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-validate-jsx-nesting"));return[{files:o,name:"anolilab/validate-jsx-nesting/setup",plugins:{"validate-jsx-nesting":t},rules:{"validate-jsx-nesting/no-invalid-jsx-nesting":"error",...s}}]}),Br={suite:!0,test:!0,chai:!0,describe:!0,it:!0,expectTypeOf:!0,assertType:!0,expect:!0,assert:!0,vitest:!0,vi:!0,beforeAll:!0,afterAll:!0,beforeEach:!0,afterEach:!0,onTestFailed:!0,onTestFinished:!0};let Z;const Gr=f("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:n,tsconfigPath:i}=e,[l,d]=await Promise.all([a(import("@vitest/eslint-plugin")),a(import("eslint-plugin-no-only-tests"))]);return Z=Z??{...l,rules:{...l.rules,...d.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:Z}},{files:o,...i?{...l.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Br}},name:"anolilab/vitest/rules",rules:{...l.configs.all.rules,...l.configs.recommended.rules,"@typescript-eslint/explicit-function-return-type":"off","antfu/no-top-level-await":"off","n/prefer-global/process":"off","no-unused-expressions":"off","vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/max-expects":"off","vitest/no-hooks":"off","vitest/no-mocks-import":"off","vitest/no-only-tests":s?"off":"error","vitest/no-restricted-vi-methods":"off","vitest/no-standalone-expect":"error","vitest/valid-expect":["error",{alwaysAwait:!0,maxArgs:2,minArgs:1}],"vitest/valid-title":"off",...t,...n?{"vitest/padding-around-after-all-blocks":"off","vitest/padding-around-after-each-blocks":"off","vitest/padding-around-all":"off","vitest/padding-around-before-all-blocks":"off","vitest/padding-around-before-each-blocks":"off","vitest/padding-around-describe-blocks":"off","vitest/padding-around-expect-blocks":"off","vitest/padding-around-test-blocks":"off"}:{}}}]}),Xr=f("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:n=!0}=e,{indent:i=4,quotes:l="double"}=typeof n=="boolean"?{}:n,[d,b]=await Promise.all([a(import("eslint-plugin-yml")),a(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:b},name:"anolilab/yaml",plugins:{yaml:d},rules:{"@stylistic/spaced-comment":"off","yaml/block-mapping":"error","yaml/block-sequence":"error","yaml/no-empty-key":"error","yaml/no-empty-sequence-entry":"error","yaml/no-irregular-whitespace":"error","yaml/plain-scalar":"error","yaml/vue-custom-block/no-parsing-error":"error",...n?{"yaml/block-mapping-question-indicator-newline":"error","yaml/block-sequence-hyphen-indicator-newline":"error","yaml/flow-mapping-curly-newline":"error","yaml/flow-mapping-curly-spacing":"error","yaml/flow-sequence-bracket-newline":"error","yaml/flow-sequence-bracket-spacing":"error","yaml/indent":[t?"off":"error",i==="tab"?2:i],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:l==="backtick"?"single":l}],"yaml/spaced-comment":"error"}:{},...t?d.configs.prettier.rules:{},...s}}]}),Hr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ce(t)},rules:{...t.configs.all.rules,...s}}]}),Kr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var Qr=Object.defineProperty,Yr=v((e,r)=>Qr(e,"name",{value:r,configurable:!0}),"e$1");const Zr=Yr(()=>!!(process.env.GIT_PARAMS??process.env.VSCODE_GIT_COMMAND??process.env.npm_lifecycle_script?.startsWith("lint-staged")??!1),"isInGitHooksOrLintStaged");var es=Object.defineProperty,rs=v((e,r)=>es(e,"name",{value:r,configurable:!0}),"e");const ss=rs(()=>process.env.CI||Zr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var os=Object.defineProperty,H=v((e,r)=>os(e,"name",{value:r,configurable:!0}),"f");const ts=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],X=H((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),u=H((e,r)=>{const o=X(e,r);return{..."overrides"in o?o.overrides:{}}},"getOverrides"),g=H((e,r)=>{const o=X(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),ws=H(async(e={},...r)=>{if("files"in e)throw new Error('[@anolilab/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.');const o=e.cwd??process.cwd(),s=await xe(be(o,"package.json"),{resolveCatalogs:!0}),t=s.packageManager?.startsWith("pnpm"),n=y(s,["prettier"]),i=y(s,["@anolilab/eslint-config"]),l=y(s,["react","react-dom"]),d=s.dependencies?.react??s.devDependencies?.react;let b=!1;if(d!==void 0){const c=ee(d);c?.major&&c.major>=19&&(b=!0)}let h=!1,x=!1;const C=s.dependencies?.tailwindcss??s.devDependencies?.tailwindcss;if(C){const c=ee(C);c?.major&&c.major<=3&&(h=!0),c?.major&&c.major>=4&&(x=!0)}const{astro:k=y(s,["astro"]),componentExts:M=[],css:R=y(s,["postcss","cssnano"]),gitignore:I=!0,html:A=!1,jsx:E=y(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||l,lodash:T=y(s,["lodash","underscore","lodash-es","@types/lodash","lodash.chunk","lodash.compact","lodash.concat","lodash.difference","lodash.differenceby","lodash.differencewith","lodash.drop","lodash.dropright","lodash.droprightwhile","lodash.dropwhile","lodash.fill","lodash.findindex","lodash.findlastindex","lodash.flatten","lodash.flattendeep","lodash.flattendepth","lodash.frompairs","lodash.head","lodash.indexof","lodash.initial","lodash.intersection","lodash.intersectionby","lodash.intersectionwith","lodash.join","lodash.last","lodash.lastindexof","lodash.nth","lodash.pull","lodash.pullall","lodash.pullallby","lodash.pullallwith","lodash.pullat","lodash.remove","lodash.reverse","lodash.slice","lodash.sortedindex","lodash.sortedindexby","lodash.sortedindexof","lodash.sortedlastindex","lodash.sortedlastindexby","lodash.sortedlastindexof","lodash.sorteduniq","lodash.sorteduniqby","lodash.tail","lodash.take","lodash.takeright","lodash.takerightwhile","lodash.takewhile","lodash.union","lodash.unionby","lodash.unionwith","lodash.uniq","lodash.uniqby","lodash.uniqwith","lodash.unzip","lodash.unzipwith","lodash.without","lodash.xor","lodash.xorby","lodash.xorwith","lodash.zip","lodash.zipobject","lodash.zipobjectdeep","lodash.zipwith","lodash.countby","lodash.every","lodash.filter","lodash.find","lodash.findlast","lodash.flatmap","lodash.flatmapdeep","lodash.flatmapdepth","lodash.foreach","lodash.foreachright","lodash.groupby","lodash.includes","lodash.invokemap","lodash.keyby","lodash.map","lodash.orderby","lodash.partition","lodash.reduce","lodash.reduceright","lodash.reject","lodash.sample","lodash.samplesize","lodash.shuffle","lodash.size","lodash.some","lodash.sortby","lodash.now","lodash.after","lodash.ary","lodash.before","lodash.bind","lodash.bindkey","lodash.curry","lodash.curryright","lodash.debounce","lodash.defer","lodash.delay","lodash.flip","lodash.memoize","lodash.negate","lodash.once","lodash.overargs","lodash.partial","lodash.partialright","lodash.rearg","lodash.rest","lodash.spread","lodash.throttle","lodash.unary","lodash.wrap","lodash.castarray","lodash.clone","lodash.clonedeep","lodash.clonedeepwith","lodash.clonewith","lodash.conformsto","lodash.eq","lodash.gt","lodash.gte","lodash.isarguments","lodash.isarray","lodash.isarraybuffer","lodash.isarraylike","lodash.isarraylikeobject","lodash.isboolean","lodash.isbuffer","lodash.isdate","lodash.iselement","lodash.isempty","lodash.isequal","lodash.isequalwith","lodash.iserror","lodash.isfinite","lodash.isfunction","lodash.isinteger","lodash.islength","lodash.ismap","lodash.ismatch","lodash.ismatchwith","lodash.isnan","lodash.isnative","lodash.isnil","lodash.isnull","lodash.isnumber","lodash.isobject","lodash.isobjectlike","lodash.isplainobject","lodash.isregexp","lodash.issafeinteger","lodash.isset","lodash.isstring","lodash.issymbol","lodash.istypedarray","lodash.isundefined","lodash.isweakmap","lodash.isweakset","lodash.lt","lodash.lte","lodash.toarray","lodash.tofinite","lodash.tointeger","lodash.tolength","lodash.tonumber","lodash.toplainobject","lodash.tosafeinteger","lodash.tostring","lodash.add","lodash.ceil","lodash.divide","lodash.floor","lodash.max","lodash.maxby","lodash.mean","lodash.meanby","lodash.min","lodash.minby","lodash.multiply","lodash.round","lodash.subtract","lodash.sum","lodash.sumby","lodash.clamp","lodash.inrange","lodash.random","lodash.assign","lodash.assignin","lodash.assigninwith","lodash.assignwith","lodash.at","lodash.create","lodash.defaults","lodash.defaultsdeep","lodash.findkey","lodash.findlastkey","lodash.forin","lodash.forinright","lodash.forown","lodash.forownright","lodash.functions","lodash.functionsin","lodash.get","lodash.has","lodash.hasin","lodash.invert","lodash.invertby","lodash.invoke","lodash.keys","lodash.keysin","lodash.mapkeys","lodash.mapvalues","lodash.merge","lodash.mergewith","lodash.omit","lodash.omitby","lodash.pick","lodash.pickby","lodash.result","lodash.set","lodash.setwith","lodash.topairs","lodash.topairsin","lodash.transform","lodash.unset","lodash.update","lodash.updatewith","lodash.values","lodash.valuesin","lodash.chain","lodash.tap","lodash.thru","lodash.camelcase","lodash.capitalize","lodash.deburr","lodash.endswith","lodash.escape","lodash.escaperegexp","lodash.kebabcase","lodash.lowercase","lodash.lowerfirst","lodash.pad","lodash.padend","lodash.padstart","lodash.parseint","lodash.repeat","lodash.replace","lodash.snakecase","lodash.split","lodash.startcase","lodash.startswith","lodash.template","lodash.tolower","lodash.toupper","lodash.trim","lodash.trimend","lodash.trimstart","lodash.truncate","lodash.unescape","lodash.uppercase","lodash.upperfirst","lodash.words","lodash.attempt","lodash.bindall","lodash.cond","lodash.conforms","lodash.constant","lodash.defaultto","lodash.flow","lodash.flowright","lodash.identity","lodash.iteratee","lodash.matches","lodash.matchesproperty","lodash.method","lodash.methodof","lodash.mixin","lodash.noconflict","lodash.noop","lodash.ntharg","lodash.over","lodash.overevery","lodash.oversome","lodash.property","lodash.propertyof","lodash.range","lodash.rangeright","lodash.runincontext","lodash.stubarray","lodash.stubfalse","lodash.stubobject","lodash.stubstring","lodash.stubtrue","lodash.times","lodash.topath","lodash.uniqueid"]),playwright:_=y(s,["playwright","eslint-plugin-playwright"]),pnpm:B=t,react:U=l||y(s,["eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"]),reactCompiler:V=b,regexp:N=!0,silent:F=!1,storybook:D=y(s,["storybook","eslint-plugin-storybook"]),tailwindcss:j=h||x,tanstackQuery:$=y(s,["@tanstack/react-query"]),tanstackRouter:J=y(s,["@tanstack/react-router"]),testingLibrary:O=y(s,["@testing-library/dom","@testing-library/react"]),tsdoc:oe=!1,typescript:te=y(s,["typescript"]),unicorn:me=!0,unocss:ne=!1,vitest:ye=y(s,["vitest"]),zod:ae=y(s,["zod"])}=e;if(i){let c=[];ae&&c.push("eslint-plugin-zod"),ne&&c.push("@unocss/eslint-plugin"),$&&c.push("@tanstack/eslint-plugin-query"),J&&c.push("@tanstack/eslint-plugin-router"),(R||j)&&(c.push("@eslint/css"),(j&&x||j==="v4")&&c.push("tailwind-csstree")),(j&&h||j==="v3")&&c.push("eslint-plugin-tailwindcss"),D&&c.push("eslint-plugin-storybook"),U&&c.push("eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),U&&V&&c.push("eslint-plugin-react-compiler"),O&&c.push("eslint-plugin-testing-library"),E&&c.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),T&&c.push("eslint-plugin-you-dont-need-lodash-underscore"),oe&&c.push("eslint-plugin-tsdoc"),e.formatters&&c.push("eslint-plugin-format"),_&&c.push("eslint-plugin-playwright"),k&&(c.push("eslint-plugin-astro","astro-eslint-parser"),typeof e.formatters=="object"&&e.formatters.astro&&c.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters.markdown&&e.formatters.slidev&&c.push("prettier-plugin-slidev"),(e.formatters.xml||e.formatters.svg)&&c.push("@prettier/plugin-xml")),c=c.filter(Boolean),c.length>0&&await we(s,c,"devDependencies",{confirm:{message:H(W=>`@anolilab/eslint-config requires the following ${W.length===1?"package":"packages"} to be installed:
|
|
18
18
|
|
|
19
19
|
"${W.join(`"
|
|
20
20
|
"`)}"
|
|
21
21
|
|
|
22
|
-
for the ESLint configurations to work correctly. Do you want to install ${c.length===1?"it":"them"} now?`,"message")}})}let{isInEditor:L}=e;(L===void 0||!L)&&(L=ss(),L&&console.log("[@anolilab/eslint-config] Detected running in editor, some rules are disabled."));let w={};e.stylistic===!1?w=!1:typeof e.stylistic=="object"&&(w=e.stylistic),w&&!("jsx"in w)&&(w.jsx=E);const m=[];I&&(typeof I=="boolean"?m.push(a(import("eslint-config-flat-gitignore")).then(c=>[c({name:"anolilab/gitignore",strict:!1})])):m.push(a(import("eslint-config-flat-gitignore")).then(c=>[c({name:"anolilab/gitignore",...I})])));const
|
|
22
|
+
for the ESLint configurations to work correctly. Do you want to install ${c.length===1?"it":"them"} now?`,"message")}})}let{isInEditor:L}=e;(L===void 0||!L)&&(L=ss(),L&&console.log("[@anolilab/eslint-config] Detected running in editor, some rules are disabled."));let w={};e.stylistic===!1?w=!1:typeof e.stylistic=="object"&&(w=e.stylistic),w&&!("jsx"in w)&&(w.jsx=E);const m=[];I&&(typeof I=="boolean"?m.push(a(import("eslint-config-flat-gitignore")).then(c=>[c({name:"anolilab/gitignore",strict:!1})])):m.push(a(import("eslint-config-flat-gitignore")).then(c=>[c({name:"anolilab/gitignore",...I})])));const K=X(e,"typescript"),Q="tsconfigPath"in K?K.tsconfigPath:void 0;if(m.push($e(e.ignores),rr({packageJson:s}),De({}),Ie({}),wr({prettier:n}),Fe({isInEditor:L}),Ar({}),Vr({files:g(e,"unusedImports"),isInEditor:L,overrides:u(e,"unusedImports")}),ze({files:g(e,"comments"),overrides:u(e,"comments")}),dr({files:g(e,"node"),overrides:u(e,"node"),packageJson:s}),sr({files:g(e,"jsdoc"),jsx:E,overrides:u(e,"jsdoc"),packageJson:s,silent:F,stylistic:w,typescript:te}),er({cwd:o,files:g(e,"imports"),overrides:u(e,"imports"),packageJson:s,stylistic:w,tsconfigPath:Q}),Sr({files:g(e,"simpleImportSort"),overrides:u(e,"simpleImportSort")}),Re({files:g(e,"antfu"),lessOpinionated:e.lessOpinionated,overrides:u(e,"antfu"),packageJson:s}),pr({overrides:u(e,"noSecrets")}),fr({overrides:u(e,"noUnsanitized")}),xr({files:g(e,"promise"),overrides:u(e,"promise")}),Er({files:g(e,"sonarjs"),overrides:u(e,"sonarjs")}),ur({files:g(e,"perfectionist"),overrides:u(e,"perfectionist"),packageJson:s})),s.browserlist!==void 0&&m.push(Ve({files:g(e,"compat")})),me&&m.push(Mr({files:g(e,"unicorn"),overrides:u(e,"unicorn"),packageJson:s,prettier:n,stylistic:w})),T&&m.push(Hr({files:g(e,"lodash"),overrides:u(e,"lodash")})),E&&m.push([{files:p("jsx_and_tsx"),languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/jsx/setup"}],ar({files:g(e,"jsx-a11y"),overrides:u(e,"jsx-a11y")}),Wr({files:g(e,"validateJsxNesting"),overrides:u(e,"validateJsxNesting")})),te&&m.push(Lr({...K,componentExts:M,overrides:u(e,"typescript"),prettier:n})),w&&m.push(Ke({...w,overrides:u(e,"stylistic")})),N&&m.push(Cr(typeof N=="boolean"?{}:N)),ye&&m.push(Gr({files:g(e,"vitest"),isInEditor:L,overrides:u(e,"vitest"),prettier:n,tsconfigPath:Q})),O&&m.push(Tr({files:g(e,"testingLibrary"),overrides:u(e,"testingLibrary"),packageJson:s})),_&&m.push(mr({files:g(e,"playwright"),overrides:u(e,"playwright")})),D&&m.push(_r({overrides:u(e,"storybook")})),(R||j)&&m.push(We({files:g(e,"css"),overrides:u(e,"css"),tailwind:j!==!1})),(j&&h||j==="v3")&&m.push(Dr({overrides:u(e,"tailwindcss")})),$&&m.push(qr({files:g(e,"tanstackQuery"),overrides:u(e,"tanstackQuery")})),J&&m.push(Ir({files:g(e,"tanstackRouter"),overrides:u(e,"tanstackRouter")})),A&&m.push(Ze({files:g(e,"html"),overrides:u(e,"html"),prettier:n,stylistic:w})),ae&&m.push(Kr({files:g(e,"zod"),overrides:u(e,"zod")})),oe&&m.push(Fr({files:g(e,"tsdoc"),overrides:u(e,"tsdoc")})),U&&m.push(Or({...K,overrides:u(e,"react"),packageJson:s,reactCompiler:V,silent:F,tsconfigPath:Q})),ne&&m.push(zr({...X(e,"unocss"),overrides:u(e,"unocss")})),k&&m.push(Je({files:g(e,"astro"),overrides:u(e,"astro"),stylistic:w})),(e.jsonc??!0)&&m.push(nr({overrides:u(e,"jsonc"),packageJson:s,prettier:n,silent:F,stylistic:w})),(e.toml??!0)&&m.push(Nr({files:g(e,"toml"),overrides:u(e,"toml"),stylistic:w})),(e.markdown??!0)&&m.push(ir({componentExts:M,files:g(e,"markdown"),overrides:u(e,"markdown")})),(e.yaml??!0)&&m.push(Xr({files:g(e,"yaml"),overrides:u(e,"yaml"),prettier:n,stylistic:w})),B&&m.push(br({...X(e,"pnpm"),isInEditor:L,overrides:u(e,"pnpm")})),e.formatters){const c=y(s,["@prettier/plugin-xml"]);m.push(Ye({astro:y(s,["prettier-plugin-astro"]),css:!0,graphql:!0,html:!0,markdown:!0,slidev:y(s,["@slidev/cli"]),svg:c,xml:c,...typeof e.formatters=="object"?e.formatters:{}},typeof w=="object"?w:{}))}const ie=ts.reduce((c,W)=>(W in e&&(c[W]=e[W]),c),{});Object.keys(ie).length>0&&m.push([ie]);let Y=new je;return Y=Y.append(...m,...r),Y},"createConfig");export{ws as createConfig,g as getFiles,p as getFilesGlobs,u as getOverrides,X as resolveSubOptions};
|