@anolilab/eslint-config 22.0.0 → 22.0.1

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 CHANGED
@@ -1,3 +1,9 @@
1
+ ## @anolilab/eslint-config [22.0.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@22.0.0...@anolilab/eslint-config@22.0.1) (2026-02-25)
2
+
3
+ ### Bug Fixes
4
+
5
+ * fixed wrong files path ([3883288](https://github.com/anolilab/javascript-style-guide/commit/3883288b1cc556fe9ec768d8d42da7bcb5ceefb6))
6
+
1
7
  ## @anolilab/eslint-config [22.0.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@21.0.0...@anolilab/eslint-config@22.0.0) (2026-02-21)
2
8
 
3
9
  ### Features
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ Please remove "eslint-plugin-typescript-sort-keys" from your package.json, it co
15
15
  If you dont use the new react jsx-runtime in you project, please enable it manually.
16
16
  `))}$=l??$;let M;$&&(console.info(`@anolilab/eslint-config enabling react-compiler plugin
17
17
  `),M=await a(import("eslint-plugin-react-compiler")));const Q=f??!1;let V;return Q&&(console.info(`@anolilab/eslint-config enabling react-unhookify plugin
18
- `),V=await a(import("@ospm/eslint-plugin-react-unhookify"))),[{name:"anolilab/react/setup",plugins:{react:T,"react-dom":j["@eslint-react/dom"],"react-hooks":_,"react-hooks-extra":j["@eslint-react/hooks-extra"],"react-naming-convention":j["@eslint-react/naming-convention"],"react-perf":E,"react-refresh":N,"react-web-api":j["@eslint-react/web-api"],"react-x":j["@eslint-react"],"react-you-might-not-need-an-effect":J,...$&&M?M.configs.recommended.plugins:{},...Q&&V?{"react-unhookify":V}:{}}},{files:o,languageOptions:{globals:{...Y.browser},parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{...C.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",{...ae,allow:[...ae.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:z,allowExportNames:[...H?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...F||ee?["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":L?"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":"off","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",I,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",I],"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":L?"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",...$&&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"}:{},...Q&&V?{"react-unhookify/remove-memo":"error","react-unhookify/remove-use-callback":"error","react-unhookify/remove-use-memo":"error"}:{},...E.configs.flat.recommended.rules,...J.configs.recommended.rules,...L?T.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:U??"detect"},"react-x":{version:U??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0},...L?T.configs.flat["jsx-runtime"].languageOptions.parserOptions:{}}},name:"anolilab/react/jsx",rules:{"react-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:c("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...S?[{files:s,ignores:P,name:"anolilab/react/type-aware-rules",rules:{...G}}]:[]]}),Tr=p("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,n=Te["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}}]}),Nr=p("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}}]}),Fr=p("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:c("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:c("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"}}]}),Ar=p("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}),Ur=p("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}),$r=p("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}}]}),Lr=p("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}},{files:"**/routes/**/*.{ts,tsx}",rules:{"perfectionist/sort-objects":"off"}}]}),Mr=p("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}}]}),Rr=p("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}}]}),Jr=p("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}}]}),ie={"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"},...Fe.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}]},zr=p("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:ie},{files:c("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Vr=Object.defineProperty,Br=v((e,r)=>Vr(e,"name",{value:r,configurable:!0}),"O");const Wr=p("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:n,overridesTypeAware:i,parserOptions:l,prettier:f}=e,b=he,g=me(t),[x,O]=await Promise.all([a(import("typescript-eslint")),a(import("eslint-plugin-no-for-of-array"))]);let P;l?.erasableSyntaxOnly&&(P=await a(import("eslint-plugin-erasable-syntax-only")));const S=e.filesTypeAware??c("ts"),I=[...c("astro"),...c("markdown"),...c("markdown_inline_js_jsx"),...c("js"),...c("jsx"),"**/*.json","**/*.jsonc",...e.ignoresTypeAware??[]],{tsconfigPath:G}=e;let{isTypeAware:C=!0}=e;C=C&&G!==void 0;const T=Br((N,E,J)=>{const z=ke(Ne(import.meta.url));return{files:[...E,...o.map(F=>`**/*.${F}`)],...J?{ignores:J}:{},languageOptions:{parser:x.parser,parserOptions:{extraFileExtensions:o.map(F=>`.${F}`),sourceType:"module",...N?{projectService:!0,tsconfigRootDir:z}:{},...l}},name:`anolilab/typescript/${N?"type-aware-parser":"parser"}`}},"makeParser"),_=[{files:s,name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":x.plugin,"no-for-of-array":O,...P?P.configs.recommended.plugins:{}}},...C?[T(!1,s),T(!0,S,I)]:[T(!1,s)],...x.configs.strict];if(C){const N=x.configs.strictTypeCheckedOnly.map(E=>({...E,files:S,ignores:I}));_.push(...N,{files:[...S,...o.map(E=>`**/*.${E}`)],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:S,ignores:I,name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}})}return _.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-deprecated":"off","@typescript-eslint/no-dupe-class-members":g["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":B["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":B["no-loop-func"],"@typescript-eslint/no-magic-numbers":B["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":B["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":ie["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":B["no-unused-expressions"],"@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":ie["no-use-before-define"],"@typescript-eslint/no-useless-constructor":g["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":B["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"],...P?P.configs.recommended.rules:{},...n,...f?{"@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"}:{}}}),_}),Xr=/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u,Gr=p("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,f=await a(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:Y.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:f}},{files:o,name:"anolilab/unicorn/rules",rules:{...f.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[Xr]}],"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 Hr=Object.defineProperty,Kr=v((e,r)=>Hr(e,"name",{value:r,configurable:!0}),"n$2");const Qr=Kr(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"),Yr=p("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}}]}),Zr=p("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}}]}),es={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 ne;const rs=p("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:n,tsconfigPath:i}=e,[l,f]=await Promise.all([a(import("@vitest/eslint-plugin")),a(import("eslint-plugin-no-only-tests"))]);return ne=ne??{...l,rules:{...l.rules,...f.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:ne}},{files:o,...i?{...l.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...es}},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",{additionalTestBlockFunctions:[]}],"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"}:{}}}]}),ss=p("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,[f,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:f},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","never"],"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?f.configs.prettier.rules:{},...s}}]}),os=p("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":de(t)},rules:{...t.configs.all.rules,...s}}]}),ts=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-zod"));return[{...t.configs.recommended,files:o,name:"anolilab/zod/rules",rules:{...t.configs.recommended.rules,...s}}]});var ns=Object.defineProperty,as=v((e,r)=>ns(e,"name",{value:r,configurable:!0}),"e$1");const is=as(()=>!!(process.env.GIT_PARAMS??process.env.VSCODE_GIT_COMMAND??process.env.npm_lifecycle_script?.startsWith("lint-staged")??!1),"isInGitHooksOrLintStaged");var ls=Object.defineProperty,cs=v((e,r)=>ls(e,"name",{value:r,configurable:!0}),"e");const ps=cs(()=>process.env.CI||is()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var fs=Object.defineProperty,Z=v((e,r)=>fs(e,"name",{value:r,configurable:!0}),"f");const us=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],W=Z((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),d=Z((e,r)=>{const o=W(e,r);return{..."overrides"in o?o.overrides:{}}},"getOverrides"),h=Z((e,r)=>{const o=W(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),Es=Z(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 Oe(Pe(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"]),f=s.dependencies?.react??s.devDependencies?.react,b=y(s,["react-compiler-runtime"]);let g=!1,x=!1;const O=s.dependencies?.tailwindcss??s.devDependencies?.tailwindcss;if(O){const u=fe(O);u?.major&&u.major<=3&&(g=!0),u?.major&&u.major>=4&&(x=!0)}const{astro:P=y(s,["astro"]),componentExts:S=[],css:I=y(s,["postcss","cssnano"]),e18e:G=!0,gitignore:C=!0,html:T=!1,jsx:_=y(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||l,lodash:N=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:E=y(s,["playwright","eslint-plugin-playwright"]),pnpm:J=t,react:z=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"]),regexp:F=!0,silent:H=!1,storybook:ee=y(s,["storybook","eslint-plugin-storybook"]),tailwindcss:j=g||x,tanstackQuery:K=y(s,["@tanstack/react-query"]),tanstackRouter:U=y(s,["@tanstack/react-router"]),testingLibrary:$=y(s,["@testing-library/dom","@testing-library/react"]),tsdoc:L=!1,typescript:M=y(s,["typescript"]),unicorn:Q=!0,unocss:V=!1,vitest:A=y(s,["vitest"]),zod:le=y(s,["zod"])}=e,be=e.reactCompiler,re=W(e,"react"),xe="version"in re?re.version:void 0,we="compiler"in re?re.compiler:void 0,je=xe??f,ce=be??we??b;if(i){let u=[];le&&u.push("eslint-plugin-zod"),V&&u.push("@unocss/eslint-plugin"),K&&u.push("@tanstack/eslint-plugin-query"),U&&u.push("@tanstack/eslint-plugin-router"),(I||j)&&(u.push("@eslint/css"),(j&&x||j==="v4")&&u.push("tailwind-csstree")),(j&&g||j==="v3")&&u.push("eslint-plugin-tailwindcss"),ee&&u.push("eslint-plugin-storybook"),z&&u.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"),z&&ce&&u.push("eslint-plugin-react-compiler"),$&&u.push("eslint-plugin-testing-library"),_&&u.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),N&&u.push("eslint-plugin-you-dont-need-lodash-underscore"),L&&u.push("eslint-plugin-tsdoc"),e.formatters&&u.push("eslint-plugin-format"),E&&u.push("eslint-plugin-playwright"),P&&(u.push("eslint-plugin-astro","astro-eslint-parser"),typeof e.formatters=="object"&&e.formatters.astro&&u.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters.markdown&&e.formatters.slidev&&u.push("prettier-plugin-slidev"),(e.formatters.xml||e.formatters.svg)&&u.push("@prettier/plugin-xml")),u=u.filter(Boolean),u.length>0&&await Se(s,u,"devDependencies",{confirm:{message:Z(X=>`@anolilab/eslint-config requires the following ${X.length===1?"package":"packages"} to be installed:
18
+ `),V=await a(import("@ospm/eslint-plugin-react-unhookify"))),[{name:"anolilab/react/setup",plugins:{react:T,"react-dom":j["@eslint-react/dom"],"react-hooks":_,"react-hooks-extra":j["@eslint-react/hooks-extra"],"react-naming-convention":j["@eslint-react/naming-convention"],"react-perf":E,"react-refresh":N,"react-web-api":j["@eslint-react/web-api"],"react-x":j["@eslint-react"],"react-you-might-not-need-an-effect":J,...$&&M?M.configs.recommended.plugins:{},...Q&&V?{"react-unhookify":V}:{}}},{files:o,languageOptions:{globals:{...Y.browser},parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{...C.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",{...ae,allow:[...ae.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:z,allowExportNames:[...H?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...F||ee?["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":L?"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":"off","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",I,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",I],"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":L?"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",...$&&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"}:{},...Q&&V?{"react-unhookify/remove-memo":"error","react-unhookify/remove-use-callback":"error","react-unhookify/remove-use-memo":"error"}:{},...E.configs.flat.recommended.rules,...J.configs.recommended.rules,...L?T.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:U??"detect"},"react-x":{version:U??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0},...L?T.configs.flat["jsx-runtime"].languageOptions.parserOptions:{}}},name:"anolilab/react/jsx",rules:{"react-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:c("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...S?[{files:s,ignores:P,name:"anolilab/react/type-aware-rules",rules:{...G}}]:[]]}),Tr=p("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,n=Te["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}}]}),Nr=p("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}}]}),Fr=p("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:c("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:c("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"}}]}),Ar=p("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}),Ur=p("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}),$r=p("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}}]}),Lr=p("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}},{files:["**/routes/**/*.{ts,tsx}"],rules:{"perfectionist/sort-objects":"off"}}]}),Mr=p("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}}]}),Rr=p("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}}]}),Jr=p("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}}]}),ie={"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"},...Fe.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}]},zr=p("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:ie},{files:c("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Vr=Object.defineProperty,Br=v((e,r)=>Vr(e,"name",{value:r,configurable:!0}),"O");const Wr=p("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:n,overridesTypeAware:i,parserOptions:l,prettier:f}=e,b=he,g=me(t),[x,O]=await Promise.all([a(import("typescript-eslint")),a(import("eslint-plugin-no-for-of-array"))]);let P;l?.erasableSyntaxOnly&&(P=await a(import("eslint-plugin-erasable-syntax-only")));const S=e.filesTypeAware??c("ts"),I=[...c("astro"),...c("markdown"),...c("markdown_inline_js_jsx"),...c("js"),...c("jsx"),"**/*.json","**/*.jsonc",...e.ignoresTypeAware??[]],{tsconfigPath:G}=e;let{isTypeAware:C=!0}=e;C=C&&G!==void 0;const T=Br((N,E,J)=>{const z=ke(Ne(import.meta.url));return{files:[...E,...o.map(F=>`**/*.${F}`)],...J?{ignores:J}:{},languageOptions:{parser:x.parser,parserOptions:{extraFileExtensions:o.map(F=>`.${F}`),sourceType:"module",...N?{projectService:!0,tsconfigRootDir:z}:{},...l}},name:`anolilab/typescript/${N?"type-aware-parser":"parser"}`}},"makeParser"),_=[{files:s,name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":x.plugin,"no-for-of-array":O,...P?P.configs.recommended.plugins:{}}},...C?[T(!1,s),T(!0,S,I)]:[T(!1,s)],...x.configs.strict];if(C){const N=x.configs.strictTypeCheckedOnly.map(E=>({...E,files:S,ignores:I}));_.push(...N,{files:[...S,...o.map(E=>`**/*.${E}`)],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:S,ignores:I,name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}})}return _.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-deprecated":"off","@typescript-eslint/no-dupe-class-members":g["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":B["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":B["no-loop-func"],"@typescript-eslint/no-magic-numbers":B["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":B["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":ie["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":B["no-unused-expressions"],"@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":ie["no-use-before-define"],"@typescript-eslint/no-useless-constructor":g["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":B["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"],...P?P.configs.recommended.rules:{},...n,...f?{"@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"}:{}}}),_}),Xr=/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u,Gr=p("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,f=await a(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:Y.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:f}},{files:o,name:"anolilab/unicorn/rules",rules:{...f.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[Xr]}],"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 Hr=Object.defineProperty,Kr=v((e,r)=>Hr(e,"name",{value:r,configurable:!0}),"n$2");const Qr=Kr(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"),Yr=p("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}}]}),Zr=p("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}}]}),es={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 ne;const rs=p("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:n,tsconfigPath:i}=e,[l,f]=await Promise.all([a(import("@vitest/eslint-plugin")),a(import("eslint-plugin-no-only-tests"))]);return ne=ne??{...l,rules:{...l.rules,...f.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:ne}},{files:o,...i?{...l.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...es}},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",{additionalTestBlockFunctions:[]}],"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"}:{}}}]}),ss=p("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,[f,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:f},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","never"],"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?f.configs.prettier.rules:{},...s}}]}),os=p("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":de(t)},rules:{...t.configs.all.rules,...s}}]}),ts=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-zod"));return[{...t.configs.recommended,files:o,name:"anolilab/zod/rules",rules:{...t.configs.recommended.rules,...s}}]});var ns=Object.defineProperty,as=v((e,r)=>ns(e,"name",{value:r,configurable:!0}),"e$1");const is=as(()=>!!(process.env.GIT_PARAMS??process.env.VSCODE_GIT_COMMAND??process.env.npm_lifecycle_script?.startsWith("lint-staged")??!1),"isInGitHooksOrLintStaged");var ls=Object.defineProperty,cs=v((e,r)=>ls(e,"name",{value:r,configurable:!0}),"e");const ps=cs(()=>process.env.CI||is()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var fs=Object.defineProperty,Z=v((e,r)=>fs(e,"name",{value:r,configurable:!0}),"f");const us=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],W=Z((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),d=Z((e,r)=>{const o=W(e,r);return{..."overrides"in o?o.overrides:{}}},"getOverrides"),h=Z((e,r)=>{const o=W(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),Es=Z(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 Oe(Pe(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"]),f=s.dependencies?.react??s.devDependencies?.react,b=y(s,["react-compiler-runtime"]);let g=!1,x=!1;const O=s.dependencies?.tailwindcss??s.devDependencies?.tailwindcss;if(O){const u=fe(O);u?.major&&u.major<=3&&(g=!0),u?.major&&u.major>=4&&(x=!0)}const{astro:P=y(s,["astro"]),componentExts:S=[],css:I=y(s,["postcss","cssnano"]),e18e:G=!0,gitignore:C=!0,html:T=!1,jsx:_=y(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||l,lodash:N=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:E=y(s,["playwright","eslint-plugin-playwright"]),pnpm:J=t,react:z=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"]),regexp:F=!0,silent:H=!1,storybook:ee=y(s,["storybook","eslint-plugin-storybook"]),tailwindcss:j=g||x,tanstackQuery:K=y(s,["@tanstack/react-query"]),tanstackRouter:U=y(s,["@tanstack/react-router"]),testingLibrary:$=y(s,["@testing-library/dom","@testing-library/react"]),tsdoc:L=!1,typescript:M=y(s,["typescript"]),unicorn:Q=!0,unocss:V=!1,vitest:A=y(s,["vitest"]),zod:le=y(s,["zod"])}=e,be=e.reactCompiler,re=W(e,"react"),xe="version"in re?re.version:void 0,we="compiler"in re?re.compiler:void 0,je=xe??f,ce=be??we??b;if(i){let u=[];le&&u.push("eslint-plugin-zod"),V&&u.push("@unocss/eslint-plugin"),K&&u.push("@tanstack/eslint-plugin-query"),U&&u.push("@tanstack/eslint-plugin-router"),(I||j)&&(u.push("@eslint/css"),(j&&x||j==="v4")&&u.push("tailwind-csstree")),(j&&g||j==="v3")&&u.push("eslint-plugin-tailwindcss"),ee&&u.push("eslint-plugin-storybook"),z&&u.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"),z&&ce&&u.push("eslint-plugin-react-compiler"),$&&u.push("eslint-plugin-testing-library"),_&&u.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),N&&u.push("eslint-plugin-you-dont-need-lodash-underscore"),L&&u.push("eslint-plugin-tsdoc"),e.formatters&&u.push("eslint-plugin-format"),E&&u.push("eslint-plugin-playwright"),P&&(u.push("eslint-plugin-astro","astro-eslint-parser"),typeof e.formatters=="object"&&e.formatters.astro&&u.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters.markdown&&e.formatters.slidev&&u.push("prettier-plugin-slidev"),(e.formatters.xml||e.formatters.svg)&&u.push("@prettier/plugin-xml")),u=u.filter(Boolean),u.length>0&&await Se(s,u,"devDependencies",{confirm:{message:Z(X=>`@anolilab/eslint-config requires the following ${X.length===1?"package":"packages"} to be installed:
19
19
 
20
20
  "${X.join(`"
21
21
  "`)}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/eslint-config",
3
- "version": "22.0.0",
3
+ "version": "22.0.1",
4
4
  "description": "ESLint shareable config for the Anolilab JavaScript style guide.",
5
5
  "keywords": [
6
6
  "anolilab",