@anolilab/eslint-config 16.2.2 → 16.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## @anolilab/eslint-config [16.2.3](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@16.2.2...@anolilab/eslint-config@16.2.3) (2025-05-27)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **eslint-config:** disabled the buggy `vitest/valid-title` rule in the Vitest plugin configuration. ([eb38510](https://github.com/anolilab/javascript-style-guide/commit/eb38510aa4baa5dc6f89f7dcf7b1b8e272656fc9))
6
+
1
7
  ## @anolilab/eslint-config [16.2.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@16.2.1...@anolilab/eslint-config@16.2.2) (2025-05-27)
2
8
 
3
9
  ### Bug Fixes
package/README.md CHANGED
@@ -354,6 +354,95 @@ lspconfig.eslint.setup({
354
354
 
355
355
  </details>
356
356
 
357
+ ### Using `getFilesGlobs` for Common File Types
358
+
359
+ Your `@anolilab/eslint-config` package also exports a handy utility function `getFilesGlobs` that provides pre-defined glob patterns for common file types. This can simplify targeting specific sets of files in your ESLint configuration objects.
360
+
361
+ You can import it alongside `createConfig`:
362
+
363
+ ```javascript
364
+ // eslint.config.js
365
+ import { createConfig, getFilesGlobs } from "@anolilab/eslint-config";
366
+
367
+ const baseConfig = createConfig();
368
+
369
+ // Get glob patterns for all JavaScript and TypeScript files
370
+ const jsTsFiles = getFilesGlobs("js_and_ts");
371
+ // Get glob patterns for Markdown files
372
+ const markdownFiles = getFilesGlobs("markdown");
373
+ // Get glob patterns for HTML related files
374
+ const htmlFiles = getFilesGlobs("html");
375
+
376
+ export default [
377
+ ...baseConfig,
378
+ {
379
+ files: jsTsFiles,
380
+ // languageOptions, rules, etc., specific to JS and TS files
381
+ rules: {
382
+ // 'your-rule/for-js-ts': 'error',
383
+ },
384
+ },
385
+ {
386
+ files: markdownFiles,
387
+ // languageOptions, rules, etc., specific to Markdown files
388
+ // Often, you might use a specific processor or plugin for Markdown here
389
+ // processor: markdownProcessor, // Fictional example
390
+ // plugins: { markdownPlugin } // Fictional example
391
+ },
392
+ {
393
+ files: htmlFiles,
394
+ // languageOptions, rules, etc., specific to HTML files
395
+ },
396
+ // ... other configurations
397
+ ];
398
+ ```
399
+
400
+ ### Type Aware Rules
401
+
402
+ You can optionally enable the [type aware](https://typescript-eslint.io/linting/typed-linting/) rules by passing the options object to the `typescript` config:
403
+
404
+ ```js
405
+ // eslint.config.js
406
+ import antfu from "@antfu/eslint-config";
407
+
408
+ export default antfu({
409
+ typescript: {
410
+ tsconfigPath: "tsconfig.json",
411
+ },
412
+ });
413
+ ```
414
+
415
+ ### Utilities
416
+
417
+ The `getFilesGlobs` function accepts one of the following `FileType` strings:
418
+
419
+ - `"all"`: All JavaScript, TypeScript, and declaration files.
420
+ - `"astro_ts"`: TypeScript files within Astro components.
421
+ - `"astro"`: Astro component files (`.astro`).
422
+ - `"css"`: CSS files.
423
+ - `"types"`: TypeScript declaration files (`.d.ts`, `.d.cts`, `.d.mts`).
424
+ - `"e2e"`: End-to-end test files.
425
+ - `"graphql"`: GraphQL files (`.gql`, `.graphql`).
426
+ - `"html"`: Various HTML-like template files (`.html`, `.hbs`, `.erb`, etc.).
427
+ - `"js_and_ts"`: All JavaScript and TypeScript source files (excluding declarations).
428
+ - `"js"`: JavaScript files (`.js`, `.mjs`, `.cjs`).
429
+ - `"jsx_and_tsx"`: JSX and TSX files.
430
+ - `"less"`: LESS files.
431
+ - `"markdown_in_markdown"`: Markdown files embedded within other Markdown files.
432
+ - `"markdown_inline_js_jsx"`: JS/JSX code blocks within Markdown.
433
+ - `"markdown"`: Markdown files (`.md`, `.mkdn`, etc.).
434
+ - `"postcss"`: PostCSS configuration files.
435
+ - `"scss"`: SCSS files.
436
+ - `"storybook"`: Storybook story files.
437
+ - `"svg"`: SVG files.
438
+ - `"toml"`: TOML files.
439
+ - `"ts"`: All TypeScript files including declarations and TSX (`.ts`, `.tsx`, `.d.ts`, etc.).
440
+ - `"vitest"`: Vitest test files.
441
+ - `"xml"`: XML files.
442
+ - `"yaml"`: YAML files (`.yaml`, `.yml`).
443
+
444
+ Using `getFilesGlobs` can make your configuration more readable and maintainable by abstracting away the specific glob patterns.
445
+
357
446
  ## Plugins
358
447
 
359
448
  Our configuration integrates a wide array of ESLint plugins to cover various aspects of code quality, language support, security, and specific libraries/frameworks. Many of these are enabled automatically when relevant dependencies are detected in your project.
@@ -570,77 +659,3 @@ The anolilab javascript-style-guide is open-sourced software licensed under the
570
659
  [license-url]: LICENSE.md "license"
571
660
  [npm-image]: https://img.shields.io/npm/v/@anolilab/eslint-config/latest.svg?style=for-the-badge&logo=npm
572
661
  [npm-url]: https://www.npmjs.com/package/@anolilab/eslint-config/v/latest "npm"
573
-
574
- ### Using `getFilesGlobs` for Common File Types
575
-
576
- Your `@anolilab/eslint-config` package also exports a handy utility function `getFilesGlobs` that provides pre-defined glob patterns for common file types. This can simplify targeting specific sets of files in your ESLint configuration objects.
577
-
578
- You can import it alongside `createConfig`:
579
-
580
- ```javascript
581
- // eslint.config.js
582
- import { createConfig, getFilesGlobs } from "@anolilab/eslint-config";
583
-
584
- const baseConfig = createConfig();
585
-
586
- // Get glob patterns for all JavaScript and TypeScript files
587
- const jsTsFiles = getFilesGlobs("js_and_ts");
588
- // Get glob patterns for Markdown files
589
- const markdownFiles = getFilesGlobs("markdown");
590
- // Get glob patterns for HTML related files
591
- const htmlFiles = getFilesGlobs("html");
592
-
593
- export default [
594
- ...baseConfig,
595
- {
596
- files: jsTsFiles,
597
- // languageOptions, rules, etc., specific to JS and TS files
598
- rules: {
599
- // 'your-rule/for-js-ts': 'error',
600
- },
601
- },
602
- {
603
- files: markdownFiles,
604
- // languageOptions, rules, etc., specific to Markdown files
605
- // Often, you might use a specific processor or plugin for Markdown here
606
- // processor: markdownProcessor, // Fictional example
607
- // plugins: { markdownPlugin } // Fictional example
608
- },
609
- {
610
- files: htmlFiles,
611
- // languageOptions, rules, etc., specific to HTML files
612
- },
613
- // ... other configurations
614
- ];
615
- ```
616
-
617
- The `getFilesGlobs` function accepts one of the following `FileType` strings:
618
-
619
- - `"all"`: All JavaScript, TypeScript, and declaration files.
620
- - `"astro_ts"`: TypeScript files within Astro components.
621
- - `"astro"`: Astro component files (`.astro`).
622
- - `"css"`: CSS files.
623
- - `"types"`: TypeScript declaration files (`.d.ts`, `.d.cts`, `.d.mts`).
624
- - `"e2e"`: End-to-end test files.
625
- - `"graphql"`: GraphQL files (`.gql`, `.graphql`).
626
- - `"html"`: Various HTML-like template files (`.html`, `.hbs`, `.erb`, etc.).
627
- - `"js_and_ts"`: All JavaScript and TypeScript source files (excluding declarations).
628
- - `"js"`: JavaScript files (`.js`, `.mjs`, `.cjs`).
629
- - `"jsx_and_tsx"`: JSX and TSX files.
630
- - `"less"`: LESS files.
631
- - `"markdown_in_markdown"`: Markdown files embedded within other Markdown files.
632
- - `"markdown_inline_js_jsx"`: JS/JSX code blocks within Markdown.
633
- - `"markdown"`: Markdown files (`.md`, `.mkdn`, etc.).
634
- - `"postcss"`: PostCSS configuration files.
635
- - `"scss"`: SCSS files.
636
- - `"storybook"`: Storybook story files.
637
- - `"svg"`: SVG files.
638
- - `"toml"`: TOML files.
639
- - `"ts"`: All TypeScript files including declarations and TSX (`.ts`, `.tsx`, `.d.ts`, etc.).
640
- - `"vitest"`: Vitest test files.
641
- - `"xml"`: XML files.
642
- - `"yaml"`: YAML files (`.yaml`, `.yml`).
643
-
644
- Using `getFilesGlobs` can make your configuration more readable and maintainable by abstracting away the specific glob patterns.
645
-
646
- ### Type-Aware Linting
package/dist/index.cjs CHANGED
@@ -14,7 +14,7 @@ Please remove "eslint-plugin-typescript-sort-keys" from your package.json, it co
14
14
  If you dont use the new react jsx-runtime in you project, please enable it manually.
15
15
  `))}A=A&&f!==!1;let B;return A&&(console.info(`
16
16
  @anolilab/eslint-config enabling react-compiler plugin
17
- `),B=c(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:z,"react-dom":J["@eslint-react/dom"],"react-hooks":N,"react-hooks-extra":J["@eslint-react/hooks-extra"],"react-naming-convention":J["@eslint-react/naming-convention"],"react-perf":D,"react-refresh":$,"react-web-api":J["@eslint-react/web-api"],"react-x":J["@eslint-react"],"react-you-might-not-need-an-effect":F,...A?{"react-compiler":B}:{}}},{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:q,allowExportNames:[...L?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...E||T?["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",O,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",O],"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",...A?{"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:_??"detect"},"react-x":{version:_??"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"}},...C?[{files:s,ignores:t,name:"anolilab/react/type-aware-rules",rules:{...I}}]:[]]}),jr=n.createConfig("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,a=Ce.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}}]}),vr=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}}]}),kr=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"}}]}),Pr=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}),Cr=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}),Or=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}}]}),Dr=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}}]}),_r=n.createConfig("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await c(import("eslint-plugin-testing-library")),i=y.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}}]}),Sr=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}}]}),Fr=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"},..._e.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":["error",{args:"after-used",ignoreRestSiblings:!0,vars:"all"}],"no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},qr=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 Er=Object.defineProperty,Ar=w((e,r)=>Er(e,"name",{value:r,configurable:!0}),"w");const Ir=n.createConfig("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:a,overridesTypeAware:i,parserOptions:p,prettier:f}=e,h=de,x=ce(t),[v,C,O,I]=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"))]),U=e.filesTypeAware??n.getFilesGlobs("ts"),z=e.ignoresTypeAware??["**/*.mdx/**",...n.getFilesGlobs("astro")],N=e?.tsconfigPath??void 0,$=N!==void 0,D=Ar((q,E,L)=>({files:[...E,...o.map(T=>`**/*.${T}`)],...L?{ignores:L}:{},languageOptions:{parser:C,parserOptions:{extraFileExtensions:o.map(T=>`.${T}`),sourceType:"module",...q?{projectService:{allowDefaultProject:["./*.js"],defaultProject:N},tsconfigRootDir:process.cwd()}:{},...p}},name:`anolilab/typescript/${q?"type-aware-parser":"parser"}`}),"makeParser"),F=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":v,"no-for-of-array":I}},...$?[D(!1,s),D(!0,U,z)]:[D(!1,s)],...O.configs.strict];return $&&F.push(...O.configs.strictTypeCheckedOnly,{files:[...U,...o.map(q=>`**/*.${q}`)],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"}}),F.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":M["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":M["no-loop-func"],"@typescript-eslint/no-magic-numbers":M["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":M["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":M["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":M["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"error","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":h["space-infix-ops"],...a,...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"}:{}}}),F}),Nr=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,f=await c(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"],...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 Tr=Object.defineProperty,Jr=w((e,r)=>Tr(e,"name",{value:r,configurable:!0}),"n$2");const Ur=Jr(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"),$r=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}}]}),Lr={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 Mr=n.createConfig("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:a,tsconfigPath:i}=e,[p,f]=await Promise.all([c(import("@vitest/eslint-plugin")),c(import("eslint-plugin-no-only-tests"))]);return re=re||{...p,rules:{...p.rules,...f.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:re}},{files:o,...i?{...p.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Lr}},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}],...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"}:{}}}]}),Rr=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,[f,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: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",...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?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:"^$"}]}}]}),Gr=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":le.fixupPluginRules(t)},rules:{...t.configs.all.rules,...s}}]}),zr=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 Vr=Object.defineProperty,Br=w((e,r)=>Vr(e,"name",{value:r,configurable:!0}),"e$1");const Wr=Br(()=>!!(process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged")),"isInGitHooksOrLintStaged");var Xr=Object.defineProperty,Kr=w((e,r)=>Xr(e,"name",{value:r,configurable:!0}),"e");const Hr=Kr(()=>process.env.CI||Wr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var Qr=Object.defineProperty,W=w((e,r)=>Qr(e,"name",{value:r,configurable:!0}),"f");const Yr=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],X=W((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),d=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"),Zr=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=y.parsePackageJson(xe.readFileSync(we.join(o,"package.json"),"utf8")),t=y.hasPackageJsonAnyDependency(s,["prettier"]),a=y.hasPackageJsonAnyDependency(s,["@anolilab/eslint-config"]),i=y.hasPackageJsonAnyDependency(s,["react","react-dom"]),p=s?.dependencies?.react||s?.devDependencies?.react;let f=!1;if(p!==void 0){const u=ie.parse(p);u?.major&&u.major>=19&&(f=!0)}const{astro:h=y.hasPackageJsonAnyDependency(s,["astro"]),componentExts:x=[],css:v=!1,gitignore:C=!0,html:O=!1,jsx:I=y.hasPackageJsonAnyDependency(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||i,lodash:U=y.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:z=y.hasPackageJsonAnyDependency(s,["playwright","eslint-plugin-playwright"]),react:N=i||y.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:$=f,regexp:D=!0,silent:F=!1,storybook:q=y.hasPackageJsonAnyDependency(s,["storybook","eslint-plugin-storybook"]),tailwindcss:E=!1,tanstackQuery:L=y.hasPackageJsonAnyDependency(s,["@tanstack/react-query"]),tanstackRouter:T=y.hasPackageJsonAnyDependency(s,["@tanstack/react-router"]),testingLibrary:J=y.hasPackageJsonAnyDependency(s,["@testing-library/dom","@testing-library/react"]),tsdoc:_=!1,typescript:A=y.hasPackageJsonAnyDependency(s,["typescript"]),unicorn:V=!0,unocss:B=!1,vitest:k=y.hasPackageJsonAnyDependency(s,["vitest"]),zod:te=y.hasPackageJsonAnyDependency(s,["zod"])}=e;if(a){const u=[];te&&u.push("eslint-plugin-zod"),B&&u.push("@unocss/eslint-plugin"),L&&u.push("@tanstack/eslint-plugin-query"),T&&u.push("@tanstack/eslint-plugin-router"),(v||E)&&u.push("@eslint/css"),E&&u.push("eslint-plugin-tailwindcss"),q&&u.push("eslint-plugin-storybook"),N&&u.push("eslint-plugin-react","@eslint-react/eslint-plugin","eslint-plugin-react-hooks","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),N&&$&&u.push("eslint-plugin-react-compiler"),J&&u.push("eslint-plugin-testing-library"),I&&u.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),U&&u.push("eslint-plugin-you-dont-need-lodash-underscore"),_&&u.push("eslint-plugin-tsdoc"),e.formatters&&u.push("eslint-plugin-format"),h&&(u.push("eslint-plugin-astro","astro-eslint-parser","@typescript-eslint/parser"),typeof e.formatters=="object"&&e.formatters.astro&&u.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters?.markdown&&e.formatters?.slidev&&u.push("prettier-plugin-slidev"),(e.formatters?.xml||e.formatters?.svg)&&u.push("@prettier/plugin-xml")),u.length>0&&await y.ensurePackages(s,u,"devDependencies",{confirm:{message:W(G=>`@anolilab/eslint-config requires the following ${G.length===1?"package":"packages"} to be installed:
17
+ `),B=c(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:z,"react-dom":J["@eslint-react/dom"],"react-hooks":N,"react-hooks-extra":J["@eslint-react/hooks-extra"],"react-naming-convention":J["@eslint-react/naming-convention"],"react-perf":D,"react-refresh":$,"react-web-api":J["@eslint-react/web-api"],"react-x":J["@eslint-react"],"react-you-might-not-need-an-effect":F,...A?{"react-compiler":B}:{}}},{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:q,allowExportNames:[...L?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...E||T?["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",O,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",O],"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",...A?{"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:_??"detect"},"react-x":{version:_??"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"}},...C?[{files:s,ignores:t,name:"anolilab/react/type-aware-rules",rules:{...I}}]:[]]}),jr=n.createConfig("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,a=Ce.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}}]}),vr=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}}]}),kr=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"}}]}),Pr=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}),Cr=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}),Or=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}}]}),Dr=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}}]}),_r=n.createConfig("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await c(import("eslint-plugin-testing-library")),i=y.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}}]}),Sr=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}}]}),Fr=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"},..._e.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":["error",{args:"after-used",ignoreRestSiblings:!0,vars:"all"}],"no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},qr=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 Er=Object.defineProperty,Ar=w((e,r)=>Er(e,"name",{value:r,configurable:!0}),"w");const Ir=n.createConfig("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:a,overridesTypeAware:i,parserOptions:p,prettier:f}=e,h=de,x=ce(t),[v,C,O,I]=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"))]),U=e.filesTypeAware??n.getFilesGlobs("ts"),z=e.ignoresTypeAware??["**/*.mdx/**",...n.getFilesGlobs("astro")],N=e?.tsconfigPath??void 0,$=N!==void 0,D=Ar((q,E,L)=>({files:[...E,...o.map(T=>`**/*.${T}`)],...L?{ignores:L}:{},languageOptions:{parser:C,parserOptions:{extraFileExtensions:o.map(T=>`.${T}`),sourceType:"module",...q?{projectService:{allowDefaultProject:["./*.js"],defaultProject:N},tsconfigRootDir:process.cwd()}:{},...p}},name:`anolilab/typescript/${q?"type-aware-parser":"parser"}`}),"makeParser"),F=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":v,"no-for-of-array":I}},...$?[D(!1,s),D(!0,U,z)]:[D(!1,s)],...O.configs.strict];return $&&F.push(...O.configs.strictTypeCheckedOnly,{files:[...U,...o.map(q=>`**/*.${q}`)],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"}}),F.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":M["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":M["no-loop-func"],"@typescript-eslint/no-magic-numbers":M["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":M["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":M["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":M["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"error","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":h["space-infix-ops"],...a,...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"}:{}}}),F}),Nr=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,f=await c(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"],...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 Tr=Object.defineProperty,Jr=w((e,r)=>Tr(e,"name",{value:r,configurable:!0}),"n$2");const Ur=Jr(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"),$r=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}}]}),Lr={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 Mr=n.createConfig("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:a,tsconfigPath:i}=e,[p,f]=await Promise.all([c(import("@vitest/eslint-plugin")),c(import("eslint-plugin-no-only-tests"))]);return re=re||{...p,rules:{...p.rules,...f.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:re}},{files:o,...i?{...p.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Lr}},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"}:{}}}]}),Rr=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,[f,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: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",...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?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:"^$"}]}}]}),Gr=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":le.fixupPluginRules(t)},rules:{...t.configs.all.rules,...s}}]}),zr=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 Vr=Object.defineProperty,Br=w((e,r)=>Vr(e,"name",{value:r,configurable:!0}),"e$1");const Wr=Br(()=>!!(process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged")),"isInGitHooksOrLintStaged");var Xr=Object.defineProperty,Kr=w((e,r)=>Xr(e,"name",{value:r,configurable:!0}),"e");const Hr=Kr(()=>process.env.CI||Wr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var Qr=Object.defineProperty,W=w((e,r)=>Qr(e,"name",{value:r,configurable:!0}),"f");const Yr=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],X=W((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),d=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"),Zr=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=y.parsePackageJson(xe.readFileSync(we.join(o,"package.json"),"utf8")),t=y.hasPackageJsonAnyDependency(s,["prettier"]),a=y.hasPackageJsonAnyDependency(s,["@anolilab/eslint-config"]),i=y.hasPackageJsonAnyDependency(s,["react","react-dom"]),p=s?.dependencies?.react||s?.devDependencies?.react;let f=!1;if(p!==void 0){const u=ie.parse(p);u?.major&&u.major>=19&&(f=!0)}const{astro:h=y.hasPackageJsonAnyDependency(s,["astro"]),componentExts:x=[],css:v=!1,gitignore:C=!0,html:O=!1,jsx:I=y.hasPackageJsonAnyDependency(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||i,lodash:U=y.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:z=y.hasPackageJsonAnyDependency(s,["playwright","eslint-plugin-playwright"]),react:N=i||y.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:$=f,regexp:D=!0,silent:F=!1,storybook:q=y.hasPackageJsonAnyDependency(s,["storybook","eslint-plugin-storybook"]),tailwindcss:E=!1,tanstackQuery:L=y.hasPackageJsonAnyDependency(s,["@tanstack/react-query"]),tanstackRouter:T=y.hasPackageJsonAnyDependency(s,["@tanstack/react-router"]),testingLibrary:J=y.hasPackageJsonAnyDependency(s,["@testing-library/dom","@testing-library/react"]),tsdoc:_=!1,typescript:A=y.hasPackageJsonAnyDependency(s,["typescript"]),unicorn:V=!0,unocss:B=!1,vitest:k=y.hasPackageJsonAnyDependency(s,["vitest"]),zod:te=y.hasPackageJsonAnyDependency(s,["zod"])}=e;if(a){const u=[];te&&u.push("eslint-plugin-zod"),B&&u.push("@unocss/eslint-plugin"),L&&u.push("@tanstack/eslint-plugin-query"),T&&u.push("@tanstack/eslint-plugin-router"),(v||E)&&u.push("@eslint/css"),E&&u.push("eslint-plugin-tailwindcss"),q&&u.push("eslint-plugin-storybook"),N&&u.push("eslint-plugin-react","@eslint-react/eslint-plugin","eslint-plugin-react-hooks","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),N&&$&&u.push("eslint-plugin-react-compiler"),J&&u.push("eslint-plugin-testing-library"),I&&u.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),U&&u.push("eslint-plugin-you-dont-need-lodash-underscore"),_&&u.push("eslint-plugin-tsdoc"),e.formatters&&u.push("eslint-plugin-format"),h&&(u.push("eslint-plugin-astro","astro-eslint-parser","@typescript-eslint/parser"),typeof e.formatters=="object"&&e.formatters.astro&&u.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters?.markdown&&e.formatters?.slidev&&u.push("prettier-plugin-slidev"),(e.formatters?.xml||e.formatters?.svg)&&u.push("@prettier/plugin-xml")),u.length>0&&await y.ensurePackages(s,u,"devDependencies",{confirm:{message:W(G=>`@anolilab/eslint-config requires the following ${G.length===1?"package":"packages"} to be installed:
18
18
 
19
19
  "${G.join(`"
20
20
  "`)}"
package/dist/index.mjs CHANGED
@@ -14,7 +14,7 @@ Please remove "eslint-plugin-typescript-sort-keys" from your package.json, it co
14
14
  If you dont use the new react jsx-runtime in you project, please enable it manually.
15
15
  `))}F=F&&p!==!1;let W;return F&&(console.info(`
16
16
  @anolilab/eslint-config enabling react-compiler plugin
17
- `),W=i(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:V,"react-dom":$["@eslint-react/dom"],"react-hooks":T,"react-hooks-extra":$["@eslint-react/hooks-extra"],"react-naming-convention":$["@eslint-react/naming-convention"],"react-perf":S,"react-refresh":L,"react-web-api":$["@eslint-react/web-api"],"react-x":$["@eslint-react"],"react-you-might-not-need-an-effect":q,...F?{"react-compiler":W}:{}}},{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",{...re,allow:[...re.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:D,allowExportNames:[...M?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...I||A?["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":B?"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",C,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",C],"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":B?"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",...F?{"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:_??"detect"},"react-x":{version:_??"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:d("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...P?[{files:s,ignores:t,name:"anolilab/react/type-aware-rules",rules:{...N}}]:[]]}),mr=c("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,n=we["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}}]}),yr=c("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}}]}),gr=c("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:d("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:d("js"),languageOptions:{ecmaVersion:2020},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off"}}]}),hr=c("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}),br=c("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}),xr=c("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}}]}),wr=c("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}}]}),jr=c("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}}]}),vr=c("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}}]}),kr=c("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}}]}),H={"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"},...je.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}]},Or=c("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:H},{files:d("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Pr=Object.defineProperty,Cr=w((e,r)=>Pr(e,"name",{value:r,configurable:!0}),"w");const Sr=c("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:n,overridesTypeAware:a,parserOptions:l,prettier:p}=e,h=ce,x=ae(t),[v,P,C,N]=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"))]),U=e.filesTypeAware??d("ts"),V=e.ignoresTypeAware??["**/*.mdx/**",...d("astro")],T=e?.tsconfigPath??void 0,L=T!==void 0,S=Cr((D,I,M)=>({files:[...I,...o.map(A=>`**/*.${A}`)],...M?{ignores:M}:{},languageOptions:{parser:P,parserOptions:{extraFileExtensions:o.map(A=>`.${A}`),sourceType:"module",...D?{projectService:{allowDefaultProject:["./*.js"],defaultProject:T},tsconfigRootDir:process.cwd()}:{},...l}},name:`anolilab/typescript/${D?"type-aware-parser":"parser"}`}),"makeParser"),q=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":v,"no-for-of-array":N}},...L?[S(!1,s),S(!0,U,V)]:[S(!1,s)],...C.configs.strict];return L&&q.push(...C.configs.strictTypeCheckedOnly,{files:[...U,...o.map(D=>`**/*.${D}`)],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:d("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),q.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":H["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":H["no-unused-vars"],"@typescript-eslint/no-use-before-define":H["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":"error","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":h["space-infix-ops"],...n,...p?{"@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"}:{}}}),q}),_r=c("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,p=await i(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:K.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:p}},{files:o,name:"anolilab/unicorn/rules",rules:{...p.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 Er=Object.defineProperty,qr=w((e,r)=>Er(e,"name",{value:r,configurable:!0}),"n$2");const Dr=qr(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"),Ir=c("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}}]}),Fr={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 Nr=c("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:n,tsconfigPath:a}=e,[l,p]=await Promise.all([i(import("@vitest/eslint-plugin")),i(import("eslint-plugin-no-only-tests"))]);return ee=ee||{...l,rules:{...l.rules,...p.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:ee}},{files:o,...a?{...l.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Fr}},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}],...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"}:{}}}]}),Tr=c("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,[p,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:p},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?p.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:"^$"}]}}]}),Ar=c("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":ne(t)},rules:{...t.configs.all.rules,...s}}]}),$r=c("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 Ur=Object.defineProperty,Lr=w((e,r)=>Ur(e,"name",{value:r,configurable:!0}),"e$1");const Mr=Lr(()=>!!(process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged")),"isInGitHooksOrLintStaged");var Rr=Object.defineProperty,Jr=w((e,r)=>Rr(e,"name",{value:r,configurable:!0}),"e");const zr=Jr(()=>process.env.CI||Mr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var Vr=Object.defineProperty,X=w((e,r)=>Vr(e,"name",{value:r,configurable:!0}),"f");const Br=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],Q=X((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),f=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"),as=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=ue(fe(de(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 p=!1;if(l!==void 0){const u=te(l);u?.major&&u.major>=19&&(p=!0)}const{astro:h=y(s,["astro"]),componentExts:x=[],css:v=!1,gitignore:P=!0,html:C=!1,jsx:N=y(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||a,lodash:U=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:V=y(s,["playwright","eslint-plugin-playwright"]),react:T=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:L=p,regexp:S=!0,silent:q=!1,storybook:D=y(s,["storybook","eslint-plugin-storybook"]),tailwindcss:I=!1,tanstackQuery:M=y(s,["@tanstack/react-query"]),tanstackRouter:A=y(s,["@tanstack/react-router"]),testingLibrary:$=y(s,["@testing-library/dom","@testing-library/react"]),tsdoc:_=!1,typescript:F=y(s,["typescript"]),unicorn:B=!0,unocss:W=!1,vitest:k=y(s,["vitest"]),zod:se=y(s,["zod"])}=e;if(n){const u=[];se&&u.push("eslint-plugin-zod"),W&&u.push("@unocss/eslint-plugin"),M&&u.push("@tanstack/eslint-plugin-query"),A&&u.push("@tanstack/eslint-plugin-router"),(v||I)&&u.push("@eslint/css"),I&&u.push("eslint-plugin-tailwindcss"),D&&u.push("eslint-plugin-storybook"),T&&u.push("eslint-plugin-react","@eslint-react/eslint-plugin","eslint-plugin-react-hooks","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),T&&L&&u.push("eslint-plugin-react-compiler"),$&&u.push("eslint-plugin-testing-library"),N&&u.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),U&&u.push("eslint-plugin-you-dont-need-lodash-underscore"),_&&u.push("eslint-plugin-tsdoc"),e.formatters&&u.push("eslint-plugin-format"),h&&(u.push("eslint-plugin-astro","astro-eslint-parser","@typescript-eslint/parser"),typeof e.formatters=="object"&&e.formatters.astro&&u.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters?.markdown&&e.formatters?.slidev&&u.push("prettier-plugin-slidev"),(e.formatters?.xml||e.formatters?.svg)&&u.push("@prettier/plugin-xml")),u.length>0&&await me(s,u,"devDependencies",{confirm:{message:X(z=>`@anolilab/eslint-config requires the following ${z.length===1?"package":"packages"} to be installed:
17
+ `),W=i(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:V,"react-dom":$["@eslint-react/dom"],"react-hooks":T,"react-hooks-extra":$["@eslint-react/hooks-extra"],"react-naming-convention":$["@eslint-react/naming-convention"],"react-perf":S,"react-refresh":L,"react-web-api":$["@eslint-react/web-api"],"react-x":$["@eslint-react"],"react-you-might-not-need-an-effect":q,...F?{"react-compiler":W}:{}}},{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",{...re,allow:[...re.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:D,allowExportNames:[...M?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...I||A?["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":B?"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",C,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",C],"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":B?"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",...F?{"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:_??"detect"},"react-x":{version:_??"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:d("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...P?[{files:s,ignores:t,name:"anolilab/react/type-aware-rules",rules:{...N}}]:[]]}),mr=c("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,n=we["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}}]}),yr=c("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}}]}),gr=c("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:d("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:d("js"),languageOptions:{ecmaVersion:2020},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off"}}]}),hr=c("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}),br=c("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}),xr=c("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}}]}),wr=c("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}}]}),jr=c("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}}]}),vr=c("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}}]}),kr=c("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}}]}),H={"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"},...je.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}]},Or=c("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:H},{files:d("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Pr=Object.defineProperty,Cr=w((e,r)=>Pr(e,"name",{value:r,configurable:!0}),"w");const Sr=c("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:n,overridesTypeAware:a,parserOptions:l,prettier:p}=e,h=ce,x=ae(t),[v,P,C,N]=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"))]),U=e.filesTypeAware??d("ts"),V=e.ignoresTypeAware??["**/*.mdx/**",...d("astro")],T=e?.tsconfigPath??void 0,L=T!==void 0,S=Cr((D,I,M)=>({files:[...I,...o.map(A=>`**/*.${A}`)],...M?{ignores:M}:{},languageOptions:{parser:P,parserOptions:{extraFileExtensions:o.map(A=>`.${A}`),sourceType:"module",...D?{projectService:{allowDefaultProject:["./*.js"],defaultProject:T},tsconfigRootDir:process.cwd()}:{},...l}},name:`anolilab/typescript/${D?"type-aware-parser":"parser"}`}),"makeParser"),q=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":v,"no-for-of-array":N}},...L?[S(!1,s),S(!0,U,V)]:[S(!1,s)],...C.configs.strict];return L&&q.push(...C.configs.strictTypeCheckedOnly,{files:[...U,...o.map(D=>`**/*.${D}`)],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:d("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),q.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":H["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":H["no-unused-vars"],"@typescript-eslint/no-use-before-define":H["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":"error","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":h["space-infix-ops"],...n,...p?{"@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"}:{}}}),q}),_r=c("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,p=await i(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:K.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:p}},{files:o,name:"anolilab/unicorn/rules",rules:{...p.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 Er=Object.defineProperty,qr=w((e,r)=>Er(e,"name",{value:r,configurable:!0}),"n$2");const Dr=qr(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"),Ir=c("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}}]}),Fr={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 Nr=c("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:n,tsconfigPath:a}=e,[l,p]=await Promise.all([i(import("@vitest/eslint-plugin")),i(import("eslint-plugin-no-only-tests"))]);return ee=ee||{...l,rules:{...l.rules,...p.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:ee}},{files:o,...a?{...l.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Fr}},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"}:{}}}]}),Tr=c("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,[p,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:p},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?p.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:"^$"}]}}]}),Ar=c("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":ne(t)},rules:{...t.configs.all.rules,...s}}]}),$r=c("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 Ur=Object.defineProperty,Lr=w((e,r)=>Ur(e,"name",{value:r,configurable:!0}),"e$1");const Mr=Lr(()=>!!(process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged")),"isInGitHooksOrLintStaged");var Rr=Object.defineProperty,Jr=w((e,r)=>Rr(e,"name",{value:r,configurable:!0}),"e");const zr=Jr(()=>process.env.CI||Mr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var Vr=Object.defineProperty,X=w((e,r)=>Vr(e,"name",{value:r,configurable:!0}),"f");const Br=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],Q=X((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),f=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"),as=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=ue(fe(de(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 p=!1;if(l!==void 0){const u=te(l);u?.major&&u.major>=19&&(p=!0)}const{astro:h=y(s,["astro"]),componentExts:x=[],css:v=!1,gitignore:P=!0,html:C=!1,jsx:N=y(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||a,lodash:U=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:V=y(s,["playwright","eslint-plugin-playwright"]),react:T=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:L=p,regexp:S=!0,silent:q=!1,storybook:D=y(s,["storybook","eslint-plugin-storybook"]),tailwindcss:I=!1,tanstackQuery:M=y(s,["@tanstack/react-query"]),tanstackRouter:A=y(s,["@tanstack/react-router"]),testingLibrary:$=y(s,["@testing-library/dom","@testing-library/react"]),tsdoc:_=!1,typescript:F=y(s,["typescript"]),unicorn:B=!0,unocss:W=!1,vitest:k=y(s,["vitest"]),zod:se=y(s,["zod"])}=e;if(n){const u=[];se&&u.push("eslint-plugin-zod"),W&&u.push("@unocss/eslint-plugin"),M&&u.push("@tanstack/eslint-plugin-query"),A&&u.push("@tanstack/eslint-plugin-router"),(v||I)&&u.push("@eslint/css"),I&&u.push("eslint-plugin-tailwindcss"),D&&u.push("eslint-plugin-storybook"),T&&u.push("eslint-plugin-react","@eslint-react/eslint-plugin","eslint-plugin-react-hooks","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),T&&L&&u.push("eslint-plugin-react-compiler"),$&&u.push("eslint-plugin-testing-library"),N&&u.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),U&&u.push("eslint-plugin-you-dont-need-lodash-underscore"),_&&u.push("eslint-plugin-tsdoc"),e.formatters&&u.push("eslint-plugin-format"),h&&(u.push("eslint-plugin-astro","astro-eslint-parser","@typescript-eslint/parser"),typeof e.formatters=="object"&&e.formatters.astro&&u.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters?.markdown&&e.formatters?.slidev&&u.push("prettier-plugin-slidev"),(e.formatters?.xml||e.formatters?.svg)&&u.push("@prettier/plugin-xml")),u.length>0&&await me(s,u,"devDependencies",{confirm:{message:X(z=>`@anolilab/eslint-config requires the following ${z.length===1?"package":"packages"} to be installed:
18
18
 
19
19
  "${z.join(`"
20
20
  "`)}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/eslint-config",
3
- "version": "16.2.2",
3
+ "version": "16.2.3",
4
4
  "description": "ESLint shareable config for the Anolilab JavaScript style guide.",
5
5
  "keywords": [
6
6
  "anolilab",