@anolilab/eslint-config 16.2.11 → 16.2.12
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 +3 -5
- package/dist/index.mjs +3 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## @anolilab/eslint-config [16.2.12](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@16.2.11...@anolilab/eslint-config@16.2.12) (2025-06-04)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **eslint-config:** update react compiler configuration and improve logging messages ([251b2f5](https://github.com/anolilab/javascript-style-guide/commit/251b2f5b79d01e9b81c0bca00c1fc2e3247b18b0))
|
|
6
|
+
|
|
1
7
|
## @anolilab/eslint-config [16.2.11](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@16.2.10...@anolilab/eslint-config@16.2.11) (2025-06-04)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/dist/index.cjs
CHANGED
|
@@ -7,14 +7,12 @@ Found eslint-plugin-tsdoc as dependency, disabling the jsdoc rules for *.ts and
|
|
|
7
7
|
Please remove "eslint-plugin-typescript-sort-keys" from your package.json, it conflicts with "eslint-plugin-perfectionist".
|
|
8
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"}}]}),yr=n.createConfig("e2e",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-playwright"));return[{files:o,plugins:{playwright:t},rules:{...t.configs.recommended.rules,...s}}]}),gr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-promise"));return[{files:o,name:"anolilab/promise/rules",plugins:{promise:t},rules:{...ce.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},ue={"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"},hr=n.createConfig("all",async(e,r)=>{const{files:o=r,prettier:s}=e;return[{files:o,name:"anolilab/style/rules",rules:{...ue,"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"}}]}),br=["vite"],xr=["@remix-run/node","@remix-run/react","@remix-run/serve","@remix-run/dev"],wr=["next"],jr=["@react-router/node","@react-router/react","@react-router/serve","@react-router/dev"],vr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,filesTypeAware:s=n.getFilesGlobs("ts"),ignoresTypeAware:t=["**/*.md/**",...n.getFilesGlobs("astro")],overrides:a,packageJson:i,prettier:p,reactCompiler:d,silent:h,stylistic:x=!0,tsconfigPath:v}=e,q=v!==void 0,{indent:k=4}=typeof x=="boolean"?{}:x,T={"react-x/no-leaked-conditional-rendering":"error"},[G,A,J,$,D,I]=await Promise.all([c(import("@eslint-react/eslint-plugin")),c(import("eslint-plugin-react")),c(import("eslint-plugin-react-hooks")),c(import("eslint-plugin-react-refresh")),c(import("eslint-plugin-react-perf")),c(import("eslint-plugin-react-you-might-not-need-an-effect"))]),_=m.hasPackageJsonAnyDependency(i,br),U=m.hasPackageJsonAnyDependency(i,xr),L=m.hasPackageJsonAnyDependency(i,wr),P=m.hasPackageJsonAnyDependency(i,jr),{plugins:N}=G.configs.all;let S=i?.dependencies?.react||i?.devDependencies?.react,E=!1;if(S!==void 0){const C=se.parse(S);C!==null&&(S=`${C.major}.${C.minor}`,h||console.info(`
|
|
9
9
|
@anolilab/eslint-config found the version ${S} of react in your dependencies, this version ${S} will be used to setup the "eslint-plugin-react"
|
|
10
|
-
`)),C?.major&&C.major>=19&&(E=!0)}let z=!1;if(v!==void 0){const C=Oe.readTsConfig(v);C?.compilerOptions!==void 0&&(C?.compilerOptions.jsx==="react-jsx"||C?.compilerOptions.jsx==="react-jsxdev")&&(z=!0,h||console.info(
|
|
11
|
-
@anolilab/eslint-config found react jsx-runtime.
|
|
10
|
+
`)),C?.major&&C.major>=19&&(E=!0)}let z=!1;if(v!==void 0){const C=Oe.readTsConfig(v);C?.compilerOptions!==void 0&&(C?.compilerOptions.jsx==="react-jsx"||C?.compilerOptions.jsx==="react-jsxdev")&&(z=!0,h||console.info(`@anolilab/eslint-config found react jsx-runtime.
|
|
12
11
|
|
|
13
12
|
Following rules are disabled: "react/jsx-uses-react" and "react/react-in-jsx-scope".
|
|
14
13
|
If you dont use the new react jsx-runtime in you project, please enable it manually.
|
|
15
|
-
`))}E=E&&d!==!1;let M;return E&&(console.info(
|
|
16
|
-
@anolilab/eslint-config enabling react-compiler plugin
|
|
17
|
-
`),M=await c(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:A,"react-dom":N["@eslint-react/dom"],"react-hooks":J,"react-hooks-extra":N["@eslint-react/hooks-extra"],"react-naming-convention":N["@eslint-react/naming-convention"],"react-perf":D,"react-refresh":$,"react-web-api":N["@eslint-react/web-api"],"react-x":N["@eslint-react"],"react-you-might-not-need-an-effect":I,...E&&M?M.recommended.plugins:{}}},{files:o,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",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-extra/no-unnecessary-use-callback":"error","react-hooks-extra/no-unnecessary-use-memo":"error","react-hooks-extra/no-unnecessary-use-prefix":"error","react-hooks-extra/prefer-use-state-lazy-initialization":"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:_,allowExportNames:[...L?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...U||P?["meta","links","headers","loader","action"]:[]]}],"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/avoid-shorthand-boolean":"off","react-x/avoid-shorthand-fragment":"off","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-uses-react":z?"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-comment-textnodes":"error","react-x/no-complex-conditional-rendering":"off","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-leaked-conditional-rendering":"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-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-react-namespace-import":"off","react-x/prefer-read-only-props":"off","react-x/prefer-shorthand-boolean":"off","react-x/prefer-shorthand-fragment":"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":z?"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",...E&&M?{"react-compiler/react-compiler":"error"}:{},...D?.configs?.flat?.recommended?.rules,"react-you-might-not-need-an-effect/you-might-not-need-an-effect":"warn",...p?{"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"}:{},...a},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:S??"detect"},"react-x":{version:S??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},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"}},...q?[{files:s,ignores:t,name:"anolilab/react/type-aware-rules",rules:{...T}}]:[]]}),kr=n.createConfig("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,a=De.configs["flat/recommended"],i={...a.rules};if(s==="warn")for(const p in i)i[p]==="error"&&(i[p]="warn");return[{...a,files:o,name:"anolilab/regexp/rules",rules:{...i,...t}}]}),Pr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(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}}]}),Cr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(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:2020},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off"}}]}),Or=n.createConfig("storybook",async e=>{const{overrides:r}=e,o=[...(await c(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),Dr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await c(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),_r=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),Sr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),Fr=n.createConfig("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await c(import("eslint-plugin-testing-library")),i=m.hasPackageJsonAnyDependency(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":a},rules:{...a.configs["flat/dom"].rules,...i?a.configs["flat/react"].rules:{},...s}}]}),qr=n.createConfig("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:a=2}=typeof t=="boolean"?{}:t,[i,p]=await Promise.all([c(import("eslint-plugin-toml")),c(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:p},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",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}}]}),Er=n.createConfig("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),Q={"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":["error",{args:"after-used",ignoreRestSiblings:!0,vars:"all"}],"no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Ar=n.createConfig("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:Q},{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 Ir=Object.defineProperty,Nr=w((e,r)=>Ir(e,"name",{value:r,configurable:!0}),"w");const Tr=n.createConfig("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:a,overridesTypeAware:i,parserOptions:p,prettier:d}=e,h=ue,x=pe(t),[v,q,k,T]=await Promise.all([c(import("@typescript-eslint/eslint-plugin")),c(import("@typescript-eslint/parser")),c(import("typescript-eslint")),c(import("eslint-plugin-no-for-of-array"))]),G=e.filesTypeAware??n.getFilesGlobs("ts"),A=e.ignoresTypeAware??["**/*.mdx/**",...n.getFilesGlobs("astro")],J=e?.tsconfigPath??void 0,$=J!==void 0,D=Nr((_,U,L)=>({files:[...U,...o.map(P=>`**/*.${P}`)],...L?{ignores:L}:{},languageOptions:{parser:q,parserOptions:{extraFileExtensions:o.map(P=>`.${P}`),sourceType:"module",..._?{projectService:{allowDefaultProject:["./*.js"],defaultProject:J},tsconfigRootDir:process.cwd()}:{},...p}},name:`anolilab/typescript/${_?"type-aware-parser":"parser"}`}),"makeParser"),I=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":v,"no-for-of-array":T}},...$?[D(!1,s),D(!0,G,A)]:[D(!1,s)],...k.configs.strict];return $&&I.push(...k.configs.strictTypeCheckedOnly,{files:[...G,...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:n.getFilesGlobs("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),I.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":h["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":x["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":R["no-empty-function"],"@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":R["no-loop-func"],"@typescript-eslint/no-magic-numbers":R["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":R["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":Q["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":R["no-unused-expressions"],"@typescript-eslint/no-unused-vars":Q["no-unused-vars"],"@typescript-eslint/no-use-before-define":Q["no-use-before-define"],"@typescript-eslint/no-useless-constructor":x["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":R["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":h["space-infix-ops"],...a,...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"}:{}}}),I}),Jr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:a,stylistic:i=!0}=e,{indent:p=4}=typeof i=="boolean"?{}:i,d=await c(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:K.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/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","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"],...a?{"unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"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 $r=Object.defineProperty,Ur=w((e,r)=>$r(e,"name",{value:r,configurable:!0}),"n$2");const Lr=Ur(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await c(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Mr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(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}}]}),Rr={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 re;const Gr=n.createConfig("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:a,tsconfigPath:i}=e,[p,d]=await Promise.all([c(import("@vitest/eslint-plugin")),c(import("eslint-plugin-no-only-tests"))]);return re=re||{...p,rules:{...p.rules,...d.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:re}},{files:o,...i?{...p.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Rr}},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:i=4,quotes:p="double"}=typeof a=="boolean"?{}:a,[d,h]=await Promise.all([c(import("eslint-plugin-yml")),c(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:h},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",...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",i==="tab"?2:i],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:p==="backtick"?"single":p}],"yaml/spaced-comment":"error"}:{},...t?d.configs.prettier.rules:{},...s}},{files:["pnpm-workspace.yaml"],name:"anolilab/yaml/pnpm-workspace",rules:{"yaml/sort-keys":["error",{order:["packages","overrides","patchedDependencies","hoistPattern","catalog","catalogs","allowedDeprecatedVersions","allowNonAppliedPatches","configDependencies","ignoredBuiltDependencies","ignoredOptionalDependencies","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","packageExtensions","peerDependencyRules","supportedArchitectures"],pathPattern:"^$"}]}}]}),Vr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ce.fixupPluginRules(t)},rules:{...t.configs.all.rules,...s}}]}),Br=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var Wr=Object.defineProperty,Xr=w((e,r)=>Wr(e,"name",{value:r,configurable:!0}),"e$1");const Hr=Xr(()=>!!(process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged")),"isInGitHooksOrLintStaged");var Kr=Object.defineProperty,Qr=w((e,r)=>Kr(e,"name",{value:r,configurable:!0}),"e");const Yr=Qr(()=>process.env.CI||Hr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var Zr=Object.defineProperty,W=w((e,r)=>Zr(e,"name",{value:r,configurable:!0}),"p");const es=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],X=W((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),u=W((e,r)=>{const o=X(e,r);return{...e.overrides?.[r],..."overrides"in o?o.overrides:{}}},"getOverrides"),g=W((e,r)=>{const o=X(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),rs=W(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=m.parsePackageJson(je.readFileSync(ve.join(o,"package.json"),"utf8")),t=m.hasPackageJsonAnyDependency(s,["prettier"]),a=m.hasPackageJsonAnyDependency(s,["@anolilab/eslint-config"]),i=m.hasPackageJsonAnyDependency(s,["react","react-dom"]),p=s?.dependencies?.react||s?.devDependencies?.react;let d=!1;if(p!==void 0){const f=se.parse(p);f?.major&&f.major>=19&&(d=!0)}let h=!1;const x=s?.dependencies?.tailwindcss||s?.devDependencies?.tailwindcss;if(x){const f=se.parse(x);f?.major&&f.major<=3&&(h=!0)}const{astro:v=m.hasPackageJsonAnyDependency(s,["astro"]),componentExts:q=[],css:k=m.hasPackageJsonAnyDependency(s,["postcss","cssnano"]),gitignore:T=!0,html:G=!1,jsx:A=m.hasPackageJsonAnyDependency(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||i,lodash:J=m.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:$=m.hasPackageJsonAnyDependency(s,["playwright","eslint-plugin-playwright"]),react:D=i||m.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:I=d,regexp:_=!0,silent:U=!1,storybook:L=m.hasPackageJsonAnyDependency(s,["storybook","eslint-plugin-storybook"]),tailwindcss:P=h,tanstackQuery:N=m.hasPackageJsonAnyDependency(s,["@tanstack/react-query"]),tanstackRouter:S=m.hasPackageJsonAnyDependency(s,["@tanstack/react-router"]),testingLibrary:E=m.hasPackageJsonAnyDependency(s,["@testing-library/dom","@testing-library/react"]),tsdoc:z=!1,typescript:M=m.hasPackageJsonAnyDependency(s,["typescript"]),unicorn:C=!0,unocss:ne=!1,vitest:me=m.hasPackageJsonAnyDependency(s,["vitest"]),zod:ae=m.hasPackageJsonAnyDependency(s,["zod"])}=e;if(a){let f=[];ae&&f.push("eslint-plugin-zod"),ne&&f.push("@unocss/eslint-plugin"),N&&f.push("@tanstack/eslint-plugin-query"),S&&f.push("@tanstack/eslint-plugin-router"),(k||P)&&f.push("@eslint/css"),P&&f.push("eslint-plugin-tailwindcss"),L&&f.push("eslint-plugin-storybook"),D&&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"),D&&I&&f.push("eslint-plugin-react-compiler"),E&&f.push("eslint-plugin-testing-library"),A&&f.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),J&&f.push("eslint-plugin-you-dont-need-lodash-underscore"),z&&f.push("eslint-plugin-tsdoc"),e.formatters&&f.push("eslint-plugin-format"),$&&f.push("playwright-eslint-plugin"),v&&(f.push("eslint-plugin-astro","astro-eslint-parser","@typescript-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 m.ensurePackages(s,f,"devDependencies",{confirm:{message:W(B=>`@anolilab/eslint-config requires the following ${B.length===1?"package":"packages"} to be installed:
|
|
14
|
+
`))}E=E&&d!==!1;let M;return E&&(console.info(`@anolilab/eslint-config enabling react-compiler plugin
|
|
15
|
+
`),M=await c(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:A,"react-dom":N["@eslint-react/dom"],"react-hooks":J,"react-hooks-extra":N["@eslint-react/hooks-extra"],"react-naming-convention":N["@eslint-react/naming-convention"],"react-perf":D,"react-refresh":$,"react-web-api":N["@eslint-react/web-api"],"react-x":N["@eslint-react"],"react-you-might-not-need-an-effect":I,...E&&M?M.configs.recommended.plugins:{}}},{files:o,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",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-extra/no-unnecessary-use-callback":"error","react-hooks-extra/no-unnecessary-use-memo":"error","react-hooks-extra/no-unnecessary-use-prefix":"error","react-hooks-extra/prefer-use-state-lazy-initialization":"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:_,allowExportNames:[...L?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...U||P?["meta","links","headers","loader","action"]:[]]}],"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/avoid-shorthand-boolean":"off","react-x/avoid-shorthand-fragment":"off","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-uses-react":z?"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-comment-textnodes":"error","react-x/no-complex-conditional-rendering":"off","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-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-react-namespace-import":"off","react-x/prefer-read-only-props":"off","react-x/prefer-shorthand-boolean":"off","react-x/prefer-shorthand-fragment":"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":z?"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",...E&&M?{"react-compiler/react-compiler":"error"}:{},...D?.configs?.flat?.recommended?.rules,"react-you-might-not-need-an-effect/you-might-not-need-an-effect":"warn",...p?{"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"}:{},...a},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:S??"detect"},"react-x":{version:S??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},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"}},...q?[{files:s,ignores:t,name:"anolilab/react/type-aware-rules",rules:{...T}}]:[]]}),kr=n.createConfig("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,a=De.configs["flat/recommended"],i={...a.rules};if(s==="warn")for(const p in i)i[p]==="error"&&(i[p]="warn");return[{...a,files:o,name:"anolilab/regexp/rules",rules:{...i,...t}}]}),Pr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(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}}]}),Cr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(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:2020},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off"}}]}),Or=n.createConfig("storybook",async e=>{const{overrides:r}=e,o=[...(await c(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),Dr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await c(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),_r=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),Sr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),Fr=n.createConfig("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await c(import("eslint-plugin-testing-library")),i=m.hasPackageJsonAnyDependency(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":a},rules:{...a.configs["flat/dom"].rules,...i?a.configs["flat/react"].rules:{},...s}}]}),qr=n.createConfig("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:a=2}=typeof t=="boolean"?{}:t,[i,p]=await Promise.all([c(import("eslint-plugin-toml")),c(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:p},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",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}}]}),Er=n.createConfig("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),Q={"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":["error",{args:"after-used",ignoreRestSiblings:!0,vars:"all"}],"no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Ar=n.createConfig("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:Q},{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 Ir=Object.defineProperty,Nr=w((e,r)=>Ir(e,"name",{value:r,configurable:!0}),"w");const Tr=n.createConfig("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:a,overridesTypeAware:i,parserOptions:p,prettier:d}=e,h=ue,x=pe(t),[v,q,k,T]=await Promise.all([c(import("@typescript-eslint/eslint-plugin")),c(import("@typescript-eslint/parser")),c(import("typescript-eslint")),c(import("eslint-plugin-no-for-of-array"))]),G=e.filesTypeAware??n.getFilesGlobs("ts"),A=e.ignoresTypeAware??["**/*.mdx/**",...n.getFilesGlobs("astro")],J=e?.tsconfigPath??void 0,$=J!==void 0,D=Nr((_,U,L)=>({files:[...U,...o.map(P=>`**/*.${P}`)],...L?{ignores:L}:{},languageOptions:{parser:q,parserOptions:{extraFileExtensions:o.map(P=>`.${P}`),sourceType:"module",..._?{projectService:{allowDefaultProject:["./*.js"],defaultProject:J},tsconfigRootDir:process.cwd()}:{},...p}},name:`anolilab/typescript/${_?"type-aware-parser":"parser"}`}),"makeParser"),I=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":v,"no-for-of-array":T}},...$?[D(!1,s),D(!0,G,A)]:[D(!1,s)],...k.configs.strict];return $&&I.push(...k.configs.strictTypeCheckedOnly,{files:[...G,...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:n.getFilesGlobs("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),I.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":h["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":x["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":R["no-empty-function"],"@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":R["no-loop-func"],"@typescript-eslint/no-magic-numbers":R["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":R["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":Q["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":R["no-unused-expressions"],"@typescript-eslint/no-unused-vars":Q["no-unused-vars"],"@typescript-eslint/no-use-before-define":Q["no-use-before-define"],"@typescript-eslint/no-useless-constructor":x["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":R["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":h["space-infix-ops"],...a,...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"}:{}}}),I}),Jr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:a,stylistic:i=!0}=e,{indent:p=4}=typeof i=="boolean"?{}:i,d=await c(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:K.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/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","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"],...a?{"unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"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 $r=Object.defineProperty,Ur=w((e,r)=>$r(e,"name",{value:r,configurable:!0}),"n$2");const Lr=Ur(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await c(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Mr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(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}}]}),Rr={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 re;const Gr=n.createConfig("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:a,tsconfigPath:i}=e,[p,d]=await Promise.all([c(import("@vitest/eslint-plugin")),c(import("eslint-plugin-no-only-tests"))]);return re=re||{...p,rules:{...p.rules,...d.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:re}},{files:o,...i?{...p.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Rr}},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:i=4,quotes:p="double"}=typeof a=="boolean"?{}:a,[d,h]=await Promise.all([c(import("eslint-plugin-yml")),c(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:h},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",...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",i==="tab"?2:i],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:p==="backtick"?"single":p}],"yaml/spaced-comment":"error"}:{},...t?d.configs.prettier.rules:{},...s}},{files:["pnpm-workspace.yaml"],name:"anolilab/yaml/pnpm-workspace",rules:{"yaml/sort-keys":["error",{order:["packages","overrides","patchedDependencies","hoistPattern","catalog","catalogs","allowedDeprecatedVersions","allowNonAppliedPatches","configDependencies","ignoredBuiltDependencies","ignoredOptionalDependencies","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","packageExtensions","peerDependencyRules","supportedArchitectures"],pathPattern:"^$"}]}}]}),Vr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ce.fixupPluginRules(t)},rules:{...t.configs.all.rules,...s}}]}),Br=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var Wr=Object.defineProperty,Xr=w((e,r)=>Wr(e,"name",{value:r,configurable:!0}),"e$1");const Hr=Xr(()=>!!(process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged")),"isInGitHooksOrLintStaged");var Kr=Object.defineProperty,Qr=w((e,r)=>Kr(e,"name",{value:r,configurable:!0}),"e");const Yr=Qr(()=>process.env.CI||Hr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var Zr=Object.defineProperty,W=w((e,r)=>Zr(e,"name",{value:r,configurable:!0}),"p");const es=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],X=W((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),u=W((e,r)=>{const o=X(e,r);return{...e.overrides?.[r],..."overrides"in o?o.overrides:{}}},"getOverrides"),g=W((e,r)=>{const o=X(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),rs=W(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=m.parsePackageJson(je.readFileSync(ve.join(o,"package.json"),"utf8")),t=m.hasPackageJsonAnyDependency(s,["prettier"]),a=m.hasPackageJsonAnyDependency(s,["@anolilab/eslint-config"]),i=m.hasPackageJsonAnyDependency(s,["react","react-dom"]),p=s?.dependencies?.react||s?.devDependencies?.react;let d=!1;if(p!==void 0){const f=se.parse(p);f?.major&&f.major>=19&&(d=!0)}let h=!1;const x=s?.dependencies?.tailwindcss||s?.devDependencies?.tailwindcss;if(x){const f=se.parse(x);f?.major&&f.major<=3&&(h=!0)}const{astro:v=m.hasPackageJsonAnyDependency(s,["astro"]),componentExts:q=[],css:k=m.hasPackageJsonAnyDependency(s,["postcss","cssnano"]),gitignore:T=!0,html:G=!1,jsx:A=m.hasPackageJsonAnyDependency(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||i,lodash:J=m.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:$=m.hasPackageJsonAnyDependency(s,["playwright","eslint-plugin-playwright"]),react:D=i||m.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:I=d,regexp:_=!0,silent:U=!1,storybook:L=m.hasPackageJsonAnyDependency(s,["storybook","eslint-plugin-storybook"]),tailwindcss:P=h,tanstackQuery:N=m.hasPackageJsonAnyDependency(s,["@tanstack/react-query"]),tanstackRouter:S=m.hasPackageJsonAnyDependency(s,["@tanstack/react-router"]),testingLibrary:E=m.hasPackageJsonAnyDependency(s,["@testing-library/dom","@testing-library/react"]),tsdoc:z=!1,typescript:M=m.hasPackageJsonAnyDependency(s,["typescript"]),unicorn:C=!0,unocss:ne=!1,vitest:me=m.hasPackageJsonAnyDependency(s,["vitest"]),zod:ae=m.hasPackageJsonAnyDependency(s,["zod"])}=e;if(a){let f=[];ae&&f.push("eslint-plugin-zod"),ne&&f.push("@unocss/eslint-plugin"),N&&f.push("@tanstack/eslint-plugin-query"),S&&f.push("@tanstack/eslint-plugin-router"),(k||P)&&f.push("@eslint/css"),P&&f.push("eslint-plugin-tailwindcss"),L&&f.push("eslint-plugin-storybook"),D&&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"),D&&I&&f.push("eslint-plugin-react-compiler"),E&&f.push("eslint-plugin-testing-library"),A&&f.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),J&&f.push("eslint-plugin-you-dont-need-lodash-underscore"),z&&f.push("eslint-plugin-tsdoc"),e.formatters&&f.push("eslint-plugin-format"),$&&f.push("playwright-eslint-plugin"),v&&(f.push("eslint-plugin-astro","astro-eslint-parser","@typescript-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 m.ensurePackages(s,f,"devDependencies",{confirm:{message:W(B=>`@anolilab/eslint-config requires the following ${B.length===1?"package":"packages"} to be installed:
|
|
18
16
|
|
|
19
17
|
"${B.join(`"
|
|
20
18
|
"`)}"
|
package/dist/index.mjs
CHANGED
|
@@ -9,14 +9,12 @@ Found eslint-plugin-tsdoc as dependency, disabling the jsdoc rules for *.ts and
|
|
|
9
9
|
Please remove "eslint-plugin-typescript-sort-keys" from your package.json, it conflicts with "eslint-plugin-perfectionist".
|
|
10
10
|
`),[{name:"anolilab/perfectionist/setup",plugins:{perfectionist:n}},{files:o,name:"anolilab/perfectionist/rules",rules:{...n.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:u("ts"),name:"anolilab/perfectionist/typescript",rules:{"perfectionist/sort-classes":"off"}},{files:u("postcss"),name:"anolilab/perfectionist/postcss",rules:{"perfectionist/sort-objects":"off"}}]}),lr=p("e2e",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-playwright"));return[{files:o,plugins:{playwright:t},rules:{...t.configs.recommended.rules,...s}}]}),cr=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-promise"));return[{files:o,name:"anolilab/promise/rules",plugins:{promise:t},rules:{...ae(t.configs["flat/recommended"].rules),"promise/prefer-await-to-callbacks":"off","promise/prefer-await-to-then":"off",...s}}]}),se={allow:["__DEV__","__STORYBOOK_CLIENT_API__","__STORYBOOK_ADDONS_CHANNEL__","__STORYBOOK_STORY_STORE__"],allowAfterSuper:!1,allowAfterThis:!1,enforceInMethodNames:!0},pe={"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",se],"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"},pr=p("all",async(e,r)=>{const{files:o=r,prettier:s}=e;return[{files:o,name:"anolilab/style/rules",rules:{...pe,"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:u("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"}}]}),fr=["vite"],dr=["@remix-run/node","@remix-run/react","@remix-run/serve","@remix-run/dev"],ur=["next"],mr=["@react-router/node","@react-router/react","@react-router/serve","@react-router/dev"],yr=p("jsx_and_tsx",async(e,r)=>{const{files:o=r,filesTypeAware:s=u("ts"),ignoresTypeAware:t=["**/*.md/**",...u("astro")],overrides:n,packageJson:a,prettier:l,reactCompiler:f,silent:h,stylistic:x=!0,tsconfigPath:v}=e,q=v!==void 0,{indent:k=4}=typeof x=="boolean"?{}:x,A={"react-x/no-leaked-conditional-rendering":"error"},[z,F,$,U,S,N]=await Promise.all([i(import("@eslint-react/eslint-plugin")),i(import("eslint-plugin-react")),i(import("eslint-plugin-react-hooks")),i(import("eslint-plugin-react-refresh")),i(import("eslint-plugin-react-perf")),i(import("eslint-plugin-react-you-might-not-need-an-effect"))]),_=y(a,fr),L=y(a,dr),M=y(a,ur),O=y(a,mr),{plugins:T}=z.configs.all;let E=a?.dependencies?.react||a?.devDependencies?.react,I=!1;if(E!==void 0){const P=re(E);P!==null&&(E=`${P.major}.${P.minor}`,h||console.info(`
|
|
11
11
|
@anolilab/eslint-config found the version ${E} of react in your dependencies, this version ${E} will be used to setup the "eslint-plugin-react"
|
|
12
|
-
`)),P?.major&&P.major>=19&&(I=!0)}let V=!1;if(v!==void 0){const P=je(v);P?.compilerOptions!==void 0&&(P?.compilerOptions.jsx==="react-jsx"||P?.compilerOptions.jsx==="react-jsxdev")&&(V=!0,h||console.info(
|
|
13
|
-
@anolilab/eslint-config found react jsx-runtime.
|
|
12
|
+
`)),P?.major&&P.major>=19&&(I=!0)}let V=!1;if(v!==void 0){const P=je(v);P?.compilerOptions!==void 0&&(P?.compilerOptions.jsx==="react-jsx"||P?.compilerOptions.jsx==="react-jsxdev")&&(V=!0,h||console.info(`@anolilab/eslint-config found react jsx-runtime.
|
|
14
13
|
|
|
15
14
|
Following rules are disabled: "react/jsx-uses-react" and "react/react-in-jsx-scope".
|
|
16
15
|
If you dont use the new react jsx-runtime in you project, please enable it manually.
|
|
17
|
-
`))}I=I&&f!==!1;let R;return I&&(console.info(
|
|
18
|
-
@anolilab/eslint-config enabling react-compiler plugin
|
|
19
|
-
`),R=await i(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:F,"react-dom":T["@eslint-react/dom"],"react-hooks":$,"react-hooks-extra":T["@eslint-react/hooks-extra"],"react-naming-convention":T["@eslint-react/naming-convention"],"react-perf":S,"react-refresh":U,"react-web-api":T["@eslint-react/web-api"],"react-x":T["@eslint-react"],"react-you-might-not-need-an-effect":N,...I&&R?R.recommended.plugins:{}}},{files:o,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",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",{...se,allow:[...se.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks-extra/no-unnecessary-use-callback":"error","react-hooks-extra/no-unnecessary-use-memo":"error","react-hooks-extra/no-unnecessary-use-prefix":"error","react-hooks-extra/prefer-use-state-lazy-initialization":"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:_,allowExportNames:[...M?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...L||O?["meta","links","headers","loader","action"]:[]]}],"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/avoid-shorthand-boolean":"off","react-x/avoid-shorthand-fragment":"off","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-uses-react":V?"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-comment-textnodes":"error","react-x/no-complex-conditional-rendering":"off","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-leaked-conditional-rendering":"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-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-react-namespace-import":"off","react-x/prefer-read-only-props":"off","react-x/prefer-shorthand-boolean":"off","react-x/prefer-shorthand-fragment":"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":V?"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",...I&&R?{"react-compiler/react-compiler":"error"}:{},...S?.configs?.flat?.recommended?.rules,"react-you-might-not-need-an-effect/you-might-not-need-an-effect":"warn",...l?{"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"}:{},...n},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:E??"detect"},"react-x":{version:E??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},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:u("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...q?[{files:s,ignores:t,name:"anolilab/react/type-aware-rules",rules:{...A}}]:[]]}),gr=p("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,n=ve["flat/recommended"],a={...n.rules};if(s==="warn")for(const l in a)a[l]==="error"&&(a[l]="warn");return[{...n,files:o,name:"anolilab/regexp/rules",rules:{...a,...t}}]}),hr=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(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}}]}),br=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(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:u("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:u("js"),languageOptions:{ecmaVersion:2020},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off"}}]}),xr=p("storybook",async e=>{const{overrides:r}=e,o=[...(await i(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),wr=p("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await i(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),jr=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),vr=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),kr=p("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,n=await i(import("eslint-plugin-testing-library")),a=y(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":n},rules:{...n.configs["flat/dom"].rules,...a?n.configs["flat/react"].rules:{},...s}}]}),Or=p("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:n=2}=typeof t=="boolean"?{}:t,[a,l]=await Promise.all([i(import("eslint-plugin-toml")),i(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:l},name:"anolilab/toml",plugins:{toml:a},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}}]}),Pr=p("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),K={"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"},...ke.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":["error",{args:"after-used",ignoreRestSiblings:!0,vars:"all"}],"no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Cr=p("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:K},{files:u("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Sr=Object.defineProperty,_r=w((e,r)=>Sr(e,"name",{value:r,configurable:!0}),"w");const Er=p("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:n,overridesTypeAware:a,parserOptions:l,prettier:f}=e,h=pe,x=ie(t),[v,q,k,A]=await Promise.all([i(import("@typescript-eslint/eslint-plugin")),i(import("@typescript-eslint/parser")),i(import("typescript-eslint")),i(import("eslint-plugin-no-for-of-array"))]),z=e.filesTypeAware??u("ts"),F=e.ignoresTypeAware??["**/*.mdx/**",...u("astro")],$=e?.tsconfigPath??void 0,U=$!==void 0,S=_r((_,L,M)=>({files:[...L,...o.map(O=>`**/*.${O}`)],...M?{ignores:M}:{},languageOptions:{parser:q,parserOptions:{extraFileExtensions:o.map(O=>`.${O}`),sourceType:"module",..._?{projectService:{allowDefaultProject:["./*.js"],defaultProject:$},tsconfigRootDir:process.cwd()}:{},...l}},name:`anolilab/typescript/${_?"type-aware-parser":"parser"}`}),"makeParser"),N=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":v,"no-for-of-array":A}},...U?[S(!1,s),S(!0,z,F)]:[S(!1,s)],...k.configs.strict];return U&&N.push(...k.configs.strictTypeCheckedOnly,{files:[...z,...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",...a}},{files:u("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),N.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":h["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":x["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":J["no-empty-function"],"@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":J["no-loop-func"],"@typescript-eslint/no-magic-numbers":J["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":J["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":K["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":J["no-unused-expressions"],"@typescript-eslint/no-unused-vars":K["no-unused-vars"],"@typescript-eslint/no-use-before-define":K["no-use-before-define"],"@typescript-eslint/no-useless-constructor":x["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":J["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":h["space-infix-ops"],...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"}:{}}}),N}),Dr=p("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:n,stylistic:a=!0}=e,{indent:l=4}=typeof a=="boolean"?{}:a,f=await i(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:H.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:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","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"],...n?{"unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"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 qr=Object.defineProperty,Ir=w((e,r)=>qr(e,"name",{value:r,configurable:!0}),"n$2");const Fr=Ir(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await i(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Nr=p("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(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}}]}),Tr={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 ee;const Ar=p("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:n,tsconfigPath:a}=e,[l,f]=await Promise.all([i(import("@vitest/eslint-plugin")),i(import("eslint-plugin-no-only-tests"))]);return ee=ee||{...l,rules:{...l.rules,...f.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:ee}},{files:o,...a?{...l.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Tr}},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"}:{}}}]}),$r=p("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:n=!0}=e,{indent:a=4,quotes:l="double"}=typeof n=="boolean"?{}:n,[f,h]=await Promise.all([i(import("eslint-plugin-yml")),i(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:h},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","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",a==="tab"?2:a],"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}},{files:["pnpm-workspace.yaml"],name:"anolilab/yaml/pnpm-workspace",rules:{"yaml/sort-keys":["error",{order:["packages","overrides","patchedDependencies","hoistPattern","catalog","catalogs","allowedDeprecatedVersions","allowNonAppliedPatches","configDependencies","ignoredBuiltDependencies","ignoredOptionalDependencies","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","packageExtensions","peerDependencyRules","supportedArchitectures"],pathPattern:"^$"}]}}]}),Ur=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ae(t)},rules:{...t.configs.all.rules,...s}}]}),Lr=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var Mr=Object.defineProperty,Rr=w((e,r)=>Mr(e,"name",{value:r,configurable:!0}),"e$1");const Jr=Rr(()=>!!(process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged")),"isInGitHooksOrLintStaged");var zr=Object.defineProperty,Vr=w((e,r)=>zr(e,"name",{value:r,configurable:!0}),"e");const Br=Vr(()=>process.env.CI||Jr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var Wr=Object.defineProperty,X=w((e,r)=>Wr(e,"name",{value:r,configurable:!0}),"p");const Xr=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],Q=X((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),d=X((e,r)=>{const o=Q(e,r);return{...e.overrides?.[r],..."overrides"in o?o.overrides:{}}},"getOverrides"),g=X((e,r)=>{const o=Q(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),ls=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=ye(ue(me(o,"package.json"),"utf8")),t=y(s,["prettier"]),n=y(s,["@anolilab/eslint-config"]),a=y(s,["react","react-dom"]),l=s?.dependencies?.react||s?.devDependencies?.react;let f=!1;if(l!==void 0){const c=re(l);c?.major&&c.major>=19&&(f=!0)}let h=!1;const x=s?.dependencies?.tailwindcss||s?.devDependencies?.tailwindcss;if(x){const c=re(x);c?.major&&c.major<=3&&(h=!0)}const{astro:v=y(s,["astro"]),componentExts:q=[],css:k=y(s,["postcss","cssnano"]),gitignore:A=!0,html:z=!1,jsx:F=y(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||a,lodash:$=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:U=y(s,["playwright","eslint-plugin-playwright"]),react:S=a||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:N=f,regexp:_=!0,silent:L=!1,storybook:M=y(s,["storybook","eslint-plugin-storybook"]),tailwindcss:O=h,tanstackQuery:T=y(s,["@tanstack/react-query"]),tanstackRouter:E=y(s,["@tanstack/react-router"]),testingLibrary:I=y(s,["@testing-library/dom","@testing-library/react"]),tsdoc:V=!1,typescript:R=y(s,["typescript"]),unicorn:P=!0,unocss:oe=!1,vitest:fe=y(s,["vitest"]),zod:te=y(s,["zod"])}=e;if(n){let c=[];te&&c.push("eslint-plugin-zod"),oe&&c.push("@unocss/eslint-plugin"),T&&c.push("@tanstack/eslint-plugin-query"),E&&c.push("@tanstack/eslint-plugin-router"),(k||O)&&c.push("@eslint/css"),O&&c.push("eslint-plugin-tailwindcss"),M&&c.push("eslint-plugin-storybook"),S&&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"),S&&N&&c.push("eslint-plugin-react-compiler"),I&&c.push("eslint-plugin-testing-library"),F&&c.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),$&&c.push("eslint-plugin-you-dont-need-lodash-underscore"),V&&c.push("eslint-plugin-tsdoc"),e.formatters&&c.push("eslint-plugin-format"),U&&c.push("playwright-eslint-plugin"),v&&(c.push("eslint-plugin-astro","astro-eslint-parser","@typescript-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 ge(s,c,"devDependencies",{confirm:{message:X(W=>`@anolilab/eslint-config requires the following ${W.length===1?"package":"packages"} to be installed:
|
|
16
|
+
`))}I=I&&f!==!1;let R;return I&&(console.info(`@anolilab/eslint-config enabling react-compiler plugin
|
|
17
|
+
`),R=await i(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:F,"react-dom":T["@eslint-react/dom"],"react-hooks":$,"react-hooks-extra":T["@eslint-react/hooks-extra"],"react-naming-convention":T["@eslint-react/naming-convention"],"react-perf":S,"react-refresh":U,"react-web-api":T["@eslint-react/web-api"],"react-x":T["@eslint-react"],"react-you-might-not-need-an-effect":N,...I&&R?R.configs.recommended.plugins:{}}},{files:o,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",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",{...se,allow:[...se.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks-extra/no-unnecessary-use-callback":"error","react-hooks-extra/no-unnecessary-use-memo":"error","react-hooks-extra/no-unnecessary-use-prefix":"error","react-hooks-extra/prefer-use-state-lazy-initialization":"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:_,allowExportNames:[...M?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...L||O?["meta","links","headers","loader","action"]:[]]}],"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/avoid-shorthand-boolean":"off","react-x/avoid-shorthand-fragment":"off","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-uses-react":V?"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-comment-textnodes":"error","react-x/no-complex-conditional-rendering":"off","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-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-react-namespace-import":"off","react-x/prefer-read-only-props":"off","react-x/prefer-shorthand-boolean":"off","react-x/prefer-shorthand-fragment":"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":V?"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",...I&&R?{"react-compiler/react-compiler":"error"}:{},...S?.configs?.flat?.recommended?.rules,"react-you-might-not-need-an-effect/you-might-not-need-an-effect":"warn",...l?{"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"}:{},...n},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:E??"detect"},"react-x":{version:E??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},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:u("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...q?[{files:s,ignores:t,name:"anolilab/react/type-aware-rules",rules:{...A}}]:[]]}),gr=p("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,n=ve["flat/recommended"],a={...n.rules};if(s==="warn")for(const l in a)a[l]==="error"&&(a[l]="warn");return[{...n,files:o,name:"anolilab/regexp/rules",rules:{...a,...t}}]}),hr=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(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}}]}),br=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(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:u("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:u("js"),languageOptions:{ecmaVersion:2020},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off"}}]}),xr=p("storybook",async e=>{const{overrides:r}=e,o=[...(await i(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),wr=p("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await i(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),jr=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),vr=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),kr=p("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,n=await i(import("eslint-plugin-testing-library")),a=y(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":n},rules:{...n.configs["flat/dom"].rules,...a?n.configs["flat/react"].rules:{},...s}}]}),Or=p("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:n=2}=typeof t=="boolean"?{}:t,[a,l]=await Promise.all([i(import("eslint-plugin-toml")),i(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:l},name:"anolilab/toml",plugins:{toml:a},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}}]}),Pr=p("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),K={"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"},...ke.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":["error",{args:"after-used",ignoreRestSiblings:!0,vars:"all"}],"no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Cr=p("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:K},{files:u("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Sr=Object.defineProperty,_r=w((e,r)=>Sr(e,"name",{value:r,configurable:!0}),"w");const Er=p("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:n,overridesTypeAware:a,parserOptions:l,prettier:f}=e,h=pe,x=ie(t),[v,q,k,A]=await Promise.all([i(import("@typescript-eslint/eslint-plugin")),i(import("@typescript-eslint/parser")),i(import("typescript-eslint")),i(import("eslint-plugin-no-for-of-array"))]),z=e.filesTypeAware??u("ts"),F=e.ignoresTypeAware??["**/*.mdx/**",...u("astro")],$=e?.tsconfigPath??void 0,U=$!==void 0,S=_r((_,L,M)=>({files:[...L,...o.map(O=>`**/*.${O}`)],...M?{ignores:M}:{},languageOptions:{parser:q,parserOptions:{extraFileExtensions:o.map(O=>`.${O}`),sourceType:"module",..._?{projectService:{allowDefaultProject:["./*.js"],defaultProject:$},tsconfigRootDir:process.cwd()}:{},...l}},name:`anolilab/typescript/${_?"type-aware-parser":"parser"}`}),"makeParser"),N=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":v,"no-for-of-array":A}},...U?[S(!1,s),S(!0,z,F)]:[S(!1,s)],...k.configs.strict];return U&&N.push(...k.configs.strictTypeCheckedOnly,{files:[...z,...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",...a}},{files:u("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),N.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":h["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":x["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":J["no-empty-function"],"@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":J["no-loop-func"],"@typescript-eslint/no-magic-numbers":J["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":J["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":K["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":J["no-unused-expressions"],"@typescript-eslint/no-unused-vars":K["no-unused-vars"],"@typescript-eslint/no-use-before-define":K["no-use-before-define"],"@typescript-eslint/no-useless-constructor":x["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":J["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":h["space-infix-ops"],...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"}:{}}}),N}),Dr=p("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:n,stylistic:a=!0}=e,{indent:l=4}=typeof a=="boolean"?{}:a,f=await i(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:H.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:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","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"],...n?{"unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"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 qr=Object.defineProperty,Ir=w((e,r)=>qr(e,"name",{value:r,configurable:!0}),"n$2");const Fr=Ir(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await i(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Nr=p("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(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}}]}),Tr={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 ee;const Ar=p("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:n,tsconfigPath:a}=e,[l,f]=await Promise.all([i(import("@vitest/eslint-plugin")),i(import("eslint-plugin-no-only-tests"))]);return ee=ee||{...l,rules:{...l.rules,...f.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:ee}},{files:o,...a?{...l.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Tr}},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"}:{}}}]}),$r=p("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:n=!0}=e,{indent:a=4,quotes:l="double"}=typeof n=="boolean"?{}:n,[f,h]=await Promise.all([i(import("eslint-plugin-yml")),i(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:h},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","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",a==="tab"?2:a],"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}},{files:["pnpm-workspace.yaml"],name:"anolilab/yaml/pnpm-workspace",rules:{"yaml/sort-keys":["error",{order:["packages","overrides","patchedDependencies","hoistPattern","catalog","catalogs","allowedDeprecatedVersions","allowNonAppliedPatches","configDependencies","ignoredBuiltDependencies","ignoredOptionalDependencies","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","packageExtensions","peerDependencyRules","supportedArchitectures"],pathPattern:"^$"}]}}]}),Ur=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ae(t)},rules:{...t.configs.all.rules,...s}}]}),Lr=p("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var Mr=Object.defineProperty,Rr=w((e,r)=>Mr(e,"name",{value:r,configurable:!0}),"e$1");const Jr=Rr(()=>!!(process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged")),"isInGitHooksOrLintStaged");var zr=Object.defineProperty,Vr=w((e,r)=>zr(e,"name",{value:r,configurable:!0}),"e");const Br=Vr(()=>process.env.CI||Jr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var Wr=Object.defineProperty,X=w((e,r)=>Wr(e,"name",{value:r,configurable:!0}),"p");const Xr=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],Q=X((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),d=X((e,r)=>{const o=Q(e,r);return{...e.overrides?.[r],..."overrides"in o?o.overrides:{}}},"getOverrides"),g=X((e,r)=>{const o=Q(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),ls=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=ye(ue(me(o,"package.json"),"utf8")),t=y(s,["prettier"]),n=y(s,["@anolilab/eslint-config"]),a=y(s,["react","react-dom"]),l=s?.dependencies?.react||s?.devDependencies?.react;let f=!1;if(l!==void 0){const c=re(l);c?.major&&c.major>=19&&(f=!0)}let h=!1;const x=s?.dependencies?.tailwindcss||s?.devDependencies?.tailwindcss;if(x){const c=re(x);c?.major&&c.major<=3&&(h=!0)}const{astro:v=y(s,["astro"]),componentExts:q=[],css:k=y(s,["postcss","cssnano"]),gitignore:A=!0,html:z=!1,jsx:F=y(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||a,lodash:$=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:U=y(s,["playwright","eslint-plugin-playwright"]),react:S=a||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:N=f,regexp:_=!0,silent:L=!1,storybook:M=y(s,["storybook","eslint-plugin-storybook"]),tailwindcss:O=h,tanstackQuery:T=y(s,["@tanstack/react-query"]),tanstackRouter:E=y(s,["@tanstack/react-router"]),testingLibrary:I=y(s,["@testing-library/dom","@testing-library/react"]),tsdoc:V=!1,typescript:R=y(s,["typescript"]),unicorn:P=!0,unocss:oe=!1,vitest:fe=y(s,["vitest"]),zod:te=y(s,["zod"])}=e;if(n){let c=[];te&&c.push("eslint-plugin-zod"),oe&&c.push("@unocss/eslint-plugin"),T&&c.push("@tanstack/eslint-plugin-query"),E&&c.push("@tanstack/eslint-plugin-router"),(k||O)&&c.push("@eslint/css"),O&&c.push("eslint-plugin-tailwindcss"),M&&c.push("eslint-plugin-storybook"),S&&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"),S&&N&&c.push("eslint-plugin-react-compiler"),I&&c.push("eslint-plugin-testing-library"),F&&c.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),$&&c.push("eslint-plugin-you-dont-need-lodash-underscore"),V&&c.push("eslint-plugin-tsdoc"),e.formatters&&c.push("eslint-plugin-format"),U&&c.push("playwright-eslint-plugin"),v&&(c.push("eslint-plugin-astro","astro-eslint-parser","@typescript-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 ge(s,c,"devDependencies",{confirm:{message:X(W=>`@anolilab/eslint-config requires the following ${W.length===1?"package":"packages"} to be installed:
|
|
20
18
|
|
|
21
19
|
"${W.join(`"
|
|
22
20
|
"`)}"
|