@anolilab/eslint-config 17.0.0 → 17.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +66 -37
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## @anolilab/eslint-config [17.0.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@17.0.0...@anolilab/eslint-config@17.0.1) (2025-12-11)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* update sonarjs rules in ESLint configuration ([54f0b7a](https://github.com/anolilab/javascript-style-guide/commit/54f0b7ac7b11b3e5b3dc094e0e7cf56bbb19c785))
|
|
6
|
+
|
|
7
|
+
### Miscellaneous Chores
|
|
8
|
+
|
|
9
|
+
* update configuration and scripts ([5d6a44f](https://github.com/anolilab/javascript-style-guide/commit/5d6a44f99568b5f67939dfc52047fa742fd2bf58))
|
|
10
|
+
|
|
1
11
|
## @anolilab/eslint-config [17.0.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@16.4.4...@anolilab/eslint-config@17.0.0) (2025-12-10)
|
|
2
12
|
|
|
3
13
|
### Features
|
package/README.md
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- START_PACKAGE_OG_IMAGE_PLACEHOLDER -->
|
|
2
|
+
|
|
3
|
+
<a href="https://github.com/anolilab/semantic-release" align="center">
|
|
4
|
+
|
|
5
|
+
<img src="__assets__/package-og.svg" alt="eslint-config" />
|
|
6
|
+
|
|
7
|
+
</a>
|
|
8
|
+
|
|
9
|
+
<h3 align="center">ESLint shareable config for the Anolilab JavaScript style guide.</h3>
|
|
2
10
|
|
|
3
|
-
|
|
11
|
+
<!-- END_PACKAGE_OG_IMAGE_PLACEHOLDER -->
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
<br />
|
|
14
|
+
|
|
15
|
+
<div align="center">
|
|
16
|
+
|
|
17
|
+
[![typescript-image][typescript-badge]][typescript-url]
|
|
18
|
+
[![mit licence][license-badge]][license]
|
|
19
|
+
[![npm downloads][npm-downloads-badge]][npm-downloads]
|
|
20
|
+
[![Chat][chat-badge]][chat]
|
|
21
|
+
[![PRs Welcome][prs-welcome-badge]][prs-welcome]
|
|
6
22
|
|
|
7
23
|
</div>
|
|
8
24
|
|
|
@@ -18,6 +34,20 @@
|
|
|
18
34
|
|
|
19
35
|
---
|
|
20
36
|
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
npm install @anolilab/eslint-config
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
yarn add @anolilab/eslint-config
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
pnpm add @anolilab/eslint-config
|
|
49
|
+
```
|
|
50
|
+
|
|
21
51
|
## Purpose
|
|
22
52
|
|
|
23
53
|
Our package serves as a valuable resource for JavaScript/Typescript-based projects, offering composable [ESLint](https://eslint.org/) configurations. It encompasses a range of features, including performance optimization and the flexibility to extend pre-defined base configurations. We aim to provide a strong, opinionated foundation for code quality and consistency, while still allowing for customization to suit specific project needs.
|
|
@@ -51,22 +81,6 @@ Our package serves as a valuable resource for JavaScript/Typescript-based projec
|
|
|
51
81
|
- Easily configure stylistic preferences like indent and semicolon without deep diving into rule configurations.
|
|
52
82
|
- Works alongside Prettier: Our configuration disables ESLint rules that would conflict with Prettier, allowing ESLint to focus on code quality and Prettier on formatting if you choose to use both. However, many stylistic rules are included and can be enforced by ESLint directly.
|
|
53
83
|
|
|
54
|
-
## Install
|
|
55
|
-
|
|
56
|
-
To install this config, run the following command.
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
npm install --save-dev eslint @anolilab/eslint-config
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
```sh
|
|
63
|
-
pnpm add -D eslint @anolilab/eslint-config
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
```sh
|
|
67
|
-
yarn add -D eslint @anolilab/eslint-config
|
|
68
|
-
```
|
|
69
|
-
|
|
70
84
|
## Usage
|
|
71
85
|
|
|
72
86
|
Our default export is designed to be used within ESLint's flat configuration system (e.g., `eslint.config.js`). It contains a comprehensive set of ESLint rules, suitable for modern ECMAScript (ES2021+ by default) and TypeScript projects.
|
|
@@ -630,34 +644,49 @@ Don't you remember how ESLint defeated JSHint and became the most popular JS cod
|
|
|
630
644
|
|
|
631
645
|
Therefore, `@anolilab/eslint-config` also inherits the philosophy of ESLint. It will not force you to use our config.
|
|
632
646
|
|
|
647
|
+
## Related
|
|
648
|
+
|
|
633
649
|
## Supported Node.js Versions
|
|
634
650
|
|
|
635
|
-
Libraries in this ecosystem make the best effort to track
|
|
636
|
-
|
|
637
|
-
post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
|
|
651
|
+
Libraries in this ecosystem make the best effort to track [Node.js' release schedule](https://github.com/nodejs/release#release-schedule).
|
|
652
|
+
|
|
653
|
+
Here's [a post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
|
|
638
654
|
|
|
639
655
|
## Contributing
|
|
640
656
|
|
|
641
|
-
If you would like to help take a look at the [list of issues](https://github.com/anolilab/javascript-style-guide/issues) and check our [Contributing](.github/CONTRIBUTING.md)
|
|
657
|
+
If you would like to help take a look at the [list of issues](https://github.com/anolilab/javascript-style-guide/issues) and check our [Contributing](.github/CONTRIBUTING.md) guidelines.
|
|
642
658
|
|
|
643
659
|
> **Note:** please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
|
|
644
660
|
|
|
645
661
|
## Credits
|
|
646
662
|
|
|
647
|
-
-
|
|
648
|
-
- [All Contributors](https://github.com/anolilab/javascript-style-guide/graphs/contributors)
|
|
649
|
-
- Inspired by and thankful for the work in configurations like:
|
|
650
|
-
- [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb)
|
|
651
|
-
- [eslint-config-canonical](https://github.com/gajus/eslint-config-canonical)
|
|
652
|
-
- [@antfu/eslint-config](https://github.com/antfu/eslint-config) (for its modern approach and clear documentation)
|
|
663
|
+
- [Daniel Bannert](https://github.com/prisis)
|
|
653
664
|
|
|
654
|
-
|
|
665
|
+
- [All Contributors](https://github.com/anolilab/javascript-style-guide/graphs/contributors)
|
|
655
666
|
|
|
656
|
-
|
|
667
|
+
- Inspired by and thankful for the work in configurations like:
|
|
668
|
+
- [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb)
|
|
669
|
+
- [eslint-config-canonical](https://github.com/gajus/eslint-config-canonical)
|
|
670
|
+
- [@antfu/eslint-config](https://github.com/antfu/eslint-config) (for its modern approach and clear documentation)
|
|
671
|
+
|
|
672
|
+
## Made with ❤️ at Anolilab
|
|
673
|
+
|
|
674
|
+
This is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. [Anolilab](https://www.anolilab.com/open-source) is a Development and AI Studio. Contact us at [hello@anolilab.com](mailto:hello@anolilab.com) if you need any help with these technologies or just want to say hi!
|
|
675
|
+
|
|
676
|
+
## License
|
|
657
677
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
[
|
|
663
|
-
[
|
|
678
|
+
The anolilab eslint-config is open-sourced software licensed under the [MIT][license-url]
|
|
679
|
+
|
|
680
|
+
<!-- badges -->
|
|
681
|
+
|
|
682
|
+
[license-badge]: https://img.shields.io/npm/l/@anolilab/eslint-config?style=for-the-badge
|
|
683
|
+
[license]: https://github.com/anolilab/javascript-style-guide/blob/main/LICENSE
|
|
684
|
+
[npm-downloads-badge]: https://img.shields.io/npm/dm/@anolilab/eslint-config?style=for-the-badge
|
|
685
|
+
[npm-downloads]: https://www.npmjs.com/package/@anolilab/eslint-config
|
|
686
|
+
[prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
|
|
687
|
+
[prs-welcome]: https://github.com/anolilab/javascript-style-guide/blob/main/.github/CONTRIBUTING.md
|
|
688
|
+
[chat-badge]: https://img.shields.io/discord/902465130518949899.svg?style=for-the-badge
|
|
689
|
+
[chat]: https://discord.gg/4VuvwWGaaB
|
|
690
|
+
[typescript-badge]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
|
|
691
|
+
[typescript-url]: https://www.typescriptlang.org/
|
|
692
|
+
[license-url]: https://opensource.org/licenses/MIT
|
package/dist/index.cjs
CHANGED
|
@@ -12,7 +12,7 @@ Please remove "eslint-plugin-typescript-sort-keys" from your package.json, it co
|
|
|
12
12
|
Following rules are disabled: "react/jsx-uses-react" and "react/react-in-jsx-scope".
|
|
13
13
|
If you dont use the new react jsx-runtime in you project, please enable it manually.
|
|
14
14
|
`))}j=j&&p!==!1;let M;return j&&(console.info(`@anolilab/eslint-config enabling react-compiler plugin
|
|
15
|
-
`),M=await l(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:q,"react-dom":T["@eslint-react/dom"],"react-hooks":N,"react-hooks-extra":T["@eslint-react/hooks-extra"],"react-naming-convention":T["@eslint-react/naming-convention"],"react-perf":A,"react-refresh":_,"react-web-api":T["@eslint-react/web-api"],"react-x":T["@eslint-react"],"react-you-might-not-need-an-effect":S,...j&&M?M.configs.recommended.plugins:{}}},{files:o,languageOptions:{globals:{...B.browser},parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{...R.configs["disable-conflict-eslint-plugin-react"]?.rules,"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":["error",{...oe,allow:[...oe.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-naming-convention/component-name":"error","react-naming-convention/context-name":"error","react-naming-convention/filename":"off","react-naming-convention/use-state":"error","react-refresh/only-export-components":["error",{allowConstantExport:W,allowExportNames:[...z?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...J||I?["meta","links","headers","loader","action","clientLoader","clientAction","handle","shouldRevalidate"]:[]]}],"react-web-api/no-leaked-event-listener":"error","react-web-api/no-leaked-interval":"error","react-web-api/no-leaked-resize-observer":"error","react-web-api/no-leaked-timeout":"error","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-shorthand-boolean":"error","react-x/jsx-shorthand-fragment":"error","react-x/jsx-uses-react":U?"off":"error","react-x/jsx-uses-vars":"error","react-x/no-access-state-in-setstate":"error","react-x/no-array-index-key":"error","react-x/no-children-count":"error","react-x/no-children-for-each":"error","react-x/no-children-map":"error","react-x/no-children-only":"error","react-x/no-children-prop":"off","react-x/no-children-to-array":"error","react-x/no-class-component":"off","react-x/no-clone-element":"error","react-x/no-component-will-mount":"error","react-x/no-component-will-receive-props":"error","react-x/no-component-will-update":"error","react-x/no-context-provider":"error","react-x/no-create-ref":"error","react-x/no-default-props":"error","react-x/no-direct-mutation-state":"error","react-x/no-duplicate-key":"error","react-x/no-forward-ref":"error","react-x/no-implicit-key":"error","react-x/no-missing-component-display-name":"off","react-x/no-missing-context-display-name":"off","react-x/no-missing-key":"error","react-x/no-misused-capture-owner-stack":"off","react-x/no-nested-component-definitions":"error","react-x/no-nested-lazy-component-declarations":"error","react-x/no-prop-types":"error","react-x/no-redundant-should-component-update":"error","react-x/no-set-state-in-component-did-mount":"error","react-x/no-set-state-in-component-did-update":"error","react-x/no-set-state-in-component-will-update":"error","react-x/no-string-refs":"error","react-x/no-unnecessary-use-callback":"error","react-x/no-unnecessary-use-memo":"error","react-x/no-unsafe-component-will-mount":"error","react-x/no-unsafe-component-will-receive-props":"error","react-x/no-unsafe-component-will-update":"error","react-x/no-unstable-context-value":"error","react-x/no-unstable-default-props":"error","react-x/no-unused-class-component-members":"error","react-x/no-unused-state":"error","react-x/no-use-context":"error","react-x/no-useless-forward-ref":"error","react-x/no-useless-fragment":"off","react-x/prefer-destructuring-assignment":"off","react-x/prefer-read-only-props":"off","react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["error",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",k,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",k],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"off","react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"off","react/jsx-no-useless-fragment":"off","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":"off","react/jsx-uses-vars":"off","react/no-access-state-in-setstate":"off","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"off","react/no-children-prop":"off","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"off","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"off","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"off","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"off","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":"off","react/react-in-jsx-scope":U?"off":"error","react/require-default-props":"off","react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","static public field"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...j&&M?{"react-compiler/react-compiler":"error","react-hooks/component-hook-factories":"error","react-hooks/config":"error","react-hooks/error-boundaries":"error","react-hooks/gating":"error","react-hooks/globals":"error","react-hooks/immutability":"error","react-hooks/incompatible-library":"warn","react-hooks/preserve-manual-memoization":"error","react-hooks/purity":"error","react-hooks/refs":"error","react-hooks/set-state-in-effect":"error","react-hooks/set-state-in-render":"error","react-hooks/static-components":"error","react-hooks/unsupported-syntax":"warn","react-hooks/use-memo":"error"}:{},...A.configs.flat.recommended.rules,...S.configs.recommended.rules,...U?q?.configs.flat?.["jsx-runtime"]?.rules:{},...c?{"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off"}:{},...t},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:F??"detect"},"react-x":{version:F??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}},...U?q.configs.flat["jsx-runtime"].languageOptions.parserOptions:{}},name:"anolilab/react/jsx",rules:{"react-x/naming-convention/filename-extension":["error","as-needed"],"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"off","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"},settings:{extensions:[".jsx"]}},{files:["**/*.tsx"],name:"anolilab/react/tsx",rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:n.getFilesGlobs("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...O?[{files:s,ignores:x,name:"anolilab/react/type-aware-rules",rules:{...$}}]:[]]}),Er=n.createConfig("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,a=Ee.configs["flat/recommended"],c={...a.rules};if(s==="warn")for(const p in c)c[p]==="error"&&(c[p]="warn");return[{...a,files:o,name:"anolilab/regexp/rules",rules:{...c,...t}}]}),qr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-simple-import-sort"));return[{files:o,name:"anolilab/simple-import-sort",plugins:{"simple-import-sort":t},rules:{"simple-import-sort/exports":"error","simple-import-sort/imports":"error",...s}}]}),Ar=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-sonarjs"));return[{name:"anolilab/sonarjs/plugin",plugins:{sonarjs:t}},{files:o,name:"anolilab/sonarjs/rules",rules:{...t.configs.recommended.rules,"sonarjs/file-name-differ-from-class":"error","sonarjs/no-collapsible-if":"error","sonarjs/no-nested-template-literals":"off","sonarjs/no-tab":"error","sonarjs/todo-tag":"off",...s}},{files:n.getFilesGlobs("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:n.getFilesGlobs("js"),languageOptions:{ecmaVersion:"latest"},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off"}}]}),Ir=n.createConfig("storybook",async e=>{const{overrides:r}=e,o=[...(await l(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),Tr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await l(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),Nr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),Jr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),Ur=n.createConfig("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await l(import("eslint-plugin-testing-library")),c=g.hasPackageJsonAnyDependency(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":a},rules:{...a.configs["flat/dom"].rules,...c?a.configs["flat/react"].rules:{},...s}}]}),Lr=n.createConfig("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:a=2}=typeof t=="boolean"?{}:t,[c,p]=await Promise.all([l(import("eslint-plugin-toml")),l(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:p},name:"anolilab/toml",plugins:{toml:c},rules:{...t?{"@stylistic/spaced-comment":"off"}:{},"toml/comma-style":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error",...t?{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"error","toml/indent":["error",a==="tab"?2:a],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error"}:{},...s}}]}),$r=n.createConfig("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),te={"init-declarations":"off","no-catch-shadow":"off","no-delete-var":"error","no-label-var":"error","no-restricted-globals":["error",{message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",name:"isFinite"},{message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",name:"isNaN"},...Ie.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":"off","no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Rr=n.createConfig("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:te},{files:n.getFilesGlobs("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Mr=Object.defineProperty,Gr=v((e,r)=>Mr(e,"name",{value:r,configurable:!0}),"w");const zr=n.createConfig("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:a,overridesTypeAware:c,parserOptions:p,prettier:u}=e,b=be,h=ge(t),[x,O]=await Promise.all([l(import("typescript-eslint")),l(import("eslint-plugin-no-for-of-array"))]);let k;p?.erasableSyntaxOnly&&(k=await l(import("eslint-plugin-erasable-syntax-only")));const $=e.filesTypeAware??n.getFilesGlobs("ts"),R=[...n.getFilesGlobs("astro"),...n.getFilesGlobs("markdown"),...n.getFilesGlobs("markdown_inline_js_jsx"),...n.getFilesGlobs("js"),...n.getFilesGlobs("jsx"),"**/*.json","**/*.jsonc",...e.ignoresTypeAware??[]],{tsconfigPath:q}=e;let{isTypeAware:N=!0}=e;N=N&&q!==void 0;const _=Gr((S,W,J)=>{const z=fe.dirname(qe.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:re&&re.tagName.toUpperCase()==="SCRIPT"&&re.src||new URL("index.cjs",document.baseURI).href));return{files:[...W,...o.map(I=>`**/*.${I}`)],...J?{ignores:J}:{},languageOptions:{parser:x.parser,parserOptions:{extraFileExtensions:o.map(I=>`.${I}`),sourceType:"module",...S?{projectService:!0,tsconfigRootDir:z}:{},...p}},name:`anolilab/typescript/${S?"type-aware-parser":"parser"}`}},"makeParser"),A=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":x.plugin,"no-for-of-array":O,...k?k.configs.recommended.plugins:{}}},...N?[_(!1,s),_(!0,$,R)]:[_(!1,s)],...x.configs.strict];return N&&A.push(...x.configs.strictTypeCheckedOnly,{files:[...$,...o.map(S=>`**/*.${S}`)],name:"anolilab/typescript/rules-type-aware",rules:{"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error",...c}},{files:n.getFilesGlobs("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),A.push({files:s,name:"anolilab/typescript/rules",rules:{"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-ts-comment":["error",{minimumDescriptionLength:3,"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":"allow-with-description","ts-nocheck":!0}],"@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/method-signature-style":"error","@typescript-eslint/naming-convention":["error",{format:["camelCase","PascalCase","UPPER_CASE"],selector:"variable"},{format:["camelCase","PascalCase"],selector:"function"},{format:["PascalCase"],selector:"typeLike"}],"@typescript-eslint/no-array-constructor":b["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":h["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":G["no-empty-function"],"@typescript-eslint/no-explicit-any":["error",{fixToUnknown:!1,ignoreRestArgs:!0}],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-loop-func":G["no-loop-func"],"@typescript-eslint/no-magic-numbers":G["no-magic-numbers"],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redeclare":G["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":te["no-shadow"],"@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unused-expressions":G["no-unused-expressions"],"@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":te["no-use-before-define"],"@typescript-eslint/no-useless-constructor":h["no-useless-constructor"],"@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"off","@typescript-eslint/prefer-ts-expect-error":"off","@typescript-eslint/return-await":G["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":b["space-infix-ops"],...k?k.configs.recommended.rules:{},...a,...u?{"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":0,"@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/quotes":0,"@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"}:{}}}),A}),Vr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:a,stylistic:c=!0}=e,{indent:p=4}=typeof c=="boolean"?{}:c,u=await l(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:B.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:u}},{files:o,name:"anolilab/unicorn/rules",rules:{...u.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/import-style":["error",{styles:{"node:path":{named:!0},"node:util":{named:!0},path:{named:!0},util:{named:!0}}}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","unicorn/no-nested-ternary":"off","unicorn/no-useless-undefined":"off","unicorn/prefer-at":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":t.type==="module"?"error":"off","unicorn/prefer-node-protocol":"error","unicorn/prefer-ternary":["error","only-single-line"],"unicorn/prevent-abbreviations":["error",{allowList:{i:!0,j:!0},replacements:{args:!1,dev:!1,dist:!1,env:!1,params:!1,pkg:!1,prop:!1,props:!1,ref:!1,src:!1,utils:!1}}],...a?{"unicorn/empty-brace-spaces":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}:{"unicorn/template-indent":["error",{indent:p}]},...s}},{files:["tsconfig.dev.json","tsconfig.prod.json"],name:"anolilab/unicorn/tsconfig-overrides",rules:{"unicorn/prevent-abbreviations":"off"}},{files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],name:"anolilab/unicorn/ts-overrides",rules:{"unicorn/import-style":"off"}}]});var Wr=Object.defineProperty,Br=v((e,r)=>Wr(e,"name",{value:r,configurable:!0}),"n$2");const Xr=Br(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await l(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Hr=n.createConfig("all",async(e,r)=>{const{files:o=r,isInEditor:s,overrides:t}=e,a=await l(import("eslint-plugin-unused-imports"));return[{files:o,name:"anolilab/unused-imports/rules",plugins:{"unused-imports":a},rules:{"@typescript-eslint/no-unused-vars":"off","no-unused-vars":"off","unused-imports/no-unused-imports":s?"off":"error","unused-imports/no-unused-vars":[s?"warn":"error",{args:"after-used",argsIgnorePattern:"^_",vars:"all",varsIgnorePattern:"^_"}],...t}}]}),Kr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-validate-jsx-nesting"));return[{files:o,name:"anolilab/validate-jsx-nesting/setup",plugins:{"validate-jsx-nesting":t},rules:{"validate-jsx-nesting/no-invalid-jsx-nesting":"error",...s}}]}),Qr={suite:!0,test:!0,chai:!0,describe:!0,it:!0,expectTypeOf:!0,assertType:!0,expect:!0,assert:!0,vitest:!0,vi:!0,beforeAll:!0,afterAll:!0,beforeEach:!0,afterEach:!0,onTestFailed:!0,onTestFinished:!0};let se;const Yr=n.createConfig("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:a,tsconfigPath:c}=e,[p,u]=await Promise.all([l(import("@vitest/eslint-plugin")),l(import("eslint-plugin-no-only-tests"))]);return se=se??{...p,rules:{...p.rules,...u.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:se}},{files:o,...c?{...p.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Qr}},name:"anolilab/vitest/rules",rules:{...p.configs.all.rules,...p.configs.recommended.rules,"@typescript-eslint/explicit-function-return-type":"off","antfu/no-top-level-await":"off","n/prefer-global/process":"off","no-unused-expressions":"off","vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/max-expects":"off","vitest/no-hooks":"off","vitest/no-mocks-import":"off","vitest/no-only-tests":s?"off":"error","vitest/no-restricted-vi-methods":"off","vitest/no-standalone-expect":"error","vitest/valid-expect":["error",{alwaysAwait:!0,maxArgs:2,minArgs:1}],"vitest/valid-title":"off",...t,...a?{"vitest/padding-around-after-all-blocks":"off","vitest/padding-around-after-each-blocks":"off","vitest/padding-around-all":"off","vitest/padding-around-before-all-blocks":"off","vitest/padding-around-before-each-blocks":"off","vitest/padding-around-describe-blocks":"off","vitest/padding-around-expect-blocks":"off","vitest/padding-around-test-blocks":"off"}:{}}}]}),Zr=n.createConfig("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:a=!0}=e,{indent:c=4,quotes:p="double"}=typeof a=="boolean"?{}:a,[u,b]=await Promise.all([l(import("eslint-plugin-yml")),l(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:b},name:"anolilab/yaml",plugins:{yaml:u},rules:{"@stylistic/spaced-comment":"off","yaml/block-mapping":"error","yaml/block-sequence":"error","yaml/no-empty-key":"error","yaml/no-empty-sequence-entry":"error","yaml/no-irregular-whitespace":"error","yaml/plain-scalar":"error","yaml/vue-custom-block/no-parsing-error":"error",...a?{"yaml/block-mapping-question-indicator-newline":"error","yaml/block-sequence-hyphen-indicator-newline":"error","yaml/flow-mapping-curly-newline":"error","yaml/flow-mapping-curly-spacing":"error","yaml/flow-sequence-bracket-newline":"error","yaml/flow-sequence-bracket-spacing":"error","yaml/indent":[t?"off":"error",c==="tab"?2:c],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:p==="backtick"?"single":p}],"yaml/spaced-comment":"error"}:{},...t?u.configs.prettier.rules:{},...s}}]}),es=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ue.fixupPluginRules(t)},rules:{...t.configs.all.rules,...s}}]}),rs=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var ss=Object.defineProperty,os=v((e,r)=>ss(e,"name",{value:r,configurable:!0}),"e$1");const ts=os(()=>!!(process.env.GIT_PARAMS??process.env.VSCODE_GIT_COMMAND??process.env.npm_lifecycle_script?.startsWith("lint-staged")??!1),"isInGitHooksOrLintStaged");var ns=Object.defineProperty,as=v((e,r)=>ns(e,"name",{value:r,configurable:!0}),"e");const is=as(()=>process.env.CI||ts()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var ls=Object.defineProperty,X=v((e,r)=>ls(e,"name",{value:r,configurable:!0}),"f");const cs=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],H=X((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),d=X((e,r)=>{const o=H(e,r);return{..."overrides"in o?o.overrides:{}}},"getOverrides"),y=X((e,r)=>{const o=H(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),ps=X(async(e={},...r)=>{if("files"in e)throw new Error('[@anolilab/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');const o=e.cwd??process.cwd(),s=await g.parsePackageJson(fe.join(o,"package.json"),{resolveCatalogs:!0}),t=s.packageManager?.startsWith("pnpm"),a=g.hasPackageJsonAnyDependency(s,["prettier"]),c=g.hasPackageJsonAnyDependency(s,["@anolilab/eslint-config"]),p=g.hasPackageJsonAnyDependency(s,["react","react-dom"]),u=s.dependencies?.react??s.devDependencies?.react;let b=!1;if(u!==void 0){const f=Q.parse(u);f?.major&&f.major>=19&&(b=!0)}let h=!1,x=!1;const O=s.dependencies?.tailwindcss??s.devDependencies?.tailwindcss;if(O){const f=Q.parse(O);f?.major&&f.major<=3&&(h=!0),f?.major&&f.major>=4&&(x=!0)}const{astro:k=g.hasPackageJsonAnyDependency(s,["astro"]),componentExts:$=[],css:R=g.hasPackageJsonAnyDependency(s,["postcss","cssnano"]),gitignore:q=!0,html:N=!1,jsx:_=g.hasPackageJsonAnyDependency(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||p,lodash:A=g.hasPackageJsonAnyDependency(s,["lodash","underscore","lodash-es","@types/lodash","lodash.chunk","lodash.compact","lodash.concat","lodash.difference","lodash.differenceby","lodash.differencewith","lodash.drop","lodash.dropright","lodash.droprightwhile","lodash.dropwhile","lodash.fill","lodash.findindex","lodash.findlastindex","lodash.flatten","lodash.flattendeep","lodash.flattendepth","lodash.frompairs","lodash.head","lodash.indexof","lodash.initial","lodash.intersection","lodash.intersectionby","lodash.intersectionwith","lodash.join","lodash.last","lodash.lastindexof","lodash.nth","lodash.pull","lodash.pullall","lodash.pullallby","lodash.pullallwith","lodash.pullat","lodash.remove","lodash.reverse","lodash.slice","lodash.sortedindex","lodash.sortedindexby","lodash.sortedindexof","lodash.sortedlastindex","lodash.sortedlastindexby","lodash.sortedlastindexof","lodash.sorteduniq","lodash.sorteduniqby","lodash.tail","lodash.take","lodash.takeright","lodash.takerightwhile","lodash.takewhile","lodash.union","lodash.unionby","lodash.unionwith","lodash.uniq","lodash.uniqby","lodash.uniqwith","lodash.unzip","lodash.unzipwith","lodash.without","lodash.xor","lodash.xorby","lodash.xorwith","lodash.zip","lodash.zipobject","lodash.zipobjectdeep","lodash.zipwith","lodash.countby","lodash.every","lodash.filter","lodash.find","lodash.findlast","lodash.flatmap","lodash.flatmapdeep","lodash.flatmapdepth","lodash.foreach","lodash.foreachright","lodash.groupby","lodash.includes","lodash.invokemap","lodash.keyby","lodash.map","lodash.orderby","lodash.partition","lodash.reduce","lodash.reduceright","lodash.reject","lodash.sample","lodash.samplesize","lodash.shuffle","lodash.size","lodash.some","lodash.sortby","lodash.now","lodash.after","lodash.ary","lodash.before","lodash.bind","lodash.bindkey","lodash.curry","lodash.curryright","lodash.debounce","lodash.defer","lodash.delay","lodash.flip","lodash.memoize","lodash.negate","lodash.once","lodash.overargs","lodash.partial","lodash.partialright","lodash.rearg","lodash.rest","lodash.spread","lodash.throttle","lodash.unary","lodash.wrap","lodash.castarray","lodash.clone","lodash.clonedeep","lodash.clonedeepwith","lodash.clonewith","lodash.conformsto","lodash.eq","lodash.gt","lodash.gte","lodash.isarguments","lodash.isarray","lodash.isarraybuffer","lodash.isarraylike","lodash.isarraylikeobject","lodash.isboolean","lodash.isbuffer","lodash.isdate","lodash.iselement","lodash.isempty","lodash.isequal","lodash.isequalwith","lodash.iserror","lodash.isfinite","lodash.isfunction","lodash.isinteger","lodash.islength","lodash.ismap","lodash.ismatch","lodash.ismatchwith","lodash.isnan","lodash.isnative","lodash.isnil","lodash.isnull","lodash.isnumber","lodash.isobject","lodash.isobjectlike","lodash.isplainobject","lodash.isregexp","lodash.issafeinteger","lodash.isset","lodash.isstring","lodash.issymbol","lodash.istypedarray","lodash.isundefined","lodash.isweakmap","lodash.isweakset","lodash.lt","lodash.lte","lodash.toarray","lodash.tofinite","lodash.tointeger","lodash.tolength","lodash.tonumber","lodash.toplainobject","lodash.tosafeinteger","lodash.tostring","lodash.add","lodash.ceil","lodash.divide","lodash.floor","lodash.max","lodash.maxby","lodash.mean","lodash.meanby","lodash.min","lodash.minby","lodash.multiply","lodash.round","lodash.subtract","lodash.sum","lodash.sumby","lodash.clamp","lodash.inrange","lodash.random","lodash.assign","lodash.assignin","lodash.assigninwith","lodash.assignwith","lodash.at","lodash.create","lodash.defaults","lodash.defaultsdeep","lodash.findkey","lodash.findlastkey","lodash.forin","lodash.forinright","lodash.forown","lodash.forownright","lodash.functions","lodash.functionsin","lodash.get","lodash.has","lodash.hasin","lodash.invert","lodash.invertby","lodash.invoke","lodash.keys","lodash.keysin","lodash.mapkeys","lodash.mapvalues","lodash.merge","lodash.mergewith","lodash.omit","lodash.omitby","lodash.pick","lodash.pickby","lodash.result","lodash.set","lodash.setwith","lodash.topairs","lodash.topairsin","lodash.transform","lodash.unset","lodash.update","lodash.updatewith","lodash.values","lodash.valuesin","lodash.chain","lodash.tap","lodash.thru","lodash.camelcase","lodash.capitalize","lodash.deburr","lodash.endswith","lodash.escape","lodash.escaperegexp","lodash.kebabcase","lodash.lowercase","lodash.lowerfirst","lodash.pad","lodash.padend","lodash.padstart","lodash.parseint","lodash.repeat","lodash.replace","lodash.snakecase","lodash.split","lodash.startcase","lodash.startswith","lodash.template","lodash.tolower","lodash.toupper","lodash.trim","lodash.trimend","lodash.trimstart","lodash.truncate","lodash.unescape","lodash.uppercase","lodash.upperfirst","lodash.words","lodash.attempt","lodash.bindall","lodash.cond","lodash.conforms","lodash.constant","lodash.defaultto","lodash.flow","lodash.flowright","lodash.identity","lodash.iteratee","lodash.matches","lodash.matchesproperty","lodash.method","lodash.methodof","lodash.mixin","lodash.noconflict","lodash.noop","lodash.ntharg","lodash.over","lodash.overevery","lodash.oversome","lodash.property","lodash.propertyof","lodash.range","lodash.rangeright","lodash.runincontext","lodash.stubarray","lodash.stubfalse","lodash.stubobject","lodash.stubstring","lodash.stubtrue","lodash.times","lodash.topath","lodash.uniqueid"]),playwright:S=g.hasPackageJsonAnyDependency(s,["playwright","eslint-plugin-playwright"]),pnpm:W=t,react:J=p||g.hasPackageJsonAnyDependency(s,["eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"]),reactCompiler:z=b,regexp:I=!0,silent:T=!1,storybook:F=g.hasPackageJsonAnyDependency(s,["storybook","eslint-plugin-storybook"]),tailwindcss:j=h||x,tanstackQuery:U=g.hasPackageJsonAnyDependency(s,["@tanstack/react-query"]),tanstackRouter:M=g.hasPackageJsonAnyDependency(s,["@tanstack/react-router"]),testingLibrary:C=g.hasPackageJsonAnyDependency(s,["@testing-library/dom","@testing-library/react"]),tsdoc:ne=!1,typescript:ae=g.hasPackageJsonAnyDependency(s,["typescript"]),unicorn:xe=!0,unocss:ie=!1,vitest:we=g.hasPackageJsonAnyDependency(s,["vitest"]),zod:le=g.hasPackageJsonAnyDependency(s,["zod"])}=e;if(c){let f=[];le&&f.push("eslint-plugin-zod"),ie&&f.push("@unocss/eslint-plugin"),U&&f.push("@tanstack/eslint-plugin-query"),M&&f.push("@tanstack/eslint-plugin-router"),(R||j)&&(f.push("@eslint/css"),(j&&x||j==="v4")&&f.push("tailwind-csstree")),(j&&h||j==="v3")&&f.push("eslint-plugin-tailwindcss"),F&&f.push("eslint-plugin-storybook"),J&&f.push("eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),J&&z&&f.push("eslint-plugin-react-compiler"),C&&f.push("eslint-plugin-testing-library"),_&&f.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),A&&f.push("eslint-plugin-you-dont-need-lodash-underscore"),ne&&f.push("eslint-plugin-tsdoc"),e.formatters&&f.push("eslint-plugin-format"),S&&f.push("eslint-plugin-playwright"),k&&(f.push("eslint-plugin-astro","astro-eslint-parser"),typeof e.formatters=="object"&&e.formatters.astro&&f.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters.markdown&&e.formatters.slidev&&f.push("prettier-plugin-slidev"),(e.formatters.xml||e.formatters.svg)&&f.push("@prettier/plugin-xml")),f=f.filter(Boolean),f.length>0&&await g.ensurePackages(s,f,"devDependencies",{confirm:{message:X(V=>`@anolilab/eslint-config requires the following ${V.length===1?"package":"packages"} to be installed:
|
|
15
|
+
`),M=await l(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:q,"react-dom":T["@eslint-react/dom"],"react-hooks":N,"react-hooks-extra":T["@eslint-react/hooks-extra"],"react-naming-convention":T["@eslint-react/naming-convention"],"react-perf":A,"react-refresh":_,"react-web-api":T["@eslint-react/web-api"],"react-x":T["@eslint-react"],"react-you-might-not-need-an-effect":S,...j&&M?M.configs.recommended.plugins:{}}},{files:o,languageOptions:{globals:{...B.browser},parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{...R.configs["disable-conflict-eslint-plugin-react"]?.rules,"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":["error",{...oe,allow:[...oe.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-naming-convention/component-name":"error","react-naming-convention/context-name":"error","react-naming-convention/filename":"off","react-naming-convention/use-state":"error","react-refresh/only-export-components":["error",{allowConstantExport:W,allowExportNames:[...z?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...J||I?["meta","links","headers","loader","action","clientLoader","clientAction","handle","shouldRevalidate"]:[]]}],"react-web-api/no-leaked-event-listener":"error","react-web-api/no-leaked-interval":"error","react-web-api/no-leaked-resize-observer":"error","react-web-api/no-leaked-timeout":"error","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-shorthand-boolean":"error","react-x/jsx-shorthand-fragment":"error","react-x/jsx-uses-react":U?"off":"error","react-x/jsx-uses-vars":"error","react-x/no-access-state-in-setstate":"error","react-x/no-array-index-key":"error","react-x/no-children-count":"error","react-x/no-children-for-each":"error","react-x/no-children-map":"error","react-x/no-children-only":"error","react-x/no-children-prop":"off","react-x/no-children-to-array":"error","react-x/no-class-component":"off","react-x/no-clone-element":"error","react-x/no-component-will-mount":"error","react-x/no-component-will-receive-props":"error","react-x/no-component-will-update":"error","react-x/no-context-provider":"error","react-x/no-create-ref":"error","react-x/no-default-props":"error","react-x/no-direct-mutation-state":"error","react-x/no-duplicate-key":"error","react-x/no-forward-ref":"error","react-x/no-implicit-key":"error","react-x/no-missing-component-display-name":"off","react-x/no-missing-context-display-name":"off","react-x/no-missing-key":"error","react-x/no-misused-capture-owner-stack":"off","react-x/no-nested-component-definitions":"error","react-x/no-nested-lazy-component-declarations":"error","react-x/no-prop-types":"error","react-x/no-redundant-should-component-update":"error","react-x/no-set-state-in-component-did-mount":"error","react-x/no-set-state-in-component-did-update":"error","react-x/no-set-state-in-component-will-update":"error","react-x/no-string-refs":"error","react-x/no-unnecessary-use-callback":"error","react-x/no-unnecessary-use-memo":"error","react-x/no-unsafe-component-will-mount":"error","react-x/no-unsafe-component-will-receive-props":"error","react-x/no-unsafe-component-will-update":"error","react-x/no-unstable-context-value":"error","react-x/no-unstable-default-props":"error","react-x/no-unused-class-component-members":"error","react-x/no-unused-state":"error","react-x/no-use-context":"error","react-x/no-useless-forward-ref":"error","react-x/no-useless-fragment":"off","react-x/prefer-destructuring-assignment":"off","react-x/prefer-read-only-props":"off","react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["error",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",k,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",k],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"off","react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"off","react/jsx-no-useless-fragment":"off","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":"off","react/jsx-uses-vars":"off","react/no-access-state-in-setstate":"off","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"off","react/no-children-prop":"off","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"off","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"off","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"off","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"off","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":"off","react/react-in-jsx-scope":U?"off":"error","react/require-default-props":"off","react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","static public field"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...j&&M?{"react-compiler/react-compiler":"error","react-hooks/component-hook-factories":"error","react-hooks/config":"error","react-hooks/error-boundaries":"error","react-hooks/gating":"error","react-hooks/globals":"error","react-hooks/immutability":"error","react-hooks/incompatible-library":"warn","react-hooks/preserve-manual-memoization":"error","react-hooks/purity":"error","react-hooks/refs":"error","react-hooks/set-state-in-effect":"error","react-hooks/set-state-in-render":"error","react-hooks/static-components":"error","react-hooks/unsupported-syntax":"warn","react-hooks/use-memo":"error"}:{},...A.configs.flat.recommended.rules,...S.configs.recommended.rules,...U?q?.configs.flat?.["jsx-runtime"]?.rules:{},...c?{"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off"}:{},...t},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:F??"detect"},"react-x":{version:F??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}},...U?q.configs.flat["jsx-runtime"].languageOptions.parserOptions:{}},name:"anolilab/react/jsx",rules:{"react-x/naming-convention/filename-extension":["error","as-needed"],"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"off","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"},settings:{extensions:[".jsx"]}},{files:["**/*.tsx"],name:"anolilab/react/tsx",rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:n.getFilesGlobs("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...O?[{files:s,ignores:x,name:"anolilab/react/type-aware-rules",rules:{...$}}]:[]]}),Er=n.createConfig("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,a=Ee.configs["flat/recommended"],c={...a.rules};if(s==="warn")for(const p in c)c[p]==="error"&&(c[p]="warn");return[{...a,files:o,name:"anolilab/regexp/rules",rules:{...c,...t}}]}),qr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-simple-import-sort"));return[{files:o,name:"anolilab/simple-import-sort",plugins:{"simple-import-sort":t},rules:{"simple-import-sort/exports":"error","simple-import-sort/imports":"error",...s}}]}),Ar=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-sonarjs"));return[{name:"anolilab/sonarjs/plugin",plugins:{sonarjs:t}},{files:o,name:"anolilab/sonarjs/rules",rules:{...t.configs.recommended.rules,"sonarjs/file-name-differ-from-class":"error","sonarjs/no-collapsible-if":"error","sonarjs/no-nested-template-literals":"off","sonarjs/no-tab":"error","sonarjs/todo-tag":"off",...s}},{files:n.getFilesGlobs("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:n.getFilesGlobs("js"),languageOptions:{ecmaVersion:"latest"},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off","sonarjs/public-static-readonly":"off"}}]}),Ir=n.createConfig("storybook",async e=>{const{overrides:r}=e,o=[...(await l(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),Tr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await l(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),Nr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),Jr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),Ur=n.createConfig("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await l(import("eslint-plugin-testing-library")),c=g.hasPackageJsonAnyDependency(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":a},rules:{...a.configs["flat/dom"].rules,...c?a.configs["flat/react"].rules:{},...s}}]}),Lr=n.createConfig("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:a=2}=typeof t=="boolean"?{}:t,[c,p]=await Promise.all([l(import("eslint-plugin-toml")),l(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:p},name:"anolilab/toml",plugins:{toml:c},rules:{...t?{"@stylistic/spaced-comment":"off"}:{},"toml/comma-style":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error",...t?{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"error","toml/indent":["error",a==="tab"?2:a],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error"}:{},...s}}]}),$r=n.createConfig("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),te={"init-declarations":"off","no-catch-shadow":"off","no-delete-var":"error","no-label-var":"error","no-restricted-globals":["error",{message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",name:"isFinite"},{message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",name:"isNaN"},...Ie.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":"off","no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Rr=n.createConfig("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:te},{files:n.getFilesGlobs("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Mr=Object.defineProperty,Gr=v((e,r)=>Mr(e,"name",{value:r,configurable:!0}),"w");const zr=n.createConfig("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:a,overridesTypeAware:c,parserOptions:p,prettier:u}=e,b=be,h=ge(t),[x,O]=await Promise.all([l(import("typescript-eslint")),l(import("eslint-plugin-no-for-of-array"))]);let k;p?.erasableSyntaxOnly&&(k=await l(import("eslint-plugin-erasable-syntax-only")));const $=e.filesTypeAware??n.getFilesGlobs("ts"),R=[...n.getFilesGlobs("astro"),...n.getFilesGlobs("markdown"),...n.getFilesGlobs("markdown_inline_js_jsx"),...n.getFilesGlobs("js"),...n.getFilesGlobs("jsx"),"**/*.json","**/*.jsonc",...e.ignoresTypeAware??[]],{tsconfigPath:q}=e;let{isTypeAware:N=!0}=e;N=N&&q!==void 0;const _=Gr((S,W,J)=>{const z=fe.dirname(qe.fileURLToPath(typeof document>"u"?require("url").pathToFileURL(__filename).href:re&&re.tagName.toUpperCase()==="SCRIPT"&&re.src||new URL("index.cjs",document.baseURI).href));return{files:[...W,...o.map(I=>`**/*.${I}`)],...J?{ignores:J}:{},languageOptions:{parser:x.parser,parserOptions:{extraFileExtensions:o.map(I=>`.${I}`),sourceType:"module",...S?{projectService:!0,tsconfigRootDir:z}:{},...p}},name:`anolilab/typescript/${S?"type-aware-parser":"parser"}`}},"makeParser"),A=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":x.plugin,"no-for-of-array":O,...k?k.configs.recommended.plugins:{}}},...N?[_(!1,s),_(!0,$,R)]:[_(!1,s)],...x.configs.strict];return N&&A.push(...x.configs.strictTypeCheckedOnly,{files:[...$,...o.map(S=>`**/*.${S}`)],name:"anolilab/typescript/rules-type-aware",rules:{"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error",...c}},{files:n.getFilesGlobs("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),A.push({files:s,name:"anolilab/typescript/rules",rules:{"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-ts-comment":["error",{minimumDescriptionLength:3,"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":"allow-with-description","ts-nocheck":!0}],"@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/method-signature-style":"error","@typescript-eslint/naming-convention":["error",{format:["camelCase","PascalCase","UPPER_CASE"],selector:"variable"},{format:["camelCase","PascalCase"],selector:"function"},{format:["PascalCase"],selector:"typeLike"}],"@typescript-eslint/no-array-constructor":b["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":h["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":G["no-empty-function"],"@typescript-eslint/no-explicit-any":["error",{fixToUnknown:!1,ignoreRestArgs:!0}],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-loop-func":G["no-loop-func"],"@typescript-eslint/no-magic-numbers":G["no-magic-numbers"],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redeclare":G["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":te["no-shadow"],"@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unused-expressions":G["no-unused-expressions"],"@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":te["no-use-before-define"],"@typescript-eslint/no-useless-constructor":h["no-useless-constructor"],"@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"off","@typescript-eslint/prefer-ts-expect-error":"off","@typescript-eslint/return-await":G["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":b["space-infix-ops"],...k?k.configs.recommended.rules:{},...a,...u?{"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":0,"@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/quotes":0,"@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"}:{}}}),A}),Vr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:a,stylistic:c=!0}=e,{indent:p=4}=typeof c=="boolean"?{}:c,u=await l(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:B.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:u}},{files:o,name:"anolilab/unicorn/rules",rules:{...u.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/import-style":["error",{styles:{"node:path":{named:!0},"node:util":{named:!0},path:{named:!0},util:{named:!0}}}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","unicorn/no-nested-ternary":"off","unicorn/no-useless-undefined":"off","unicorn/prefer-at":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":t.type==="module"?"error":"off","unicorn/prefer-node-protocol":"error","unicorn/prefer-ternary":["error","only-single-line"],"unicorn/prevent-abbreviations":["error",{allowList:{i:!0,j:!0},replacements:{args:!1,dev:!1,dist:!1,env:!1,params:!1,pkg:!1,prop:!1,props:!1,ref:!1,src:!1,utils:!1}}],...a?{"unicorn/empty-brace-spaces":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}:{"unicorn/template-indent":["error",{indent:p}]},...s}},{files:["tsconfig.dev.json","tsconfig.prod.json"],name:"anolilab/unicorn/tsconfig-overrides",rules:{"unicorn/prevent-abbreviations":"off"}},{files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],name:"anolilab/unicorn/ts-overrides",rules:{"unicorn/import-style":"off"}}]});var Wr=Object.defineProperty,Br=v((e,r)=>Wr(e,"name",{value:r,configurable:!0}),"n$2");const Xr=Br(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await l(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Hr=n.createConfig("all",async(e,r)=>{const{files:o=r,isInEditor:s,overrides:t}=e,a=await l(import("eslint-plugin-unused-imports"));return[{files:o,name:"anolilab/unused-imports/rules",plugins:{"unused-imports":a},rules:{"@typescript-eslint/no-unused-vars":"off","no-unused-vars":"off","unused-imports/no-unused-imports":s?"off":"error","unused-imports/no-unused-vars":[s?"warn":"error",{args:"after-used",argsIgnorePattern:"^_",vars:"all",varsIgnorePattern:"^_"}],...t}}]}),Kr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-validate-jsx-nesting"));return[{files:o,name:"anolilab/validate-jsx-nesting/setup",plugins:{"validate-jsx-nesting":t},rules:{"validate-jsx-nesting/no-invalid-jsx-nesting":"error",...s}}]}),Qr={suite:!0,test:!0,chai:!0,describe:!0,it:!0,expectTypeOf:!0,assertType:!0,expect:!0,assert:!0,vitest:!0,vi:!0,beforeAll:!0,afterAll:!0,beforeEach:!0,afterEach:!0,onTestFailed:!0,onTestFinished:!0};let se;const Yr=n.createConfig("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:a,tsconfigPath:c}=e,[p,u]=await Promise.all([l(import("@vitest/eslint-plugin")),l(import("eslint-plugin-no-only-tests"))]);return se=se??{...p,rules:{...p.rules,...u.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:se}},{files:o,...c?{...p.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Qr}},name:"anolilab/vitest/rules",rules:{...p.configs.all.rules,...p.configs.recommended.rules,"@typescript-eslint/explicit-function-return-type":"off","antfu/no-top-level-await":"off","n/prefer-global/process":"off","no-unused-expressions":"off","vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/max-expects":"off","vitest/no-hooks":"off","vitest/no-mocks-import":"off","vitest/no-only-tests":s?"off":"error","vitest/no-restricted-vi-methods":"off","vitest/no-standalone-expect":"error","vitest/valid-expect":["error",{alwaysAwait:!0,maxArgs:2,minArgs:1}],"vitest/valid-title":"off",...t,...a?{"vitest/padding-around-after-all-blocks":"off","vitest/padding-around-after-each-blocks":"off","vitest/padding-around-all":"off","vitest/padding-around-before-all-blocks":"off","vitest/padding-around-before-each-blocks":"off","vitest/padding-around-describe-blocks":"off","vitest/padding-around-expect-blocks":"off","vitest/padding-around-test-blocks":"off"}:{}}}]}),Zr=n.createConfig("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:a=!0}=e,{indent:c=4,quotes:p="double"}=typeof a=="boolean"?{}:a,[u,b]=await Promise.all([l(import("eslint-plugin-yml")),l(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:b},name:"anolilab/yaml",plugins:{yaml:u},rules:{"@stylistic/spaced-comment":"off","yaml/block-mapping":"error","yaml/block-sequence":"error","yaml/no-empty-key":"error","yaml/no-empty-sequence-entry":"error","yaml/no-irregular-whitespace":"error","yaml/plain-scalar":"error","yaml/vue-custom-block/no-parsing-error":"error",...a?{"yaml/block-mapping-question-indicator-newline":"error","yaml/block-sequence-hyphen-indicator-newline":"error","yaml/flow-mapping-curly-newline":"error","yaml/flow-mapping-curly-spacing":"error","yaml/flow-sequence-bracket-newline":"error","yaml/flow-sequence-bracket-spacing":"error","yaml/indent":[t?"off":"error",c==="tab"?2:c],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:p==="backtick"?"single":p}],"yaml/spaced-comment":"error"}:{},...t?u.configs.prettier.rules:{},...s}}]}),es=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ue.fixupPluginRules(t)},rules:{...t.configs.all.rules,...s}}]}),rs=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await l(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var ss=Object.defineProperty,os=v((e,r)=>ss(e,"name",{value:r,configurable:!0}),"e$1");const ts=os(()=>!!(process.env.GIT_PARAMS??process.env.VSCODE_GIT_COMMAND??process.env.npm_lifecycle_script?.startsWith("lint-staged")??!1),"isInGitHooksOrLintStaged");var ns=Object.defineProperty,as=v((e,r)=>ns(e,"name",{value:r,configurable:!0}),"e");const is=as(()=>process.env.CI||ts()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var ls=Object.defineProperty,X=v((e,r)=>ls(e,"name",{value:r,configurable:!0}),"f");const cs=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],H=X((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),d=X((e,r)=>{const o=H(e,r);return{..."overrides"in o?o.overrides:{}}},"getOverrides"),y=X((e,r)=>{const o=H(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),ps=X(async(e={},...r)=>{if("files"in e)throw new Error('[@anolilab/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');const o=e.cwd??process.cwd(),s=await g.parsePackageJson(fe.join(o,"package.json"),{resolveCatalogs:!0}),t=s.packageManager?.startsWith("pnpm"),a=g.hasPackageJsonAnyDependency(s,["prettier"]),c=g.hasPackageJsonAnyDependency(s,["@anolilab/eslint-config"]),p=g.hasPackageJsonAnyDependency(s,["react","react-dom"]),u=s.dependencies?.react??s.devDependencies?.react;let b=!1;if(u!==void 0){const f=Q.parse(u);f?.major&&f.major>=19&&(b=!0)}let h=!1,x=!1;const O=s.dependencies?.tailwindcss??s.devDependencies?.tailwindcss;if(O){const f=Q.parse(O);f?.major&&f.major<=3&&(h=!0),f?.major&&f.major>=4&&(x=!0)}const{astro:k=g.hasPackageJsonAnyDependency(s,["astro"]),componentExts:$=[],css:R=g.hasPackageJsonAnyDependency(s,["postcss","cssnano"]),gitignore:q=!0,html:N=!1,jsx:_=g.hasPackageJsonAnyDependency(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||p,lodash:A=g.hasPackageJsonAnyDependency(s,["lodash","underscore","lodash-es","@types/lodash","lodash.chunk","lodash.compact","lodash.concat","lodash.difference","lodash.differenceby","lodash.differencewith","lodash.drop","lodash.dropright","lodash.droprightwhile","lodash.dropwhile","lodash.fill","lodash.findindex","lodash.findlastindex","lodash.flatten","lodash.flattendeep","lodash.flattendepth","lodash.frompairs","lodash.head","lodash.indexof","lodash.initial","lodash.intersection","lodash.intersectionby","lodash.intersectionwith","lodash.join","lodash.last","lodash.lastindexof","lodash.nth","lodash.pull","lodash.pullall","lodash.pullallby","lodash.pullallwith","lodash.pullat","lodash.remove","lodash.reverse","lodash.slice","lodash.sortedindex","lodash.sortedindexby","lodash.sortedindexof","lodash.sortedlastindex","lodash.sortedlastindexby","lodash.sortedlastindexof","lodash.sorteduniq","lodash.sorteduniqby","lodash.tail","lodash.take","lodash.takeright","lodash.takerightwhile","lodash.takewhile","lodash.union","lodash.unionby","lodash.unionwith","lodash.uniq","lodash.uniqby","lodash.uniqwith","lodash.unzip","lodash.unzipwith","lodash.without","lodash.xor","lodash.xorby","lodash.xorwith","lodash.zip","lodash.zipobject","lodash.zipobjectdeep","lodash.zipwith","lodash.countby","lodash.every","lodash.filter","lodash.find","lodash.findlast","lodash.flatmap","lodash.flatmapdeep","lodash.flatmapdepth","lodash.foreach","lodash.foreachright","lodash.groupby","lodash.includes","lodash.invokemap","lodash.keyby","lodash.map","lodash.orderby","lodash.partition","lodash.reduce","lodash.reduceright","lodash.reject","lodash.sample","lodash.samplesize","lodash.shuffle","lodash.size","lodash.some","lodash.sortby","lodash.now","lodash.after","lodash.ary","lodash.before","lodash.bind","lodash.bindkey","lodash.curry","lodash.curryright","lodash.debounce","lodash.defer","lodash.delay","lodash.flip","lodash.memoize","lodash.negate","lodash.once","lodash.overargs","lodash.partial","lodash.partialright","lodash.rearg","lodash.rest","lodash.spread","lodash.throttle","lodash.unary","lodash.wrap","lodash.castarray","lodash.clone","lodash.clonedeep","lodash.clonedeepwith","lodash.clonewith","lodash.conformsto","lodash.eq","lodash.gt","lodash.gte","lodash.isarguments","lodash.isarray","lodash.isarraybuffer","lodash.isarraylike","lodash.isarraylikeobject","lodash.isboolean","lodash.isbuffer","lodash.isdate","lodash.iselement","lodash.isempty","lodash.isequal","lodash.isequalwith","lodash.iserror","lodash.isfinite","lodash.isfunction","lodash.isinteger","lodash.islength","lodash.ismap","lodash.ismatch","lodash.ismatchwith","lodash.isnan","lodash.isnative","lodash.isnil","lodash.isnull","lodash.isnumber","lodash.isobject","lodash.isobjectlike","lodash.isplainobject","lodash.isregexp","lodash.issafeinteger","lodash.isset","lodash.isstring","lodash.issymbol","lodash.istypedarray","lodash.isundefined","lodash.isweakmap","lodash.isweakset","lodash.lt","lodash.lte","lodash.toarray","lodash.tofinite","lodash.tointeger","lodash.tolength","lodash.tonumber","lodash.toplainobject","lodash.tosafeinteger","lodash.tostring","lodash.add","lodash.ceil","lodash.divide","lodash.floor","lodash.max","lodash.maxby","lodash.mean","lodash.meanby","lodash.min","lodash.minby","lodash.multiply","lodash.round","lodash.subtract","lodash.sum","lodash.sumby","lodash.clamp","lodash.inrange","lodash.random","lodash.assign","lodash.assignin","lodash.assigninwith","lodash.assignwith","lodash.at","lodash.create","lodash.defaults","lodash.defaultsdeep","lodash.findkey","lodash.findlastkey","lodash.forin","lodash.forinright","lodash.forown","lodash.forownright","lodash.functions","lodash.functionsin","lodash.get","lodash.has","lodash.hasin","lodash.invert","lodash.invertby","lodash.invoke","lodash.keys","lodash.keysin","lodash.mapkeys","lodash.mapvalues","lodash.merge","lodash.mergewith","lodash.omit","lodash.omitby","lodash.pick","lodash.pickby","lodash.result","lodash.set","lodash.setwith","lodash.topairs","lodash.topairsin","lodash.transform","lodash.unset","lodash.update","lodash.updatewith","lodash.values","lodash.valuesin","lodash.chain","lodash.tap","lodash.thru","lodash.camelcase","lodash.capitalize","lodash.deburr","lodash.endswith","lodash.escape","lodash.escaperegexp","lodash.kebabcase","lodash.lowercase","lodash.lowerfirst","lodash.pad","lodash.padend","lodash.padstart","lodash.parseint","lodash.repeat","lodash.replace","lodash.snakecase","lodash.split","lodash.startcase","lodash.startswith","lodash.template","lodash.tolower","lodash.toupper","lodash.trim","lodash.trimend","lodash.trimstart","lodash.truncate","lodash.unescape","lodash.uppercase","lodash.upperfirst","lodash.words","lodash.attempt","lodash.bindall","lodash.cond","lodash.conforms","lodash.constant","lodash.defaultto","lodash.flow","lodash.flowright","lodash.identity","lodash.iteratee","lodash.matches","lodash.matchesproperty","lodash.method","lodash.methodof","lodash.mixin","lodash.noconflict","lodash.noop","lodash.ntharg","lodash.over","lodash.overevery","lodash.oversome","lodash.property","lodash.propertyof","lodash.range","lodash.rangeright","lodash.runincontext","lodash.stubarray","lodash.stubfalse","lodash.stubobject","lodash.stubstring","lodash.stubtrue","lodash.times","lodash.topath","lodash.uniqueid"]),playwright:S=g.hasPackageJsonAnyDependency(s,["playwright","eslint-plugin-playwright"]),pnpm:W=t,react:J=p||g.hasPackageJsonAnyDependency(s,["eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"]),reactCompiler:z=b,regexp:I=!0,silent:T=!1,storybook:F=g.hasPackageJsonAnyDependency(s,["storybook","eslint-plugin-storybook"]),tailwindcss:j=h||x,tanstackQuery:U=g.hasPackageJsonAnyDependency(s,["@tanstack/react-query"]),tanstackRouter:M=g.hasPackageJsonAnyDependency(s,["@tanstack/react-router"]),testingLibrary:C=g.hasPackageJsonAnyDependency(s,["@testing-library/dom","@testing-library/react"]),tsdoc:ne=!1,typescript:ae=g.hasPackageJsonAnyDependency(s,["typescript"]),unicorn:xe=!0,unocss:ie=!1,vitest:we=g.hasPackageJsonAnyDependency(s,["vitest"]),zod:le=g.hasPackageJsonAnyDependency(s,["zod"])}=e;if(c){let f=[];le&&f.push("eslint-plugin-zod"),ie&&f.push("@unocss/eslint-plugin"),U&&f.push("@tanstack/eslint-plugin-query"),M&&f.push("@tanstack/eslint-plugin-router"),(R||j)&&(f.push("@eslint/css"),(j&&x||j==="v4")&&f.push("tailwind-csstree")),(j&&h||j==="v3")&&f.push("eslint-plugin-tailwindcss"),F&&f.push("eslint-plugin-storybook"),J&&f.push("eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),J&&z&&f.push("eslint-plugin-react-compiler"),C&&f.push("eslint-plugin-testing-library"),_&&f.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),A&&f.push("eslint-plugin-you-dont-need-lodash-underscore"),ne&&f.push("eslint-plugin-tsdoc"),e.formatters&&f.push("eslint-plugin-format"),S&&f.push("eslint-plugin-playwright"),k&&(f.push("eslint-plugin-astro","astro-eslint-parser"),typeof e.formatters=="object"&&e.formatters.astro&&f.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters.markdown&&e.formatters.slidev&&f.push("prettier-plugin-slidev"),(e.formatters.xml||e.formatters.svg)&&f.push("@prettier/plugin-xml")),f=f.filter(Boolean),f.length>0&&await g.ensurePackages(s,f,"devDependencies",{confirm:{message:X(V=>`@anolilab/eslint-config requires the following ${V.length===1?"package":"packages"} to be installed:
|
|
16
16
|
|
|
17
17
|
"${V.join(`"
|
|
18
18
|
"`)}"
|
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ Please remove "eslint-plugin-typescript-sort-keys" from your package.json, it co
|
|
|
14
14
|
Following rules are disabled: "react/jsx-uses-react" and "react/react-in-jsx-scope".
|
|
15
15
|
If you dont use the new react jsx-runtime in you project, please enable it manually.
|
|
16
16
|
`))}j=j&&l!==!1;let J;return j&&(console.info(`@anolilab/eslint-config enabling react-compiler plugin
|
|
17
|
-
`),J=await a(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:I,"react-dom":F["@eslint-react/dom"],"react-hooks":A,"react-hooks-extra":F["@eslint-react/hooks-extra"],"react-naming-convention":F["@eslint-react/naming-convention"],"react-perf":T,"react-refresh":E,"react-web-api":F["@eslint-react/web-api"],"react-x":F["@eslint-react"],"react-you-might-not-need-an-effect":_,...j&&J?J.configs.recommended.plugins:{}}},{files:o,languageOptions:{globals:{...G.browser},parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{...R.configs["disable-conflict-eslint-plugin-react"]?.rules,"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":["error",{...re,allow:[...re.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-naming-convention/component-name":"error","react-naming-convention/context-name":"error","react-naming-convention/filename":"off","react-naming-convention/use-state":"error","react-refresh/only-export-components":["error",{allowConstantExport:B,allowExportNames:[...V?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...U||N?["meta","links","headers","loader","action","clientLoader","clientAction","handle","shouldRevalidate"]:[]]}],"react-web-api/no-leaked-event-listener":"error","react-web-api/no-leaked-interval":"error","react-web-api/no-leaked-resize-observer":"error","react-web-api/no-leaked-timeout":"error","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-shorthand-boolean":"error","react-x/jsx-shorthand-fragment":"error","react-x/jsx-uses-react":$?"off":"error","react-x/jsx-uses-vars":"error","react-x/no-access-state-in-setstate":"error","react-x/no-array-index-key":"error","react-x/no-children-count":"error","react-x/no-children-for-each":"error","react-x/no-children-map":"error","react-x/no-children-only":"error","react-x/no-children-prop":"off","react-x/no-children-to-array":"error","react-x/no-class-component":"off","react-x/no-clone-element":"error","react-x/no-component-will-mount":"error","react-x/no-component-will-receive-props":"error","react-x/no-component-will-update":"error","react-x/no-context-provider":"error","react-x/no-create-ref":"error","react-x/no-default-props":"error","react-x/no-direct-mutation-state":"error","react-x/no-duplicate-key":"error","react-x/no-forward-ref":"error","react-x/no-implicit-key":"error","react-x/no-missing-component-display-name":"off","react-x/no-missing-context-display-name":"off","react-x/no-missing-key":"error","react-x/no-misused-capture-owner-stack":"off","react-x/no-nested-component-definitions":"error","react-x/no-nested-lazy-component-declarations":"error","react-x/no-prop-types":"error","react-x/no-redundant-should-component-update":"error","react-x/no-set-state-in-component-did-mount":"error","react-x/no-set-state-in-component-did-update":"error","react-x/no-set-state-in-component-will-update":"error","react-x/no-string-refs":"error","react-x/no-unnecessary-use-callback":"error","react-x/no-unnecessary-use-memo":"error","react-x/no-unsafe-component-will-mount":"error","react-x/no-unsafe-component-will-receive-props":"error","react-x/no-unsafe-component-will-update":"error","react-x/no-unstable-context-value":"error","react-x/no-unstable-default-props":"error","react-x/no-unused-class-component-members":"error","react-x/no-unused-state":"error","react-x/no-use-context":"error","react-x/no-useless-forward-ref":"error","react-x/no-useless-fragment":"off","react-x/prefer-destructuring-assignment":"off","react-x/prefer-read-only-props":"off","react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["error",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",k,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",k],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"off","react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"off","react/jsx-no-useless-fragment":"off","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":"off","react/jsx-uses-vars":"off","react/no-access-state-in-setstate":"off","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"off","react/no-children-prop":"off","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"off","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"off","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"off","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"off","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":"off","react/react-in-jsx-scope":$?"off":"error","react/require-default-props":"off","react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","static public field"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...j&&J?{"react-compiler/react-compiler":"error","react-hooks/component-hook-factories":"error","react-hooks/config":"error","react-hooks/error-boundaries":"error","react-hooks/gating":"error","react-hooks/globals":"error","react-hooks/immutability":"error","react-hooks/incompatible-library":"warn","react-hooks/preserve-manual-memoization":"error","react-hooks/purity":"error","react-hooks/refs":"error","react-hooks/set-state-in-effect":"error","react-hooks/set-state-in-render":"error","react-hooks/static-components":"error","react-hooks/unsupported-syntax":"warn","react-hooks/use-memo":"error"}:{},...T.configs.flat.recommended.rules,..._.configs.recommended.rules,...$?I?.configs.flat?.["jsx-runtime"]?.rules:{},...i?{"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off"}:{},...t},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:D??"detect"},"react-x":{version:D??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}},...$?I.configs.flat["jsx-runtime"].languageOptions.parserOptions:{}},name:"anolilab/react/jsx",rules:{"react-x/naming-convention/filename-extension":["error","as-needed"],"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"off","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"},settings:{extensions:[".jsx"]}},{files:["**/*.tsx"],name:"anolilab/react/tsx",rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:p("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...C?[{files:s,ignores:x,name:"anolilab/react/type-aware-rules",rules:{...M}}]:[]]}),Cr=f("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,n=Se["flat/recommended"],i={...n.rules};if(s==="warn")for(const l in i)i[l]==="error"&&(i[l]="warn");return[{...n,files:o,name:"anolilab/regexp/rules",rules:{...i,...t}}]}),Sr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-simple-import-sort"));return[{files:o,name:"anolilab/simple-import-sort",plugins:{"simple-import-sort":t},rules:{"simple-import-sort/exports":"error","simple-import-sort/imports":"error",...s}}]}),Er=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-sonarjs"));return[{name:"anolilab/sonarjs/plugin",plugins:{sonarjs:t}},{files:o,name:"anolilab/sonarjs/rules",rules:{...t.configs.recommended.rules,"sonarjs/file-name-differ-from-class":"error","sonarjs/no-collapsible-if":"error","sonarjs/no-nested-template-literals":"off","sonarjs/no-tab":"error","sonarjs/todo-tag":"off",...s}},{files:p("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:p("js"),languageOptions:{ecmaVersion:"latest"},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off"}}]}),_r=f("storybook",async e=>{const{overrides:r}=e,o=[...(await a(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),Dr=f("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await a(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),qr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),Ir=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),Tr=f("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,n=await a(import("eslint-plugin-testing-library")),i=y(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":n},rules:{...n.configs["flat/dom"].rules,...i?n.configs["flat/react"].rules:{},...s}}]}),Nr=f("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:n=2}=typeof t=="boolean"?{}:t,[i,l]=await Promise.all([a(import("eslint-plugin-toml")),a(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:l},name:"anolilab/toml",plugins:{toml:i},rules:{...t?{"@stylistic/spaced-comment":"off"}:{},"toml/comma-style":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error",...t?{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"error","toml/indent":["error",n==="tab"?2:n],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error"}:{},...s}}]}),Fr=f("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),se={"init-declarations":"off","no-catch-shadow":"off","no-delete-var":"error","no-label-var":"error","no-restricted-globals":["error",{message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",name:"isFinite"},{message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",name:"isNaN"},..._e.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":"off","no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Ar=f("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:se},{files:p("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Ur=Object.defineProperty,$r=v((e,r)=>Ur(e,"name",{value:r,configurable:!0}),"w");const Lr=f("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:n,overridesTypeAware:i,parserOptions:l,prettier:d}=e,b=ue,h=pe(t),[x,C]=await Promise.all([a(import("typescript-eslint")),a(import("eslint-plugin-no-for-of-array"))]);let k;l?.erasableSyntaxOnly&&(k=await a(import("eslint-plugin-erasable-syntax-only")));const M=e.filesTypeAware??p("ts"),R=[...p("astro"),...p("markdown"),...p("markdown_inline_js_jsx"),...p("js"),...p("jsx"),"**/*.json","**/*.jsonc",...e.ignoresTypeAware??[]],{tsconfigPath:I}=e;let{isTypeAware:A=!0}=e;A=A&&I!==void 0;const E=$r((_,B,U)=>{const V=he(Ee(import.meta.url));return{files:[...B,...o.map(N=>`**/*.${N}`)],...U?{ignores:U}:{},languageOptions:{parser:x.parser,parserOptions:{extraFileExtensions:o.map(N=>`.${N}`),sourceType:"module",..._?{projectService:!0,tsconfigRootDir:V}:{},...l}},name:`anolilab/typescript/${_?"type-aware-parser":"parser"}`}},"makeParser"),T=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":x.plugin,"no-for-of-array":C,...k?k.configs.recommended.plugins:{}}},...A?[E(!1,s),E(!0,M,R)]:[E(!1,s)],...x.configs.strict];return A&&T.push(...x.configs.strictTypeCheckedOnly,{files:[...M,...o.map(_=>`**/*.${_}`)],name:"anolilab/typescript/rules-type-aware",rules:{"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error",...i}},{files:p("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),T.push({files:s,name:"anolilab/typescript/rules",rules:{"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-ts-comment":["error",{minimumDescriptionLength:3,"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":"allow-with-description","ts-nocheck":!0}],"@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/method-signature-style":"error","@typescript-eslint/naming-convention":["error",{format:["camelCase","PascalCase","UPPER_CASE"],selector:"variable"},{format:["camelCase","PascalCase"],selector:"function"},{format:["PascalCase"],selector:"typeLike"}],"@typescript-eslint/no-array-constructor":b["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":h["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":z["no-empty-function"],"@typescript-eslint/no-explicit-any":["error",{fixToUnknown:!1,ignoreRestArgs:!0}],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-loop-func":z["no-loop-func"],"@typescript-eslint/no-magic-numbers":z["no-magic-numbers"],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redeclare":z["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":se["no-shadow"],"@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unused-expressions":z["no-unused-expressions"],"@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":se["no-use-before-define"],"@typescript-eslint/no-useless-constructor":h["no-useless-constructor"],"@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"off","@typescript-eslint/prefer-ts-expect-error":"off","@typescript-eslint/return-await":z["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":b["space-infix-ops"],...k?k.configs.recommended.rules:{},...n,...d?{"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":0,"@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/quotes":0,"@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"}:{}}}),T}),Mr=f("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:n,stylistic:i=!0}=e,{indent:l=4}=typeof i=="boolean"?{}:i,d=await a(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:G.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:d}},{files:o,name:"anolilab/unicorn/rules",rules:{...d.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/import-style":["error",{styles:{"node:path":{named:!0},"node:util":{named:!0},path:{named:!0},util:{named:!0}}}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","unicorn/no-nested-ternary":"off","unicorn/no-useless-undefined":"off","unicorn/prefer-at":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":t.type==="module"?"error":"off","unicorn/prefer-node-protocol":"error","unicorn/prefer-ternary":["error","only-single-line"],"unicorn/prevent-abbreviations":["error",{allowList:{i:!0,j:!0},replacements:{args:!1,dev:!1,dist:!1,env:!1,params:!1,pkg:!1,prop:!1,props:!1,ref:!1,src:!1,utils:!1}}],...n?{"unicorn/empty-brace-spaces":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}:{"unicorn/template-indent":["error",{indent:l}]},...s}},{files:["tsconfig.dev.json","tsconfig.prod.json"],name:"anolilab/unicorn/tsconfig-overrides",rules:{"unicorn/prevent-abbreviations":"off"}},{files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],name:"anolilab/unicorn/ts-overrides",rules:{"unicorn/import-style":"off"}}]});var Rr=Object.defineProperty,Jr=v((e,r)=>Rr(e,"name",{value:r,configurable:!0}),"n$2");const zr=Jr(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await a(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Vr=f("all",async(e,r)=>{const{files:o=r,isInEditor:s,overrides:t}=e,n=await a(import("eslint-plugin-unused-imports"));return[{files:o,name:"anolilab/unused-imports/rules",plugins:{"unused-imports":n},rules:{"@typescript-eslint/no-unused-vars":"off","no-unused-vars":"off","unused-imports/no-unused-imports":s?"off":"error","unused-imports/no-unused-vars":[s?"warn":"error",{args:"after-used",argsIgnorePattern:"^_",vars:"all",varsIgnorePattern:"^_"}],...t}}]}),Wr=f("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-validate-jsx-nesting"));return[{files:o,name:"anolilab/validate-jsx-nesting/setup",plugins:{"validate-jsx-nesting":t},rules:{"validate-jsx-nesting/no-invalid-jsx-nesting":"error",...s}}]}),Br={suite:!0,test:!0,chai:!0,describe:!0,it:!0,expectTypeOf:!0,assertType:!0,expect:!0,assert:!0,vitest:!0,vi:!0,beforeAll:!0,afterAll:!0,beforeEach:!0,afterEach:!0,onTestFailed:!0,onTestFinished:!0};let Z;const Gr=f("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:n,tsconfigPath:i}=e,[l,d]=await Promise.all([a(import("@vitest/eslint-plugin")),a(import("eslint-plugin-no-only-tests"))]);return Z=Z??{...l,rules:{...l.rules,...d.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:Z}},{files:o,...i?{...l.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Br}},name:"anolilab/vitest/rules",rules:{...l.configs.all.rules,...l.configs.recommended.rules,"@typescript-eslint/explicit-function-return-type":"off","antfu/no-top-level-await":"off","n/prefer-global/process":"off","no-unused-expressions":"off","vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/max-expects":"off","vitest/no-hooks":"off","vitest/no-mocks-import":"off","vitest/no-only-tests":s?"off":"error","vitest/no-restricted-vi-methods":"off","vitest/no-standalone-expect":"error","vitest/valid-expect":["error",{alwaysAwait:!0,maxArgs:2,minArgs:1}],"vitest/valid-title":"off",...t,...n?{"vitest/padding-around-after-all-blocks":"off","vitest/padding-around-after-each-blocks":"off","vitest/padding-around-all":"off","vitest/padding-around-before-all-blocks":"off","vitest/padding-around-before-each-blocks":"off","vitest/padding-around-describe-blocks":"off","vitest/padding-around-expect-blocks":"off","vitest/padding-around-test-blocks":"off"}:{}}}]}),Xr=f("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:n=!0}=e,{indent:i=4,quotes:l="double"}=typeof n=="boolean"?{}:n,[d,b]=await Promise.all([a(import("eslint-plugin-yml")),a(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:b},name:"anolilab/yaml",plugins:{yaml:d},rules:{"@stylistic/spaced-comment":"off","yaml/block-mapping":"error","yaml/block-sequence":"error","yaml/no-empty-key":"error","yaml/no-empty-sequence-entry":"error","yaml/no-irregular-whitespace":"error","yaml/plain-scalar":"error","yaml/vue-custom-block/no-parsing-error":"error",...n?{"yaml/block-mapping-question-indicator-newline":"error","yaml/block-sequence-hyphen-indicator-newline":"error","yaml/flow-mapping-curly-newline":"error","yaml/flow-mapping-curly-spacing":"error","yaml/flow-sequence-bracket-newline":"error","yaml/flow-sequence-bracket-spacing":"error","yaml/indent":[t?"off":"error",i==="tab"?2:i],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:l==="backtick"?"single":l}],"yaml/spaced-comment":"error"}:{},...t?d.configs.prettier.rules:{},...s}}]}),Hr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ce(t)},rules:{...t.configs.all.rules,...s}}]}),Kr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var Qr=Object.defineProperty,Yr=v((e,r)=>Qr(e,"name",{value:r,configurable:!0}),"e$1");const Zr=Yr(()=>!!(process.env.GIT_PARAMS??process.env.VSCODE_GIT_COMMAND??process.env.npm_lifecycle_script?.startsWith("lint-staged")??!1),"isInGitHooksOrLintStaged");var es=Object.defineProperty,rs=v((e,r)=>es(e,"name",{value:r,configurable:!0}),"e");const ss=rs(()=>process.env.CI||Zr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var os=Object.defineProperty,X=v((e,r)=>os(e,"name",{value:r,configurable:!0}),"f");const ts=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],K=X((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),u=X((e,r)=>{const o=K(e,r);return{..."overrides"in o?o.overrides:{}}},"getOverrides"),g=X((e,r)=>{const o=K(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),ws=X(async(e={},...r)=>{if("files"in e)throw new Error('[@anolilab/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');const o=e.cwd??process.cwd(),s=await xe(be(o,"package.json"),{resolveCatalogs:!0}),t=s.packageManager?.startsWith("pnpm"),n=y(s,["prettier"]),i=y(s,["@anolilab/eslint-config"]),l=y(s,["react","react-dom"]),d=s.dependencies?.react??s.devDependencies?.react;let b=!1;if(d!==void 0){const c=ee(d);c?.major&&c.major>=19&&(b=!0)}let h=!1,x=!1;const C=s.dependencies?.tailwindcss??s.devDependencies?.tailwindcss;if(C){const c=ee(C);c?.major&&c.major<=3&&(h=!0),c?.major&&c.major>=4&&(x=!0)}const{astro:k=y(s,["astro"]),componentExts:M=[],css:R=y(s,["postcss","cssnano"]),gitignore:I=!0,html:A=!1,jsx:E=y(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||l,lodash:T=y(s,["lodash","underscore","lodash-es","@types/lodash","lodash.chunk","lodash.compact","lodash.concat","lodash.difference","lodash.differenceby","lodash.differencewith","lodash.drop","lodash.dropright","lodash.droprightwhile","lodash.dropwhile","lodash.fill","lodash.findindex","lodash.findlastindex","lodash.flatten","lodash.flattendeep","lodash.flattendepth","lodash.frompairs","lodash.head","lodash.indexof","lodash.initial","lodash.intersection","lodash.intersectionby","lodash.intersectionwith","lodash.join","lodash.last","lodash.lastindexof","lodash.nth","lodash.pull","lodash.pullall","lodash.pullallby","lodash.pullallwith","lodash.pullat","lodash.remove","lodash.reverse","lodash.slice","lodash.sortedindex","lodash.sortedindexby","lodash.sortedindexof","lodash.sortedlastindex","lodash.sortedlastindexby","lodash.sortedlastindexof","lodash.sorteduniq","lodash.sorteduniqby","lodash.tail","lodash.take","lodash.takeright","lodash.takerightwhile","lodash.takewhile","lodash.union","lodash.unionby","lodash.unionwith","lodash.uniq","lodash.uniqby","lodash.uniqwith","lodash.unzip","lodash.unzipwith","lodash.without","lodash.xor","lodash.xorby","lodash.xorwith","lodash.zip","lodash.zipobject","lodash.zipobjectdeep","lodash.zipwith","lodash.countby","lodash.every","lodash.filter","lodash.find","lodash.findlast","lodash.flatmap","lodash.flatmapdeep","lodash.flatmapdepth","lodash.foreach","lodash.foreachright","lodash.groupby","lodash.includes","lodash.invokemap","lodash.keyby","lodash.map","lodash.orderby","lodash.partition","lodash.reduce","lodash.reduceright","lodash.reject","lodash.sample","lodash.samplesize","lodash.shuffle","lodash.size","lodash.some","lodash.sortby","lodash.now","lodash.after","lodash.ary","lodash.before","lodash.bind","lodash.bindkey","lodash.curry","lodash.curryright","lodash.debounce","lodash.defer","lodash.delay","lodash.flip","lodash.memoize","lodash.negate","lodash.once","lodash.overargs","lodash.partial","lodash.partialright","lodash.rearg","lodash.rest","lodash.spread","lodash.throttle","lodash.unary","lodash.wrap","lodash.castarray","lodash.clone","lodash.clonedeep","lodash.clonedeepwith","lodash.clonewith","lodash.conformsto","lodash.eq","lodash.gt","lodash.gte","lodash.isarguments","lodash.isarray","lodash.isarraybuffer","lodash.isarraylike","lodash.isarraylikeobject","lodash.isboolean","lodash.isbuffer","lodash.isdate","lodash.iselement","lodash.isempty","lodash.isequal","lodash.isequalwith","lodash.iserror","lodash.isfinite","lodash.isfunction","lodash.isinteger","lodash.islength","lodash.ismap","lodash.ismatch","lodash.ismatchwith","lodash.isnan","lodash.isnative","lodash.isnil","lodash.isnull","lodash.isnumber","lodash.isobject","lodash.isobjectlike","lodash.isplainobject","lodash.isregexp","lodash.issafeinteger","lodash.isset","lodash.isstring","lodash.issymbol","lodash.istypedarray","lodash.isundefined","lodash.isweakmap","lodash.isweakset","lodash.lt","lodash.lte","lodash.toarray","lodash.tofinite","lodash.tointeger","lodash.tolength","lodash.tonumber","lodash.toplainobject","lodash.tosafeinteger","lodash.tostring","lodash.add","lodash.ceil","lodash.divide","lodash.floor","lodash.max","lodash.maxby","lodash.mean","lodash.meanby","lodash.min","lodash.minby","lodash.multiply","lodash.round","lodash.subtract","lodash.sum","lodash.sumby","lodash.clamp","lodash.inrange","lodash.random","lodash.assign","lodash.assignin","lodash.assigninwith","lodash.assignwith","lodash.at","lodash.create","lodash.defaults","lodash.defaultsdeep","lodash.findkey","lodash.findlastkey","lodash.forin","lodash.forinright","lodash.forown","lodash.forownright","lodash.functions","lodash.functionsin","lodash.get","lodash.has","lodash.hasin","lodash.invert","lodash.invertby","lodash.invoke","lodash.keys","lodash.keysin","lodash.mapkeys","lodash.mapvalues","lodash.merge","lodash.mergewith","lodash.omit","lodash.omitby","lodash.pick","lodash.pickby","lodash.result","lodash.set","lodash.setwith","lodash.topairs","lodash.topairsin","lodash.transform","lodash.unset","lodash.update","lodash.updatewith","lodash.values","lodash.valuesin","lodash.chain","lodash.tap","lodash.thru","lodash.camelcase","lodash.capitalize","lodash.deburr","lodash.endswith","lodash.escape","lodash.escaperegexp","lodash.kebabcase","lodash.lowercase","lodash.lowerfirst","lodash.pad","lodash.padend","lodash.padstart","lodash.parseint","lodash.repeat","lodash.replace","lodash.snakecase","lodash.split","lodash.startcase","lodash.startswith","lodash.template","lodash.tolower","lodash.toupper","lodash.trim","lodash.trimend","lodash.trimstart","lodash.truncate","lodash.unescape","lodash.uppercase","lodash.upperfirst","lodash.words","lodash.attempt","lodash.bindall","lodash.cond","lodash.conforms","lodash.constant","lodash.defaultto","lodash.flow","lodash.flowright","lodash.identity","lodash.iteratee","lodash.matches","lodash.matchesproperty","lodash.method","lodash.methodof","lodash.mixin","lodash.noconflict","lodash.noop","lodash.ntharg","lodash.over","lodash.overevery","lodash.oversome","lodash.property","lodash.propertyof","lodash.range","lodash.rangeright","lodash.runincontext","lodash.stubarray","lodash.stubfalse","lodash.stubobject","lodash.stubstring","lodash.stubtrue","lodash.times","lodash.topath","lodash.uniqueid"]),playwright:_=y(s,["playwright","eslint-plugin-playwright"]),pnpm:B=t,react:U=l||y(s,["eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"]),reactCompiler:V=b,regexp:N=!0,silent:F=!1,storybook:D=y(s,["storybook","eslint-plugin-storybook"]),tailwindcss:j=h||x,tanstackQuery:$=y(s,["@tanstack/react-query"]),tanstackRouter:J=y(s,["@tanstack/react-router"]),testingLibrary:O=y(s,["@testing-library/dom","@testing-library/react"]),tsdoc:oe=!1,typescript:te=y(s,["typescript"]),unicorn:me=!0,unocss:ne=!1,vitest:ye=y(s,["vitest"]),zod:ae=y(s,["zod"])}=e;if(i){let c=[];ae&&c.push("eslint-plugin-zod"),ne&&c.push("@unocss/eslint-plugin"),$&&c.push("@tanstack/eslint-plugin-query"),J&&c.push("@tanstack/eslint-plugin-router"),(R||j)&&(c.push("@eslint/css"),(j&&x||j==="v4")&&c.push("tailwind-csstree")),(j&&h||j==="v3")&&c.push("eslint-plugin-tailwindcss"),D&&c.push("eslint-plugin-storybook"),U&&c.push("eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),U&&V&&c.push("eslint-plugin-react-compiler"),O&&c.push("eslint-plugin-testing-library"),E&&c.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),T&&c.push("eslint-plugin-you-dont-need-lodash-underscore"),oe&&c.push("eslint-plugin-tsdoc"),e.formatters&&c.push("eslint-plugin-format"),_&&c.push("eslint-plugin-playwright"),k&&(c.push("eslint-plugin-astro","astro-eslint-parser"),typeof e.formatters=="object"&&e.formatters.astro&&c.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters.markdown&&e.formatters.slidev&&c.push("prettier-plugin-slidev"),(e.formatters.xml||e.formatters.svg)&&c.push("@prettier/plugin-xml")),c=c.filter(Boolean),c.length>0&&await we(s,c,"devDependencies",{confirm:{message:X(W=>`@anolilab/eslint-config requires the following ${W.length===1?"package":"packages"} to be installed:
|
|
17
|
+
`),J=await a(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:I,"react-dom":F["@eslint-react/dom"],"react-hooks":A,"react-hooks-extra":F["@eslint-react/hooks-extra"],"react-naming-convention":F["@eslint-react/naming-convention"],"react-perf":T,"react-refresh":E,"react-web-api":F["@eslint-react/web-api"],"react-x":F["@eslint-react"],"react-you-might-not-need-an-effect":_,...j&&J?J.configs.recommended.plugins:{}}},{files:o,languageOptions:{globals:{...G.browser},parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{...R.configs["disable-conflict-eslint-plugin-react"]?.rules,"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":["error",{...re,allow:[...re.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-naming-convention/component-name":"error","react-naming-convention/context-name":"error","react-naming-convention/filename":"off","react-naming-convention/use-state":"error","react-refresh/only-export-components":["error",{allowConstantExport:B,allowExportNames:[...V?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...U||N?["meta","links","headers","loader","action","clientLoader","clientAction","handle","shouldRevalidate"]:[]]}],"react-web-api/no-leaked-event-listener":"error","react-web-api/no-leaked-interval":"error","react-web-api/no-leaked-resize-observer":"error","react-web-api/no-leaked-timeout":"error","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-shorthand-boolean":"error","react-x/jsx-shorthand-fragment":"error","react-x/jsx-uses-react":$?"off":"error","react-x/jsx-uses-vars":"error","react-x/no-access-state-in-setstate":"error","react-x/no-array-index-key":"error","react-x/no-children-count":"error","react-x/no-children-for-each":"error","react-x/no-children-map":"error","react-x/no-children-only":"error","react-x/no-children-prop":"off","react-x/no-children-to-array":"error","react-x/no-class-component":"off","react-x/no-clone-element":"error","react-x/no-component-will-mount":"error","react-x/no-component-will-receive-props":"error","react-x/no-component-will-update":"error","react-x/no-context-provider":"error","react-x/no-create-ref":"error","react-x/no-default-props":"error","react-x/no-direct-mutation-state":"error","react-x/no-duplicate-key":"error","react-x/no-forward-ref":"error","react-x/no-implicit-key":"error","react-x/no-missing-component-display-name":"off","react-x/no-missing-context-display-name":"off","react-x/no-missing-key":"error","react-x/no-misused-capture-owner-stack":"off","react-x/no-nested-component-definitions":"error","react-x/no-nested-lazy-component-declarations":"error","react-x/no-prop-types":"error","react-x/no-redundant-should-component-update":"error","react-x/no-set-state-in-component-did-mount":"error","react-x/no-set-state-in-component-did-update":"error","react-x/no-set-state-in-component-will-update":"error","react-x/no-string-refs":"error","react-x/no-unnecessary-use-callback":"error","react-x/no-unnecessary-use-memo":"error","react-x/no-unsafe-component-will-mount":"error","react-x/no-unsafe-component-will-receive-props":"error","react-x/no-unsafe-component-will-update":"error","react-x/no-unstable-context-value":"error","react-x/no-unstable-default-props":"error","react-x/no-unused-class-component-members":"error","react-x/no-unused-state":"error","react-x/no-use-context":"error","react-x/no-useless-forward-ref":"error","react-x/no-useless-fragment":"off","react-x/prefer-destructuring-assignment":"off","react-x/prefer-read-only-props":"off","react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["error",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",k,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",k],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"off","react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"off","react/jsx-no-useless-fragment":"off","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":"off","react/jsx-uses-vars":"off","react/no-access-state-in-setstate":"off","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"off","react/no-children-prop":"off","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"off","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"off","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"off","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"off","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":"off","react/react-in-jsx-scope":$?"off":"error","react/require-default-props":"off","react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","static public field"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...j&&J?{"react-compiler/react-compiler":"error","react-hooks/component-hook-factories":"error","react-hooks/config":"error","react-hooks/error-boundaries":"error","react-hooks/gating":"error","react-hooks/globals":"error","react-hooks/immutability":"error","react-hooks/incompatible-library":"warn","react-hooks/preserve-manual-memoization":"error","react-hooks/purity":"error","react-hooks/refs":"error","react-hooks/set-state-in-effect":"error","react-hooks/set-state-in-render":"error","react-hooks/static-components":"error","react-hooks/unsupported-syntax":"warn","react-hooks/use-memo":"error"}:{},...T.configs.flat.recommended.rules,..._.configs.recommended.rules,...$?I?.configs.flat?.["jsx-runtime"]?.rules:{},...i?{"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off"}:{},...t},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:D??"detect"},"react-x":{version:D??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}},...$?I.configs.flat["jsx-runtime"].languageOptions.parserOptions:{}},name:"anolilab/react/jsx",rules:{"react-x/naming-convention/filename-extension":["error","as-needed"],"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"off","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"},settings:{extensions:[".jsx"]}},{files:["**/*.tsx"],name:"anolilab/react/tsx",rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:p("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...C?[{files:s,ignores:x,name:"anolilab/react/type-aware-rules",rules:{...M}}]:[]]}),Cr=f("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,n=Se["flat/recommended"],i={...n.rules};if(s==="warn")for(const l in i)i[l]==="error"&&(i[l]="warn");return[{...n,files:o,name:"anolilab/regexp/rules",rules:{...i,...t}}]}),Sr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-simple-import-sort"));return[{files:o,name:"anolilab/simple-import-sort",plugins:{"simple-import-sort":t},rules:{"simple-import-sort/exports":"error","simple-import-sort/imports":"error",...s}}]}),Er=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-sonarjs"));return[{name:"anolilab/sonarjs/plugin",plugins:{sonarjs:t}},{files:o,name:"anolilab/sonarjs/rules",rules:{...t.configs.recommended.rules,"sonarjs/file-name-differ-from-class":"error","sonarjs/no-collapsible-if":"error","sonarjs/no-nested-template-literals":"off","sonarjs/no-tab":"error","sonarjs/todo-tag":"off",...s}},{files:p("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:p("js"),languageOptions:{ecmaVersion:"latest"},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off","sonarjs/public-static-readonly":"off"}}]}),_r=f("storybook",async e=>{const{overrides:r}=e,o=[...(await a(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),Dr=f("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await a(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),qr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),Ir=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),Tr=f("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,n=await a(import("eslint-plugin-testing-library")),i=y(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":n},rules:{...n.configs["flat/dom"].rules,...i?n.configs["flat/react"].rules:{},...s}}]}),Nr=f("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:n=2}=typeof t=="boolean"?{}:t,[i,l]=await Promise.all([a(import("eslint-plugin-toml")),a(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:l},name:"anolilab/toml",plugins:{toml:i},rules:{...t?{"@stylistic/spaced-comment":"off"}:{},"toml/comma-style":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error",...t?{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"error","toml/indent":["error",n==="tab"?2:n],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error"}:{},...s}}]}),Fr=f("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),se={"init-declarations":"off","no-catch-shadow":"off","no-delete-var":"error","no-label-var":"error","no-restricted-globals":["error",{message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",name:"isFinite"},{message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",name:"isNaN"},..._e.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":"off","no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Ar=f("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:se},{files:p("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Ur=Object.defineProperty,$r=v((e,r)=>Ur(e,"name",{value:r,configurable:!0}),"w");const Lr=f("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:n,overridesTypeAware:i,parserOptions:l,prettier:d}=e,b=ue,h=pe(t),[x,C]=await Promise.all([a(import("typescript-eslint")),a(import("eslint-plugin-no-for-of-array"))]);let k;l?.erasableSyntaxOnly&&(k=await a(import("eslint-plugin-erasable-syntax-only")));const M=e.filesTypeAware??p("ts"),R=[...p("astro"),...p("markdown"),...p("markdown_inline_js_jsx"),...p("js"),...p("jsx"),"**/*.json","**/*.jsonc",...e.ignoresTypeAware??[]],{tsconfigPath:I}=e;let{isTypeAware:A=!0}=e;A=A&&I!==void 0;const E=$r((_,B,U)=>{const V=he(Ee(import.meta.url));return{files:[...B,...o.map(N=>`**/*.${N}`)],...U?{ignores:U}:{},languageOptions:{parser:x.parser,parserOptions:{extraFileExtensions:o.map(N=>`.${N}`),sourceType:"module",..._?{projectService:!0,tsconfigRootDir:V}:{},...l}},name:`anolilab/typescript/${_?"type-aware-parser":"parser"}`}},"makeParser"),T=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":x.plugin,"no-for-of-array":C,...k?k.configs.recommended.plugins:{}}},...A?[E(!1,s),E(!0,M,R)]:[E(!1,s)],...x.configs.strict];return A&&T.push(...x.configs.strictTypeCheckedOnly,{files:[...M,...o.map(_=>`**/*.${_}`)],name:"anolilab/typescript/rules-type-aware",rules:{"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error",...i}},{files:p("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),T.push({files:s,name:"anolilab/typescript/rules",rules:{"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-ts-comment":["error",{minimumDescriptionLength:3,"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":"allow-with-description","ts-nocheck":!0}],"@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/method-signature-style":"error","@typescript-eslint/naming-convention":["error",{format:["camelCase","PascalCase","UPPER_CASE"],selector:"variable"},{format:["camelCase","PascalCase"],selector:"function"},{format:["PascalCase"],selector:"typeLike"}],"@typescript-eslint/no-array-constructor":b["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":h["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":z["no-empty-function"],"@typescript-eslint/no-explicit-any":["error",{fixToUnknown:!1,ignoreRestArgs:!0}],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-loop-func":z["no-loop-func"],"@typescript-eslint/no-magic-numbers":z["no-magic-numbers"],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redeclare":z["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":se["no-shadow"],"@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unused-expressions":z["no-unused-expressions"],"@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":se["no-use-before-define"],"@typescript-eslint/no-useless-constructor":h["no-useless-constructor"],"@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"off","@typescript-eslint/prefer-ts-expect-error":"off","@typescript-eslint/return-await":z["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":b["space-infix-ops"],...k?k.configs.recommended.rules:{},...n,...d?{"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":0,"@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/quotes":0,"@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"}:{}}}),T}),Mr=f("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:n,stylistic:i=!0}=e,{indent:l=4}=typeof i=="boolean"?{}:i,d=await a(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:G.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:d}},{files:o,name:"anolilab/unicorn/rules",rules:{...d.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/import-style":["error",{styles:{"node:path":{named:!0},"node:util":{named:!0},path:{named:!0},util:{named:!0}}}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","unicorn/no-nested-ternary":"off","unicorn/no-useless-undefined":"off","unicorn/prefer-at":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":t.type==="module"?"error":"off","unicorn/prefer-node-protocol":"error","unicorn/prefer-ternary":["error","only-single-line"],"unicorn/prevent-abbreviations":["error",{allowList:{i:!0,j:!0},replacements:{args:!1,dev:!1,dist:!1,env:!1,params:!1,pkg:!1,prop:!1,props:!1,ref:!1,src:!1,utils:!1}}],...n?{"unicorn/empty-brace-spaces":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}:{"unicorn/template-indent":["error",{indent:l}]},...s}},{files:["tsconfig.dev.json","tsconfig.prod.json"],name:"anolilab/unicorn/tsconfig-overrides",rules:{"unicorn/prevent-abbreviations":"off"}},{files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],name:"anolilab/unicorn/ts-overrides",rules:{"unicorn/import-style":"off"}}]});var Rr=Object.defineProperty,Jr=v((e,r)=>Rr(e,"name",{value:r,configurable:!0}),"n$2");const zr=Jr(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await a(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Vr=f("all",async(e,r)=>{const{files:o=r,isInEditor:s,overrides:t}=e,n=await a(import("eslint-plugin-unused-imports"));return[{files:o,name:"anolilab/unused-imports/rules",plugins:{"unused-imports":n},rules:{"@typescript-eslint/no-unused-vars":"off","no-unused-vars":"off","unused-imports/no-unused-imports":s?"off":"error","unused-imports/no-unused-vars":[s?"warn":"error",{args:"after-used",argsIgnorePattern:"^_",vars:"all",varsIgnorePattern:"^_"}],...t}}]}),Wr=f("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-validate-jsx-nesting"));return[{files:o,name:"anolilab/validate-jsx-nesting/setup",plugins:{"validate-jsx-nesting":t},rules:{"validate-jsx-nesting/no-invalid-jsx-nesting":"error",...s}}]}),Br={suite:!0,test:!0,chai:!0,describe:!0,it:!0,expectTypeOf:!0,assertType:!0,expect:!0,assert:!0,vitest:!0,vi:!0,beforeAll:!0,afterAll:!0,beforeEach:!0,afterEach:!0,onTestFailed:!0,onTestFinished:!0};let Z;const Gr=f("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:n,tsconfigPath:i}=e,[l,d]=await Promise.all([a(import("@vitest/eslint-plugin")),a(import("eslint-plugin-no-only-tests"))]);return Z=Z??{...l,rules:{...l.rules,...d.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:Z}},{files:o,...i?{...l.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Br}},name:"anolilab/vitest/rules",rules:{...l.configs.all.rules,...l.configs.recommended.rules,"@typescript-eslint/explicit-function-return-type":"off","antfu/no-top-level-await":"off","n/prefer-global/process":"off","no-unused-expressions":"off","vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/max-expects":"off","vitest/no-hooks":"off","vitest/no-mocks-import":"off","vitest/no-only-tests":s?"off":"error","vitest/no-restricted-vi-methods":"off","vitest/no-standalone-expect":"error","vitest/valid-expect":["error",{alwaysAwait:!0,maxArgs:2,minArgs:1}],"vitest/valid-title":"off",...t,...n?{"vitest/padding-around-after-all-blocks":"off","vitest/padding-around-after-each-blocks":"off","vitest/padding-around-all":"off","vitest/padding-around-before-all-blocks":"off","vitest/padding-around-before-each-blocks":"off","vitest/padding-around-describe-blocks":"off","vitest/padding-around-expect-blocks":"off","vitest/padding-around-test-blocks":"off"}:{}}}]}),Xr=f("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:n=!0}=e,{indent:i=4,quotes:l="double"}=typeof n=="boolean"?{}:n,[d,b]=await Promise.all([a(import("eslint-plugin-yml")),a(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:b},name:"anolilab/yaml",plugins:{yaml:d},rules:{"@stylistic/spaced-comment":"off","yaml/block-mapping":"error","yaml/block-sequence":"error","yaml/no-empty-key":"error","yaml/no-empty-sequence-entry":"error","yaml/no-irregular-whitespace":"error","yaml/plain-scalar":"error","yaml/vue-custom-block/no-parsing-error":"error",...n?{"yaml/block-mapping-question-indicator-newline":"error","yaml/block-sequence-hyphen-indicator-newline":"error","yaml/flow-mapping-curly-newline":"error","yaml/flow-mapping-curly-spacing":"error","yaml/flow-sequence-bracket-newline":"error","yaml/flow-sequence-bracket-spacing":"error","yaml/indent":[t?"off":"error",i==="tab"?2:i],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:l==="backtick"?"single":l}],"yaml/spaced-comment":"error"}:{},...t?d.configs.prettier.rules:{},...s}}]}),Hr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ce(t)},rules:{...t.configs.all.rules,...s}}]}),Kr=f("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await a(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var Qr=Object.defineProperty,Yr=v((e,r)=>Qr(e,"name",{value:r,configurable:!0}),"e$1");const Zr=Yr(()=>!!(process.env.GIT_PARAMS??process.env.VSCODE_GIT_COMMAND??process.env.npm_lifecycle_script?.startsWith("lint-staged")??!1),"isInGitHooksOrLintStaged");var es=Object.defineProperty,rs=v((e,r)=>es(e,"name",{value:r,configurable:!0}),"e");const ss=rs(()=>process.env.CI||Zr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var os=Object.defineProperty,X=v((e,r)=>os(e,"name",{value:r,configurable:!0}),"f");const ts=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],K=X((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),u=X((e,r)=>{const o=K(e,r);return{..."overrides"in o?o.overrides:{}}},"getOverrides"),g=X((e,r)=>{const o=K(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),ws=X(async(e={},...r)=>{if("files"in e)throw new Error('[@anolilab/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');const o=e.cwd??process.cwd(),s=await xe(be(o,"package.json"),{resolveCatalogs:!0}),t=s.packageManager?.startsWith("pnpm"),n=y(s,["prettier"]),i=y(s,["@anolilab/eslint-config"]),l=y(s,["react","react-dom"]),d=s.dependencies?.react??s.devDependencies?.react;let b=!1;if(d!==void 0){const c=ee(d);c?.major&&c.major>=19&&(b=!0)}let h=!1,x=!1;const C=s.dependencies?.tailwindcss??s.devDependencies?.tailwindcss;if(C){const c=ee(C);c?.major&&c.major<=3&&(h=!0),c?.major&&c.major>=4&&(x=!0)}const{astro:k=y(s,["astro"]),componentExts:M=[],css:R=y(s,["postcss","cssnano"]),gitignore:I=!0,html:A=!1,jsx:E=y(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||l,lodash:T=y(s,["lodash","underscore","lodash-es","@types/lodash","lodash.chunk","lodash.compact","lodash.concat","lodash.difference","lodash.differenceby","lodash.differencewith","lodash.drop","lodash.dropright","lodash.droprightwhile","lodash.dropwhile","lodash.fill","lodash.findindex","lodash.findlastindex","lodash.flatten","lodash.flattendeep","lodash.flattendepth","lodash.frompairs","lodash.head","lodash.indexof","lodash.initial","lodash.intersection","lodash.intersectionby","lodash.intersectionwith","lodash.join","lodash.last","lodash.lastindexof","lodash.nth","lodash.pull","lodash.pullall","lodash.pullallby","lodash.pullallwith","lodash.pullat","lodash.remove","lodash.reverse","lodash.slice","lodash.sortedindex","lodash.sortedindexby","lodash.sortedindexof","lodash.sortedlastindex","lodash.sortedlastindexby","lodash.sortedlastindexof","lodash.sorteduniq","lodash.sorteduniqby","lodash.tail","lodash.take","lodash.takeright","lodash.takerightwhile","lodash.takewhile","lodash.union","lodash.unionby","lodash.unionwith","lodash.uniq","lodash.uniqby","lodash.uniqwith","lodash.unzip","lodash.unzipwith","lodash.without","lodash.xor","lodash.xorby","lodash.xorwith","lodash.zip","lodash.zipobject","lodash.zipobjectdeep","lodash.zipwith","lodash.countby","lodash.every","lodash.filter","lodash.find","lodash.findlast","lodash.flatmap","lodash.flatmapdeep","lodash.flatmapdepth","lodash.foreach","lodash.foreachright","lodash.groupby","lodash.includes","lodash.invokemap","lodash.keyby","lodash.map","lodash.orderby","lodash.partition","lodash.reduce","lodash.reduceright","lodash.reject","lodash.sample","lodash.samplesize","lodash.shuffle","lodash.size","lodash.some","lodash.sortby","lodash.now","lodash.after","lodash.ary","lodash.before","lodash.bind","lodash.bindkey","lodash.curry","lodash.curryright","lodash.debounce","lodash.defer","lodash.delay","lodash.flip","lodash.memoize","lodash.negate","lodash.once","lodash.overargs","lodash.partial","lodash.partialright","lodash.rearg","lodash.rest","lodash.spread","lodash.throttle","lodash.unary","lodash.wrap","lodash.castarray","lodash.clone","lodash.clonedeep","lodash.clonedeepwith","lodash.clonewith","lodash.conformsto","lodash.eq","lodash.gt","lodash.gte","lodash.isarguments","lodash.isarray","lodash.isarraybuffer","lodash.isarraylike","lodash.isarraylikeobject","lodash.isboolean","lodash.isbuffer","lodash.isdate","lodash.iselement","lodash.isempty","lodash.isequal","lodash.isequalwith","lodash.iserror","lodash.isfinite","lodash.isfunction","lodash.isinteger","lodash.islength","lodash.ismap","lodash.ismatch","lodash.ismatchwith","lodash.isnan","lodash.isnative","lodash.isnil","lodash.isnull","lodash.isnumber","lodash.isobject","lodash.isobjectlike","lodash.isplainobject","lodash.isregexp","lodash.issafeinteger","lodash.isset","lodash.isstring","lodash.issymbol","lodash.istypedarray","lodash.isundefined","lodash.isweakmap","lodash.isweakset","lodash.lt","lodash.lte","lodash.toarray","lodash.tofinite","lodash.tointeger","lodash.tolength","lodash.tonumber","lodash.toplainobject","lodash.tosafeinteger","lodash.tostring","lodash.add","lodash.ceil","lodash.divide","lodash.floor","lodash.max","lodash.maxby","lodash.mean","lodash.meanby","lodash.min","lodash.minby","lodash.multiply","lodash.round","lodash.subtract","lodash.sum","lodash.sumby","lodash.clamp","lodash.inrange","lodash.random","lodash.assign","lodash.assignin","lodash.assigninwith","lodash.assignwith","lodash.at","lodash.create","lodash.defaults","lodash.defaultsdeep","lodash.findkey","lodash.findlastkey","lodash.forin","lodash.forinright","lodash.forown","lodash.forownright","lodash.functions","lodash.functionsin","lodash.get","lodash.has","lodash.hasin","lodash.invert","lodash.invertby","lodash.invoke","lodash.keys","lodash.keysin","lodash.mapkeys","lodash.mapvalues","lodash.merge","lodash.mergewith","lodash.omit","lodash.omitby","lodash.pick","lodash.pickby","lodash.result","lodash.set","lodash.setwith","lodash.topairs","lodash.topairsin","lodash.transform","lodash.unset","lodash.update","lodash.updatewith","lodash.values","lodash.valuesin","lodash.chain","lodash.tap","lodash.thru","lodash.camelcase","lodash.capitalize","lodash.deburr","lodash.endswith","lodash.escape","lodash.escaperegexp","lodash.kebabcase","lodash.lowercase","lodash.lowerfirst","lodash.pad","lodash.padend","lodash.padstart","lodash.parseint","lodash.repeat","lodash.replace","lodash.snakecase","lodash.split","lodash.startcase","lodash.startswith","lodash.template","lodash.tolower","lodash.toupper","lodash.trim","lodash.trimend","lodash.trimstart","lodash.truncate","lodash.unescape","lodash.uppercase","lodash.upperfirst","lodash.words","lodash.attempt","lodash.bindall","lodash.cond","lodash.conforms","lodash.constant","lodash.defaultto","lodash.flow","lodash.flowright","lodash.identity","lodash.iteratee","lodash.matches","lodash.matchesproperty","lodash.method","lodash.methodof","lodash.mixin","lodash.noconflict","lodash.noop","lodash.ntharg","lodash.over","lodash.overevery","lodash.oversome","lodash.property","lodash.propertyof","lodash.range","lodash.rangeright","lodash.runincontext","lodash.stubarray","lodash.stubfalse","lodash.stubobject","lodash.stubstring","lodash.stubtrue","lodash.times","lodash.topath","lodash.uniqueid"]),playwright:_=y(s,["playwright","eslint-plugin-playwright"]),pnpm:B=t,react:U=l||y(s,["eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"]),reactCompiler:V=b,regexp:N=!0,silent:F=!1,storybook:D=y(s,["storybook","eslint-plugin-storybook"]),tailwindcss:j=h||x,tanstackQuery:$=y(s,["@tanstack/react-query"]),tanstackRouter:J=y(s,["@tanstack/react-router"]),testingLibrary:O=y(s,["@testing-library/dom","@testing-library/react"]),tsdoc:oe=!1,typescript:te=y(s,["typescript"]),unicorn:me=!0,unocss:ne=!1,vitest:ye=y(s,["vitest"]),zod:ae=y(s,["zod"])}=e;if(i){let c=[];ae&&c.push("eslint-plugin-zod"),ne&&c.push("@unocss/eslint-plugin"),$&&c.push("@tanstack/eslint-plugin-query"),J&&c.push("@tanstack/eslint-plugin-router"),(R||j)&&(c.push("@eslint/css"),(j&&x||j==="v4")&&c.push("tailwind-csstree")),(j&&h||j==="v3")&&c.push("eslint-plugin-tailwindcss"),D&&c.push("eslint-plugin-storybook"),U&&c.push("eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),U&&V&&c.push("eslint-plugin-react-compiler"),O&&c.push("eslint-plugin-testing-library"),E&&c.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),T&&c.push("eslint-plugin-you-dont-need-lodash-underscore"),oe&&c.push("eslint-plugin-tsdoc"),e.formatters&&c.push("eslint-plugin-format"),_&&c.push("eslint-plugin-playwright"),k&&(c.push("eslint-plugin-astro","astro-eslint-parser"),typeof e.formatters=="object"&&e.formatters.astro&&c.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters.markdown&&e.formatters.slidev&&c.push("prettier-plugin-slidev"),(e.formatters.xml||e.formatters.svg)&&c.push("@prettier/plugin-xml")),c=c.filter(Boolean),c.length>0&&await we(s,c,"devDependencies",{confirm:{message:X(W=>`@anolilab/eslint-config requires the following ${W.length===1?"package":"packages"} to be installed:
|
|
18
18
|
|
|
19
19
|
"${W.join(`"
|
|
20
20
|
"`)}"
|