@anolilab/eslint-config 16.2.1 → 16.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +89 -74
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +25 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## @anolilab/eslint-config [16.2.3](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@16.2.2...@anolilab/eslint-config@16.2.3) (2025-05-27)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **eslint-config:** disabled the buggy `vitest/valid-title` rule in the Vitest plugin configuration. ([eb38510](https://github.com/anolilab/javascript-style-guide/commit/eb38510aa4baa5dc6f89f7dcf7b1b8e272656fc9))
|
|
6
|
+
|
|
7
|
+
## @anolilab/eslint-config [16.2.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@16.2.1...@anolilab/eslint-config@16.2.2) (2025-05-27)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **eslint-config:** add missing optional ESLint plugins to peerDependenciesMeta ([d6a0714](https://github.com/anolilab/javascript-style-guide/commit/d6a0714006f4ed47cb1adf490b2034f92c4f529e))
|
|
12
|
+
* **eslint-config:** disable additional perfectionist sorting rules in ESLint configuration ([f290fc3](https://github.com/anolilab/javascript-style-guide/commit/f290fc3f638beae20802ea0e14d83e8d59a5f644))
|
|
13
|
+
|
|
1
14
|
## @anolilab/eslint-config [16.2.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@16.2.0...@anolilab/eslint-config@16.2.1) (2025-05-27)
|
|
2
15
|
|
|
3
16
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -354,6 +354,95 @@ lspconfig.eslint.setup({
|
|
|
354
354
|
|
|
355
355
|
</details>
|
|
356
356
|
|
|
357
|
+
### Using `getFilesGlobs` for Common File Types
|
|
358
|
+
|
|
359
|
+
Your `@anolilab/eslint-config` package also exports a handy utility function `getFilesGlobs` that provides pre-defined glob patterns for common file types. This can simplify targeting specific sets of files in your ESLint configuration objects.
|
|
360
|
+
|
|
361
|
+
You can import it alongside `createConfig`:
|
|
362
|
+
|
|
363
|
+
```javascript
|
|
364
|
+
// eslint.config.js
|
|
365
|
+
import { createConfig, getFilesGlobs } from "@anolilab/eslint-config";
|
|
366
|
+
|
|
367
|
+
const baseConfig = createConfig();
|
|
368
|
+
|
|
369
|
+
// Get glob patterns for all JavaScript and TypeScript files
|
|
370
|
+
const jsTsFiles = getFilesGlobs("js_and_ts");
|
|
371
|
+
// Get glob patterns for Markdown files
|
|
372
|
+
const markdownFiles = getFilesGlobs("markdown");
|
|
373
|
+
// Get glob patterns for HTML related files
|
|
374
|
+
const htmlFiles = getFilesGlobs("html");
|
|
375
|
+
|
|
376
|
+
export default [
|
|
377
|
+
...baseConfig,
|
|
378
|
+
{
|
|
379
|
+
files: jsTsFiles,
|
|
380
|
+
// languageOptions, rules, etc., specific to JS and TS files
|
|
381
|
+
rules: {
|
|
382
|
+
// 'your-rule/for-js-ts': 'error',
|
|
383
|
+
},
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
files: markdownFiles,
|
|
387
|
+
// languageOptions, rules, etc., specific to Markdown files
|
|
388
|
+
// Often, you might use a specific processor or plugin for Markdown here
|
|
389
|
+
// processor: markdownProcessor, // Fictional example
|
|
390
|
+
// plugins: { markdownPlugin } // Fictional example
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
files: htmlFiles,
|
|
394
|
+
// languageOptions, rules, etc., specific to HTML files
|
|
395
|
+
},
|
|
396
|
+
// ... other configurations
|
|
397
|
+
];
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### Type Aware Rules
|
|
401
|
+
|
|
402
|
+
You can optionally enable the [type aware](https://typescript-eslint.io/linting/typed-linting/) rules by passing the options object to the `typescript` config:
|
|
403
|
+
|
|
404
|
+
```js
|
|
405
|
+
// eslint.config.js
|
|
406
|
+
import antfu from "@antfu/eslint-config";
|
|
407
|
+
|
|
408
|
+
export default antfu({
|
|
409
|
+
typescript: {
|
|
410
|
+
tsconfigPath: "tsconfig.json",
|
|
411
|
+
},
|
|
412
|
+
});
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### Utilities
|
|
416
|
+
|
|
417
|
+
The `getFilesGlobs` function accepts one of the following `FileType` strings:
|
|
418
|
+
|
|
419
|
+
- `"all"`: All JavaScript, TypeScript, and declaration files.
|
|
420
|
+
- `"astro_ts"`: TypeScript files within Astro components.
|
|
421
|
+
- `"astro"`: Astro component files (`.astro`).
|
|
422
|
+
- `"css"`: CSS files.
|
|
423
|
+
- `"types"`: TypeScript declaration files (`.d.ts`, `.d.cts`, `.d.mts`).
|
|
424
|
+
- `"e2e"`: End-to-end test files.
|
|
425
|
+
- `"graphql"`: GraphQL files (`.gql`, `.graphql`).
|
|
426
|
+
- `"html"`: Various HTML-like template files (`.html`, `.hbs`, `.erb`, etc.).
|
|
427
|
+
- `"js_and_ts"`: All JavaScript and TypeScript source files (excluding declarations).
|
|
428
|
+
- `"js"`: JavaScript files (`.js`, `.mjs`, `.cjs`).
|
|
429
|
+
- `"jsx_and_tsx"`: JSX and TSX files.
|
|
430
|
+
- `"less"`: LESS files.
|
|
431
|
+
- `"markdown_in_markdown"`: Markdown files embedded within other Markdown files.
|
|
432
|
+
- `"markdown_inline_js_jsx"`: JS/JSX code blocks within Markdown.
|
|
433
|
+
- `"markdown"`: Markdown files (`.md`, `.mkdn`, etc.).
|
|
434
|
+
- `"postcss"`: PostCSS configuration files.
|
|
435
|
+
- `"scss"`: SCSS files.
|
|
436
|
+
- `"storybook"`: Storybook story files.
|
|
437
|
+
- `"svg"`: SVG files.
|
|
438
|
+
- `"toml"`: TOML files.
|
|
439
|
+
- `"ts"`: All TypeScript files including declarations and TSX (`.ts`, `.tsx`, `.d.ts`, etc.).
|
|
440
|
+
- `"vitest"`: Vitest test files.
|
|
441
|
+
- `"xml"`: XML files.
|
|
442
|
+
- `"yaml"`: YAML files (`.yaml`, `.yml`).
|
|
443
|
+
|
|
444
|
+
Using `getFilesGlobs` can make your configuration more readable and maintainable by abstracting away the specific glob patterns.
|
|
445
|
+
|
|
357
446
|
## Plugins
|
|
358
447
|
|
|
359
448
|
Our configuration integrates a wide array of ESLint plugins to cover various aspects of code quality, language support, security, and specific libraries/frameworks. Many of these are enabled automatically when relevant dependencies are detected in your project.
|
|
@@ -570,77 +659,3 @@ The anolilab javascript-style-guide is open-sourced software licensed under the
|
|
|
570
659
|
[license-url]: LICENSE.md "license"
|
|
571
660
|
[npm-image]: https://img.shields.io/npm/v/@anolilab/eslint-config/latest.svg?style=for-the-badge&logo=npm
|
|
572
661
|
[npm-url]: https://www.npmjs.com/package/@anolilab/eslint-config/v/latest "npm"
|
|
573
|
-
|
|
574
|
-
### Using `getFilesGlobs` for Common File Types
|
|
575
|
-
|
|
576
|
-
Your `@anolilab/eslint-config` package also exports a handy utility function `getFilesGlobs` that provides pre-defined glob patterns for common file types. This can simplify targeting specific sets of files in your ESLint configuration objects.
|
|
577
|
-
|
|
578
|
-
You can import it alongside `createConfig`:
|
|
579
|
-
|
|
580
|
-
```javascript
|
|
581
|
-
// eslint.config.js
|
|
582
|
-
import { createConfig, getFilesGlobs } from "@anolilab/eslint-config";
|
|
583
|
-
|
|
584
|
-
const baseConfig = createConfig();
|
|
585
|
-
|
|
586
|
-
// Get glob patterns for all JavaScript and TypeScript files
|
|
587
|
-
const jsTsFiles = getFilesGlobs("js_and_ts");
|
|
588
|
-
// Get glob patterns for Markdown files
|
|
589
|
-
const markdownFiles = getFilesGlobs("markdown");
|
|
590
|
-
// Get glob patterns for HTML related files
|
|
591
|
-
const htmlFiles = getFilesGlobs("html");
|
|
592
|
-
|
|
593
|
-
export default [
|
|
594
|
-
...baseConfig,
|
|
595
|
-
{
|
|
596
|
-
files: jsTsFiles,
|
|
597
|
-
// languageOptions, rules, etc., specific to JS and TS files
|
|
598
|
-
rules: {
|
|
599
|
-
// 'your-rule/for-js-ts': 'error',
|
|
600
|
-
},
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
files: markdownFiles,
|
|
604
|
-
// languageOptions, rules, etc., specific to Markdown files
|
|
605
|
-
// Often, you might use a specific processor or plugin for Markdown here
|
|
606
|
-
// processor: markdownProcessor, // Fictional example
|
|
607
|
-
// plugins: { markdownPlugin } // Fictional example
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
files: htmlFiles,
|
|
611
|
-
// languageOptions, rules, etc., specific to HTML files
|
|
612
|
-
},
|
|
613
|
-
// ... other configurations
|
|
614
|
-
];
|
|
615
|
-
```
|
|
616
|
-
|
|
617
|
-
The `getFilesGlobs` function accepts one of the following `FileType` strings:
|
|
618
|
-
|
|
619
|
-
- `"all"`: All JavaScript, TypeScript, and declaration files.
|
|
620
|
-
- `"astro_ts"`: TypeScript files within Astro components.
|
|
621
|
-
- `"astro"`: Astro component files (`.astro`).
|
|
622
|
-
- `"css"`: CSS files.
|
|
623
|
-
- `"types"`: TypeScript declaration files (`.d.ts`, `.d.cts`, `.d.mts`).
|
|
624
|
-
- `"e2e"`: End-to-end test files.
|
|
625
|
-
- `"graphql"`: GraphQL files (`.gql`, `.graphql`).
|
|
626
|
-
- `"html"`: Various HTML-like template files (`.html`, `.hbs`, `.erb`, etc.).
|
|
627
|
-
- `"js_and_ts"`: All JavaScript and TypeScript source files (excluding declarations).
|
|
628
|
-
- `"js"`: JavaScript files (`.js`, `.mjs`, `.cjs`).
|
|
629
|
-
- `"jsx_and_tsx"`: JSX and TSX files.
|
|
630
|
-
- `"less"`: LESS files.
|
|
631
|
-
- `"markdown_in_markdown"`: Markdown files embedded within other Markdown files.
|
|
632
|
-
- `"markdown_inline_js_jsx"`: JS/JSX code blocks within Markdown.
|
|
633
|
-
- `"markdown"`: Markdown files (`.md`, `.mkdn`, etc.).
|
|
634
|
-
- `"postcss"`: PostCSS configuration files.
|
|
635
|
-
- `"scss"`: SCSS files.
|
|
636
|
-
- `"storybook"`: Storybook story files.
|
|
637
|
-
- `"svg"`: SVG files.
|
|
638
|
-
- `"toml"`: TOML files.
|
|
639
|
-
- `"ts"`: All TypeScript files including declarations and TSX (`.ts`, `.tsx`, `.d.ts`, etc.).
|
|
640
|
-
- `"vitest"`: Vitest test files.
|
|
641
|
-
- `"xml"`: XML files.
|
|
642
|
-
- `"yaml"`: YAML files (`.yaml`, `.yml`).
|
|
643
|
-
|
|
644
|
-
Using `getFilesGlobs` can make your configuration more readable and maintainable by abstracting away the specific glob patterns.
|
|
645
|
-
|
|
646
|
-
### Type-Aware Linting
|
package/dist/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@ Found eslint-plugin-tsdoc as dependency, disabling the jsdoc rules for *.ts and
|
|
|
5
5
|
Following rules are disabled: jsonc/sort-keys for all package.json files.
|
|
6
6
|
`),[...p.configs["flat/base"],{files:["**/*.json5"],name:"anolilab/jsonc/json5-rules",rules:p.configs["recommended-with-json5"].rules},{files:["**/*.jsonc"],name:"anolilab/jsonc/jsonc-rules",rules:p.configs["recommended-with-jsonc"].rules},{files:["**/*.json"],name:"anolilab/jsonc/json-rules",rules:p.configs["recommended-with-json"].rules},{files:["package.json","**/package.json"],name:"anolilab/jsonc/package.json-rules",rules:{"jsonc/sort-array-values":f?"off":["error",{order:{type:"asc"},pathPattern:"^files$"}],"jsonc/sort-keys":f?"off":["error",{order:["$schema","name","displayName","version","private","description","categories","keywords","homepage","bugs","repository","funding","license","qna","author","maintainers","contributors","publisher","sideEffects","type","imports","exports","main","svelte","umd:main","jsdelivr","unpkg","module","source","jsnext:main","browser","react-native","types","typesVersions","typings","style","example","examplestyle","assets","bin","man","directories","files","workspaces","binary","scripts","betterScripts","contributes","activationEvents","husky","simple-git-hooks","pre-commit","commitlint","lint-staged","nano-staged","config","nodemonConfig","browserify","babel","browserslist","xo","prettier","eslintConfig","eslintIgnore","npmpackagejsonlint","release","remarkConfig","stylelint","ava","jest","mocha","nyc","tap","oclif","resolutions","dependencies","devDependencies","dependenciesMeta","peerDependencies","peerDependenciesMeta","optionalDependencies","bundledDependencies","bundleDependencies","extensionPack","extensionDependencies","flat","packageManager","engines","engineStrict","volta","languageName","os","cpu","preferGlobal","publishConfig","icon","badges","galleryBanner","preview","markdown","pnpm"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"},{order:{type:"asc"},pathPattern:"^(?:resolutions|overrides|pnpm.overrides)$"},{order:["types","import","require","default"],pathPattern:"^exports.*$"},{order:["applypatch-msg","pre-applypatch","post-applypatch","pre-commit","pre-merge-commit","prepare-commit-msg","commit-msg","post-commit","pre-rebase","post-checkout","post-merge","pre-push","pre-receive","update","post-receive","post-update","push-to-checkout","pre-auto-gc","post-rewrite","sendemail-validate","fsmonitor-watchman","p4-pre-submit","post-index-chang"],pathPattern:"^(?:gitHooks|husky|simple-git-hooks)$"},{order:["build","preinstall","install","postinstall","lint",{order:{type:"asc"}}],pathPattern:"^scripts$"}]}},{files:["**/tsconfig.json","**/tsconfig.*.json"],name:"anolilab/jsonc/tsconfig-json",rules:{"jsonc/sort-keys":["error",{order:["extends","compilerOptions","references","files","include","exclude"],pathPattern:"^$"},{order:["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","jsx","jsxFactory","jsxFragmentFactory","jsxImportSource","lib","moduleDetection","noLib","reactNamespace","useDefineForClassFields","emitDecoratorMetadata","experimentalDecorators","libReplacement","baseUrl","rootDir","rootDirs","customConditions","module","moduleResolution","moduleSuffixes","noResolve","paths","resolveJsonModule","resolvePackageJsonExports","resolvePackageJsonImports","typeRoots","types","allowArbitraryExtensions","allowImportingTsExtensions","allowUmdGlobalAccess","allowJs","checkJs","maxNodeModuleJsDepth","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","declaration","declarationDir","declarationMap","downlevelIteration","emitBOM","emitDeclarationOnly","importHelpers","importsNotUsedAsValues","inlineSourceMap","inlineSources","mapRoot","newLine","noEmit","noEmitHelpers","noEmitOnError","outDir","outFile","preserveConstEnums","preserveValueImports","removeComments","sourceMap","sourceRoot","stripInternal","allowSyntheticDefaultImports","esModuleInterop","forceConsistentCasingInFileNames","isolatedDeclarations","isolatedModules","preserveSymlinks","verbatimModuleSyntax","erasableSyntaxOnly","skipDefaultLibCheck","skipLibCheck"],pathPattern:"^compilerOptions$"}]}},...s?p.configs["flat/prettier"]:[],{files:["**/*.json","**/*.jsonc","**/*.json5"],rules:{...a?{"jsonc/array-bracket-spacing":["error","never"],"jsonc/comma-dangle":["error","never"],"jsonc/comma-style":["error","last"],"jsonc/indent":["error",i],"jsonc/key-spacing":["error",{afterColon:!0,beforeColon:!1}],"jsonc/object-curly-newline":["error",{consistent:!0,multiline:!0}],"jsonc/object-curly-spacing":["error","always"],"jsonc/object-property-newline":["error",{allowMultiplePropertiesPerLine:!0}],"jsonc/quote-props":"error","jsonc/quotes":"error"}:{},...r}}]},"jsonc"),nr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-jsx-a11y"));return[{files:o,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/jsx-a11y/setup",plugins:{"jsx-a11y":t},rules:{"jsx-a11y/accessible-emoji":"off","jsx-a11y/alt-text":["error",{area:[],elements:["img","object","area",'input[type="image"]'],img:[],'input[type="image"]':[],object:[]}],"jsx-a11y/anchor-has-content":["error",{components:[]}],"jsx-a11y/anchor-is-valid":["error",{aspects:["noHref","invalidHref","preferButton"],components:["A","LinkTo","Link"],specialLink:["to"]}],"jsx-a11y/aria-activedescendant-has-tabindex":"error","jsx-a11y/aria-props":"error","jsx-a11y/aria-proptypes":"error","jsx-a11y/aria-role":["error",{ignoreNonDOM:!1}],"jsx-a11y/aria-unsupported-elements":"error","jsx-a11y/autocomplete-valid":["off",{inputComponents:[]}],"jsx-a11y/click-events-have-key-events":"error","jsx-a11y/control-has-associated-label":["error",{controlComponents:[],depth:5,ignoreElements:["audio","canvas","embed","input","textarea","tr","video"],ignoreRoles:["grid","listbox","menu","menubar","radiogroup","row","tablist","toolbar","tree","treegrid"],labelAttributes:["label"]}],"jsx-a11y/heading-has-content":["error",{components:[""]}],"jsx-a11y/html-has-lang":"error","jsx-a11y/iframe-has-title":"error","jsx-a11y/img-redundant-alt":"error","jsx-a11y/interactive-supports-focus":"error","jsx-a11y/label-has-associated-control":["error",{assert:"both",controlComponents:[],depth:25,labelAttributes:[],labelComponents:[]}],"jsx-a11y/label-has-for":["off",{allowChildren:!1,components:[],required:{every:["nesting","id"]}}],"jsx-a11y/lang":"error","jsx-a11y/media-has-caption":["error",{audio:[],track:[],video:[]}],"jsx-a11y/mouse-events-have-key-events":"error","jsx-a11y/no-access-key":"error","jsx-a11y/no-autofocus":["error",{ignoreNonDOM:!0}],"jsx-a11y/no-distracting-elements":["error",{elements:["marquee","blink"]}],"jsx-a11y/no-interactive-element-to-noninteractive-role":["error",{tr:["none","presentation"]}],"jsx-a11y/no-noninteractive-element-interactions":["error",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/no-noninteractive-element-to-interactive-role":["error",{li:["menuitem","option","row","tab","treeitem"],ol:["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"],table:["grid"],td:["gridcell"],ul:["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"]}],"jsx-a11y/no-noninteractive-tabindex":["error",{roles:["tabpanel"],tags:[]}],"jsx-a11y/no-onchange":"off","jsx-a11y/no-redundant-roles":"error","jsx-a11y/no-static-element-interactions":["error",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/role-has-required-aria-props":"error","jsx-a11y/role-supports-aria-props":"error","jsx-a11y/scope":"error","jsx-a11y/tabindex-no-positive":"error",...s}}]}),ar=n.createConfig("markdown",async(e,r)=>{const{componentExts:o=[],files:s=r,overrides:t}=e,a=await c(import("@eslint/markdown"));return[{name:"anolilab/markdown/setup",plugins:{markdown:a}},{files:s,ignores:n.getFilesGlobs("markdown_in_markdown"),name:"anolilab/markdown/processor",processor:ae.mergeProcessors([a.processors?.markdown,ae.processorPassThrough])},{files:s,languageOptions:{parser:P},name:"anolilab/markdown/parser",rules:a.configs.recommended[0].rules},{files:["**/*.md/**/*.?([cm])[jt]s?(x)",...o.map(i=>`**/*.md/**/*.${i}`)],languageOptions:{parserOptions:{ecmaFeatures:{impliedStrict:!0}}},name:"anolilab/markdown/disables",rules:{"@stylistic/comma-dangle":"off","@stylistic/eol-last":"off","@stylistic/prefer-global/process":"off","@typescript-eslint/consistent-type-imports":"off","@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/no-namespace":"off","@typescript-eslint/no-redeclare":"off","@typescript-eslint/no-require-imports":"off","@typescript-eslint/no-unused-expressions":"off","@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":"off","antfu/no-top-level-await":"off","import/newline-after-import":"off","no-alert":"off","no-console":"off","no-labels":"off","no-lone-blocks":"off","no-restricted-syntax":"off","no-undef":"off","no-unused-expressions":"off","no-unused-labels":"off","no-unused-vars":"off","unicode-bom":"off","unicorn/prefer-module":"off","unicorn/prefer-string-raw":"off","unused-imports/no-unused-imports":"off","unused-imports/no-unused-vars":"off",...t}}]});var ir=Object.defineProperty,lr=w((e,r)=>ir(e,"name",{value:r,configurable:!0}),"s");const cr=lr(async e=>{const r=await c(import("eslint-plugin-no-secrets"));return[{files:["*","*/**"],ignores:["package.json","**/package.json","package-lock.json","**/package-lock.json","tsconfig.json","**/tsconfig.json"],languageOptions:{ecmaVersion:6},name:"anolilab/no-secrets",plugins:{"no-secrets":r},rules:{"no-secrets/no-secrets":"error",...e.overrides}}]},"noSecrets"),pr=n.createConfig("js",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-no-unsanitized"));return[{files:o,name:"anolilab/no-unsanitized/setup",plugins:{"no-unsanitized":t},rules:{"no-unsanitized/method":"error","no-unsanitized/property":"error",...s}}]}),fr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await c(import("eslint-plugin-n")),i=t?.engines?.node;return[{name:"anolilab/node/setup",plugins:{n:a}},{files:o,name:"anolilab/node/rules",rules:{...a.configs.recommended.rules,"global-require":"error","n/callback-return":"off","n/file-extension-in-import":"off","n/handle-callback-err":"off","n/no-extraneous-import":"off","n/no-extraneous-require":"off","n/no-missing-import":"off","n/no-missing-require":"off","n/no-mixed-requires":["error",{allowCall:!0,grouping:!0}],"n/no-new-require":"error","n/no-process-env":"off","n/no-process-exit":"off","n/no-restricted-modules":"off","n/no-sync":"off","n/no-unpublished-bin":"error","n/process-exit-as-throw":"error","no-buffer-constructor":"error","no-path-concat":"error",...i?{"n/no-unsupported-features/es-builtins":["error",{version:i}],"n/no-unsupported-features/es-syntax":["error",{ignores:["modules"],version:i}],"n/no-unsupported-features/node-builtins":["error",{version:i}]}:{},...s}}]}),dr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await c(import("eslint-plugin-perfectionist"));return y.hasPackageJsonAnyDependency(t,["eslint-plugin-typescript-sort-keys"])&&console.warn(`
|
|
7
7
|
Please remove "eslint-plugin-typescript-sort-keys" from your package.json, it conflicts with "eslint-plugin-perfectionist".
|
|
8
|
-
`),[{name:"anolilab/perfectionist/setup",plugins:{perfectionist:a}},{files:o,name:"anolilab/perfectionist/rules",rules:{...a.configs["recommended-natural"].rules,"perfectionist/sort-imports":"off","perfectionist/sort-named-exports":"off","perfectionist/sort-named-imports":"off","perfectionist/sort-union-types":"off",...s}},{files:n.getFilesGlobs("ts"),name:"anolilab/perfectionist/typescript",rules:{"perfectionist/sort-classes":"off"}},{files:n.getFilesGlobs("postcss"),name:"anolilab/perfectionist/postcss",rules:{"perfectionist/sort-objects":"off"}}]}),ur=n.createConfig("e2e",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-playwright"));return[{files:o,plugins:{playwright:t},rules:{...t.configs.recommended.rules,...s}}]}),mr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-promise"));return[{files:o,name:"anolilab/promise/rules",plugins:{promise:t},rules:{...le.fixupPluginRules(t.configs["flat/recommended"].rules),"promise/prefer-await-to-callbacks":"off","promise/prefer-await-to-then":"off",...s}}]}),se={allow:["__DEV__","__STORYBOOK_CLIENT_API__","__STORYBOOK_ADDONS_CHANNEL__","__STORYBOOK_STORY_STORE__"],allowAfterSuper:!1,allowAfterThis:!1,enforceInMethodNames:!0},de={"array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off",camelcase:["error",{ignoreDestructuring:!1,properties:"never"}],"capitalized-comments":["off","never",{block:{ignoreConsecutiveComments:!0,ignoreInlineComments:!0,ignorePattern:".*"},line:{ignoreConsecutiveComments:!0,ignoreInlineComments:!0,ignorePattern:".*"}}],"comma-style":"off","computed-property-spacing":"off","consistent-this":"off","default-param-last":["error"],"eol-last":"off","func-name-matching":["off","always",{considerPropertyDescriptor:!0,includeCommonJSModuleExports:!1}],"func-names":["error","as-needed"],"func-style":["error","expression"],"function-call-argument-newline":"off","function-paren-newline":"off","id-blacklist":"error","id-denylist":"off","id-length":"off","id-match":"off","implicit-arrow-linebreak":"off","jsx-quotes":"off","line-comment-position":"off","linebreak-style":"off","lines-around-directive":["error",{after:"always",before:"always"}],"max-depth":["off",4],"max-len":"off","max-lines":["off",{max:300,skipBlankLines:!0,skipComments:!0}],"max-lines-per-function":["off",{IIFEs:!0,max:50,skipBlankLines:!0,skipComments:!0}],"max-nested-callbacks":"off","max-params":["off",3],"max-statements":["off",10],"max-statements-per-line":"off","multiline-comment-style":"off","multiline-ternary":"off","new-cap":["error",{capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"],newIsCap:!0,newIsCapExceptions:[]}],"new-parens":"off","newline-after-var":"off","newline-before-return":"off","newline-per-chained-call":"off","no-array-constructor":"error","no-bitwise":"error","no-continue":"off","no-inline-comments":"off","no-lonely-if":"error","no-mixed-operators":["error",{allowSamePrecedence:!1,groups:[["%","**"],["%","+"],["%","-"],["%","*"],["%","/"],["/","*"],["&","|","<<",">>",">>>"],["==","!=","===","!=="],["&&","||"],["in","instanceof"]]}],"no-mixed-spaces-and-tabs":"off","no-multi-assign":["error"],"no-multiple-empty-lines":"off","no-negated-condition":"off","no-nested-ternary":"error","no-new-object":"error","no-plusplus":"error","no-restricted-syntax":["error",{message:"for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",selector:"ForInStatement"},{message:"Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",selector:"LabeledStatement"},{message:"`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",selector:"WithStatement"},{message:"`useMemo` with an empty dependency array can't provide a stable reference, use `useRef` instead.",selector:"CallExpression[callee.name=useMemo][arguments.1.type=ArrayExpression][arguments.1.elements.length=0]"},{message:"Use `.key` instead of `.keyCode`",selector:"MemberExpression > .property[type=Identifier][name=keyCode]"},{message:"Do not use full-width tilde. Use wave dash instead.",selector:":matches(Literal[value=/~/],TemplateElement[value.raw=/~/])"},{message:"Use `.toString()` instead of template literal if you want to convert a value to string.",selector:'TemplateLiteral[quasis.0.value.raw=""][quasis.1.tail=true][quasis.1.value.raw=""]'}],"no-spaced-func":"off","no-tabs":"off","no-ternary":"off","no-trailing-spaces":"off","no-underscore-dangle":["error",se],"no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var":["error","never"],"one-var-declaration-per-line":"off","operator-assignment":["error","always"],"operator-linebreak":"off","padded-blocks":"off","padding-line-between-statements":"off","prefer-exponentiation-operator":"error","prefer-object-spread":"error","quote-props":"off",quotes:"off","require-jsdoc":"off","rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","sort-keys":"off","sort-vars":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-infix-ops":"off","space-unary-ops":"off","spaced-comment":"off","switch-colon-spacing":"off","template-tag-spacing":"off","unicode-bom":["error","never"],"wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off"},yr=n.createConfig("all",async(e,r)=>{const{files:o=r,prettier:s}=e;return[{files:o,name:"anolilab/style/rules",rules:{...de,"quote-props":"off",...s?{"array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off","arrow-parens":"off","arrow-spacing":"off","block-spacing":"off","brace-style":"off","comma-dangle":"off","comma-spacing":"off","comma-style":"off","computed-property-spacing":"off",curly:0,"dot-location":"off","eol-last":"off","func-call-spacing":"off","function-call-argument-newline":"off","function-paren-newline":"off","generator-star-spacing":"off","implicit-arrow-linebreak":"off",indent:"off","jsx-quotes":"off","key-spacing":"off","keyword-spacing":"off","linebreak-style":"off","lines-around-comment":0,"max-len":0,"max-statements-per-line":"off","multiline-ternary":"off","new-parens":"off","newline-per-chained-call":"off","no-confusing-arrow":0,"no-extra-parens":"off","no-extra-semi":"off","no-floating-decimal":"off","no-mixed-operators":0,"no-mixed-spaces-and-tabs":"off","no-multi-spaces":"off","no-multiple-empty-lines":"off","no-tabs":0,"no-trailing-spaces":"off","no-unexpected-multiline":0,"no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var-declaration-per-line":"off","operator-linebreak":"off","padded-blocks":"off",quotes:0,"rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-unary-ops":"off","switch-colon-spacing":"off","template-curly-spacing":"off","template-tag-spacing":"off","wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off"}:{}}},{files:n.getFilesGlobs("ts"),name:"anolilab/style/ts-rules",rules:{"brace-style":"off",camelcase:"off","comma-dangle":"off","comma-spacing":"off","func-call-spacing":"off",indent:"off","keyword-spacing":"off","lines-between-class-members":"off","no-array-constructor":"off",quotes:"off",semi:"off","space-before-function-paren":"off"}}]}),gr=["vite"],hr=["@remix-run/node","@remix-run/react","@remix-run/serve","@remix-run/dev"],br=["next"],xr=["@react-router/node","@react-router/react","@react-router/serve","@react-router/dev"],wr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,filesTypeAware:s=n.getFilesGlobs("ts"),ignoresTypeAware:t=["**/*.md/**",...n.getFilesGlobs("astro")],overrides:a,packageJson:i,prettier:p,reactCompiler:f,silent:h,stylistic:x=!0,tsconfigPath:v}=e,C=v!==void 0,{indent:O=4}=typeof x=="boolean"?{}:x,I={"react-x/no-leaked-conditional-rendering":"error"},[U,z,N,$,D,F]=await Promise.all([c(import("@eslint-react/eslint-plugin")),c(import("eslint-plugin-react")),c(import("eslint-plugin-react-hooks")),c(import("eslint-plugin-react-refresh")),c(import("eslint-plugin-react-perf")),c(import("eslint-plugin-react-you-might-not-need-an-effect"))]),q=y.hasPackageJsonAnyDependency(i,gr),E=y.hasPackageJsonAnyDependency(i,hr),L=y.hasPackageJsonAnyDependency(i,br),T=y.hasPackageJsonAnyDependency(i,xr),{plugins:J}=U.configs.all;let _=i?.dependencies?.react||i?.devDependencies?.react,A=!1;if(_!==void 0){const k=ie.parse(_);k!==null&&(_=`${k.major}.${k.minor}`,h||console.info(`
|
|
8
|
+
`),[{name:"anolilab/perfectionist/setup",plugins:{perfectionist:a}},{files:o,name:"anolilab/perfectionist/rules",rules:{...a.configs["recommended-natural"].rules,"perfectionist/sort-imports":"off","perfectionist/sort-modules":"off","perfectionist/sort-named-exports":"off","perfectionist/sort-named-imports":"off","perfectionist/sort-union-types":"off",...s}},{files:n.getFilesGlobs("ts"),name:"anolilab/perfectionist/typescript",rules:{"perfectionist/sort-classes":"off"}},{files:n.getFilesGlobs("postcss"),name:"anolilab/perfectionist/postcss",rules:{"perfectionist/sort-objects":"off"}}]}),ur=n.createConfig("e2e",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-playwright"));return[{files:o,plugins:{playwright:t},rules:{...t.configs.recommended.rules,...s}}]}),mr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-promise"));return[{files:o,name:"anolilab/promise/rules",plugins:{promise:t},rules:{...le.fixupPluginRules(t.configs["flat/recommended"].rules),"promise/prefer-await-to-callbacks":"off","promise/prefer-await-to-then":"off",...s}}]}),se={allow:["__DEV__","__STORYBOOK_CLIENT_API__","__STORYBOOK_ADDONS_CHANNEL__","__STORYBOOK_STORY_STORE__"],allowAfterSuper:!1,allowAfterThis:!1,enforceInMethodNames:!0},de={"array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off",camelcase:["error",{ignoreDestructuring:!1,properties:"never"}],"capitalized-comments":["off","never",{block:{ignoreConsecutiveComments:!0,ignoreInlineComments:!0,ignorePattern:".*"},line:{ignoreConsecutiveComments:!0,ignoreInlineComments:!0,ignorePattern:".*"}}],"comma-style":"off","computed-property-spacing":"off","consistent-this":"off","default-param-last":["error"],"eol-last":"off","func-name-matching":["off","always",{considerPropertyDescriptor:!0,includeCommonJSModuleExports:!1}],"func-names":["error","as-needed"],"func-style":["error","expression"],"function-call-argument-newline":"off","function-paren-newline":"off","id-blacklist":"error","id-denylist":"off","id-length":"off","id-match":"off","implicit-arrow-linebreak":"off","jsx-quotes":"off","line-comment-position":"off","linebreak-style":"off","lines-around-directive":["error",{after:"always",before:"always"}],"max-depth":["off",4],"max-len":"off","max-lines":["off",{max:300,skipBlankLines:!0,skipComments:!0}],"max-lines-per-function":["off",{IIFEs:!0,max:50,skipBlankLines:!0,skipComments:!0}],"max-nested-callbacks":"off","max-params":["off",3],"max-statements":["off",10],"max-statements-per-line":"off","multiline-comment-style":"off","multiline-ternary":"off","new-cap":["error",{capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"],newIsCap:!0,newIsCapExceptions:[]}],"new-parens":"off","newline-after-var":"off","newline-before-return":"off","newline-per-chained-call":"off","no-array-constructor":"error","no-bitwise":"error","no-continue":"off","no-inline-comments":"off","no-lonely-if":"error","no-mixed-operators":["error",{allowSamePrecedence:!1,groups:[["%","**"],["%","+"],["%","-"],["%","*"],["%","/"],["/","*"],["&","|","<<",">>",">>>"],["==","!=","===","!=="],["&&","||"],["in","instanceof"]]}],"no-mixed-spaces-and-tabs":"off","no-multi-assign":["error"],"no-multiple-empty-lines":"off","no-negated-condition":"off","no-nested-ternary":"error","no-new-object":"error","no-plusplus":"error","no-restricted-syntax":["error",{message:"for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",selector:"ForInStatement"},{message:"Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",selector:"LabeledStatement"},{message:"`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",selector:"WithStatement"},{message:"`useMemo` with an empty dependency array can't provide a stable reference, use `useRef` instead.",selector:"CallExpression[callee.name=useMemo][arguments.1.type=ArrayExpression][arguments.1.elements.length=0]"},{message:"Use `.key` instead of `.keyCode`",selector:"MemberExpression > .property[type=Identifier][name=keyCode]"},{message:"Do not use full-width tilde. Use wave dash instead.",selector:":matches(Literal[value=/~/],TemplateElement[value.raw=/~/])"},{message:"Use `.toString()` instead of template literal if you want to convert a value to string.",selector:'TemplateLiteral[quasis.0.value.raw=""][quasis.1.tail=true][quasis.1.value.raw=""]'}],"no-spaced-func":"off","no-tabs":"off","no-ternary":"off","no-trailing-spaces":"off","no-underscore-dangle":["error",se],"no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var":["error","never"],"one-var-declaration-per-line":"off","operator-assignment":["error","always"],"operator-linebreak":"off","padded-blocks":"off","padding-line-between-statements":"off","prefer-exponentiation-operator":"error","prefer-object-spread":"error","quote-props":"off",quotes:"off","require-jsdoc":"off","rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","sort-keys":"off","sort-vars":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-infix-ops":"off","space-unary-ops":"off","spaced-comment":"off","switch-colon-spacing":"off","template-tag-spacing":"off","unicode-bom":["error","never"],"wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off"},yr=n.createConfig("all",async(e,r)=>{const{files:o=r,prettier:s}=e;return[{files:o,name:"anolilab/style/rules",rules:{...de,"quote-props":"off",...s?{"array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off","arrow-parens":"off","arrow-spacing":"off","block-spacing":"off","brace-style":"off","comma-dangle":"off","comma-spacing":"off","comma-style":"off","computed-property-spacing":"off",curly:0,"dot-location":"off","eol-last":"off","func-call-spacing":"off","function-call-argument-newline":"off","function-paren-newline":"off","generator-star-spacing":"off","implicit-arrow-linebreak":"off",indent:"off","jsx-quotes":"off","key-spacing":"off","keyword-spacing":"off","linebreak-style":"off","lines-around-comment":0,"max-len":0,"max-statements-per-line":"off","multiline-ternary":"off","new-parens":"off","newline-per-chained-call":"off","no-confusing-arrow":0,"no-extra-parens":"off","no-extra-semi":"off","no-floating-decimal":"off","no-mixed-operators":0,"no-mixed-spaces-and-tabs":"off","no-multi-spaces":"off","no-multiple-empty-lines":"off","no-tabs":0,"no-trailing-spaces":"off","no-unexpected-multiline":0,"no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var-declaration-per-line":"off","operator-linebreak":"off","padded-blocks":"off",quotes:0,"rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-unary-ops":"off","switch-colon-spacing":"off","template-curly-spacing":"off","template-tag-spacing":"off","wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off"}:{}}},{files:n.getFilesGlobs("ts"),name:"anolilab/style/ts-rules",rules:{"brace-style":"off",camelcase:"off","comma-dangle":"off","comma-spacing":"off","func-call-spacing":"off",indent:"off","keyword-spacing":"off","lines-between-class-members":"off","no-array-constructor":"off",quotes:"off",semi:"off","space-before-function-paren":"off"}}]}),gr=["vite"],hr=["@remix-run/node","@remix-run/react","@remix-run/serve","@remix-run/dev"],br=["next"],xr=["@react-router/node","@react-router/react","@react-router/serve","@react-router/dev"],wr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,filesTypeAware:s=n.getFilesGlobs("ts"),ignoresTypeAware:t=["**/*.md/**",...n.getFilesGlobs("astro")],overrides:a,packageJson:i,prettier:p,reactCompiler:f,silent:h,stylistic:x=!0,tsconfigPath:v}=e,C=v!==void 0,{indent:O=4}=typeof x=="boolean"?{}:x,I={"react-x/no-leaked-conditional-rendering":"error"},[U,z,N,$,D,F]=await Promise.all([c(import("@eslint-react/eslint-plugin")),c(import("eslint-plugin-react")),c(import("eslint-plugin-react-hooks")),c(import("eslint-plugin-react-refresh")),c(import("eslint-plugin-react-perf")),c(import("eslint-plugin-react-you-might-not-need-an-effect"))]),q=y.hasPackageJsonAnyDependency(i,gr),E=y.hasPackageJsonAnyDependency(i,hr),L=y.hasPackageJsonAnyDependency(i,br),T=y.hasPackageJsonAnyDependency(i,xr),{plugins:J}=U.configs.all;let _=i?.dependencies?.react||i?.devDependencies?.react,A=!1;if(_!==void 0){const k=ie.parse(_);k!==null&&(_=`${k.major}.${k.minor}`,h||console.info(`
|
|
9
9
|
@anolilab/eslint-config found the version ${_} of react in your dependencies, this version ${_} will be used to setup the "eslint-plugin-react"
|
|
10
10
|
`)),k?.major&&k.major>=19&&(A=!0)}let V=!1;if(v!==void 0){const k=Pe.readTsConfig(v);k?.compilerOptions!==void 0&&(k?.compilerOptions.jsx==="react-jsx"||k?.compilerOptions.jsx==="react-jsxdev")&&(V=!0,h||console.info(`
|
|
11
11
|
@anolilab/eslint-config found react jsx-runtime.
|
|
@@ -14,7 +14,7 @@ Please remove "eslint-plugin-typescript-sort-keys" from your package.json, it co
|
|
|
14
14
|
If you dont use the new react jsx-runtime in you project, please enable it manually.
|
|
15
15
|
`))}A=A&&f!==!1;let B;return A&&(console.info(`
|
|
16
16
|
@anolilab/eslint-config enabling react-compiler plugin
|
|
17
|
-
`),B=c(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:z,"react-dom":J["@eslint-react/dom"],"react-hooks":N,"react-hooks-extra":J["@eslint-react/hooks-extra"],"react-naming-convention":J["@eslint-react/naming-convention"],"react-perf":D,"react-refresh":$,"react-web-api":J["@eslint-react/web-api"],"react-x":J["@eslint-react"],"react-you-might-not-need-an-effect":F,...A?{"react-compiler":B}:{}}},{files:o,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":["error",{...se,allow:[...se.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks-extra/no-unnecessary-use-callback":"error","react-hooks-extra/no-unnecessary-use-memo":"error","react-hooks-extra/no-unnecessary-use-prefix":"error","react-hooks-extra/prefer-use-state-lazy-initialization":"error","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-naming-convention/component-name":"error","react-naming-convention/context-name":"error","react-naming-convention/filename":"off","react-naming-convention/use-state":"error","react-refresh/only-export-components":["error",{allowConstantExport:q,allowExportNames:[...L?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...E||T?["meta","links","headers","loader","action"]:[]]}],"react-web-api/no-leaked-event-listener":"error","react-web-api/no-leaked-interval":"error","react-web-api/no-leaked-resize-observer":"error","react-web-api/no-leaked-timeout":"error","react-x/avoid-shorthand-boolean":"off","react-x/avoid-shorthand-fragment":"off","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-uses-react":V?"off":"error","react-x/jsx-uses-vars":"error","react-x/no-access-state-in-setstate":"error","react-x/no-array-index-key":"error","react-x/no-children-count":"error","react-x/no-children-for-each":"error","react-x/no-children-map":"error","react-x/no-children-only":"error","react-x/no-children-prop":"off","react-x/no-children-to-array":"error","react-x/no-class-component":"off","react-x/no-clone-element":"error","react-x/no-comment-textnodes":"error","react-x/no-complex-conditional-rendering":"off","react-x/no-component-will-mount":"error","react-x/no-component-will-receive-props":"error","react-x/no-component-will-update":"error","react-x/no-context-provider":"error","react-x/no-create-ref":"error","react-x/no-default-props":"error","react-x/no-direct-mutation-state":"error","react-x/no-duplicate-key":"error","react-x/no-forward-ref":"error","react-x/no-implicit-key":"error","react-x/no-leaked-conditional-rendering":"error","react-x/no-missing-component-display-name":"off","react-x/no-missing-context-display-name":"off","react-x/no-missing-key":"error","react-x/no-misused-capture-owner-stack":"off","react-x/no-nested-component-definitions":"error","react-x/no-nested-lazy-component-declarations":"error","react-x/no-prop-types":"error","react-x/no-redundant-should-component-update":"error","react-x/no-set-state-in-component-did-mount":"error","react-x/no-set-state-in-component-did-update":"error","react-x/no-set-state-in-component-will-update":"error","react-x/no-string-refs":"error","react-x/no-unsafe-component-will-mount":"error","react-x/no-unsafe-component-will-receive-props":"error","react-x/no-unsafe-component-will-update":"error","react-x/no-unstable-context-value":"error","react-x/no-unstable-default-props":"error","react-x/no-unused-class-component-members":"error","react-x/no-unused-state":"error","react-x/no-use-context":"error","react-x/no-useless-forward-ref":"error","react-x/no-useless-fragment":"off","react-x/prefer-destructuring-assignment":"off","react-x/prefer-react-namespace-import":"off","react-x/prefer-read-only-props":"off","react-x/prefer-shorthand-boolean":"off","react-x/prefer-shorthand-fragment":"off","react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["error",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",O,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",O],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"off","react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"off","react/jsx-no-useless-fragment":"off","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":"off","react/jsx-uses-vars":"off","react/no-access-state-in-setstate":"off","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"off","react/no-children-prop":"off","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"off","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"off","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"off","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"off","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":"off","react/react-in-jsx-scope":V?"off":"error","react/require-default-props":"off","react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","static public field"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...A?{"react-compiler/react-compiler":"error"}:{},...D?.configs?.flat?.recommended?.rules,"react-you-might-not-need-an-effect/you-might-not-need-an-effect":"warn",...p?{"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off"}:{},...a},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:_??"detect"},"react-x":{version:_??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/jsx",rules:{"react-x/naming-convention/filename-extension":["error","as-needed"],"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"off","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"},settings:{extensions:[".jsx"]}},{files:["**/*.tsx"],name:"anolilab/react/tsx",rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:n.getFilesGlobs("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...C?[{files:s,ignores:t,name:"anolilab/react/type-aware-rules",rules:{...I}}]:[]]}),jr=n.createConfig("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,a=Ce.configs["flat/recommended"],i={...a.rules};if(s==="warn")for(const p in i)i[p]==="error"&&(i[p]="warn");return[{...a,files:o,name:"anolilab/regexp/rules",rules:{...i,...t}}]}),vr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-simple-import-sort"));return[{files:o,name:"anolilab/simple-import-sort",plugins:{"simple-import-sort":t},rules:{"simple-import-sort/exports":"error","simple-import-sort/imports":"error",...s}}]}),kr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-sonarjs"));return[{name:"anolilab/sonarjs/plugin",plugins:{sonarjs:t}},{files:o,name:"anolilab/sonarjs/rules",rules:{...t.configs.recommended.rules,"sonarjs/file-name-differ-from-class":"error","sonarjs/no-collapsible-if":"error","sonarjs/no-nested-template-literals":"off","sonarjs/no-tab":"error","sonarjs/todo-tag":"off",...s}},{files:n.getFilesGlobs("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:n.getFilesGlobs("js"),languageOptions:{ecmaVersion:2020},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off"}}]}),Pr=n.createConfig("storybook",async e=>{const{overrides:r}=e,o=[...(await c(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),Cr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await c(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),Or=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),Dr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),_r=n.createConfig("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await c(import("eslint-plugin-testing-library")),i=y.hasPackageJsonAnyDependency(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":a},rules:{...a.configs["flat/dom"].rules,...i?a.configs["flat/react"].rules:{},...s}}]}),Sr=n.createConfig("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:a=2}=typeof t=="boolean"?{}:t,[i,p]=await Promise.all([c(import("eslint-plugin-toml")),c(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:p},name:"anolilab/toml",plugins:{toml:i},rules:{...t?{"@stylistic/spaced-comment":"off"}:{},"toml/comma-style":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error",...t?{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"error","toml/indent":["error",a==="tab"?2:a],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error"}:{},...s}}]}),Fr=n.createConfig("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),Q={"init-declarations":"off","no-catch-shadow":"off","no-delete-var":"error","no-label-var":"error","no-restricted-globals":["error",{message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",name:"isFinite"},{message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",name:"isNaN"},..._e.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":["error",{args:"after-used",ignoreRestSiblings:!0,vars:"all"}],"no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},qr=n.createConfig("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:Q},{files:n.getFilesGlobs("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Er=Object.defineProperty,Ar=w((e,r)=>Er(e,"name",{value:r,configurable:!0}),"w");const Ir=n.createConfig("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:a,overridesTypeAware:i,parserOptions:p,prettier:f}=e,h=de,x=ce(t),[v,C,O,I]=await Promise.all([c(import("@typescript-eslint/eslint-plugin")),c(import("@typescript-eslint/parser")),c(import("typescript-eslint")),c(import("eslint-plugin-no-for-of-array"))]),U=e.filesTypeAware??n.getFilesGlobs("ts"),z=e.ignoresTypeAware??["**/*.mdx/**",...n.getFilesGlobs("astro")],N=e?.tsconfigPath??void 0,$=N!==void 0,D=Ar((q,E,L)=>({files:[...E,...o.map(T=>`**/*.${T}`)],...L?{ignores:L}:{},languageOptions:{parser:C,parserOptions:{extraFileExtensions:o.map(T=>`.${T}`),sourceType:"module",...q?{projectService:{allowDefaultProject:["./*.js"],defaultProject:N},tsconfigRootDir:process.cwd()}:{},...p}},name:`anolilab/typescript/${q?"type-aware-parser":"parser"}`}),"makeParser"),F=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":v,"no-for-of-array":I}},...$?[D(!1,s),D(!0,U,z)]:[D(!1,s)],...O.configs.strict];return $&&F.push(...O.configs.strictTypeCheckedOnly,{files:[...U,...o.map(q=>`**/*.${q}`)],name:"anolilab/typescript/rules-type-aware",rules:{"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error",...i}},{files:n.getFilesGlobs("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),F.push({files:s,name:"anolilab/typescript/rules",rules:{"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-ts-comment":["error",{minimumDescriptionLength:3,"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":"allow-with-description","ts-nocheck":!0}],"@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/method-signature-style":"error","@typescript-eslint/naming-convention":["error",{format:["camelCase","PascalCase","UPPER_CASE"],selector:"variable"},{format:["camelCase","PascalCase"],selector:"function"},{format:["PascalCase"],selector:"typeLike"}],"@typescript-eslint/no-array-constructor":h["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":x["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":M["no-empty-function"],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-loop-func":M["no-loop-func"],"@typescript-eslint/no-magic-numbers":M["no-magic-numbers"],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redeclare":M["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":Q["no-shadow"],"@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unused-expressions":M["no-unused-expressions"],"@typescript-eslint/no-unused-vars":Q["no-unused-vars"],"@typescript-eslint/no-use-before-define":Q["no-use-before-define"],"@typescript-eslint/no-useless-constructor":x["no-useless-constructor"],"@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"off","@typescript-eslint/prefer-ts-expect-error":"off","@typescript-eslint/return-await":M["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"error","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":h["space-infix-ops"],...a,...f?{"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":0,"@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/quotes":0,"@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"}:{}}}),F}),Nr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:a,stylistic:i=!0}=e,{indent:p=4}=typeof i=="boolean"?{}:i,f=await c(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:H.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:f}},{files:o,name:"anolilab/unicorn/rules",rules:{...f.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","unicorn/no-useless-undefined":"off","unicorn/prefer-at":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":t.type==="module"?"error":"off","unicorn/prefer-node-protocol":"error","unicorn/prefer-ternary":["error","only-single-line"],...a?{"unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}:{"unicorn/template-indent":["error",{indent:p}]},...s}},{files:["tsconfig.dev.json","tsconfig.prod.json"],name:"anolilab/unicorn/tsconfig-overrides",rules:{"unicorn/prevent-abbreviations":"off"}},{files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],name:"anolilab/unicorn/ts-overrides",rules:{"unicorn/import-style":"off"}}]});var Tr=Object.defineProperty,Jr=w((e,r)=>Tr(e,"name",{value:r,configurable:!0}),"n$2");const Ur=Jr(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await c(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),$r=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-validate-jsx-nesting"));return[{files:o,name:"anolilab/validate-jsx-nesting/setup",plugins:{"validate-jsx-nesting":t},rules:{"validate-jsx-nesting/no-invalid-jsx-nesting":"error",...s}}]}),Lr={suite:!0,test:!0,chai:!0,describe:!0,it:!0,expectTypeOf:!0,assertType:!0,expect:!0,assert:!0,vitest:!0,vi:!0,beforeAll:!0,afterAll:!0,beforeEach:!0,afterEach:!0,onTestFailed:!0,onTestFinished:!0};let re;const Mr=n.createConfig("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:a,tsconfigPath:i}=e,[p,f]=await Promise.all([c(import("@vitest/eslint-plugin")),c(import("eslint-plugin-no-only-tests"))]);return re=re||{...p,rules:{...p.rules,...f.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:re}},{files:o,...i?{...p.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Lr}},name:"anolilab/vitest/rules",rules:{...p.configs.all.rules,...p.configs.recommended.rules,"@typescript-eslint/explicit-function-return-type":"off","antfu/no-top-level-await":"off","n/prefer-global/process":"off","no-unused-expressions":"off","vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/max-expects":"off","vitest/no-hooks":"off","vitest/no-mocks-import":"off","vitest/no-only-tests":s?"off":"error","vitest/no-restricted-vi-methods":"off","vitest/no-standalone-expect":"error","vitest/valid-expect":["error",{alwaysAwait:!0,maxArgs:2,minArgs:1}],...t,...a?{"vitest/padding-around-after-all-blocks":"off","vitest/padding-around-after-each-blocks":"off","vitest/padding-around-all":"off","vitest/padding-around-before-all-blocks":"off","vitest/padding-around-before-each-blocks":"off","vitest/padding-around-describe-blocks":"off","vitest/padding-around-expect-blocks":"off","vitest/padding-around-test-blocks":"off"}:{}}}]}),Rr=n.createConfig("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:a=!0}=e,{indent:i=4,quotes:p="double"}=typeof a=="boolean"?{}:a,[f,h]=await Promise.all([c(import("eslint-plugin-yml")),c(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:h},name:"anolilab/yaml",plugins:{yaml:f},rules:{"@stylistic/spaced-comment":"off","yaml/block-mapping":"error","yaml/block-sequence":"error","yaml/no-empty-key":"error","yaml/no-empty-sequence-entry":"error","yaml/no-irregular-whitespace":"error","yaml/plain-scalar":"error","yaml/vue-custom-block/no-parsing-error":"error",...a?{"yaml/block-mapping-question-indicator-newline":"error","yaml/block-sequence-hyphen-indicator-newline":"error","yaml/flow-mapping-curly-newline":"error","yaml/flow-mapping-curly-spacing":"error","yaml/flow-sequence-bracket-newline":"error","yaml/flow-sequence-bracket-spacing":"error","yaml/indent":[t?"off":"error",i==="tab"?2:i],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:p==="backtick"?"single":p}],"yaml/spaced-comment":"error"}:{},...t?f.configs.prettier.rules:{},...s}},{files:["pnpm-workspace.yaml"],name:"anolilab/yaml/pnpm-workspace",rules:{"yaml/sort-keys":["error",{order:["packages","overrides","patchedDependencies","hoistPattern","catalog","catalogs","allowedDeprecatedVersions","allowNonAppliedPatches","configDependencies","ignoredBuiltDependencies","ignoredOptionalDependencies","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","packageExtensions","peerDependencyRules","supportedArchitectures"],pathPattern:"^$"}]}}]}),Gr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":le.fixupPluginRules(t)},rules:{...t.configs.all.rules,...s}}]}),zr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var Vr=Object.defineProperty,Br=w((e,r)=>Vr(e,"name",{value:r,configurable:!0}),"e$1");const Wr=Br(()=>!!(process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged")),"isInGitHooksOrLintStaged");var Xr=Object.defineProperty,Kr=w((e,r)=>Xr(e,"name",{value:r,configurable:!0}),"e");const Hr=Kr(()=>process.env.CI||Wr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var Qr=Object.defineProperty,W=w((e,r)=>Qr(e,"name",{value:r,configurable:!0}),"f");const Yr=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],X=W((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),d=W((e,r)=>{const o=X(e,r);return{...e.overrides?.[r],..."overrides"in o?o.overrides:{}}},"getOverrides"),g=W((e,r)=>{const o=X(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),Zr=W(async(e={},...r)=>{if("files"in e)throw new Error('[@anolilab/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');const o=e.cwd??process.cwd(),s=y.parsePackageJson(xe.readFileSync(we.join(o,"package.json"),"utf8")),t=y.hasPackageJsonAnyDependency(s,["prettier"]),a=y.hasPackageJsonAnyDependency(s,["@anolilab/eslint-config"]),i=y.hasPackageJsonAnyDependency(s,["react","react-dom"]),p=s?.dependencies?.react||s?.devDependencies?.react;let f=!1;if(p!==void 0){const u=ie.parse(p);u?.major&&u.major>=19&&(f=!0)}const{astro:h=y.hasPackageJsonAnyDependency(s,["astro"]),componentExts:x=[],css:v=!1,gitignore:C=!0,html:O=!1,jsx:I=y.hasPackageJsonAnyDependency(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||i,lodash:U=y.hasPackageJsonAnyDependency(s,["lodash","underscore","lodash-es","@types/lodash","lodash.chunk","lodash.compact","lodash.concat","lodash.difference","lodash.differenceby","lodash.differencewith","lodash.drop","lodash.dropright","lodash.droprightwhile","lodash.dropwhile","lodash.fill","lodash.findindex","lodash.findlastindex","lodash.flatten","lodash.flattendeep","lodash.flattendepth","lodash.frompairs","lodash.head","lodash.indexof","lodash.initial","lodash.intersection","lodash.intersectionby","lodash.intersectionwith","lodash.join","lodash.last","lodash.lastindexof","lodash.nth","lodash.pull","lodash.pullall","lodash.pullallby","lodash.pullallwith","lodash.pullat","lodash.remove","lodash.reverse","lodash.slice","lodash.sortedindex","lodash.sortedindexby","lodash.sortedindexof","lodash.sortedlastindex","lodash.sortedlastindexby","lodash.sortedlastindexof","lodash.sorteduniq","lodash.sorteduniqby","lodash.tail","lodash.take","lodash.takeright","lodash.takerightwhile","lodash.takewhile","lodash.union","lodash.unionby","lodash.unionwith","lodash.uniq","lodash.uniqby","lodash.uniqwith","lodash.unzip","lodash.unzipwith","lodash.without","lodash.xor","lodash.xorby","lodash.xorwith","lodash.zip","lodash.zipobject","lodash.zipobjectdeep","lodash.zipwith","lodash.countby","lodash.every","lodash.filter","lodash.find","lodash.findlast","lodash.flatmap","lodash.flatmapdeep","lodash.flatmapdepth","lodash.foreach","lodash.foreachright","lodash.groupby","lodash.includes","lodash.invokemap","lodash.keyby","lodash.map","lodash.orderby","lodash.partition","lodash.reduce","lodash.reduceright","lodash.reject","lodash.sample","lodash.samplesize","lodash.shuffle","lodash.size","lodash.some","lodash.sortby","lodash.now","lodash.after","lodash.ary","lodash.before","lodash.bind","lodash.bindkey","lodash.curry","lodash.curryright","lodash.debounce","lodash.defer","lodash.delay","lodash.flip","lodash.memoize","lodash.negate","lodash.once","lodash.overargs","lodash.partial","lodash.partialright","lodash.rearg","lodash.rest","lodash.spread","lodash.throttle","lodash.unary","lodash.wrap","lodash.castarray","lodash.clone","lodash.clonedeep","lodash.clonedeepwith","lodash.clonewith","lodash.conformsto","lodash.eq","lodash.gt","lodash.gte","lodash.isarguments","lodash.isarray","lodash.isarraybuffer","lodash.isarraylike","lodash.isarraylikeobject","lodash.isboolean","lodash.isbuffer","lodash.isdate","lodash.iselement","lodash.isempty","lodash.isequal","lodash.isequalwith","lodash.iserror","lodash.isfinite","lodash.isfunction","lodash.isinteger","lodash.islength","lodash.ismap","lodash.ismatch","lodash.ismatchwith","lodash.isnan","lodash.isnative","lodash.isnil","lodash.isnull","lodash.isnumber","lodash.isobject","lodash.isobjectlike","lodash.isplainobject","lodash.isregexp","lodash.issafeinteger","lodash.isset","lodash.isstring","lodash.issymbol","lodash.istypedarray","lodash.isundefined","lodash.isweakmap","lodash.isweakset","lodash.lt","lodash.lte","lodash.toarray","lodash.tofinite","lodash.tointeger","lodash.tolength","lodash.tonumber","lodash.toplainobject","lodash.tosafeinteger","lodash.tostring","lodash.add","lodash.ceil","lodash.divide","lodash.floor","lodash.max","lodash.maxby","lodash.mean","lodash.meanby","lodash.min","lodash.minby","lodash.multiply","lodash.round","lodash.subtract","lodash.sum","lodash.sumby","lodash.clamp","lodash.inrange","lodash.random","lodash.assign","lodash.assignin","lodash.assigninwith","lodash.assignwith","lodash.at","lodash.create","lodash.defaults","lodash.defaultsdeep","lodash.findkey","lodash.findlastkey","lodash.forin","lodash.forinright","lodash.forown","lodash.forownright","lodash.functions","lodash.functionsin","lodash.get","lodash.has","lodash.hasin","lodash.invert","lodash.invertby","lodash.invoke","lodash.keys","lodash.keysin","lodash.mapkeys","lodash.mapvalues","lodash.merge","lodash.mergewith","lodash.omit","lodash.omitby","lodash.pick","lodash.pickby","lodash.result","lodash.set","lodash.setwith","lodash.topairs","lodash.topairsin","lodash.transform","lodash.unset","lodash.update","lodash.updatewith","lodash.values","lodash.valuesin","lodash.chain","lodash.tap","lodash.thru","lodash.camelcase","lodash.capitalize","lodash.deburr","lodash.endswith","lodash.escape","lodash.escaperegexp","lodash.kebabcase","lodash.lowercase","lodash.lowerfirst","lodash.pad","lodash.padend","lodash.padstart","lodash.parseint","lodash.repeat","lodash.replace","lodash.snakecase","lodash.split","lodash.startcase","lodash.startswith","lodash.template","lodash.tolower","lodash.toupper","lodash.trim","lodash.trimend","lodash.trimstart","lodash.truncate","lodash.unescape","lodash.uppercase","lodash.upperfirst","lodash.words","lodash.attempt","lodash.bindall","lodash.cond","lodash.conforms","lodash.constant","lodash.defaultto","lodash.flow","lodash.flowright","lodash.identity","lodash.iteratee","lodash.matches","lodash.matchesproperty","lodash.method","lodash.methodof","lodash.mixin","lodash.noconflict","lodash.noop","lodash.ntharg","lodash.over","lodash.overevery","lodash.oversome","lodash.property","lodash.propertyof","lodash.range","lodash.rangeright","lodash.runincontext","lodash.stubarray","lodash.stubfalse","lodash.stubobject","lodash.stubstring","lodash.stubtrue","lodash.times","lodash.topath","lodash.uniqueid"]),playwright:z=y.hasPackageJsonAnyDependency(s,["playwright","eslint-plugin-playwright"]),react:N=i||y.hasPackageJsonAnyDependency(s,["eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"]),reactCompiler:$=f,regexp:D=!0,silent:F=!1,storybook:q=y.hasPackageJsonAnyDependency(s,["storybook","eslint-plugin-storybook"]),tailwindcss:E=!1,tanstackQuery:L=y.hasPackageJsonAnyDependency(s,["@tanstack/react-query"]),tanstackRouter:T=y.hasPackageJsonAnyDependency(s,["@tanstack/react-router"]),testingLibrary:J=y.hasPackageJsonAnyDependency(s,["@testing-library/dom","@testing-library/react"]),tsdoc:_=!1,typescript:A=y.hasPackageJsonAnyDependency(s,["typescript"]),unicorn:V=!0,unocss:B=!1,vitest:k=y.hasPackageJsonAnyDependency(s,["vitest"]),zod:te=y.hasPackageJsonAnyDependency(s,["zod"])}=e;if(a){const u=[];te&&u.push("eslint-plugin-zod"),B&&u.push("@unocss/eslint-plugin"),L&&u.push("@tanstack/eslint-plugin-query"),T&&u.push("@tanstack/eslint-plugin-router"),(v||E)&&u.push("@eslint/css"),E&&u.push("eslint-plugin-tailwindcss"),q&&u.push("eslint-plugin-storybook"),N&&u.push("eslint-plugin-react","@eslint-react/eslint-plugin","eslint-plugin-react-hooks","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),N&&$&&u.push("eslint-plugin-react-compiler"),J&&u.push("eslint-plugin-testing-library"),I&&u.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),U&&u.push("eslint-plugin-you-dont-need-lodash-underscore"),_&&u.push("eslint-plugin-tsdoc"),e.formatters&&u.push("eslint-plugin-format"),h&&(u.push("eslint-plugin-astro","astro-eslint-parser","@typescript-eslint/parser"),typeof e.formatters=="object"&&e.formatters.astro&&u.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters?.markdown&&e.formatters?.slidev&&u.push("prettier-plugin-slidev"),(e.formatters?.xml||e.formatters?.svg)&&u.push("@prettier/plugin-xml")),u.length>0&&await y.ensurePackages(s,u,"devDependencies",{confirm:{message:W(G=>`@anolilab/eslint-config requires the following ${G.length===1?"package":"packages"} to be installed:
|
|
17
|
+
`),B=c(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:z,"react-dom":J["@eslint-react/dom"],"react-hooks":N,"react-hooks-extra":J["@eslint-react/hooks-extra"],"react-naming-convention":J["@eslint-react/naming-convention"],"react-perf":D,"react-refresh":$,"react-web-api":J["@eslint-react/web-api"],"react-x":J["@eslint-react"],"react-you-might-not-need-an-effect":F,...A?{"react-compiler":B}:{}}},{files:o,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":["error",{...se,allow:[...se.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks-extra/no-unnecessary-use-callback":"error","react-hooks-extra/no-unnecessary-use-memo":"error","react-hooks-extra/no-unnecessary-use-prefix":"error","react-hooks-extra/prefer-use-state-lazy-initialization":"error","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-naming-convention/component-name":"error","react-naming-convention/context-name":"error","react-naming-convention/filename":"off","react-naming-convention/use-state":"error","react-refresh/only-export-components":["error",{allowConstantExport:q,allowExportNames:[...L?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...E||T?["meta","links","headers","loader","action"]:[]]}],"react-web-api/no-leaked-event-listener":"error","react-web-api/no-leaked-interval":"error","react-web-api/no-leaked-resize-observer":"error","react-web-api/no-leaked-timeout":"error","react-x/avoid-shorthand-boolean":"off","react-x/avoid-shorthand-fragment":"off","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-uses-react":V?"off":"error","react-x/jsx-uses-vars":"error","react-x/no-access-state-in-setstate":"error","react-x/no-array-index-key":"error","react-x/no-children-count":"error","react-x/no-children-for-each":"error","react-x/no-children-map":"error","react-x/no-children-only":"error","react-x/no-children-prop":"off","react-x/no-children-to-array":"error","react-x/no-class-component":"off","react-x/no-clone-element":"error","react-x/no-comment-textnodes":"error","react-x/no-complex-conditional-rendering":"off","react-x/no-component-will-mount":"error","react-x/no-component-will-receive-props":"error","react-x/no-component-will-update":"error","react-x/no-context-provider":"error","react-x/no-create-ref":"error","react-x/no-default-props":"error","react-x/no-direct-mutation-state":"error","react-x/no-duplicate-key":"error","react-x/no-forward-ref":"error","react-x/no-implicit-key":"error","react-x/no-leaked-conditional-rendering":"error","react-x/no-missing-component-display-name":"off","react-x/no-missing-context-display-name":"off","react-x/no-missing-key":"error","react-x/no-misused-capture-owner-stack":"off","react-x/no-nested-component-definitions":"error","react-x/no-nested-lazy-component-declarations":"error","react-x/no-prop-types":"error","react-x/no-redundant-should-component-update":"error","react-x/no-set-state-in-component-did-mount":"error","react-x/no-set-state-in-component-did-update":"error","react-x/no-set-state-in-component-will-update":"error","react-x/no-string-refs":"error","react-x/no-unsafe-component-will-mount":"error","react-x/no-unsafe-component-will-receive-props":"error","react-x/no-unsafe-component-will-update":"error","react-x/no-unstable-context-value":"error","react-x/no-unstable-default-props":"error","react-x/no-unused-class-component-members":"error","react-x/no-unused-state":"error","react-x/no-use-context":"error","react-x/no-useless-forward-ref":"error","react-x/no-useless-fragment":"off","react-x/prefer-destructuring-assignment":"off","react-x/prefer-react-namespace-import":"off","react-x/prefer-read-only-props":"off","react-x/prefer-shorthand-boolean":"off","react-x/prefer-shorthand-fragment":"off","react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["error",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",O,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",O],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"off","react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"off","react/jsx-no-useless-fragment":"off","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":"off","react/jsx-uses-vars":"off","react/no-access-state-in-setstate":"off","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"off","react/no-children-prop":"off","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"off","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"off","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"off","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"off","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":"off","react/react-in-jsx-scope":V?"off":"error","react/require-default-props":"off","react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","static public field"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...A?{"react-compiler/react-compiler":"error"}:{},...D?.configs?.flat?.recommended?.rules,"react-you-might-not-need-an-effect/you-might-not-need-an-effect":"warn",...p?{"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off"}:{},...a},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:_??"detect"},"react-x":{version:_??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/jsx",rules:{"react-x/naming-convention/filename-extension":["error","as-needed"],"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"off","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"},settings:{extensions:[".jsx"]}},{files:["**/*.tsx"],name:"anolilab/react/tsx",rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:n.getFilesGlobs("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...C?[{files:s,ignores:t,name:"anolilab/react/type-aware-rules",rules:{...I}}]:[]]}),jr=n.createConfig("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,a=Ce.configs["flat/recommended"],i={...a.rules};if(s==="warn")for(const p in i)i[p]==="error"&&(i[p]="warn");return[{...a,files:o,name:"anolilab/regexp/rules",rules:{...i,...t}}]}),vr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-simple-import-sort"));return[{files:o,name:"anolilab/simple-import-sort",plugins:{"simple-import-sort":t},rules:{"simple-import-sort/exports":"error","simple-import-sort/imports":"error",...s}}]}),kr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-sonarjs"));return[{name:"anolilab/sonarjs/plugin",plugins:{sonarjs:t}},{files:o,name:"anolilab/sonarjs/rules",rules:{...t.configs.recommended.rules,"sonarjs/file-name-differ-from-class":"error","sonarjs/no-collapsible-if":"error","sonarjs/no-nested-template-literals":"off","sonarjs/no-tab":"error","sonarjs/todo-tag":"off",...s}},{files:n.getFilesGlobs("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:n.getFilesGlobs("js"),languageOptions:{ecmaVersion:2020},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off"}}]}),Pr=n.createConfig("storybook",async e=>{const{overrides:r}=e,o=[...(await c(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),Cr=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await c(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),Or=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),Dr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),_r=n.createConfig("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,a=await c(import("eslint-plugin-testing-library")),i=y.hasPackageJsonAnyDependency(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":a},rules:{...a.configs["flat/dom"].rules,...i?a.configs["flat/react"].rules:{},...s}}]}),Sr=n.createConfig("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:a=2}=typeof t=="boolean"?{}:t,[i,p]=await Promise.all([c(import("eslint-plugin-toml")),c(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:p},name:"anolilab/toml",plugins:{toml:i},rules:{...t?{"@stylistic/spaced-comment":"off"}:{},"toml/comma-style":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error",...t?{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"error","toml/indent":["error",a==="tab"?2:a],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error"}:{},...s}}]}),Fr=n.createConfig("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),Q={"init-declarations":"off","no-catch-shadow":"off","no-delete-var":"error","no-label-var":"error","no-restricted-globals":["error",{message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",name:"isFinite"},{message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",name:"isNaN"},..._e.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":["error",{args:"after-used",ignoreRestSiblings:!0,vars:"all"}],"no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},qr=n.createConfig("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:Q},{files:n.getFilesGlobs("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Er=Object.defineProperty,Ar=w((e,r)=>Er(e,"name",{value:r,configurable:!0}),"w");const Ir=n.createConfig("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:a,overridesTypeAware:i,parserOptions:p,prettier:f}=e,h=de,x=ce(t),[v,C,O,I]=await Promise.all([c(import("@typescript-eslint/eslint-plugin")),c(import("@typescript-eslint/parser")),c(import("typescript-eslint")),c(import("eslint-plugin-no-for-of-array"))]),U=e.filesTypeAware??n.getFilesGlobs("ts"),z=e.ignoresTypeAware??["**/*.mdx/**",...n.getFilesGlobs("astro")],N=e?.tsconfigPath??void 0,$=N!==void 0,D=Ar((q,E,L)=>({files:[...E,...o.map(T=>`**/*.${T}`)],...L?{ignores:L}:{},languageOptions:{parser:C,parserOptions:{extraFileExtensions:o.map(T=>`.${T}`),sourceType:"module",...q?{projectService:{allowDefaultProject:["./*.js"],defaultProject:N},tsconfigRootDir:process.cwd()}:{},...p}},name:`anolilab/typescript/${q?"type-aware-parser":"parser"}`}),"makeParser"),F=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":v,"no-for-of-array":I}},...$?[D(!1,s),D(!0,U,z)]:[D(!1,s)],...O.configs.strict];return $&&F.push(...O.configs.strictTypeCheckedOnly,{files:[...U,...o.map(q=>`**/*.${q}`)],name:"anolilab/typescript/rules-type-aware",rules:{"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error",...i}},{files:n.getFilesGlobs("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),F.push({files:s,name:"anolilab/typescript/rules",rules:{"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-ts-comment":["error",{minimumDescriptionLength:3,"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":"allow-with-description","ts-nocheck":!0}],"@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/method-signature-style":"error","@typescript-eslint/naming-convention":["error",{format:["camelCase","PascalCase","UPPER_CASE"],selector:"variable"},{format:["camelCase","PascalCase"],selector:"function"},{format:["PascalCase"],selector:"typeLike"}],"@typescript-eslint/no-array-constructor":h["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":x["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":M["no-empty-function"],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-loop-func":M["no-loop-func"],"@typescript-eslint/no-magic-numbers":M["no-magic-numbers"],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redeclare":M["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":Q["no-shadow"],"@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unused-expressions":M["no-unused-expressions"],"@typescript-eslint/no-unused-vars":Q["no-unused-vars"],"@typescript-eslint/no-use-before-define":Q["no-use-before-define"],"@typescript-eslint/no-useless-constructor":x["no-useless-constructor"],"@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"off","@typescript-eslint/prefer-ts-expect-error":"off","@typescript-eslint/return-await":M["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"error","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":h["space-infix-ops"],...a,...f?{"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":0,"@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/quotes":0,"@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"}:{}}}),F}),Nr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:a,stylistic:i=!0}=e,{indent:p=4}=typeof i=="boolean"?{}:i,f=await c(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:H.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:f}},{files:o,name:"anolilab/unicorn/rules",rules:{...f.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","unicorn/no-useless-undefined":"off","unicorn/prefer-at":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":t.type==="module"?"error":"off","unicorn/prefer-node-protocol":"error","unicorn/prefer-ternary":["error","only-single-line"],...a?{"unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}:{"unicorn/template-indent":["error",{indent:p}]},...s}},{files:["tsconfig.dev.json","tsconfig.prod.json"],name:"anolilab/unicorn/tsconfig-overrides",rules:{"unicorn/prevent-abbreviations":"off"}},{files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],name:"anolilab/unicorn/ts-overrides",rules:{"unicorn/import-style":"off"}}]});var Tr=Object.defineProperty,Jr=w((e,r)=>Tr(e,"name",{value:r,configurable:!0}),"n$2");const Ur=Jr(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await c(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),$r=n.createConfig("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-validate-jsx-nesting"));return[{files:o,name:"anolilab/validate-jsx-nesting/setup",plugins:{"validate-jsx-nesting":t},rules:{"validate-jsx-nesting/no-invalid-jsx-nesting":"error",...s}}]}),Lr={suite:!0,test:!0,chai:!0,describe:!0,it:!0,expectTypeOf:!0,assertType:!0,expect:!0,assert:!0,vitest:!0,vi:!0,beforeAll:!0,afterAll:!0,beforeEach:!0,afterEach:!0,onTestFailed:!0,onTestFinished:!0};let re;const Mr=n.createConfig("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:a,tsconfigPath:i}=e,[p,f]=await Promise.all([c(import("@vitest/eslint-plugin")),c(import("eslint-plugin-no-only-tests"))]);return re=re||{...p,rules:{...p.rules,...f.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:re}},{files:o,...i?{...p.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Lr}},name:"anolilab/vitest/rules",rules:{...p.configs.all.rules,...p.configs.recommended.rules,"@typescript-eslint/explicit-function-return-type":"off","antfu/no-top-level-await":"off","n/prefer-global/process":"off","no-unused-expressions":"off","vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/max-expects":"off","vitest/no-hooks":"off","vitest/no-mocks-import":"off","vitest/no-only-tests":s?"off":"error","vitest/no-restricted-vi-methods":"off","vitest/no-standalone-expect":"error","vitest/valid-expect":["error",{alwaysAwait:!0,maxArgs:2,minArgs:1}],"vitest/valid-title":"off",...t,...a?{"vitest/padding-around-after-all-blocks":"off","vitest/padding-around-after-each-blocks":"off","vitest/padding-around-all":"off","vitest/padding-around-before-all-blocks":"off","vitest/padding-around-before-each-blocks":"off","vitest/padding-around-describe-blocks":"off","vitest/padding-around-expect-blocks":"off","vitest/padding-around-test-blocks":"off"}:{}}}]}),Rr=n.createConfig("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:a=!0}=e,{indent:i=4,quotes:p="double"}=typeof a=="boolean"?{}:a,[f,h]=await Promise.all([c(import("eslint-plugin-yml")),c(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:h},name:"anolilab/yaml",plugins:{yaml:f},rules:{"@stylistic/spaced-comment":"off","yaml/block-mapping":"error","yaml/block-sequence":"error","yaml/no-empty-key":"error","yaml/no-empty-sequence-entry":"error","yaml/no-irregular-whitespace":"error","yaml/plain-scalar":"error","yaml/vue-custom-block/no-parsing-error":"error",...a?{"yaml/block-mapping-question-indicator-newline":"error","yaml/block-sequence-hyphen-indicator-newline":"error","yaml/flow-mapping-curly-newline":"error","yaml/flow-mapping-curly-spacing":"error","yaml/flow-sequence-bracket-newline":"error","yaml/flow-sequence-bracket-spacing":"error","yaml/indent":[t?"off":"error",i==="tab"?2:i],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:p==="backtick"?"single":p}],"yaml/spaced-comment":"error"}:{},...t?f.configs.prettier.rules:{},...s}},{files:["pnpm-workspace.yaml"],name:"anolilab/yaml/pnpm-workspace",rules:{"yaml/sort-keys":["error",{order:["packages","overrides","patchedDependencies","hoistPattern","catalog","catalogs","allowedDeprecatedVersions","allowNonAppliedPatches","configDependencies","ignoredBuiltDependencies","ignoredOptionalDependencies","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","packageExtensions","peerDependencyRules","supportedArchitectures"],pathPattern:"^$"}]}}]}),Gr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":le.fixupPluginRules(t)},rules:{...t.configs.all.rules,...s}}]}),zr=n.createConfig("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await c(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var Vr=Object.defineProperty,Br=w((e,r)=>Vr(e,"name",{value:r,configurable:!0}),"e$1");const Wr=Br(()=>!!(process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged")),"isInGitHooksOrLintStaged");var Xr=Object.defineProperty,Kr=w((e,r)=>Xr(e,"name",{value:r,configurable:!0}),"e");const Hr=Kr(()=>process.env.CI||Wr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var Qr=Object.defineProperty,W=w((e,r)=>Qr(e,"name",{value:r,configurable:!0}),"f");const Yr=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],X=W((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),d=W((e,r)=>{const o=X(e,r);return{...e.overrides?.[r],..."overrides"in o?o.overrides:{}}},"getOverrides"),g=W((e,r)=>{const o=X(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),Zr=W(async(e={},...r)=>{if("files"in e)throw new Error('[@anolilab/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');const o=e.cwd??process.cwd(),s=y.parsePackageJson(xe.readFileSync(we.join(o,"package.json"),"utf8")),t=y.hasPackageJsonAnyDependency(s,["prettier"]),a=y.hasPackageJsonAnyDependency(s,["@anolilab/eslint-config"]),i=y.hasPackageJsonAnyDependency(s,["react","react-dom"]),p=s?.dependencies?.react||s?.devDependencies?.react;let f=!1;if(p!==void 0){const u=ie.parse(p);u?.major&&u.major>=19&&(f=!0)}const{astro:h=y.hasPackageJsonAnyDependency(s,["astro"]),componentExts:x=[],css:v=!1,gitignore:C=!0,html:O=!1,jsx:I=y.hasPackageJsonAnyDependency(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||i,lodash:U=y.hasPackageJsonAnyDependency(s,["lodash","underscore","lodash-es","@types/lodash","lodash.chunk","lodash.compact","lodash.concat","lodash.difference","lodash.differenceby","lodash.differencewith","lodash.drop","lodash.dropright","lodash.droprightwhile","lodash.dropwhile","lodash.fill","lodash.findindex","lodash.findlastindex","lodash.flatten","lodash.flattendeep","lodash.flattendepth","lodash.frompairs","lodash.head","lodash.indexof","lodash.initial","lodash.intersection","lodash.intersectionby","lodash.intersectionwith","lodash.join","lodash.last","lodash.lastindexof","lodash.nth","lodash.pull","lodash.pullall","lodash.pullallby","lodash.pullallwith","lodash.pullat","lodash.remove","lodash.reverse","lodash.slice","lodash.sortedindex","lodash.sortedindexby","lodash.sortedindexof","lodash.sortedlastindex","lodash.sortedlastindexby","lodash.sortedlastindexof","lodash.sorteduniq","lodash.sorteduniqby","lodash.tail","lodash.take","lodash.takeright","lodash.takerightwhile","lodash.takewhile","lodash.union","lodash.unionby","lodash.unionwith","lodash.uniq","lodash.uniqby","lodash.uniqwith","lodash.unzip","lodash.unzipwith","lodash.without","lodash.xor","lodash.xorby","lodash.xorwith","lodash.zip","lodash.zipobject","lodash.zipobjectdeep","lodash.zipwith","lodash.countby","lodash.every","lodash.filter","lodash.find","lodash.findlast","lodash.flatmap","lodash.flatmapdeep","lodash.flatmapdepth","lodash.foreach","lodash.foreachright","lodash.groupby","lodash.includes","lodash.invokemap","lodash.keyby","lodash.map","lodash.orderby","lodash.partition","lodash.reduce","lodash.reduceright","lodash.reject","lodash.sample","lodash.samplesize","lodash.shuffle","lodash.size","lodash.some","lodash.sortby","lodash.now","lodash.after","lodash.ary","lodash.before","lodash.bind","lodash.bindkey","lodash.curry","lodash.curryright","lodash.debounce","lodash.defer","lodash.delay","lodash.flip","lodash.memoize","lodash.negate","lodash.once","lodash.overargs","lodash.partial","lodash.partialright","lodash.rearg","lodash.rest","lodash.spread","lodash.throttle","lodash.unary","lodash.wrap","lodash.castarray","lodash.clone","lodash.clonedeep","lodash.clonedeepwith","lodash.clonewith","lodash.conformsto","lodash.eq","lodash.gt","lodash.gte","lodash.isarguments","lodash.isarray","lodash.isarraybuffer","lodash.isarraylike","lodash.isarraylikeobject","lodash.isboolean","lodash.isbuffer","lodash.isdate","lodash.iselement","lodash.isempty","lodash.isequal","lodash.isequalwith","lodash.iserror","lodash.isfinite","lodash.isfunction","lodash.isinteger","lodash.islength","lodash.ismap","lodash.ismatch","lodash.ismatchwith","lodash.isnan","lodash.isnative","lodash.isnil","lodash.isnull","lodash.isnumber","lodash.isobject","lodash.isobjectlike","lodash.isplainobject","lodash.isregexp","lodash.issafeinteger","lodash.isset","lodash.isstring","lodash.issymbol","lodash.istypedarray","lodash.isundefined","lodash.isweakmap","lodash.isweakset","lodash.lt","lodash.lte","lodash.toarray","lodash.tofinite","lodash.tointeger","lodash.tolength","lodash.tonumber","lodash.toplainobject","lodash.tosafeinteger","lodash.tostring","lodash.add","lodash.ceil","lodash.divide","lodash.floor","lodash.max","lodash.maxby","lodash.mean","lodash.meanby","lodash.min","lodash.minby","lodash.multiply","lodash.round","lodash.subtract","lodash.sum","lodash.sumby","lodash.clamp","lodash.inrange","lodash.random","lodash.assign","lodash.assignin","lodash.assigninwith","lodash.assignwith","lodash.at","lodash.create","lodash.defaults","lodash.defaultsdeep","lodash.findkey","lodash.findlastkey","lodash.forin","lodash.forinright","lodash.forown","lodash.forownright","lodash.functions","lodash.functionsin","lodash.get","lodash.has","lodash.hasin","lodash.invert","lodash.invertby","lodash.invoke","lodash.keys","lodash.keysin","lodash.mapkeys","lodash.mapvalues","lodash.merge","lodash.mergewith","lodash.omit","lodash.omitby","lodash.pick","lodash.pickby","lodash.result","lodash.set","lodash.setwith","lodash.topairs","lodash.topairsin","lodash.transform","lodash.unset","lodash.update","lodash.updatewith","lodash.values","lodash.valuesin","lodash.chain","lodash.tap","lodash.thru","lodash.camelcase","lodash.capitalize","lodash.deburr","lodash.endswith","lodash.escape","lodash.escaperegexp","lodash.kebabcase","lodash.lowercase","lodash.lowerfirst","lodash.pad","lodash.padend","lodash.padstart","lodash.parseint","lodash.repeat","lodash.replace","lodash.snakecase","lodash.split","lodash.startcase","lodash.startswith","lodash.template","lodash.tolower","lodash.toupper","lodash.trim","lodash.trimend","lodash.trimstart","lodash.truncate","lodash.unescape","lodash.uppercase","lodash.upperfirst","lodash.words","lodash.attempt","lodash.bindall","lodash.cond","lodash.conforms","lodash.constant","lodash.defaultto","lodash.flow","lodash.flowright","lodash.identity","lodash.iteratee","lodash.matches","lodash.matchesproperty","lodash.method","lodash.methodof","lodash.mixin","lodash.noconflict","lodash.noop","lodash.ntharg","lodash.over","lodash.overevery","lodash.oversome","lodash.property","lodash.propertyof","lodash.range","lodash.rangeright","lodash.runincontext","lodash.stubarray","lodash.stubfalse","lodash.stubobject","lodash.stubstring","lodash.stubtrue","lodash.times","lodash.topath","lodash.uniqueid"]),playwright:z=y.hasPackageJsonAnyDependency(s,["playwright","eslint-plugin-playwright"]),react:N=i||y.hasPackageJsonAnyDependency(s,["eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"]),reactCompiler:$=f,regexp:D=!0,silent:F=!1,storybook:q=y.hasPackageJsonAnyDependency(s,["storybook","eslint-plugin-storybook"]),tailwindcss:E=!1,tanstackQuery:L=y.hasPackageJsonAnyDependency(s,["@tanstack/react-query"]),tanstackRouter:T=y.hasPackageJsonAnyDependency(s,["@tanstack/react-router"]),testingLibrary:J=y.hasPackageJsonAnyDependency(s,["@testing-library/dom","@testing-library/react"]),tsdoc:_=!1,typescript:A=y.hasPackageJsonAnyDependency(s,["typescript"]),unicorn:V=!0,unocss:B=!1,vitest:k=y.hasPackageJsonAnyDependency(s,["vitest"]),zod:te=y.hasPackageJsonAnyDependency(s,["zod"])}=e;if(a){const u=[];te&&u.push("eslint-plugin-zod"),B&&u.push("@unocss/eslint-plugin"),L&&u.push("@tanstack/eslint-plugin-query"),T&&u.push("@tanstack/eslint-plugin-router"),(v||E)&&u.push("@eslint/css"),E&&u.push("eslint-plugin-tailwindcss"),q&&u.push("eslint-plugin-storybook"),N&&u.push("eslint-plugin-react","@eslint-react/eslint-plugin","eslint-plugin-react-hooks","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),N&&$&&u.push("eslint-plugin-react-compiler"),J&&u.push("eslint-plugin-testing-library"),I&&u.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),U&&u.push("eslint-plugin-you-dont-need-lodash-underscore"),_&&u.push("eslint-plugin-tsdoc"),e.formatters&&u.push("eslint-plugin-format"),h&&(u.push("eslint-plugin-astro","astro-eslint-parser","@typescript-eslint/parser"),typeof e.formatters=="object"&&e.formatters.astro&&u.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters?.markdown&&e.formatters?.slidev&&u.push("prettier-plugin-slidev"),(e.formatters?.xml||e.formatters?.svg)&&u.push("@prettier/plugin-xml")),u.length>0&&await y.ensurePackages(s,u,"devDependencies",{confirm:{message:W(G=>`@anolilab/eslint-config requires the following ${G.length===1?"package":"packages"} to be installed:
|
|
18
18
|
|
|
19
19
|
"${G.join(`"
|
|
20
20
|
"`)}"
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ Found eslint-plugin-tsdoc as dependency, disabling the jsdoc rules for *.ts and
|
|
|
5
5
|
Following rules are disabled: jsonc/sort-keys for all package.json files.
|
|
6
6
|
`),[...l.configs["flat/base"],{files:["**/*.json5"],name:"anolilab/jsonc/json5-rules",rules:l.configs["recommended-with-json5"].rules},{files:["**/*.jsonc"],name:"anolilab/jsonc/jsonc-rules",rules:l.configs["recommended-with-jsonc"].rules},{files:["**/*.json"],name:"anolilab/jsonc/json-rules",rules:l.configs["recommended-with-json"].rules},{files:["package.json","**/package.json"],name:"anolilab/jsonc/package.json-rules",rules:{"jsonc/sort-array-values":p?"off":["error",{order:{type:"asc"},pathPattern:"^files$"}],"jsonc/sort-keys":p?"off":["error",{order:["$schema","name","displayName","version","private","description","categories","keywords","homepage","bugs","repository","funding","license","qna","author","maintainers","contributors","publisher","sideEffects","type","imports","exports","main","svelte","umd:main","jsdelivr","unpkg","module","source","jsnext:main","browser","react-native","types","typesVersions","typings","style","example","examplestyle","assets","bin","man","directories","files","workspaces","binary","scripts","betterScripts","contributes","activationEvents","husky","simple-git-hooks","pre-commit","commitlint","lint-staged","nano-staged","config","nodemonConfig","browserify","babel","browserslist","xo","prettier","eslintConfig","eslintIgnore","npmpackagejsonlint","release","remarkConfig","stylelint","ava","jest","mocha","nyc","tap","oclif","resolutions","dependencies","devDependencies","dependenciesMeta","peerDependencies","peerDependenciesMeta","optionalDependencies","bundledDependencies","bundleDependencies","extensionPack","extensionDependencies","flat","packageManager","engines","engineStrict","volta","languageName","os","cpu","preferGlobal","publishConfig","icon","badges","galleryBanner","preview","markdown","pnpm"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"},{order:{type:"asc"},pathPattern:"^(?:resolutions|overrides|pnpm.overrides)$"},{order:["types","import","require","default"],pathPattern:"^exports.*$"},{order:["applypatch-msg","pre-applypatch","post-applypatch","pre-commit","pre-merge-commit","prepare-commit-msg","commit-msg","post-commit","pre-rebase","post-checkout","post-merge","pre-push","pre-receive","update","post-receive","post-update","push-to-checkout","pre-auto-gc","post-rewrite","sendemail-validate","fsmonitor-watchman","p4-pre-submit","post-index-chang"],pathPattern:"^(?:gitHooks|husky|simple-git-hooks)$"},{order:["build","preinstall","install","postinstall","lint",{order:{type:"asc"}}],pathPattern:"^scripts$"}]}},{files:["**/tsconfig.json","**/tsconfig.*.json"],name:"anolilab/jsonc/tsconfig-json",rules:{"jsonc/sort-keys":["error",{order:["extends","compilerOptions","references","files","include","exclude"],pathPattern:"^$"},{order:["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","jsx","jsxFactory","jsxFragmentFactory","jsxImportSource","lib","moduleDetection","noLib","reactNamespace","useDefineForClassFields","emitDecoratorMetadata","experimentalDecorators","libReplacement","baseUrl","rootDir","rootDirs","customConditions","module","moduleResolution","moduleSuffixes","noResolve","paths","resolveJsonModule","resolvePackageJsonExports","resolvePackageJsonImports","typeRoots","types","allowArbitraryExtensions","allowImportingTsExtensions","allowUmdGlobalAccess","allowJs","checkJs","maxNodeModuleJsDepth","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","declaration","declarationDir","declarationMap","downlevelIteration","emitBOM","emitDeclarationOnly","importHelpers","importsNotUsedAsValues","inlineSourceMap","inlineSources","mapRoot","newLine","noEmit","noEmitHelpers","noEmitOnError","outDir","outFile","preserveConstEnums","preserveValueImports","removeComments","sourceMap","sourceRoot","stripInternal","allowSyntheticDefaultImports","esModuleInterop","forceConsistentCasingInFileNames","isolatedDeclarations","isolatedModules","preserveSymlinks","verbatimModuleSyntax","erasableSyntaxOnly","skipDefaultLibCheck","skipLibCheck"],pathPattern:"^compilerOptions$"}]}},...s?l.configs["flat/prettier"]:[],{files:["**/*.json","**/*.jsonc","**/*.json5"],rules:{...n?{"jsonc/array-bracket-spacing":["error","never"],"jsonc/comma-dangle":["error","never"],"jsonc/comma-style":["error","last"],"jsonc/indent":["error",a],"jsonc/key-spacing":["error",{afterColon:!0,beforeColon:!1}],"jsonc/object-curly-newline":["error",{consistent:!0,multiline:!0}],"jsonc/object-curly-spacing":["error","always"],"jsonc/object-property-newline":["error",{allowMultiplePropertiesPerLine:!0}],"jsonc/quote-props":"error","jsonc/quotes":"error"}:{},...r}}]},"jsonc"),Ye=c("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-jsx-a11y"));return[{files:o,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/jsx-a11y/setup",plugins:{"jsx-a11y":t},rules:{"jsx-a11y/accessible-emoji":"off","jsx-a11y/alt-text":["error",{area:[],elements:["img","object","area",'input[type="image"]'],img:[],'input[type="image"]':[],object:[]}],"jsx-a11y/anchor-has-content":["error",{components:[]}],"jsx-a11y/anchor-is-valid":["error",{aspects:["noHref","invalidHref","preferButton"],components:["A","LinkTo","Link"],specialLink:["to"]}],"jsx-a11y/aria-activedescendant-has-tabindex":"error","jsx-a11y/aria-props":"error","jsx-a11y/aria-proptypes":"error","jsx-a11y/aria-role":["error",{ignoreNonDOM:!1}],"jsx-a11y/aria-unsupported-elements":"error","jsx-a11y/autocomplete-valid":["off",{inputComponents:[]}],"jsx-a11y/click-events-have-key-events":"error","jsx-a11y/control-has-associated-label":["error",{controlComponents:[],depth:5,ignoreElements:["audio","canvas","embed","input","textarea","tr","video"],ignoreRoles:["grid","listbox","menu","menubar","radiogroup","row","tablist","toolbar","tree","treegrid"],labelAttributes:["label"]}],"jsx-a11y/heading-has-content":["error",{components:[""]}],"jsx-a11y/html-has-lang":"error","jsx-a11y/iframe-has-title":"error","jsx-a11y/img-redundant-alt":"error","jsx-a11y/interactive-supports-focus":"error","jsx-a11y/label-has-associated-control":["error",{assert:"both",controlComponents:[],depth:25,labelAttributes:[],labelComponents:[]}],"jsx-a11y/label-has-for":["off",{allowChildren:!1,components:[],required:{every:["nesting","id"]}}],"jsx-a11y/lang":"error","jsx-a11y/media-has-caption":["error",{audio:[],track:[],video:[]}],"jsx-a11y/mouse-events-have-key-events":"error","jsx-a11y/no-access-key":"error","jsx-a11y/no-autofocus":["error",{ignoreNonDOM:!0}],"jsx-a11y/no-distracting-elements":["error",{elements:["marquee","blink"]}],"jsx-a11y/no-interactive-element-to-noninteractive-role":["error",{tr:["none","presentation"]}],"jsx-a11y/no-noninteractive-element-interactions":["error",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/no-noninteractive-element-to-interactive-role":["error",{li:["menuitem","option","row","tab","treeitem"],ol:["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"],table:["grid"],td:["gridcell"],ul:["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"]}],"jsx-a11y/no-noninteractive-tabindex":["error",{roles:["tabpanel"],tags:[]}],"jsx-a11y/no-onchange":"off","jsx-a11y/no-redundant-roles":"error","jsx-a11y/no-static-element-interactions":["error",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/role-has-required-aria-props":"error","jsx-a11y/role-supports-aria-props":"error","jsx-a11y/scope":"error","jsx-a11y/tabindex-no-positive":"error",...s}}]}),Ze=c("markdown",async(e,r)=>{const{componentExts:o=[],files:s=r,overrides:t}=e,n=await i(import("@eslint/markdown"));return[{name:"anolilab/markdown/setup",plugins:{markdown:n}},{files:s,ignores:d("markdown_in_markdown"),name:"anolilab/markdown/processor",processor:he([n.processors?.markdown,be])},{files:s,languageOptions:{parser:O},name:"anolilab/markdown/parser",rules:n.configs.recommended[0].rules},{files:["**/*.md/**/*.?([cm])[jt]s?(x)",...o.map(a=>`**/*.md/**/*.${a}`)],languageOptions:{parserOptions:{ecmaFeatures:{impliedStrict:!0}}},name:"anolilab/markdown/disables",rules:{"@stylistic/comma-dangle":"off","@stylistic/eol-last":"off","@stylistic/prefer-global/process":"off","@typescript-eslint/consistent-type-imports":"off","@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/no-namespace":"off","@typescript-eslint/no-redeclare":"off","@typescript-eslint/no-require-imports":"off","@typescript-eslint/no-unused-expressions":"off","@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":"off","antfu/no-top-level-await":"off","import/newline-after-import":"off","no-alert":"off","no-console":"off","no-labels":"off","no-lone-blocks":"off","no-restricted-syntax":"off","no-undef":"off","no-unused-expressions":"off","no-unused-labels":"off","no-unused-vars":"off","unicode-bom":"off","unicorn/prefer-module":"off","unicorn/prefer-string-raw":"off","unused-imports/no-unused-imports":"off","unused-imports/no-unused-vars":"off",...t}}]});var er=Object.defineProperty,rr=w((e,r)=>er(e,"name",{value:r,configurable:!0}),"s");const sr=rr(async e=>{const r=await i(import("eslint-plugin-no-secrets"));return[{files:["*","*/**"],ignores:["package.json","**/package.json","package-lock.json","**/package-lock.json","tsconfig.json","**/tsconfig.json"],languageOptions:{ecmaVersion:6},name:"anolilab/no-secrets",plugins:{"no-secrets":r},rules:{"no-secrets/no-secrets":"error",...e.overrides}}]},"noSecrets"),or=c("js",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-no-unsanitized"));return[{files:o,name:"anolilab/no-unsanitized/setup",plugins:{"no-unsanitized":t},rules:{"no-unsanitized/method":"error","no-unsanitized/property":"error",...s}}]}),tr=c("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,n=await i(import("eslint-plugin-n")),a=t?.engines?.node;return[{name:"anolilab/node/setup",plugins:{n}},{files:o,name:"anolilab/node/rules",rules:{...n.configs.recommended.rules,"global-require":"error","n/callback-return":"off","n/file-extension-in-import":"off","n/handle-callback-err":"off","n/no-extraneous-import":"off","n/no-extraneous-require":"off","n/no-missing-import":"off","n/no-missing-require":"off","n/no-mixed-requires":["error",{allowCall:!0,grouping:!0}],"n/no-new-require":"error","n/no-process-env":"off","n/no-process-exit":"off","n/no-restricted-modules":"off","n/no-sync":"off","n/no-unpublished-bin":"error","n/process-exit-as-throw":"error","no-buffer-constructor":"error","no-path-concat":"error",...a?{"n/no-unsupported-features/es-builtins":["error",{version:a}],"n/no-unsupported-features/es-syntax":["error",{ignores:["modules"],version:a}],"n/no-unsupported-features/node-builtins":["error",{version:a}]}:{},...s}}]}),nr=c("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,n=await i(import("eslint-plugin-perfectionist"));return y(t,["eslint-plugin-typescript-sort-keys"])&&console.warn(`
|
|
7
7
|
Please remove "eslint-plugin-typescript-sort-keys" from your package.json, it conflicts with "eslint-plugin-perfectionist".
|
|
8
|
-
`),[{name:"anolilab/perfectionist/setup",plugins:{perfectionist:n}},{files:o,name:"anolilab/perfectionist/rules",rules:{...n.configs["recommended-natural"].rules,"perfectionist/sort-imports":"off","perfectionist/sort-named-exports":"off","perfectionist/sort-named-imports":"off","perfectionist/sort-union-types":"off",...s}},{files:d("ts"),name:"anolilab/perfectionist/typescript",rules:{"perfectionist/sort-classes":"off"}},{files:d("postcss"),name:"anolilab/perfectionist/postcss",rules:{"perfectionist/sort-objects":"off"}}]}),ar=c("e2e",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-playwright"));return[{files:o,plugins:{playwright:t},rules:{...t.configs.recommended.rules,...s}}]}),ir=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-promise"));return[{files:o,name:"anolilab/promise/rules",plugins:{promise:t},rules:{...ne(t.configs["flat/recommended"].rules),"promise/prefer-await-to-callbacks":"off","promise/prefer-await-to-then":"off",...s}}]}),re={allow:["__DEV__","__STORYBOOK_CLIENT_API__","__STORYBOOK_ADDONS_CHANNEL__","__STORYBOOK_STORY_STORE__"],allowAfterSuper:!1,allowAfterThis:!1,enforceInMethodNames:!0},ce={"array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off",camelcase:["error",{ignoreDestructuring:!1,properties:"never"}],"capitalized-comments":["off","never",{block:{ignoreConsecutiveComments:!0,ignoreInlineComments:!0,ignorePattern:".*"},line:{ignoreConsecutiveComments:!0,ignoreInlineComments:!0,ignorePattern:".*"}}],"comma-style":"off","computed-property-spacing":"off","consistent-this":"off","default-param-last":["error"],"eol-last":"off","func-name-matching":["off","always",{considerPropertyDescriptor:!0,includeCommonJSModuleExports:!1}],"func-names":["error","as-needed"],"func-style":["error","expression"],"function-call-argument-newline":"off","function-paren-newline":"off","id-blacklist":"error","id-denylist":"off","id-length":"off","id-match":"off","implicit-arrow-linebreak":"off","jsx-quotes":"off","line-comment-position":"off","linebreak-style":"off","lines-around-directive":["error",{after:"always",before:"always"}],"max-depth":["off",4],"max-len":"off","max-lines":["off",{max:300,skipBlankLines:!0,skipComments:!0}],"max-lines-per-function":["off",{IIFEs:!0,max:50,skipBlankLines:!0,skipComments:!0}],"max-nested-callbacks":"off","max-params":["off",3],"max-statements":["off",10],"max-statements-per-line":"off","multiline-comment-style":"off","multiline-ternary":"off","new-cap":["error",{capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"],newIsCap:!0,newIsCapExceptions:[]}],"new-parens":"off","newline-after-var":"off","newline-before-return":"off","newline-per-chained-call":"off","no-array-constructor":"error","no-bitwise":"error","no-continue":"off","no-inline-comments":"off","no-lonely-if":"error","no-mixed-operators":["error",{allowSamePrecedence:!1,groups:[["%","**"],["%","+"],["%","-"],["%","*"],["%","/"],["/","*"],["&","|","<<",">>",">>>"],["==","!=","===","!=="],["&&","||"],["in","instanceof"]]}],"no-mixed-spaces-and-tabs":"off","no-multi-assign":["error"],"no-multiple-empty-lines":"off","no-negated-condition":"off","no-nested-ternary":"error","no-new-object":"error","no-plusplus":"error","no-restricted-syntax":["error",{message:"for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",selector:"ForInStatement"},{message:"Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",selector:"LabeledStatement"},{message:"`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",selector:"WithStatement"},{message:"`useMemo` with an empty dependency array can't provide a stable reference, use `useRef` instead.",selector:"CallExpression[callee.name=useMemo][arguments.1.type=ArrayExpression][arguments.1.elements.length=0]"},{message:"Use `.key` instead of `.keyCode`",selector:"MemberExpression > .property[type=Identifier][name=keyCode]"},{message:"Do not use full-width tilde. Use wave dash instead.",selector:":matches(Literal[value=/~/],TemplateElement[value.raw=/~/])"},{message:"Use `.toString()` instead of template literal if you want to convert a value to string.",selector:'TemplateLiteral[quasis.0.value.raw=""][quasis.1.tail=true][quasis.1.value.raw=""]'}],"no-spaced-func":"off","no-tabs":"off","no-ternary":"off","no-trailing-spaces":"off","no-underscore-dangle":["error",re],"no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var":["error","never"],"one-var-declaration-per-line":"off","operator-assignment":["error","always"],"operator-linebreak":"off","padded-blocks":"off","padding-line-between-statements":"off","prefer-exponentiation-operator":"error","prefer-object-spread":"error","quote-props":"off",quotes:"off","require-jsdoc":"off","rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","sort-keys":"off","sort-vars":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-infix-ops":"off","space-unary-ops":"off","spaced-comment":"off","switch-colon-spacing":"off","template-tag-spacing":"off","unicode-bom":["error","never"],"wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off"},lr=c("all",async(e,r)=>{const{files:o=r,prettier:s}=e;return[{files:o,name:"anolilab/style/rules",rules:{...ce,"quote-props":"off",...s?{"array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off","arrow-parens":"off","arrow-spacing":"off","block-spacing":"off","brace-style":"off","comma-dangle":"off","comma-spacing":"off","comma-style":"off","computed-property-spacing":"off",curly:0,"dot-location":"off","eol-last":"off","func-call-spacing":"off","function-call-argument-newline":"off","function-paren-newline":"off","generator-star-spacing":"off","implicit-arrow-linebreak":"off",indent:"off","jsx-quotes":"off","key-spacing":"off","keyword-spacing":"off","linebreak-style":"off","lines-around-comment":0,"max-len":0,"max-statements-per-line":"off","multiline-ternary":"off","new-parens":"off","newline-per-chained-call":"off","no-confusing-arrow":0,"no-extra-parens":"off","no-extra-semi":"off","no-floating-decimal":"off","no-mixed-operators":0,"no-mixed-spaces-and-tabs":"off","no-multi-spaces":"off","no-multiple-empty-lines":"off","no-tabs":0,"no-trailing-spaces":"off","no-unexpected-multiline":0,"no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var-declaration-per-line":"off","operator-linebreak":"off","padded-blocks":"off",quotes:0,"rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-unary-ops":"off","switch-colon-spacing":"off","template-curly-spacing":"off","template-tag-spacing":"off","wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off"}:{}}},{files:d("ts"),name:"anolilab/style/ts-rules",rules:{"brace-style":"off",camelcase:"off","comma-dangle":"off","comma-spacing":"off","func-call-spacing":"off",indent:"off","keyword-spacing":"off","lines-between-class-members":"off","no-array-constructor":"off",quotes:"off",semi:"off","space-before-function-paren":"off"}}]}),cr=["vite"],pr=["@remix-run/node","@remix-run/react","@remix-run/serve","@remix-run/dev"],fr=["next"],dr=["@react-router/node","@react-router/react","@react-router/serve","@react-router/dev"],ur=c("jsx_and_tsx",async(e,r)=>{const{files:o=r,filesTypeAware:s=d("ts"),ignoresTypeAware:t=["**/*.md/**",...d("astro")],overrides:n,packageJson:a,prettier:l,reactCompiler:p,silent:h,stylistic:x=!0,tsconfigPath:v}=e,P=v!==void 0,{indent:C=4}=typeof x=="boolean"?{}:x,N={"react-x/no-leaked-conditional-rendering":"error"},[U,V,T,L,S,q]=await Promise.all([i(import("@eslint-react/eslint-plugin")),i(import("eslint-plugin-react")),i(import("eslint-plugin-react-hooks")),i(import("eslint-plugin-react-refresh")),i(import("eslint-plugin-react-perf")),i(import("eslint-plugin-react-you-might-not-need-an-effect"))]),D=y(a,cr),I=y(a,pr),M=y(a,fr),A=y(a,dr),{plugins:$}=U.configs.all;let _=a?.dependencies?.react||a?.devDependencies?.react,F=!1;if(_!==void 0){const k=te(_);k!==null&&(_=`${k.major}.${k.minor}`,h||console.info(`
|
|
8
|
+
`),[{name:"anolilab/perfectionist/setup",plugins:{perfectionist:n}},{files:o,name:"anolilab/perfectionist/rules",rules:{...n.configs["recommended-natural"].rules,"perfectionist/sort-imports":"off","perfectionist/sort-modules":"off","perfectionist/sort-named-exports":"off","perfectionist/sort-named-imports":"off","perfectionist/sort-union-types":"off",...s}},{files:d("ts"),name:"anolilab/perfectionist/typescript",rules:{"perfectionist/sort-classes":"off"}},{files:d("postcss"),name:"anolilab/perfectionist/postcss",rules:{"perfectionist/sort-objects":"off"}}]}),ar=c("e2e",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-playwright"));return[{files:o,plugins:{playwright:t},rules:{...t.configs.recommended.rules,...s}}]}),ir=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-promise"));return[{files:o,name:"anolilab/promise/rules",plugins:{promise:t},rules:{...ne(t.configs["flat/recommended"].rules),"promise/prefer-await-to-callbacks":"off","promise/prefer-await-to-then":"off",...s}}]}),re={allow:["__DEV__","__STORYBOOK_CLIENT_API__","__STORYBOOK_ADDONS_CHANNEL__","__STORYBOOK_STORY_STORE__"],allowAfterSuper:!1,allowAfterThis:!1,enforceInMethodNames:!0},ce={"array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off",camelcase:["error",{ignoreDestructuring:!1,properties:"never"}],"capitalized-comments":["off","never",{block:{ignoreConsecutiveComments:!0,ignoreInlineComments:!0,ignorePattern:".*"},line:{ignoreConsecutiveComments:!0,ignoreInlineComments:!0,ignorePattern:".*"}}],"comma-style":"off","computed-property-spacing":"off","consistent-this":"off","default-param-last":["error"],"eol-last":"off","func-name-matching":["off","always",{considerPropertyDescriptor:!0,includeCommonJSModuleExports:!1}],"func-names":["error","as-needed"],"func-style":["error","expression"],"function-call-argument-newline":"off","function-paren-newline":"off","id-blacklist":"error","id-denylist":"off","id-length":"off","id-match":"off","implicit-arrow-linebreak":"off","jsx-quotes":"off","line-comment-position":"off","linebreak-style":"off","lines-around-directive":["error",{after:"always",before:"always"}],"max-depth":["off",4],"max-len":"off","max-lines":["off",{max:300,skipBlankLines:!0,skipComments:!0}],"max-lines-per-function":["off",{IIFEs:!0,max:50,skipBlankLines:!0,skipComments:!0}],"max-nested-callbacks":"off","max-params":["off",3],"max-statements":["off",10],"max-statements-per-line":"off","multiline-comment-style":"off","multiline-ternary":"off","new-cap":["error",{capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"],newIsCap:!0,newIsCapExceptions:[]}],"new-parens":"off","newline-after-var":"off","newline-before-return":"off","newline-per-chained-call":"off","no-array-constructor":"error","no-bitwise":"error","no-continue":"off","no-inline-comments":"off","no-lonely-if":"error","no-mixed-operators":["error",{allowSamePrecedence:!1,groups:[["%","**"],["%","+"],["%","-"],["%","*"],["%","/"],["/","*"],["&","|","<<",">>",">>>"],["==","!=","===","!=="],["&&","||"],["in","instanceof"]]}],"no-mixed-spaces-and-tabs":"off","no-multi-assign":["error"],"no-multiple-empty-lines":"off","no-negated-condition":"off","no-nested-ternary":"error","no-new-object":"error","no-plusplus":"error","no-restricted-syntax":["error",{message:"for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",selector:"ForInStatement"},{message:"Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",selector:"LabeledStatement"},{message:"`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",selector:"WithStatement"},{message:"`useMemo` with an empty dependency array can't provide a stable reference, use `useRef` instead.",selector:"CallExpression[callee.name=useMemo][arguments.1.type=ArrayExpression][arguments.1.elements.length=0]"},{message:"Use `.key` instead of `.keyCode`",selector:"MemberExpression > .property[type=Identifier][name=keyCode]"},{message:"Do not use full-width tilde. Use wave dash instead.",selector:":matches(Literal[value=/~/],TemplateElement[value.raw=/~/])"},{message:"Use `.toString()` instead of template literal if you want to convert a value to string.",selector:'TemplateLiteral[quasis.0.value.raw=""][quasis.1.tail=true][quasis.1.value.raw=""]'}],"no-spaced-func":"off","no-tabs":"off","no-ternary":"off","no-trailing-spaces":"off","no-underscore-dangle":["error",re],"no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var":["error","never"],"one-var-declaration-per-line":"off","operator-assignment":["error","always"],"operator-linebreak":"off","padded-blocks":"off","padding-line-between-statements":"off","prefer-exponentiation-operator":"error","prefer-object-spread":"error","quote-props":"off",quotes:"off","require-jsdoc":"off","rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","sort-keys":"off","sort-vars":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-infix-ops":"off","space-unary-ops":"off","spaced-comment":"off","switch-colon-spacing":"off","template-tag-spacing":"off","unicode-bom":["error","never"],"wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off"},lr=c("all",async(e,r)=>{const{files:o=r,prettier:s}=e;return[{files:o,name:"anolilab/style/rules",rules:{...ce,"quote-props":"off",...s?{"array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off","arrow-parens":"off","arrow-spacing":"off","block-spacing":"off","brace-style":"off","comma-dangle":"off","comma-spacing":"off","comma-style":"off","computed-property-spacing":"off",curly:0,"dot-location":"off","eol-last":"off","func-call-spacing":"off","function-call-argument-newline":"off","function-paren-newline":"off","generator-star-spacing":"off","implicit-arrow-linebreak":"off",indent:"off","jsx-quotes":"off","key-spacing":"off","keyword-spacing":"off","linebreak-style":"off","lines-around-comment":0,"max-len":0,"max-statements-per-line":"off","multiline-ternary":"off","new-parens":"off","newline-per-chained-call":"off","no-confusing-arrow":0,"no-extra-parens":"off","no-extra-semi":"off","no-floating-decimal":"off","no-mixed-operators":0,"no-mixed-spaces-and-tabs":"off","no-multi-spaces":"off","no-multiple-empty-lines":"off","no-tabs":0,"no-trailing-spaces":"off","no-unexpected-multiline":0,"no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var-declaration-per-line":"off","operator-linebreak":"off","padded-blocks":"off",quotes:0,"rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-unary-ops":"off","switch-colon-spacing":"off","template-curly-spacing":"off","template-tag-spacing":"off","wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off"}:{}}},{files:d("ts"),name:"anolilab/style/ts-rules",rules:{"brace-style":"off",camelcase:"off","comma-dangle":"off","comma-spacing":"off","func-call-spacing":"off",indent:"off","keyword-spacing":"off","lines-between-class-members":"off","no-array-constructor":"off",quotes:"off",semi:"off","space-before-function-paren":"off"}}]}),cr=["vite"],pr=["@remix-run/node","@remix-run/react","@remix-run/serve","@remix-run/dev"],fr=["next"],dr=["@react-router/node","@react-router/react","@react-router/serve","@react-router/dev"],ur=c("jsx_and_tsx",async(e,r)=>{const{files:o=r,filesTypeAware:s=d("ts"),ignoresTypeAware:t=["**/*.md/**",...d("astro")],overrides:n,packageJson:a,prettier:l,reactCompiler:p,silent:h,stylistic:x=!0,tsconfigPath:v}=e,P=v!==void 0,{indent:C=4}=typeof x=="boolean"?{}:x,N={"react-x/no-leaked-conditional-rendering":"error"},[U,V,T,L,S,q]=await Promise.all([i(import("@eslint-react/eslint-plugin")),i(import("eslint-plugin-react")),i(import("eslint-plugin-react-hooks")),i(import("eslint-plugin-react-refresh")),i(import("eslint-plugin-react-perf")),i(import("eslint-plugin-react-you-might-not-need-an-effect"))]),D=y(a,cr),I=y(a,pr),M=y(a,fr),A=y(a,dr),{plugins:$}=U.configs.all;let _=a?.dependencies?.react||a?.devDependencies?.react,F=!1;if(_!==void 0){const k=te(_);k!==null&&(_=`${k.major}.${k.minor}`,h||console.info(`
|
|
9
9
|
@anolilab/eslint-config found the version ${_} of react in your dependencies, this version ${_} will be used to setup the "eslint-plugin-react"
|
|
10
10
|
`)),k?.major&&k.major>=19&&(F=!0)}let B=!1;if(v!==void 0){const k=xe(v);k?.compilerOptions!==void 0&&(k?.compilerOptions.jsx==="react-jsx"||k?.compilerOptions.jsx==="react-jsxdev")&&(B=!0,h||console.info(`
|
|
11
11
|
@anolilab/eslint-config found react jsx-runtime.
|
|
@@ -14,7 +14,7 @@ Please remove "eslint-plugin-typescript-sort-keys" from your package.json, it co
|
|
|
14
14
|
If you dont use the new react jsx-runtime in you project, please enable it manually.
|
|
15
15
|
`))}F=F&&p!==!1;let W;return F&&(console.info(`
|
|
16
16
|
@anolilab/eslint-config enabling react-compiler plugin
|
|
17
|
-
`),W=i(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:V,"react-dom":$["@eslint-react/dom"],"react-hooks":T,"react-hooks-extra":$["@eslint-react/hooks-extra"],"react-naming-convention":$["@eslint-react/naming-convention"],"react-perf":S,"react-refresh":L,"react-web-api":$["@eslint-react/web-api"],"react-x":$["@eslint-react"],"react-you-might-not-need-an-effect":q,...F?{"react-compiler":W}:{}}},{files:o,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":["error",{...re,allow:[...re.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks-extra/no-unnecessary-use-callback":"error","react-hooks-extra/no-unnecessary-use-memo":"error","react-hooks-extra/no-unnecessary-use-prefix":"error","react-hooks-extra/prefer-use-state-lazy-initialization":"error","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-naming-convention/component-name":"error","react-naming-convention/context-name":"error","react-naming-convention/filename":"off","react-naming-convention/use-state":"error","react-refresh/only-export-components":["error",{allowConstantExport:D,allowExportNames:[...M?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...I||A?["meta","links","headers","loader","action"]:[]]}],"react-web-api/no-leaked-event-listener":"error","react-web-api/no-leaked-interval":"error","react-web-api/no-leaked-resize-observer":"error","react-web-api/no-leaked-timeout":"error","react-x/avoid-shorthand-boolean":"off","react-x/avoid-shorthand-fragment":"off","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-uses-react":B?"off":"error","react-x/jsx-uses-vars":"error","react-x/no-access-state-in-setstate":"error","react-x/no-array-index-key":"error","react-x/no-children-count":"error","react-x/no-children-for-each":"error","react-x/no-children-map":"error","react-x/no-children-only":"error","react-x/no-children-prop":"off","react-x/no-children-to-array":"error","react-x/no-class-component":"off","react-x/no-clone-element":"error","react-x/no-comment-textnodes":"error","react-x/no-complex-conditional-rendering":"off","react-x/no-component-will-mount":"error","react-x/no-component-will-receive-props":"error","react-x/no-component-will-update":"error","react-x/no-context-provider":"error","react-x/no-create-ref":"error","react-x/no-default-props":"error","react-x/no-direct-mutation-state":"error","react-x/no-duplicate-key":"error","react-x/no-forward-ref":"error","react-x/no-implicit-key":"error","react-x/no-leaked-conditional-rendering":"error","react-x/no-missing-component-display-name":"off","react-x/no-missing-context-display-name":"off","react-x/no-missing-key":"error","react-x/no-misused-capture-owner-stack":"off","react-x/no-nested-component-definitions":"error","react-x/no-nested-lazy-component-declarations":"error","react-x/no-prop-types":"error","react-x/no-redundant-should-component-update":"error","react-x/no-set-state-in-component-did-mount":"error","react-x/no-set-state-in-component-did-update":"error","react-x/no-set-state-in-component-will-update":"error","react-x/no-string-refs":"error","react-x/no-unsafe-component-will-mount":"error","react-x/no-unsafe-component-will-receive-props":"error","react-x/no-unsafe-component-will-update":"error","react-x/no-unstable-context-value":"error","react-x/no-unstable-default-props":"error","react-x/no-unused-class-component-members":"error","react-x/no-unused-state":"error","react-x/no-use-context":"error","react-x/no-useless-forward-ref":"error","react-x/no-useless-fragment":"off","react-x/prefer-destructuring-assignment":"off","react-x/prefer-react-namespace-import":"off","react-x/prefer-read-only-props":"off","react-x/prefer-shorthand-boolean":"off","react-x/prefer-shorthand-fragment":"off","react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["error",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",C,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",C],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"off","react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"off","react/jsx-no-useless-fragment":"off","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":"off","react/jsx-uses-vars":"off","react/no-access-state-in-setstate":"off","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"off","react/no-children-prop":"off","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"off","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"off","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"off","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"off","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":"off","react/react-in-jsx-scope":B?"off":"error","react/require-default-props":"off","react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","static public field"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...F?{"react-compiler/react-compiler":"error"}:{},...S?.configs?.flat?.recommended?.rules,"react-you-might-not-need-an-effect/you-might-not-need-an-effect":"warn",...l?{"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off"}:{},...n},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:_??"detect"},"react-x":{version:_??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/jsx",rules:{"react-x/naming-convention/filename-extension":["error","as-needed"],"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"off","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"},settings:{extensions:[".jsx"]}},{files:["**/*.tsx"],name:"anolilab/react/tsx",rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:d("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...P?[{files:s,ignores:t,name:"anolilab/react/type-aware-rules",rules:{...N}}]:[]]}),mr=c("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,n=we["flat/recommended"],a={...n.rules};if(s==="warn")for(const l in a)a[l]==="error"&&(a[l]="warn");return[{...n,files:o,name:"anolilab/regexp/rules",rules:{...a,...t}}]}),yr=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-simple-import-sort"));return[{files:o,name:"anolilab/simple-import-sort",plugins:{"simple-import-sort":t},rules:{"simple-import-sort/exports":"error","simple-import-sort/imports":"error",...s}}]}),gr=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-sonarjs"));return[{name:"anolilab/sonarjs/plugin",plugins:{sonarjs:t}},{files:o,name:"anolilab/sonarjs/rules",rules:{...t.configs.recommended.rules,"sonarjs/file-name-differ-from-class":"error","sonarjs/no-collapsible-if":"error","sonarjs/no-nested-template-literals":"off","sonarjs/no-tab":"error","sonarjs/todo-tag":"off",...s}},{files:d("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:d("js"),languageOptions:{ecmaVersion:2020},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off"}}]}),hr=c("storybook",async e=>{const{overrides:r}=e,o=[...(await i(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),br=c("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await i(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),xr=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),wr=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),jr=c("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,n=await i(import("eslint-plugin-testing-library")),a=y(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":n},rules:{...n.configs["flat/dom"].rules,...a?n.configs["flat/react"].rules:{},...s}}]}),vr=c("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:n=2}=typeof t=="boolean"?{}:t,[a,l]=await Promise.all([i(import("eslint-plugin-toml")),i(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:l},name:"anolilab/toml",plugins:{toml:a},rules:{...t?{"@stylistic/spaced-comment":"off"}:{},"toml/comma-style":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error",...t?{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"error","toml/indent":["error",n==="tab"?2:n],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error"}:{},...s}}]}),kr=c("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),H={"init-declarations":"off","no-catch-shadow":"off","no-delete-var":"error","no-label-var":"error","no-restricted-globals":["error",{message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",name:"isFinite"},{message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",name:"isNaN"},...je.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":["error",{args:"after-used",ignoreRestSiblings:!0,vars:"all"}],"no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Or=c("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:H},{files:d("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Pr=Object.defineProperty,Cr=w((e,r)=>Pr(e,"name",{value:r,configurable:!0}),"w");const Sr=c("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:n,overridesTypeAware:a,parserOptions:l,prettier:p}=e,h=ce,x=ae(t),[v,P,C,N]=await Promise.all([i(import("@typescript-eslint/eslint-plugin")),i(import("@typescript-eslint/parser")),i(import("typescript-eslint")),i(import("eslint-plugin-no-for-of-array"))]),U=e.filesTypeAware??d("ts"),V=e.ignoresTypeAware??["**/*.mdx/**",...d("astro")],T=e?.tsconfigPath??void 0,L=T!==void 0,S=Cr((D,I,M)=>({files:[...I,...o.map(A=>`**/*.${A}`)],...M?{ignores:M}:{},languageOptions:{parser:P,parserOptions:{extraFileExtensions:o.map(A=>`.${A}`),sourceType:"module",...D?{projectService:{allowDefaultProject:["./*.js"],defaultProject:T},tsconfigRootDir:process.cwd()}:{},...l}},name:`anolilab/typescript/${D?"type-aware-parser":"parser"}`}),"makeParser"),q=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":v,"no-for-of-array":N}},...L?[S(!1,s),S(!0,U,V)]:[S(!1,s)],...C.configs.strict];return L&&q.push(...C.configs.strictTypeCheckedOnly,{files:[...U,...o.map(D=>`**/*.${D}`)],name:"anolilab/typescript/rules-type-aware",rules:{"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error",...a}},{files:d("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),q.push({files:s,name:"anolilab/typescript/rules",rules:{"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-ts-comment":["error",{minimumDescriptionLength:3,"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":"allow-with-description","ts-nocheck":!0}],"@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/method-signature-style":"error","@typescript-eslint/naming-convention":["error",{format:["camelCase","PascalCase","UPPER_CASE"],selector:"variable"},{format:["camelCase","PascalCase"],selector:"function"},{format:["PascalCase"],selector:"typeLike"}],"@typescript-eslint/no-array-constructor":h["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":x["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":R["no-empty-function"],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-loop-func":R["no-loop-func"],"@typescript-eslint/no-magic-numbers":R["no-magic-numbers"],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redeclare":R["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":H["no-shadow"],"@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unused-expressions":R["no-unused-expressions"],"@typescript-eslint/no-unused-vars":H["no-unused-vars"],"@typescript-eslint/no-use-before-define":H["no-use-before-define"],"@typescript-eslint/no-useless-constructor":x["no-useless-constructor"],"@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"off","@typescript-eslint/prefer-ts-expect-error":"off","@typescript-eslint/return-await":R["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"error","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":h["space-infix-ops"],...n,...p?{"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":0,"@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/quotes":0,"@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"}:{}}}),q}),_r=c("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:n,stylistic:a=!0}=e,{indent:l=4}=typeof a=="boolean"?{}:a,p=await i(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:K.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:p}},{files:o,name:"anolilab/unicorn/rules",rules:{...p.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","unicorn/no-useless-undefined":"off","unicorn/prefer-at":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":t.type==="module"?"error":"off","unicorn/prefer-node-protocol":"error","unicorn/prefer-ternary":["error","only-single-line"],...n?{"unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}:{"unicorn/template-indent":["error",{indent:l}]},...s}},{files:["tsconfig.dev.json","tsconfig.prod.json"],name:"anolilab/unicorn/tsconfig-overrides",rules:{"unicorn/prevent-abbreviations":"off"}},{files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],name:"anolilab/unicorn/ts-overrides",rules:{"unicorn/import-style":"off"}}]});var Er=Object.defineProperty,qr=w((e,r)=>Er(e,"name",{value:r,configurable:!0}),"n$2");const Dr=qr(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await i(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Ir=c("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-validate-jsx-nesting"));return[{files:o,name:"anolilab/validate-jsx-nesting/setup",plugins:{"validate-jsx-nesting":t},rules:{"validate-jsx-nesting/no-invalid-jsx-nesting":"error",...s}}]}),Fr={suite:!0,test:!0,chai:!0,describe:!0,it:!0,expectTypeOf:!0,assertType:!0,expect:!0,assert:!0,vitest:!0,vi:!0,beforeAll:!0,afterAll:!0,beforeEach:!0,afterEach:!0,onTestFailed:!0,onTestFinished:!0};let ee;const Nr=c("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:n,tsconfigPath:a}=e,[l,p]=await Promise.all([i(import("@vitest/eslint-plugin")),i(import("eslint-plugin-no-only-tests"))]);return ee=ee||{...l,rules:{...l.rules,...p.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:ee}},{files:o,...a?{...l.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Fr}},name:"anolilab/vitest/rules",rules:{...l.configs.all.rules,...l.configs.recommended.rules,"@typescript-eslint/explicit-function-return-type":"off","antfu/no-top-level-await":"off","n/prefer-global/process":"off","no-unused-expressions":"off","vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/max-expects":"off","vitest/no-hooks":"off","vitest/no-mocks-import":"off","vitest/no-only-tests":s?"off":"error","vitest/no-restricted-vi-methods":"off","vitest/no-standalone-expect":"error","vitest/valid-expect":["error",{alwaysAwait:!0,maxArgs:2,minArgs:1}],...t,...n?{"vitest/padding-around-after-all-blocks":"off","vitest/padding-around-after-each-blocks":"off","vitest/padding-around-all":"off","vitest/padding-around-before-all-blocks":"off","vitest/padding-around-before-each-blocks":"off","vitest/padding-around-describe-blocks":"off","vitest/padding-around-expect-blocks":"off","vitest/padding-around-test-blocks":"off"}:{}}}]}),Tr=c("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:n=!0}=e,{indent:a=4,quotes:l="double"}=typeof n=="boolean"?{}:n,[p,h]=await Promise.all([i(import("eslint-plugin-yml")),i(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:h},name:"anolilab/yaml",plugins:{yaml:p},rules:{"@stylistic/spaced-comment":"off","yaml/block-mapping":"error","yaml/block-sequence":"error","yaml/no-empty-key":"error","yaml/no-empty-sequence-entry":"error","yaml/no-irregular-whitespace":"error","yaml/plain-scalar":"error","yaml/vue-custom-block/no-parsing-error":"error",...n?{"yaml/block-mapping-question-indicator-newline":"error","yaml/block-sequence-hyphen-indicator-newline":"error","yaml/flow-mapping-curly-newline":"error","yaml/flow-mapping-curly-spacing":"error","yaml/flow-sequence-bracket-newline":"error","yaml/flow-sequence-bracket-spacing":"error","yaml/indent":[t?"off":"error",a==="tab"?2:a],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:l==="backtick"?"single":l}],"yaml/spaced-comment":"error"}:{},...t?p.configs.prettier.rules:{},...s}},{files:["pnpm-workspace.yaml"],name:"anolilab/yaml/pnpm-workspace",rules:{"yaml/sort-keys":["error",{order:["packages","overrides","patchedDependencies","hoistPattern","catalog","catalogs","allowedDeprecatedVersions","allowNonAppliedPatches","configDependencies","ignoredBuiltDependencies","ignoredOptionalDependencies","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","packageExtensions","peerDependencyRules","supportedArchitectures"],pathPattern:"^$"}]}}]}),Ar=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ne(t)},rules:{...t.configs.all.rules,...s}}]}),$r=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var Ur=Object.defineProperty,Lr=w((e,r)=>Ur(e,"name",{value:r,configurable:!0}),"e$1");const Mr=Lr(()=>!!(process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged")),"isInGitHooksOrLintStaged");var Rr=Object.defineProperty,Jr=w((e,r)=>Rr(e,"name",{value:r,configurable:!0}),"e");const zr=Jr(()=>process.env.CI||Mr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var Vr=Object.defineProperty,X=w((e,r)=>Vr(e,"name",{value:r,configurable:!0}),"f");const Br=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],Q=X((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),f=X((e,r)=>{const o=Q(e,r);return{...e.overrides?.[r],..."overrides"in o?o.overrides:{}}},"getOverrides"),g=X((e,r)=>{const o=Q(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),as=X(async(e={},...r)=>{if("files"in e)throw new Error('[@anolilab/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');const o=e.cwd??process.cwd(),s=ue(fe(de(o,"package.json"),"utf8")),t=y(s,["prettier"]),n=y(s,["@anolilab/eslint-config"]),a=y(s,["react","react-dom"]),l=s?.dependencies?.react||s?.devDependencies?.react;let p=!1;if(l!==void 0){const u=te(l);u?.major&&u.major>=19&&(p=!0)}const{astro:h=y(s,["astro"]),componentExts:x=[],css:v=!1,gitignore:P=!0,html:C=!1,jsx:N=y(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||a,lodash:U=y(s,["lodash","underscore","lodash-es","@types/lodash","lodash.chunk","lodash.compact","lodash.concat","lodash.difference","lodash.differenceby","lodash.differencewith","lodash.drop","lodash.dropright","lodash.droprightwhile","lodash.dropwhile","lodash.fill","lodash.findindex","lodash.findlastindex","lodash.flatten","lodash.flattendeep","lodash.flattendepth","lodash.frompairs","lodash.head","lodash.indexof","lodash.initial","lodash.intersection","lodash.intersectionby","lodash.intersectionwith","lodash.join","lodash.last","lodash.lastindexof","lodash.nth","lodash.pull","lodash.pullall","lodash.pullallby","lodash.pullallwith","lodash.pullat","lodash.remove","lodash.reverse","lodash.slice","lodash.sortedindex","lodash.sortedindexby","lodash.sortedindexof","lodash.sortedlastindex","lodash.sortedlastindexby","lodash.sortedlastindexof","lodash.sorteduniq","lodash.sorteduniqby","lodash.tail","lodash.take","lodash.takeright","lodash.takerightwhile","lodash.takewhile","lodash.union","lodash.unionby","lodash.unionwith","lodash.uniq","lodash.uniqby","lodash.uniqwith","lodash.unzip","lodash.unzipwith","lodash.without","lodash.xor","lodash.xorby","lodash.xorwith","lodash.zip","lodash.zipobject","lodash.zipobjectdeep","lodash.zipwith","lodash.countby","lodash.every","lodash.filter","lodash.find","lodash.findlast","lodash.flatmap","lodash.flatmapdeep","lodash.flatmapdepth","lodash.foreach","lodash.foreachright","lodash.groupby","lodash.includes","lodash.invokemap","lodash.keyby","lodash.map","lodash.orderby","lodash.partition","lodash.reduce","lodash.reduceright","lodash.reject","lodash.sample","lodash.samplesize","lodash.shuffle","lodash.size","lodash.some","lodash.sortby","lodash.now","lodash.after","lodash.ary","lodash.before","lodash.bind","lodash.bindkey","lodash.curry","lodash.curryright","lodash.debounce","lodash.defer","lodash.delay","lodash.flip","lodash.memoize","lodash.negate","lodash.once","lodash.overargs","lodash.partial","lodash.partialright","lodash.rearg","lodash.rest","lodash.spread","lodash.throttle","lodash.unary","lodash.wrap","lodash.castarray","lodash.clone","lodash.clonedeep","lodash.clonedeepwith","lodash.clonewith","lodash.conformsto","lodash.eq","lodash.gt","lodash.gte","lodash.isarguments","lodash.isarray","lodash.isarraybuffer","lodash.isarraylike","lodash.isarraylikeobject","lodash.isboolean","lodash.isbuffer","lodash.isdate","lodash.iselement","lodash.isempty","lodash.isequal","lodash.isequalwith","lodash.iserror","lodash.isfinite","lodash.isfunction","lodash.isinteger","lodash.islength","lodash.ismap","lodash.ismatch","lodash.ismatchwith","lodash.isnan","lodash.isnative","lodash.isnil","lodash.isnull","lodash.isnumber","lodash.isobject","lodash.isobjectlike","lodash.isplainobject","lodash.isregexp","lodash.issafeinteger","lodash.isset","lodash.isstring","lodash.issymbol","lodash.istypedarray","lodash.isundefined","lodash.isweakmap","lodash.isweakset","lodash.lt","lodash.lte","lodash.toarray","lodash.tofinite","lodash.tointeger","lodash.tolength","lodash.tonumber","lodash.toplainobject","lodash.tosafeinteger","lodash.tostring","lodash.add","lodash.ceil","lodash.divide","lodash.floor","lodash.max","lodash.maxby","lodash.mean","lodash.meanby","lodash.min","lodash.minby","lodash.multiply","lodash.round","lodash.subtract","lodash.sum","lodash.sumby","lodash.clamp","lodash.inrange","lodash.random","lodash.assign","lodash.assignin","lodash.assigninwith","lodash.assignwith","lodash.at","lodash.create","lodash.defaults","lodash.defaultsdeep","lodash.findkey","lodash.findlastkey","lodash.forin","lodash.forinright","lodash.forown","lodash.forownright","lodash.functions","lodash.functionsin","lodash.get","lodash.has","lodash.hasin","lodash.invert","lodash.invertby","lodash.invoke","lodash.keys","lodash.keysin","lodash.mapkeys","lodash.mapvalues","lodash.merge","lodash.mergewith","lodash.omit","lodash.omitby","lodash.pick","lodash.pickby","lodash.result","lodash.set","lodash.setwith","lodash.topairs","lodash.topairsin","lodash.transform","lodash.unset","lodash.update","lodash.updatewith","lodash.values","lodash.valuesin","lodash.chain","lodash.tap","lodash.thru","lodash.camelcase","lodash.capitalize","lodash.deburr","lodash.endswith","lodash.escape","lodash.escaperegexp","lodash.kebabcase","lodash.lowercase","lodash.lowerfirst","lodash.pad","lodash.padend","lodash.padstart","lodash.parseint","lodash.repeat","lodash.replace","lodash.snakecase","lodash.split","lodash.startcase","lodash.startswith","lodash.template","lodash.tolower","lodash.toupper","lodash.trim","lodash.trimend","lodash.trimstart","lodash.truncate","lodash.unescape","lodash.uppercase","lodash.upperfirst","lodash.words","lodash.attempt","lodash.bindall","lodash.cond","lodash.conforms","lodash.constant","lodash.defaultto","lodash.flow","lodash.flowright","lodash.identity","lodash.iteratee","lodash.matches","lodash.matchesproperty","lodash.method","lodash.methodof","lodash.mixin","lodash.noconflict","lodash.noop","lodash.ntharg","lodash.over","lodash.overevery","lodash.oversome","lodash.property","lodash.propertyof","lodash.range","lodash.rangeright","lodash.runincontext","lodash.stubarray","lodash.stubfalse","lodash.stubobject","lodash.stubstring","lodash.stubtrue","lodash.times","lodash.topath","lodash.uniqueid"]),playwright:V=y(s,["playwright","eslint-plugin-playwright"]),react:T=a||y(s,["eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"]),reactCompiler:L=p,regexp:S=!0,silent:q=!1,storybook:D=y(s,["storybook","eslint-plugin-storybook"]),tailwindcss:I=!1,tanstackQuery:M=y(s,["@tanstack/react-query"]),tanstackRouter:A=y(s,["@tanstack/react-router"]),testingLibrary:$=y(s,["@testing-library/dom","@testing-library/react"]),tsdoc:_=!1,typescript:F=y(s,["typescript"]),unicorn:B=!0,unocss:W=!1,vitest:k=y(s,["vitest"]),zod:se=y(s,["zod"])}=e;if(n){const u=[];se&&u.push("eslint-plugin-zod"),W&&u.push("@unocss/eslint-plugin"),M&&u.push("@tanstack/eslint-plugin-query"),A&&u.push("@tanstack/eslint-plugin-router"),(v||I)&&u.push("@eslint/css"),I&&u.push("eslint-plugin-tailwindcss"),D&&u.push("eslint-plugin-storybook"),T&&u.push("eslint-plugin-react","@eslint-react/eslint-plugin","eslint-plugin-react-hooks","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),T&&L&&u.push("eslint-plugin-react-compiler"),$&&u.push("eslint-plugin-testing-library"),N&&u.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),U&&u.push("eslint-plugin-you-dont-need-lodash-underscore"),_&&u.push("eslint-plugin-tsdoc"),e.formatters&&u.push("eslint-plugin-format"),h&&(u.push("eslint-plugin-astro","astro-eslint-parser","@typescript-eslint/parser"),typeof e.formatters=="object"&&e.formatters.astro&&u.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters?.markdown&&e.formatters?.slidev&&u.push("prettier-plugin-slidev"),(e.formatters?.xml||e.formatters?.svg)&&u.push("@prettier/plugin-xml")),u.length>0&&await me(s,u,"devDependencies",{confirm:{message:X(z=>`@anolilab/eslint-config requires the following ${z.length===1?"package":"packages"} to be installed:
|
|
17
|
+
`),W=i(import("eslint-plugin-react-compiler"))),[{name:"anolilab/react/setup",plugins:{react:V,"react-dom":$["@eslint-react/dom"],"react-hooks":T,"react-hooks-extra":$["@eslint-react/hooks-extra"],"react-naming-convention":$["@eslint-react/naming-convention"],"react-perf":S,"react-refresh":L,"react-web-api":$["@eslint-react/web-api"],"react-x":$["@eslint-react"],"react-you-might-not-need-an-effect":q,...F?{"react-compiler":W}:{}}},{files:o,languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/rules",rules:{"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":["error",{...re,allow:[...re.allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react-hooks-extra/no-direct-set-state-in-use-effect":"error","react-hooks-extra/no-unnecessary-use-callback":"error","react-hooks-extra/no-unnecessary-use-memo":"error","react-hooks-extra/no-unnecessary-use-prefix":"error","react-hooks-extra/prefer-use-state-lazy-initialization":"error","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-naming-convention/component-name":"error","react-naming-convention/context-name":"error","react-naming-convention/filename":"off","react-naming-convention/use-state":"error","react-refresh/only-export-components":["error",{allowConstantExport:D,allowExportNames:[...M?["dynamic","dynamicParams","revalidate","fetchCache","runtime","preferredRegion","maxDuration","config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...I||A?["meta","links","headers","loader","action"]:[]]}],"react-web-api/no-leaked-event-listener":"error","react-web-api/no-leaked-interval":"error","react-web-api/no-leaked-resize-observer":"error","react-web-api/no-leaked-timeout":"error","react-x/avoid-shorthand-boolean":"off","react-x/avoid-shorthand-fragment":"off","react-x/jsx-key-before-spread":"error","react-x/jsx-no-duplicate-props":"error","react-x/jsx-no-undef":"off","react-x/jsx-uses-react":B?"off":"error","react-x/jsx-uses-vars":"error","react-x/no-access-state-in-setstate":"error","react-x/no-array-index-key":"error","react-x/no-children-count":"error","react-x/no-children-for-each":"error","react-x/no-children-map":"error","react-x/no-children-only":"error","react-x/no-children-prop":"off","react-x/no-children-to-array":"error","react-x/no-class-component":"off","react-x/no-clone-element":"error","react-x/no-comment-textnodes":"error","react-x/no-complex-conditional-rendering":"off","react-x/no-component-will-mount":"error","react-x/no-component-will-receive-props":"error","react-x/no-component-will-update":"error","react-x/no-context-provider":"error","react-x/no-create-ref":"error","react-x/no-default-props":"error","react-x/no-direct-mutation-state":"error","react-x/no-duplicate-key":"error","react-x/no-forward-ref":"error","react-x/no-implicit-key":"error","react-x/no-leaked-conditional-rendering":"error","react-x/no-missing-component-display-name":"off","react-x/no-missing-context-display-name":"off","react-x/no-missing-key":"error","react-x/no-misused-capture-owner-stack":"off","react-x/no-nested-component-definitions":"error","react-x/no-nested-lazy-component-declarations":"error","react-x/no-prop-types":"error","react-x/no-redundant-should-component-update":"error","react-x/no-set-state-in-component-did-mount":"error","react-x/no-set-state-in-component-did-update":"error","react-x/no-set-state-in-component-will-update":"error","react-x/no-string-refs":"error","react-x/no-unsafe-component-will-mount":"error","react-x/no-unsafe-component-will-receive-props":"error","react-x/no-unsafe-component-will-update":"error","react-x/no-unstable-context-value":"error","react-x/no-unstable-default-props":"error","react-x/no-unused-class-component-members":"error","react-x/no-unused-state":"error","react-x/no-use-context":"error","react-x/no-useless-forward-ref":"error","react-x/no-useless-fragment":"off","react-x/prefer-destructuring-assignment":"off","react-x/prefer-react-namespace-import":"off","react-x/prefer-read-only-props":"off","react-x/prefer-shorthand-boolean":"off","react-x/prefer-shorthand-fragment":"off","react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["error",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",C,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",C],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"off","react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"off","react/jsx-no-useless-fragment":"off","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":"off","react/jsx-uses-vars":"off","react/no-access-state-in-setstate":"off","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"off","react/no-children-prop":"off","react/no-danger":"error","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"off","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"off","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"off","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"off","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":"off","react/react-in-jsx-scope":B?"off":"error","react/require-default-props":"off","react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","never"],"react/static-property-placement":["error","static public field"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...F?{"react-compiler/react-compiler":"error"}:{},...S?.configs?.flat?.recommended?.rules,"react-you-might-not-need-an-effect/you-might-not-need-an-effect":"warn",...l?{"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off"}:{},...n},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:_??"detect"},"react-x":{version:_??"detect"}}},{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:"anolilab/react/jsx",rules:{"react-x/naming-convention/filename-extension":["error","as-needed"],"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"off","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"},settings:{extensions:[".jsx"]}},{files:["**/*.tsx"],name:"anolilab/react/tsx",rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:d("storybook"),name:"anolilab/react/storybook",rules:{"react/jsx-props-no-spreading":"off"}},...P?[{files:s,ignores:t,name:"anolilab/react/type-aware-rules",rules:{...N}}]:[]]}),mr=c("all",async(e,r)=>{const{files:o=r,level:s,overrides:t}=e,n=we["flat/recommended"],a={...n.rules};if(s==="warn")for(const l in a)a[l]==="error"&&(a[l]="warn");return[{...n,files:o,name:"anolilab/regexp/rules",rules:{...a,...t}}]}),yr=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-simple-import-sort"));return[{files:o,name:"anolilab/simple-import-sort",plugins:{"simple-import-sort":t},rules:{"simple-import-sort/exports":"error","simple-import-sort/imports":"error",...s}}]}),gr=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-sonarjs"));return[{name:"anolilab/sonarjs/plugin",plugins:{sonarjs:t}},{files:o,name:"anolilab/sonarjs/rules",rules:{...t.configs.recommended.rules,"sonarjs/file-name-differ-from-class":"error","sonarjs/no-collapsible-if":"error","sonarjs/no-nested-template-literals":"off","sonarjs/no-tab":"error","sonarjs/todo-tag":"off",...s}},{files:d("js_and_ts"),name:"anolilab/sonarjs/js-and-ts-rules",rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},{files:d("js"),languageOptions:{ecmaVersion:2020},name:"anolilab/sonarjs/js-rules",rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off"}}]}),hr=c("storybook",async e=>{const{overrides:r}=e,o=[...(await i(import("eslint-plugin-storybook"))).configs["flat/recommended"]];return o[0].rules={...o[0].rules,...r},o}),br=c("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=[...(await i(import("eslint-plugin-tailwindcss"))).configs["flat/recommended"]];return t[1].files=o,t[1].rules={...t[1].rules,...s},t}),xr=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("@tanstack/eslint-plugin-query"));return[{files:o,plugins:{"@tanstack/query":t},rules:{...t.configs.recommended.rules,...s}}]}),wr=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("@tanstack/eslint-plugin-router"));return[{files:o,plugins:{"@tanstack/router":t},rules:{...t.configs.recommended.rules,...s}}]}),jr=c("vitest",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t}=e,n=await i(import("eslint-plugin-testing-library")),a=y(t,["react","react-dom","eslint-plugin-react"]);return[{files:o,plugins:{"testing-library":n},rules:{...n.configs["flat/dom"].rules,...a?n.configs["flat/react"].rules:{},...s}}]}),vr=c("toml",async(e,r)=>{const{files:o=r,overrides:s={},stylistic:t=!0}=e,{indent:n=2}=typeof t=="boolean"?{}:t,[a,l]=await Promise.all([i(import("eslint-plugin-toml")),i(import("toml-eslint-parser"))]);return[{files:o,languageOptions:{parser:l},name:"anolilab/toml",plugins:{toml:a},rules:{...t?{"@stylistic/spaced-comment":"off"}:{},"toml/comma-style":"error","toml/keys-order":"error","toml/no-space-dots":"error","toml/no-unreadable-number-separator":"error","toml/precision-of-fractional-seconds":"error","toml/precision-of-integer":"error","toml/tables-order":"error","toml/vue-custom-block/no-parsing-error":"error",...t?{"toml/array-bracket-newline":"error","toml/array-bracket-spacing":"error","toml/array-element-newline":"error","toml/indent":["error",n==="tab"?2:n],"toml/inline-table-curly-spacing":"error","toml/key-spacing":"error","toml/padding-line-between-pairs":"error","toml/padding-line-between-tables":"error","toml/quoted-keys":"error","toml/spaced-comment":"error","toml/table-bracket-spacing":"error"}:{},...s}}]}),kr=c("ts",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-tsdoc"));return[{files:o,plugins:{tsdoc:t},rules:{"tsdoc/syntax":"error",...s}}]}),H={"init-declarations":"off","no-catch-shadow":"off","no-delete-var":"error","no-label-var":"error","no-restricted-globals":["error",{message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",name:"isFinite"},{message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",name:"isNaN"},...je.map(e=>({message:`Use window.${e} instead. https://github.com/facebook/create-react-app/blob/HEAD/packages/confusing-browser-globals/README.md`,name:e})),{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-shadow":"error","no-shadow-restricted-names":"error","no-undef":"error","no-undef-init":"error","no-undefined":"off","no-unused-vars":["error",{args:"after-used",ignoreRestSiblings:!0,vars:"all"}],"no-use-before-define":["error",{classes:!0,functions:!0,variables:!0}]},Or=c("all",async(e,r)=>{const{files:o=r}=e;return[{files:o,name:"anolilab/variables/rules",rules:H},{files:d("ts"),name:"anolilab/variables/ts-rules",rules:{"no-shadow":"off","no-undef":"off","no-unused-vars":"off","no-use-before-define":"off"}}]});var Pr=Object.defineProperty,Cr=w((e,r)=>Pr(e,"name",{value:r,configurable:!0}),"w");const Sr=c("ts",async(e,r)=>{const{componentExts:o=[],files:s=r,isInEditor:t=!1,overrides:n,overridesTypeAware:a,parserOptions:l,prettier:p}=e,h=ce,x=ae(t),[v,P,C,N]=await Promise.all([i(import("@typescript-eslint/eslint-plugin")),i(import("@typescript-eslint/parser")),i(import("typescript-eslint")),i(import("eslint-plugin-no-for-of-array"))]),U=e.filesTypeAware??d("ts"),V=e.ignoresTypeAware??["**/*.mdx/**",...d("astro")],T=e?.tsconfigPath??void 0,L=T!==void 0,S=Cr((D,I,M)=>({files:[...I,...o.map(A=>`**/*.${A}`)],...M?{ignores:M}:{},languageOptions:{parser:P,parserOptions:{extraFileExtensions:o.map(A=>`.${A}`),sourceType:"module",...D?{projectService:{allowDefaultProject:["./*.js"],defaultProject:T},tsconfigRootDir:process.cwd()}:{},...l}},name:`anolilab/typescript/${D?"type-aware-parser":"parser"}`}),"makeParser"),q=[{name:"anolilab/typescript/setup",plugins:{"@typescript-eslint":v,"no-for-of-array":N}},...L?[S(!1,s),S(!0,U,V)]:[S(!1,s)],...C.configs.strict];return L&&q.push(...C.configs.strictTypeCheckedOnly,{files:[...U,...o.map(D=>`**/*.${D}`)],name:"anolilab/typescript/rules-type-aware",rules:{"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error",...a}},{files:d("all"),name:"anolilab/typescript/no-for-of-array/rules",rules:{"no-for-of-array/no-for-of-array":"error"}}),q.push({files:s,name:"anolilab/typescript/rules",rules:{"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-ts-comment":["error",{minimumDescriptionLength:3,"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":"allow-with-description","ts-nocheck":!0}],"@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/method-signature-style":"error","@typescript-eslint/naming-convention":["error",{format:["camelCase","PascalCase","UPPER_CASE"],selector:"variable"},{format:["camelCase","PascalCase"],selector:"function"},{format:["PascalCase"],selector:"typeLike"}],"@typescript-eslint/no-array-constructor":h["no-array-constructor"],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dupe-class-members":x["no-dupe-class-members"],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-empty-function":R["no-empty-function"],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-loop-func":R["no-loop-func"],"@typescript-eslint/no-magic-numbers":R["no-magic-numbers"],"@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redeclare":R["no-redeclare"],"@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":H["no-shadow"],"@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unused-expressions":R["no-unused-expressions"],"@typescript-eslint/no-unused-vars":H["no-unused-vars"],"@typescript-eslint/no-use-before-define":H["no-use-before-define"],"@typescript-eslint/no-useless-constructor":x["no-useless-constructor"],"@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"off","@typescript-eslint/prefer-ts-expect-error":"off","@typescript-eslint/return-await":R["no-return-await"],"@typescript-eslint/semi":"off","@typescript-eslint/sort-type-constituents":"error","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":h["space-infix-ops"],...n,...p?{"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":0,"@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/quotes":0,"@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"}:{}}}),q}),_r=c("all",async(e,r)=>{const{files:o=r,overrides:s,packageJson:t,prettier:n,stylistic:a=!0}=e,{indent:l=4}=typeof a=="boolean"?{}:a,p=await i(import("eslint-plugin-unicorn"));return[{languageOptions:{globals:K.builtin},name:"anolilab/unicorn/plugin",plugins:{unicorn:p}},{files:o,name:"anolilab/unicorn/rules",rules:{...p.configs.recommended.rules,"unicorn/better-regex":"off","unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/no-abusive-eslint-disable":"error","unicorn/no-array-for-each":"off","unicorn/no-instanceof-builtins":"error","unicorn/no-useless-undefined":"off","unicorn/prefer-at":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":t.type==="module"?"error":"off","unicorn/prefer-node-protocol":"error","unicorn/prefer-ternary":["error","only-single-line"],...n?{"unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"}:{"unicorn/template-indent":["error",{indent:l}]},...s}},{files:["tsconfig.dev.json","tsconfig.prod.json"],name:"anolilab/unicorn/tsconfig-overrides",rules:{"unicorn/prevent-abbreviations":"off"}},{files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],name:"anolilab/unicorn/ts-overrides",rules:{"unicorn/import-style":"off"}}]});var Er=Object.defineProperty,qr=w((e,r)=>Er(e,"name",{value:r,configurable:!0}),"n$2");const Dr=qr(async e=>{const{attributify:r=!0,strict:o=!1}=e;return[{name:"anolilab/unocss",plugins:{unocss:await i(import("@unocss/eslint-plugin"))},rules:{"unocss/order":"warn",...r?{"unocss/order-attributify":"warn"}:{},...o?{"unocss/blocklist":"error"}:{}}}]},"unocss"),Ir=c("jsx_and_tsx",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-validate-jsx-nesting"));return[{files:o,name:"anolilab/validate-jsx-nesting/setup",plugins:{"validate-jsx-nesting":t},rules:{"validate-jsx-nesting/no-invalid-jsx-nesting":"error",...s}}]}),Fr={suite:!0,test:!0,chai:!0,describe:!0,it:!0,expectTypeOf:!0,assertType:!0,expect:!0,assert:!0,vitest:!0,vi:!0,beforeAll:!0,afterAll:!0,beforeEach:!0,afterEach:!0,onTestFailed:!0,onTestFinished:!0};let ee;const Nr=c("vitest",async(e,r)=>{const{files:o=r,isInEditor:s=!1,overrides:t,prettier:n,tsconfigPath:a}=e,[l,p]=await Promise.all([i(import("@vitest/eslint-plugin")),i(import("eslint-plugin-no-only-tests"))]);return ee=ee||{...l,rules:{...l.rules,...p.rules}},[{name:"anolilab/vitest/setup",plugins:{vitest:ee}},{files:o,...a?{...l.configs.env,settings:{vitest:{typecheck:!0}}}:{},languageOptions:{globals:{...Fr}},name:"anolilab/vitest/rules",rules:{...l.configs.all.rules,...l.configs.recommended.rules,"@typescript-eslint/explicit-function-return-type":"off","antfu/no-top-level-await":"off","n/prefer-global/process":"off","no-unused-expressions":"off","vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/max-expects":"off","vitest/no-hooks":"off","vitest/no-mocks-import":"off","vitest/no-only-tests":s?"off":"error","vitest/no-restricted-vi-methods":"off","vitest/no-standalone-expect":"error","vitest/valid-expect":["error",{alwaysAwait:!0,maxArgs:2,minArgs:1}],"vitest/valid-title":"off",...t,...n?{"vitest/padding-around-after-all-blocks":"off","vitest/padding-around-after-each-blocks":"off","vitest/padding-around-all":"off","vitest/padding-around-before-all-blocks":"off","vitest/padding-around-before-each-blocks":"off","vitest/padding-around-describe-blocks":"off","vitest/padding-around-expect-blocks":"off","vitest/padding-around-test-blocks":"off"}:{}}}]}),Tr=c("yaml",async(e,r)=>{const{files:o=r,overrides:s={},prettier:t,stylistic:n=!0}=e,{indent:a=4,quotes:l="double"}=typeof n=="boolean"?{}:n,[p,h]=await Promise.all([i(import("eslint-plugin-yml")),i(import("yaml-eslint-parser"))]);return[{files:o,languageOptions:{parser:h},name:"anolilab/yaml",plugins:{yaml:p},rules:{"@stylistic/spaced-comment":"off","yaml/block-mapping":"error","yaml/block-sequence":"error","yaml/no-empty-key":"error","yaml/no-empty-sequence-entry":"error","yaml/no-irregular-whitespace":"error","yaml/plain-scalar":"error","yaml/vue-custom-block/no-parsing-error":"error",...n?{"yaml/block-mapping-question-indicator-newline":"error","yaml/block-sequence-hyphen-indicator-newline":"error","yaml/flow-mapping-curly-newline":"error","yaml/flow-mapping-curly-spacing":"error","yaml/flow-sequence-bracket-newline":"error","yaml/flow-sequence-bracket-spacing":"error","yaml/indent":[t?"off":"error",a==="tab"?2:a],"yaml/key-spacing":"error","yaml/no-tab-indent":"error","yaml/quotes":["error",{avoidEscape:!0,prefer:l==="backtick"?"single":l}],"yaml/spaced-comment":"error"}:{},...t?p.configs.prettier.rules:{},...s}},{files:["pnpm-workspace.yaml"],name:"anolilab/yaml/pnpm-workspace",rules:{"yaml/sort-keys":["error",{order:["packages","overrides","patchedDependencies","hoistPattern","catalog","catalogs","allowedDeprecatedVersions","allowNonAppliedPatches","configDependencies","ignoredBuiltDependencies","ignoredOptionalDependencies","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","packageExtensions","peerDependencyRules","supportedArchitectures"],pathPattern:"^$"}]}}]}),Ar=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-you-dont-need-lodash-underscore"));return[{files:o,plugins:{"you-dont-need-lodash-underscore":ne(t)},rules:{...t.configs.all.rules,...s}}]}),$r=c("all",async(e,r)=>{const{files:o=r,overrides:s}=e,t=await i(import("eslint-plugin-zod"));return[{files:o,plugins:{zod:t},rules:{"zod/prefer-enum":"error","zod/require-strict":"error",...s}}]});var Ur=Object.defineProperty,Lr=w((e,r)=>Ur(e,"name",{value:r,configurable:!0}),"e$1");const Mr=Lr(()=>!!(process.env.GIT_PARAMS||process.env.VSCODE_GIT_COMMAND||process.env.npm_lifecycle_script?.startsWith("lint-staged")),"isInGitHooksOrLintStaged");var Rr=Object.defineProperty,Jr=w((e,r)=>Rr(e,"name",{value:r,configurable:!0}),"e");const zr=Jr(()=>process.env.CI||Mr()?!1:!!(process.env.VSCODE_PID??process.env.VSCODE_CWD??process.env.JETBRAINS_IDE??process.env.VIM??process.env.NVIM),"isInEditorEnvironment");var Vr=Object.defineProperty,X=w((e,r)=>Vr(e,"name",{value:r,configurable:!0}),"f");const Br=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],Q=X((e,r)=>typeof e[r]=="boolean"?{}:e[r]||{},"resolveSubOptions"),f=X((e,r)=>{const o=Q(e,r);return{...e.overrides?.[r],..."overrides"in o?o.overrides:{}}},"getOverrides"),g=X((e,r)=>{const o=Q(e,r);if("files"in o)return typeof o.files=="string"?[o.files]:o.files},"getFiles"),as=X(async(e={},...r)=>{if("files"in e)throw new Error('[@anolilab/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');const o=e.cwd??process.cwd(),s=ue(fe(de(o,"package.json"),"utf8")),t=y(s,["prettier"]),n=y(s,["@anolilab/eslint-config"]),a=y(s,["react","react-dom"]),l=s?.dependencies?.react||s?.devDependencies?.react;let p=!1;if(l!==void 0){const u=te(l);u?.major&&u.major>=19&&(p=!0)}const{astro:h=y(s,["astro"]),componentExts:x=[],css:v=!1,gitignore:P=!0,html:C=!1,jsx:N=y(s,["eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"])||a,lodash:U=y(s,["lodash","underscore","lodash-es","@types/lodash","lodash.chunk","lodash.compact","lodash.concat","lodash.difference","lodash.differenceby","lodash.differencewith","lodash.drop","lodash.dropright","lodash.droprightwhile","lodash.dropwhile","lodash.fill","lodash.findindex","lodash.findlastindex","lodash.flatten","lodash.flattendeep","lodash.flattendepth","lodash.frompairs","lodash.head","lodash.indexof","lodash.initial","lodash.intersection","lodash.intersectionby","lodash.intersectionwith","lodash.join","lodash.last","lodash.lastindexof","lodash.nth","lodash.pull","lodash.pullall","lodash.pullallby","lodash.pullallwith","lodash.pullat","lodash.remove","lodash.reverse","lodash.slice","lodash.sortedindex","lodash.sortedindexby","lodash.sortedindexof","lodash.sortedlastindex","lodash.sortedlastindexby","lodash.sortedlastindexof","lodash.sorteduniq","lodash.sorteduniqby","lodash.tail","lodash.take","lodash.takeright","lodash.takerightwhile","lodash.takewhile","lodash.union","lodash.unionby","lodash.unionwith","lodash.uniq","lodash.uniqby","lodash.uniqwith","lodash.unzip","lodash.unzipwith","lodash.without","lodash.xor","lodash.xorby","lodash.xorwith","lodash.zip","lodash.zipobject","lodash.zipobjectdeep","lodash.zipwith","lodash.countby","lodash.every","lodash.filter","lodash.find","lodash.findlast","lodash.flatmap","lodash.flatmapdeep","lodash.flatmapdepth","lodash.foreach","lodash.foreachright","lodash.groupby","lodash.includes","lodash.invokemap","lodash.keyby","lodash.map","lodash.orderby","lodash.partition","lodash.reduce","lodash.reduceright","lodash.reject","lodash.sample","lodash.samplesize","lodash.shuffle","lodash.size","lodash.some","lodash.sortby","lodash.now","lodash.after","lodash.ary","lodash.before","lodash.bind","lodash.bindkey","lodash.curry","lodash.curryright","lodash.debounce","lodash.defer","lodash.delay","lodash.flip","lodash.memoize","lodash.negate","lodash.once","lodash.overargs","lodash.partial","lodash.partialright","lodash.rearg","lodash.rest","lodash.spread","lodash.throttle","lodash.unary","lodash.wrap","lodash.castarray","lodash.clone","lodash.clonedeep","lodash.clonedeepwith","lodash.clonewith","lodash.conformsto","lodash.eq","lodash.gt","lodash.gte","lodash.isarguments","lodash.isarray","lodash.isarraybuffer","lodash.isarraylike","lodash.isarraylikeobject","lodash.isboolean","lodash.isbuffer","lodash.isdate","lodash.iselement","lodash.isempty","lodash.isequal","lodash.isequalwith","lodash.iserror","lodash.isfinite","lodash.isfunction","lodash.isinteger","lodash.islength","lodash.ismap","lodash.ismatch","lodash.ismatchwith","lodash.isnan","lodash.isnative","lodash.isnil","lodash.isnull","lodash.isnumber","lodash.isobject","lodash.isobjectlike","lodash.isplainobject","lodash.isregexp","lodash.issafeinteger","lodash.isset","lodash.isstring","lodash.issymbol","lodash.istypedarray","lodash.isundefined","lodash.isweakmap","lodash.isweakset","lodash.lt","lodash.lte","lodash.toarray","lodash.tofinite","lodash.tointeger","lodash.tolength","lodash.tonumber","lodash.toplainobject","lodash.tosafeinteger","lodash.tostring","lodash.add","lodash.ceil","lodash.divide","lodash.floor","lodash.max","lodash.maxby","lodash.mean","lodash.meanby","lodash.min","lodash.minby","lodash.multiply","lodash.round","lodash.subtract","lodash.sum","lodash.sumby","lodash.clamp","lodash.inrange","lodash.random","lodash.assign","lodash.assignin","lodash.assigninwith","lodash.assignwith","lodash.at","lodash.create","lodash.defaults","lodash.defaultsdeep","lodash.findkey","lodash.findlastkey","lodash.forin","lodash.forinright","lodash.forown","lodash.forownright","lodash.functions","lodash.functionsin","lodash.get","lodash.has","lodash.hasin","lodash.invert","lodash.invertby","lodash.invoke","lodash.keys","lodash.keysin","lodash.mapkeys","lodash.mapvalues","lodash.merge","lodash.mergewith","lodash.omit","lodash.omitby","lodash.pick","lodash.pickby","lodash.result","lodash.set","lodash.setwith","lodash.topairs","lodash.topairsin","lodash.transform","lodash.unset","lodash.update","lodash.updatewith","lodash.values","lodash.valuesin","lodash.chain","lodash.tap","lodash.thru","lodash.camelcase","lodash.capitalize","lodash.deburr","lodash.endswith","lodash.escape","lodash.escaperegexp","lodash.kebabcase","lodash.lowercase","lodash.lowerfirst","lodash.pad","lodash.padend","lodash.padstart","lodash.parseint","lodash.repeat","lodash.replace","lodash.snakecase","lodash.split","lodash.startcase","lodash.startswith","lodash.template","lodash.tolower","lodash.toupper","lodash.trim","lodash.trimend","lodash.trimstart","lodash.truncate","lodash.unescape","lodash.uppercase","lodash.upperfirst","lodash.words","lodash.attempt","lodash.bindall","lodash.cond","lodash.conforms","lodash.constant","lodash.defaultto","lodash.flow","lodash.flowright","lodash.identity","lodash.iteratee","lodash.matches","lodash.matchesproperty","lodash.method","lodash.methodof","lodash.mixin","lodash.noconflict","lodash.noop","lodash.ntharg","lodash.over","lodash.overevery","lodash.oversome","lodash.property","lodash.propertyof","lodash.range","lodash.rangeright","lodash.runincontext","lodash.stubarray","lodash.stubfalse","lodash.stubobject","lodash.stubstring","lodash.stubtrue","lodash.times","lodash.topath","lodash.uniqueid"]),playwright:V=y(s,["playwright","eslint-plugin-playwright"]),react:T=a||y(s,["eslint-plugin-react","eslint-plugin-react-hooks","eslint-plugin-react-refresh","@eslint-react/eslint-plugin","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"]),reactCompiler:L=p,regexp:S=!0,silent:q=!1,storybook:D=y(s,["storybook","eslint-plugin-storybook"]),tailwindcss:I=!1,tanstackQuery:M=y(s,["@tanstack/react-query"]),tanstackRouter:A=y(s,["@tanstack/react-router"]),testingLibrary:$=y(s,["@testing-library/dom","@testing-library/react"]),tsdoc:_=!1,typescript:F=y(s,["typescript"]),unicorn:B=!0,unocss:W=!1,vitest:k=y(s,["vitest"]),zod:se=y(s,["zod"])}=e;if(n){const u=[];se&&u.push("eslint-plugin-zod"),W&&u.push("@unocss/eslint-plugin"),M&&u.push("@tanstack/eslint-plugin-query"),A&&u.push("@tanstack/eslint-plugin-router"),(v||I)&&u.push("@eslint/css"),I&&u.push("eslint-plugin-tailwindcss"),D&&u.push("eslint-plugin-storybook"),T&&u.push("eslint-plugin-react","@eslint-react/eslint-plugin","eslint-plugin-react-hooks","eslint-plugin-react-perf","eslint-plugin-react-you-might-not-need-an-effect"),T&&L&&u.push("eslint-plugin-react-compiler"),$&&u.push("eslint-plugin-testing-library"),N&&u.push("eslint-plugin-jsx-a11y","eslint-plugin-validate-jsx-nesting"),U&&u.push("eslint-plugin-you-dont-need-lodash-underscore"),_&&u.push("eslint-plugin-tsdoc"),e.formatters&&u.push("eslint-plugin-format"),h&&(u.push("eslint-plugin-astro","astro-eslint-parser","@typescript-eslint/parser"),typeof e.formatters=="object"&&e.formatters.astro&&u.push("prettier-plugin-astro")),typeof e.formatters=="object"&&(e.formatters?.markdown&&e.formatters?.slidev&&u.push("prettier-plugin-slidev"),(e.formatters?.xml||e.formatters?.svg)&&u.push("@prettier/plugin-xml")),u.length>0&&await me(s,u,"devDependencies",{confirm:{message:X(z=>`@anolilab/eslint-config requires the following ${z.length===1?"package":"packages"} to be installed:
|
|
18
18
|
|
|
19
19
|
"${z.join(`"
|
|
20
20
|
"`)}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/eslint-config",
|
|
3
|
-
"version": "16.2.
|
|
3
|
+
"version": "16.2.3",
|
|
4
4
|
"description": "ESLint shareable config for the Anolilab JavaScript style guide.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -184,6 +184,9 @@
|
|
|
184
184
|
"@eslint-react/eslint-plugin": {
|
|
185
185
|
"optional": true
|
|
186
186
|
},
|
|
187
|
+
"@eslint/css": {
|
|
188
|
+
"optional": true
|
|
189
|
+
},
|
|
187
190
|
"@tanstack/eslint-plugin-query": {
|
|
188
191
|
"optional": true
|
|
189
192
|
},
|
|
@@ -193,6 +196,15 @@
|
|
|
193
196
|
"@unocss/eslint-plugin": {
|
|
194
197
|
"optional": true
|
|
195
198
|
},
|
|
199
|
+
"astro-eslint-parser": {
|
|
200
|
+
"optional": true
|
|
201
|
+
},
|
|
202
|
+
"eslint-plugin-astro": {
|
|
203
|
+
"optional": true
|
|
204
|
+
},
|
|
205
|
+
"eslint-plugin-format": {
|
|
206
|
+
"optional": true
|
|
207
|
+
},
|
|
196
208
|
"eslint-plugin-jsx-a11y": {
|
|
197
209
|
"optional": true
|
|
198
210
|
},
|
|
@@ -205,9 +217,21 @@
|
|
|
205
217
|
"eslint-plugin-react": {
|
|
206
218
|
"optional": true
|
|
207
219
|
},
|
|
220
|
+
"eslint-plugin-react-compiler": {
|
|
221
|
+
"optional": true
|
|
222
|
+
},
|
|
208
223
|
"eslint-plugin-react-hooks": {
|
|
209
224
|
"optional": true
|
|
210
225
|
},
|
|
226
|
+
"eslint-plugin-react-perf": {
|
|
227
|
+
"optional": true
|
|
228
|
+
},
|
|
229
|
+
"eslint-plugin-react-refresh": {
|
|
230
|
+
"optional": true
|
|
231
|
+
},
|
|
232
|
+
"eslint-plugin-react-you-might-not-need-an-effect": {
|
|
233
|
+
"optional": true
|
|
234
|
+
},
|
|
211
235
|
"eslint-plugin-storybook": {
|
|
212
236
|
"optional": true
|
|
213
237
|
},
|