@2digits/eslint-config 5.4.15 → 5.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -3159,11 +3159,6 @@ interface RuleOptions {
3159
3159
  * Surfaces diagnostics from React Forget
3160
3160
  */
3161
3161
  'react-compiler/react-compiler'?: Linter.RuleEntry<ReactCompilerReactCompiler>;
3162
- /**
3163
- * Disallows higher order functions that define components or hooks inside them.
3164
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
3165
- */
3166
- 'react-extra/component-hook-factories'?: Linter.RuleEntry<[]>;
3167
3162
  /**
3168
3163
  * Disallows DOM elements from using 'dangerouslySetInnerHTML'.
3169
3164
  * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
@@ -3244,11 +3239,6 @@ interface RuleOptions {
3244
3239
  * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
3245
3240
  */
3246
3241
  'react-extra/dom-no-void-elements-with-children'?: Linter.RuleEntry<[]>;
3247
- /**
3248
- * Enforces importing React DOM via a namespace import.
3249
- * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
3250
- */
3251
- 'react-extra/dom-prefer-namespace-import'?: Linter.RuleEntry<[]>;
3252
3242
  /**
3253
3243
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
3254
3244
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -3259,6 +3249,11 @@ interface RuleOptions {
3259
3249
  * @see https://github.com/facebook/react/issues/14920
3260
3250
  */
3261
3251
  'react-extra/exhaustive-deps'?: Linter.RuleEntry<ReactExtraExhaustiveDeps>;
3252
+ /**
3253
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
3254
+ * @see https://eslint-react.xyz/docs/rules/globals
3255
+ */
3256
+ 'react-extra/globals'?: Linter.RuleEntry<[]>;
3262
3257
  /**
3263
3258
  * Validates against mutating props, state, and other values that are immutable.
3264
3259
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -3266,42 +3261,42 @@ interface RuleOptions {
3266
3261
  'react-extra/immutability'?: Linter.RuleEntry<[]>;
3267
3262
  /**
3268
3263
  * Disallows passing 'children' as a prop.
3269
- * @see https://eslint-react.xyz/docs/rules/no-children-prop
3264
+ * @see https://eslint-react.xyz/docs/rules/jsx-no-children-prop
3270
3265
  */
3271
3266
  'react-extra/jsx-no-children-prop'?: Linter.RuleEntry<[]>;
3272
3267
  /**
3273
3268
  * Disallows passing 'children' as a prop when children are also passed as nested content.
3274
- * @see https://eslint-react.xyz/docs/rules/no-children-prop-with-children
3269
+ * @see https://eslint-react.xyz/docs/rules/jsx-no-children-prop-with-children
3275
3270
  */
3276
3271
  'react-extra/jsx-no-children-prop-with-children'?: Linter.RuleEntry<[]>;
3277
3272
  /**
3278
3273
  * Prevents comment strings from being accidentally inserted into a JSX element's text nodes.
3279
- * @see https://eslint-react.xyz/docs/rules/no-comment-textnodes
3274
+ * @see https://eslint-react.xyz/docs/rules/jsx-no-comment-textnodes
3280
3275
  */
3281
3276
  'react-extra/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
3282
3277
  /**
3283
3278
  * Prevent patterns that cause deoptimization when using the automatic JSX runtime.
3284
- * @see https://eslint-react.xyz/docs/rules/no-key-after-spread
3279
+ * @see https://eslint-react.xyz/docs/rules/jsx-no-key-after-spread
3285
3280
  */
3286
3281
  'react-extra/jsx-no-key-after-spread'?: Linter.RuleEntry<[]>;
3287
3282
  /**
3288
3283
  * Catches `$` before `{expr}` in JSX — typically from template literal `${expr}` being copy-pasted into JSX without removing the `$`. The `$` "leaks" into the rendered output.
3289
- * @see https://eslint-react.xyz/docs/rules/no-leaked-dollar
3284
+ * @see https://eslint-react.xyz/docs/rules/jsx-no-leaked-dollar
3290
3285
  */
3291
3286
  'react-extra/jsx-no-leaked-dollar'?: Linter.RuleEntry<[]>;
3292
3287
  /**
3293
3288
  * Catches `;` at the start of JSX text nodes — typically from accidentally placing a statement-ending `;` inside JSX. The `;` "leaks" into the rendered output.
3294
- * @see https://eslint-react.xyz/docs/rules/no-leaked-semicolon
3289
+ * @see https://eslint-react.xyz/docs/rules/jsx-no-leaked-semicolon
3295
3290
  */
3296
3291
  'react-extra/jsx-no-leaked-semicolon'?: Linter.RuleEntry<[]>;
3297
3292
  /**
3298
3293
  * Disallow JSX namespace syntax, as React does not support them.
3299
- * @see https://eslint-react.xyz/docs/rules/no-namespace
3294
+ * @see https://eslint-react.xyz/docs/rules/jsx-no-namespace
3300
3295
  */
3301
3296
  'react-extra/jsx-no-namespace'?: Linter.RuleEntry<[]>;
3302
3297
  /**
3303
3298
  * Disallows useless fragment elements.
3304
- * @see https://eslint-react.xyz/docs/rules/no-useless-fragment
3299
+ * @see https://eslint-react.xyz/docs/rules/jsx-no-useless-fragment
3305
3300
  */
3306
3301
  'react-extra/jsx-no-useless-fragment'?: Linter.RuleEntry<ReactExtraJsxNoUselessFragment>;
3307
3302
  /**
@@ -3454,11 +3449,6 @@ interface RuleOptions {
3454
3449
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
3455
3450
  */
3456
3451
  'react-extra/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
3457
- /**
3458
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
3459
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
3460
- */
3461
- 'react-extra/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
3462
3452
  /**
3463
3453
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
3464
3454
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -3474,15 +3464,7 @@ interface RuleOptions {
3474
3464
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
3475
3465
  */
3476
3466
  'react-extra/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
3477
- /**
3478
- * Disallows unnecessary usage of 'useCallback'.
3479
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
3480
- */
3481
3467
  'react-extra/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
3482
- /**
3483
- * Disallows unnecessary usage of 'useMemo'.
3484
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
3485
- */
3486
3468
  'react-extra/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
3487
3469
  /**
3488
3470
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
@@ -3525,7 +3507,7 @@ interface RuleOptions {
3525
3507
  */
3526
3508
  'react-extra/no-unused-props'?: Linter.RuleEntry<[]>;
3527
3509
  /**
3528
- * Warns about unused class component state.
3510
+ * Warns about state variables that are defined but never used, or only used in effects.
3529
3511
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
3530
3512
  */
3531
3513
  'react-extra/no-unused-state'?: Linter.RuleEntry<[]>;
@@ -3534,15 +3516,7 @@ interface RuleOptions {
3534
3516
  * @see https://eslint-react.xyz/docs/rules/no-use-context
3535
3517
  */
3536
3518
  'react-extra/no-use-context'?: Linter.RuleEntry<[]>;
3537
- /**
3538
- * Enforces destructuring assignment for component props and context.
3539
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
3540
- */
3541
3519
  'react-extra/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
3542
- /**
3543
- * Enforces importing React via a namespace import.
3544
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
3545
- */
3546
3520
  'react-extra/prefer-namespace-import'?: Linter.RuleEntry<[]>;
3547
3521
  /**
3548
3522
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
@@ -3556,7 +3530,7 @@ interface RuleOptions {
3556
3530
  'react-extra/refs'?: Linter.RuleEntry<[]>;
3557
3531
  /**
3558
3532
  * Validates and transforms React Client/Server Function definitions.
3559
- * @see https://eslint-react.xyz/docs/rules/function-definition
3533
+ * @see https://eslint-react.xyz/docs/rules/rsc-function-definition
3560
3534
  */
3561
3535
  'react-extra/rsc-function-definition'?: Linter.RuleEntry<[]>;
3562
3536
  /**
@@ -3574,6 +3548,11 @@ interface RuleOptions {
3574
3548
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
3575
3549
  */
3576
3550
  'react-extra/set-state-in-render'?: Linter.RuleEntry<[]>;
3551
+ /**
3552
+ * Validates that components are static, not recreated every render.
3553
+ * @see https://eslint-react.xyz/docs/rules/static-components
3554
+ */
3555
+ 'react-extra/static-components'?: Linter.RuleEntry<[]>;
3577
3556
  /**
3578
3557
  * Validates against syntax that React Compiler does not support.
3579
3558
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
@@ -3594,6 +3573,11 @@ interface RuleOptions {
3594
3573
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
3595
3574
  */
3596
3575
  'react-extra/web-api-no-leaked-event-listener'?: Linter.RuleEntry<[]>;
3576
+ /**
3577
+ * Enforces that every 'fetch' in a component or custom hook has a corresponding 'AbortController' abort in the cleanup function.
3578
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-fetch
3579
+ */
3580
+ 'react-extra/web-api-no-leaked-fetch'?: Linter.RuleEntry<[]>;
3597
3581
  /**
3598
3582
  * Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
3599
3583
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
@@ -3609,11 +3593,6 @@ interface RuleOptions {
3609
3593
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
3610
3594
  */
3611
3595
  'react-extra/web-api-no-leaked-timeout'?: Linter.RuleEntry<[]>;
3612
- /**
3613
- * Disallows higher order functions that define components or hooks inside them.
3614
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
3615
- */
3616
- 'react-extra/x-component-hook-factories'?: Linter.RuleEntry<[]>;
3617
3596
  /**
3618
3597
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
3619
3598
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -3624,6 +3603,11 @@ interface RuleOptions {
3624
3603
  * @see https://github.com/facebook/react/issues/14920
3625
3604
  */
3626
3605
  'react-extra/x-exhaustive-deps'?: Linter.RuleEntry<ReactExtraXExhaustiveDeps>;
3606
+ /**
3607
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
3608
+ * @see https://eslint-react.xyz/docs/rules/globals
3609
+ */
3610
+ 'react-extra/x-globals'?: Linter.RuleEntry<[]>;
3627
3611
  /**
3628
3612
  * Validates against mutating props, state, and other values that are immutable.
3629
3613
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -3764,11 +3748,6 @@ interface RuleOptions {
3764
3748
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
3765
3749
  */
3766
3750
  'react-extra/x-no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
3767
- /**
3768
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
3769
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
3770
- */
3771
- 'react-extra/x-no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
3772
3751
  /**
3773
3752
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
3774
3753
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -3784,16 +3763,6 @@ interface RuleOptions {
3784
3763
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
3785
3764
  */
3786
3765
  'react-extra/x-no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
3787
- /**
3788
- * Disallows unnecessary usage of 'useCallback'.
3789
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
3790
- */
3791
- 'react-extra/x-no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
3792
- /**
3793
- * Disallows unnecessary usage of 'useMemo'.
3794
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
3795
- */
3796
- 'react-extra/x-no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
3797
3766
  /**
3798
3767
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
3799
3768
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
@@ -3835,7 +3804,7 @@ interface RuleOptions {
3835
3804
  */
3836
3805
  'react-extra/x-no-unused-props'?: Linter.RuleEntry<[]>;
3837
3806
  /**
3838
- * Warns about unused class component state.
3807
+ * Warns about state variables that are defined but never used, or only used in effects.
3839
3808
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
3840
3809
  */
3841
3810
  'react-extra/x-no-unused-state'?: Linter.RuleEntry<[]>;
@@ -3844,16 +3813,6 @@ interface RuleOptions {
3844
3813
  * @see https://eslint-react.xyz/docs/rules/no-use-context
3845
3814
  */
3846
3815
  'react-extra/x-no-use-context'?: Linter.RuleEntry<[]>;
3847
- /**
3848
- * Enforces destructuring assignment for component props and context.
3849
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
3850
- */
3851
- 'react-extra/x-prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
3852
- /**
3853
- * Enforces importing React via a namespace import.
3854
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
3855
- */
3856
- 'react-extra/x-prefer-namespace-import'?: Linter.RuleEntry<[]>;
3857
3816
  /**
3858
3817
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
3859
3818
  * @see https://eslint-react.xyz/docs/rules/purity
@@ -3879,6 +3838,11 @@ interface RuleOptions {
3879
3838
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
3880
3839
  */
3881
3840
  'react-extra/x-set-state-in-render'?: Linter.RuleEntry<[]>;
3841
+ /**
3842
+ * Validates that components are static, not recreated every render.
3843
+ * @see https://eslint-react.xyz/docs/rules/static-components
3844
+ */
3845
+ 'react-extra/x-static-components'?: Linter.RuleEntry<[]>;
3882
3846
  /**
3883
3847
  * Validates against syntax that React Compiler does not support.
3884
3848
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{FlatConfigComposer as e,renamePluginsInConfigs as t,renamePluginsInRules as n}from"eslint-flat-config-utils";import{getPackageInfo as r,isPackageExists as i}from"local-pkg";import{findWorkspaceDir as a}from"pkg-types";import o from"eslint-plugin-antfu";import s,{configs as c}from"eslint-plugin-de-morgan";import l from"@eslint-community/eslint-plugin-eslint-comments";import u from"@eslint-community/eslint-plugin-eslint-comments/configs";import d from"@eslint/css";import{tailwind3 as f,tailwind4 as p}from"tailwind-csstree";import m from"eslint-plugin-depend";import{fixupPluginRules as h}from"@eslint/compat";import g,{configs as _}from"eslint-plugin-github-action";import*as v from"yaml-eslint-parser";import y from"eslint-config-flat-gitignore";import ee from"@eslint/js";import te from"@stylistic/eslint-plugin";import b from"globals";import x from"eslint-plugin-jsdoc";import S,{configs as C}from"eslint-plugin-jsonc";import*as w from"jsonc-eslint-parser";import T from"@eslint/markdown";import{mergeProcessors as ne,processorPassThrough as re}from"eslint-merge-processors";import ie from"eslint-plugin-n";import ae,{configs as oe}from"eslint-plugin-regexp";import se from"eslint-plugin-sonarjs";import*as E from"empathic/find";import ce,{configs as le}from"eslint-plugin-toml";import D from"eslint-plugin-unicorn";import O from"eslint-plugin-yml";const k=`**/*.?([cm])[jt]s?(x)`,A=`**/*.?([cm])ts`,j=`**/*.?([cm])tsx`,M=`.github/workflows/*.y?(a)ml`,N=`**/*.md`,P=`${N}/${k}`,F=`**/node_modules,**/dist,**/package-lock.json,**/yarn.lock,**/pnpm-lock.yaml,**/bun.lockb,**/bun.lock,**/output,**/coverage,**/temp,**/.temp,**/tmp,**/.tmp,**/.history,**/.vitepress/cache,**/.nuxt,**/.next,**/.vercel,**/.changeset,**/.idea,**/.cache,**/.output,**/.vite-inspect,**/.yarn,**/CHANGELOG*.md,**/*.min.*,**/LICENSE*,**/__snapshots__,**/auto-import?(s).d.ts,**/components.d.ts`.split(`,`);function I(){return[{files:[k],name:`2digits:antfu`,plugins:{antfu:o},rules:{"antfu/top-level-function":`error`}}]}function L(){return[{files:[k],name:`2digits:boolean`,plugins:{boolean:s},rules:{...c.recommended.rules}}]}const R={"@next/next":`next`,"@eslint-react":`react-extra`,"react-hooks":`react-hooks`,"react-compiler":`react-compiler`,"@stylistic/eslint-plugin":`stylistic`,"@typescript-eslint":`ts`,vitest:`vitest`,node:`node`,"@eslint-community/eslint-comments":`comments`,storybook:`storybook`,turbo:`turbo`,jsdoc:`jsdoc`,unicorn:`unicorn`,tailwindcss:`tailwindcss`,"@tanstack/query":`tanstack-query`,"@tanstack/router":`tanstack-router`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`,antfu:`antfu`,css:`css`,depend:`depend`,"github-action":`github-action`,jsonc:`jsonc`,markdown:`markdown`,pnpm:`pnpm`,regexp:`regexp`,yml:`yml`,zod:`zod`,toml:`toml`},z=[`storybook`,`@storybook/nextjs`,`@storybook/nextjs-vite`,`@storybook/react-vite`,`@storybook/react-webpack5`,`@storybook/react-native-web-vite`],B=n(u.recommended.rules,R);function V(){return[{files:[k],name:`2digits:comments`,plugins:{comments:l},rules:{...B,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}async function H(e){if(e?.customSyntax)return e.customSyntax;if(e?.tailwindMajor===3)return f;if(e?.tailwindMajor===4)return p;try{let e=(await r(`tailwindcss`))?.version??``,t=Number.parseInt(e.split(`.`)[0]??`0`,10);if(Number.isFinite(t)&&t>=4)return p}catch{}return f}async function U(e={}){let t=await H(e);return[{name:`2digits:css`,files:[`**/*.css`],language:`css/css`,plugins:{css:d},languageOptions:{tolerant:!0,customSyntax:t},rules:{...d.configs.recommended.rules,...e.overrides}}]}function W(){return[{files:[k],name:`2digits:depend`,plugins:{depend:m},rules:{"depend/ban-dependencies":`warn`}}]}async function G(e){let t=await e;return t.default??t}async function ue(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await G(import(`eslint-plugin-drizzle`));return[{files:[k],name:`2digits:drizzle`,plugins:{drizzle:h(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}const de=Object.fromEntries(_.recommended.flatMap(({rules:e})=>Object.entries({...e})));function fe(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":g}},{name:`2digits:github-actions/recommended`,files:[M],ignores:[`!**/${M}`],languageOptions:{parser:v},rules:{...de}}]}async function pe(e={}){let{overrides:t={},files:r=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([G(import(`@graphql-eslint/eslint-plugin`)),import(`graphql-config`).then(({loadConfig:e})=>e({throwOnEmpty:!1,throwOnMissing:!1}).then(e=>e?.getDefault().schema))]),o=i.configs[`flat/operations-recommended`].rules,s={};if(a)s=o;else for(let e of Object.keys(o)){let t=e.replace(`@graphql-eslint/`,``);t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings)||(s[e]=o[e])}let c=n(s,R);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:r,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function me(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[F,n].flat(),name:`2digits:ignores`},y({strict:!1,...t,name:`2digits:gitignore`})]}function he(e={}){let{overrides:t={}}=e;return[{files:[k],name:`2digits:javascript`,plugins:{stylistic:te},languageOptions:{ecmaVersion:2022,globals:{...b.browser,...b.es2021,...b.node,document:`readonly`,navigator:`readonly`,window:`readonly`},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:`module`},sourceType:`module`},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...ee.configs.recommended.rules,"accessor-pairs":[`error`,{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":`error`,"block-scoped-var":`error`,"constructor-super":`error`,"default-case-last":`error`,"dot-notation":[`error`,{allowKeywords:!0}],eqeqeq:[`error`,`smart`],"new-cap":[`error`,{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":`error`,"no-array-constructor":`error`,"no-async-promise-executor":`error`,"no-caller":`error`,"no-case-declarations":`error`,"no-class-assign":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-const-assign":`error`,"no-control-regex":`error`,"no-debugger":`error`,"no-delete-var":`error`,"no-dupe-args":`error`,"no-dupe-class-members":`error`,"no-dupe-keys":`error`,"no-duplicate-case":`error`,"no-empty":[`error`,{allowEmptyCatch:!0}],"no-empty-character-class":`error`,"no-empty-pattern":`error`,"no-eval":`error`,"no-ex-assign":`error`,"no-extend-native":`error`,"no-extra-bind":`error`,"no-extra-boolean-cast":`error`,"no-fallthrough":`error`,"no-func-assign":`error`,"no-global-assign":`error`,"no-implied-eval":`error`,"no-import-assign":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-iterator":`error`,"no-labels":[`error`,{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-multi-str":`error`,"no-new":`error`,"no-new-func":`error`,"no-new-native-nonconstructor":`error`,"no-new-wrappers":`error`,"no-obj-calls":`error`,"no-octal":`error`,"no-octal-escape":`error`,"no-proto":`error`,"no-prototype-builtins":`error`,"no-redeclare":[`error`,{builtinGlobals:!1}],"no-regex-spaces":`error`,"no-restricted-globals":[`error`,{message:"Use `globalThis` instead.",name:`global`},{message:"Use `globalThis` instead.",name:`self`}],"no-restricted-properties":[`error`,{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:`__proto__`},{message:"Use `Object.defineProperty` instead.",property:`__defineGetter__`},{message:"Use `Object.defineProperty` instead.",property:`__defineSetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupGetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupSetter__`}],"no-restricted-syntax":[`error`,`DebuggerStatement`,`LabeledStatement`,`WithStatement`,`TSEnumDeclaration`,`TSExportAssignment`],"no-self-assign":[`error`,{props:!0}],"no-self-compare":`error`,"no-sequences":`error`,"no-shadow-restricted-names":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-this-before-super":`error`,"no-throw-literal":`error`,"no-undef":`error`,"no-undef-init":`error`,"no-unexpected-multiline":`error`,"no-unmodified-loop-condition":`error`,"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"no-unreachable":`error`,"no-unreachable-loop":`error`,"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-unused-expressions":[`error`,{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":[`error`,{args:`none`,caughtErrors:`none`,ignoreRestSiblings:!0,vars:`all`}],"no-useless-assignment":`off`,"no-useless-backreference":`error`,"no-useless-call":`error`,"no-useless-catch":`error`,"no-useless-computed-key":`error`,"no-useless-constructor":`error`,"no-useless-rename":`error`,"no-var":`error`,"no-with":`error`,"object-shorthand":[`error`,`always`,{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":[`error`,{initialized:`never`}],"prefer-arrow-callback":[`error`,{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":[`error`,{destructuring:`all`,ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":`error`,"prefer-promise-reject-errors":`error`,"prefer-regex-literals":[`error`,{disallowRedundantWrapping:!0}],"prefer-rest-params":`error`,"prefer-spread":`error`,"prefer-template":`error`,"symbol-description":`error`,"unicode-bom":[`error`,`never`],"use-isnan":[`error`,{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":[`error`,{requireStringLiterals:!0}],"vars-on-top":`error`,yoda:[`error`,`never`],"stylistic/padding-line-between-statements":[`error`,{blankLine:`always`,prev:[`const`,`let`],next:`*`},{blankLine:`any`,prev:[`const`,`let`],next:[`const`,`let`]},{blankLine:`always`,prev:`*`,next:`return`}],...t}}]}function ge(){return[{files:[k],name:`2digits:jsdoc`,plugins:{jsdoc:x},rules:{"jsdoc/check-access":`error`,"jsdoc/check-param-names":`error`,"jsdoc/check-property-names":`error`,"jsdoc/check-tag-names":[`error`,{typed:!0}],"jsdoc/check-types":`error`,"jsdoc/empty-tags":`error`,"jsdoc/implements-on-classes":`error`,"jsdoc/no-defaults":`error`,"jsdoc/no-multi-asterisks":`error`,"jsdoc/require-param":`error`,"jsdoc/require-param-name":`error`,"jsdoc/require-property":`error`,"jsdoc/require-property-description":`error`,"jsdoc/require-property-name":`error`,"jsdoc/require-returns-check":`error`,"jsdoc/require-returns-description":`error`,"jsdoc/require-yields":`error`,"jsdoc/require-yields-check":`error`}}]}function _e(){return[...C[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...K,rules:{...q(C[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...K,rules:{...q(C[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...K,rules:{...q(C[`flat/recommended-with-json5`])}},{name:`2digits:jsonc/package.json`,...K,files:[`**/package.json`],rules:{"jsonc/sort-array-values":[`error`,{order:{type:`asc`},pathPattern:`^files$`}],"jsonc/sort-keys":[`error`,{order:{type:`asc`},pathPattern:`^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$`},{order:[`types`,`import`,`module`,`require`,`default`],pathPattern:`^exports.*$`}]}},{name:`2digits:jsonc/tsconfig.json`,...K,files:[`**/tsconfig.json`,`**/tsconfig.*.json`,`**/tsconfig-*.json`,`**/jsconfig.json`,`**/jsconfig.*.json`,`**/jsconfig-*.json`],rules:{"jsonc/sort-keys":[`error`,{order:[`$schema`,`extends`,`compilerOptions`,`references`,`files`,`include`,`exclude`],pathPattern:`^$`},{order:`incremental.composite.tsBuildInfoFile.disableSourceOfProjectReferenceRedirect.disableSolutionSearching.disableReferencedProjectLoad.target.lib.jsx.experimentalDecorators.emitDecoratorMetadata.jsxFactory.jsxFragmentFactory.jsxImportSource.reactNamespace.noLib.useDefineForClassFields.moduleDetection.module.rootDir.moduleResolution.baseUrl.paths.rootDirs.typeRoots.types.allowUmdGlobalAccess.moduleSuffixes.allowImportingTsExtensions.resolvePackageJsonExports.resolvePackageJsonImports.customConditions.resolveJsonModule.allowArbitraryExtensions.noResolve.allowJs.checkJs.maxNodeModuleJsDepth.declaration.declarationMap.emitDeclarationOnly.sourceMap.inlineSourceMap.outFile.outDir.removeComments.noEmit.importHelpers.importsNotUsedAsValues.downlevelIteration.sourceRoot.mapRoot.inlineSources.emitBOM.newLine.stripInternal.noEmitHelpers.noEmitOnError.preserveConstEnums.declarationDir.preserveValueImports.isolatedModules.verbatimModuleSyntax.allowSyntheticDefaultImports.esModuleInterop.preserveSymlinks.forceConsistentCasingInFileNames.strict.strictBindCallApply.strictFunctionTypes.strictNullChecks.strictPropertyInitialization.allowUnreachableCode.allowUnusedLabels.alwaysStrict.exactOptionalPropertyTypes.noFallthroughCasesInSwitch.noImplicitAny.noImplicitOverride.noImplicitReturns.noImplicitThis.noPropertyAccessFromIndexSignature.noUncheckedIndexedAccess.noUnusedLocals.noUnusedParameters.useUnknownInCatchVariables.skipDefaultLibCheck.skipLibCheck`.split(`.`),pathPattern:`^compilerOptions$`}]}},...C[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const K={languageOptions:{parser:w},plugins:{jsonc:S}};function q(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const J=[N];function ve(){return[{name:`2digits:markdown/setup`,plugins:{markdown:T}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:ne([T.processors.markdown,re])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:be}},{name:`2digits:markdown/rules`,files:J,language:`markdown/gfm`,rules:{"markdown/fenced-code-language":`error`,"markdown/heading-increment":`error`,"markdown/no-empty-links":`error`,"markdown/no-invalid-label-refs":`error`,"markdown/no-missing-label-refs":`error`}}]}async function ye(){let e=await G(import(`typescript-eslint`)),t=await G(import(`@eslint-react/eslint-plugin`)),r=n({...e.configs.disableTypeChecked.rules,...t.configs[`disable-type-checked`].rules},R);return[{name:`2digits:markdown/disables`,files:[P],languageOptions:{parser:e.parser,parserOptions:{project:!1,projectService:!1,ecmaFeatures:{impliedStrict:!0}}},rules:{...r,"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`,"node/prefer-global/process":`off`,"ts/consistent-type-imports":`off`,"ts/explicit-function-return-type":`off`,"ts/no-namespace":`off`,"ts/no-redeclare":`off`,"ts/no-require-imports":`off`,"ts/no-unused-expressions":`off`,"ts/no-unused-vars":`off`,"ts/no-use-before-define":`off`,"unicode-bom":`off`}}]}const be={meta:{name:`parser-plain`},parseForESLint:e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:`Program`},scopeManager:null,services:{isPlain:!0},visitorKeys:{Program:[]}})};async function xe(e={}){let{files:t=[A,j],overrides:r={},parserOptions:i}=e,[a,o]=await Promise.all([G(import(`@next/eslint-plugin-next`)),G(import(`@typescript-eslint/parser`))]),s=n({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},R);return[{name:`2digits:next/setup`,plugins:{next:h(a)}},{name:`2digits:next/rules`,files:t,languageOptions:{parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:`module`},rules:{...s,"next/no-html-link-for-pages":`off`,...r}},{files:[`**/middleware.ts`,`**/proxy.ts`],name:`2digits:next/proxy`,rules:{"unicorn/prefer-string-raw":`off`}}]}var Se={node:`24.14.1`};function Ce(){return[{files:[k],name:`2digits:node`,settings:{node:{version:Se.node}},plugins:{node:ie},rules:{"node/handle-callback-err":[`error`,`^(err|error)$`],"node/no-deprecated-api":`error`,"node/no-exports-assign":`error`,"node/no-new-require":`error`,"node/no-path-concat":`error`,"node/no-unsupported-features/node-builtins":[`error`,{allowExperimental:!0}],"node/prefer-global/buffer":`error`,"node/prefer-global/process":`error`,"node/prefer-global/text-encoder":`error`,"node/prefer-global/url":`error`,"node/prefer-global/console":`error`,"node/prefer-global/url-search-params":`error`,"node/prefer-global/text-decoder":`error`,"node/process-exit-as-throw":`error`}}]}async function we(){let e=await G(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`package.json`,`**/package.json`],languageOptions:{parser:w},plugins:{pnpm:e},rules:{"pnpm/json-enforce-catalog":`error`,"pnpm/json-prefer-workspace-settings":`error`,"pnpm/json-valid-catalog":`error`}},{name:`2digits:pnpm/pnpm-workspace-yaml`,files:[`pnpm-workspace.yaml`],languageOptions:{parser:await G(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`,"pnpm/yaml-valid-packages":`error`,"pnpm/yaml-enforce-settings":[`error`,{autofix:!0,settings:{catalogMode:`strict`,savePrefix:``,preferWorkspacePackages:!0,cleanupUnusedCatalogs:!0}}]}}]}async function Te(){let[e,t]=await Promise.all([G(import(`eslint-config-prettier`)),G(import(`@stylistic/eslint-plugin`))]);return[{name:`2digits:prettier`,plugins:{stylistic:t},rules:{...e.rules,"tailwindcss/classnames-order":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}]}}]}async function Ee(e={}){let{files:t=[A,j],overrides:r={},parserOptions:i,tsconfigRootDir:a,reactCompiler:o=!0}=e,[s,c,l,u]=await Promise.all([G(import(`@eslint-react/eslint-plugin`)),G(import(`@typescript-eslint/parser`)),o?G(import(`eslint-plugin-react-compiler`)):Promise.resolve(void 0),G(import(`@stylistic/eslint-plugin`))]),d=s.configs.all.plugins,f=n({...s.configs[`disable-conflict-eslint-plugin-react`].rules,...s.configs[`disable-conflict-eslint-plugin-react-hooks`].rules,...s.configs[`strict-type-checked`].rules},R);return[{name:`2digits:react/setup`,plugins:{stylistic:u,"react-extra":d[`@eslint-react`],...o?{"react-compiler":l}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:t,languageOptions:{parser:c,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:a,projectService:!0,...i},sourceType:`module`},rules:{...f,...o?{"react-compiler/react-compiler":`error`}:{},"react-extra/exhaustive-deps":`error`,"react-extra/purity":`error`,"react-extra/no-unused-class-component-members":`error`,"react-extra/no-unnecessary-use-callback":`error`,"react-extra/no-unnecessary-use-prefix":`error`,"react-extra/no-unnecessary-use-memo":`error`,"react-extra/set-state-in-effect":`error`,"react-extra/use-state":`error`,"react-extra/no-unstable-context-value":`error`,"react-extra/no-unstable-default-props":`error`,"react-extra/no-unused-props":`error`,"react-extra/no-context-provider":`error`,"react-extra/no-forward-ref":`error`,"react-extra/no-use-context":`error`,"react-extra/immutability":`error`,"react-extra/refs":`error`,"react-extra/no-duplicate-key":`error`,"react-extra/dom-no-missing-button-type":`error`,"react-extra/dom-no-missing-iframe-sandbox":`error`,"react-extra/dom-no-unsafe-target-blank":`error`,"react-extra/naming-convention-context-name":`error`,"react-extra/naming-convention-id-name":`error`,"react-extra/naming-convention-ref-name":`error`,"react-extra/prefer-namespace-import":`error`,"react-extra/jsx-no-useless-fragment":`off`,"stylistic/jsx-curly-newline":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}],"stylistic/jsx-self-closing-comp":`error`,...r}}]}function De(){return[{files:[k],name:`2digits:regexp`,plugins:{regexp:ae},rules:{...oe[`flat/recommended`].rules}}]}function Oe(){return[{files:[k],name:`2digits:sonar`,plugins:{sonar:se},rules:{"sonar/cognitive-complexity":`error`,"sonar/comma-or-logical-or-case":`error`,"sonar/concise-regex":`error`,"sonar/confidential-information-logging":`error`,"sonar/constructor-for-side-effects":`error`,"sonar/content-length":`error`,"sonar/content-security-policy":`error`,"sonar/cookie-no-httponly":`error`,"sonar/cors":`error`,"sonar/csrf":`error`,"sonar/max-switch-cases":`error`,"sonar/no-all-duplicated-branches":`error`,"sonar/no-collapsible-if":`error`,"sonar/no-collection-size-mischeck":`error`,"sonar/no-duplicate-string":[`error`,{threshold:5}],"sonar/no-duplicated-branches":`error`,"sonar/no-element-overwrite":`error`,"sonar/no-empty-collection":`error`,"sonar/no-extra-arguments":`error`,"sonar/no-for-in-iterable":`error`,"sonar/no-gratuitous-expressions":`error`,"sonar/no-identical-conditions":`error`,"sonar/no-identical-expressions":`error`,"sonar/no-identical-functions":`error`,"sonar/no-ignored-return":`error`,"sonar/no-inverted-boolean-check":`error`,"sonar/no-nested-switch":`error`,"sonar/no-nested-template-literals":`error`,"sonar/no-redundant-boolean":`error`,"sonar/no-same-line-conditional":`error`,"sonar/no-small-switch":`error`,"sonar/no-unused-collection":`error`,"sonar/no-use-of-empty-return-value":`error`,"sonar/no-useless-catch":`error`,"sonar/non-existent-operator":`error`,"sonar/prefer-immediate-return":`error`,"sonar/prefer-object-literal":`error`,"sonar/prefer-single-boolean-return":`error`,"sonar/prefer-while":`error`,"sonar/elseif-without-else":`off`,"sonar/no-redundant-jump":`off`}}]}async function ke(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([G(import(`eslint-plugin-storybook`)),G(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook:a}},{name:`2digits:storybook/rules`,files:t,languageOptions:s,rules:{"storybook/await-interactions":`error`,"storybook/context-in-play-function":`error`,"storybook/csf-component":`error`,"storybook/default-exports":`error`,"storybook/hierarchy-separator":`error`,"storybook/meta-inline-properties":`error`,"storybook/no-redundant-story-name":`error`,"storybook/no-stories-of":`error`,"storybook/no-title-property-in-meta":`error`,"storybook/no-uninstalled-addons":`error`,"storybook/prefer-pascal-case":`error`,"storybook/story-exports":`error`,"storybook/use-storybook-expect":`error`,"storybook/use-storybook-testing-library":`error`,"storybook/meta-satisfies-type":`error`,"storybook/no-renderer-packages":`error`,...n}},{name:`2digits:storybook/disables`,files:t,rules:{"sonar/no-duplicate-string":`off`}},{name:`2digits:storybook/config`,files:[`${i}/main.@(js|cjs|mjs|ts)`],languageOptions:s,rules:{"storybook/no-uninstalled-addons":`error`}}]}async function Ae(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:r},i]=await Promise.all([G(import(`eslint-plugin-tailwindcss`)),G(import(`@2digits/constants`)),a().catch(()=>void 0)]),o=E.file(`tailwind.config.ts`,{last:i})??E.file(`tailwind.config.js`,{last:i});return[{files:[k],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:r,config:o}},rules:{...n.configs.recommended.rules,...t}}]}async function je(e={}){let{overrides:t={}}=e,r=await G(import(`@tanstack/eslint-plugin-query`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},R);return[{files:[k],name:`2digits:tanstack-query`,plugins:{"tanstack-query":r},rules:{...i,"tanstack-query/prefer-query-options":`error`,...t}}]}async function Y(e={}){let{overrides:t={}}=e,r=await G(import(`@tanstack/eslint-plugin-router`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},R);return[{files:[k],name:`2digits:tanstack-router`,plugins:{"tanstack-router":r},rules:{...i,"ts/only-throw-error":[`error`,{allow:[{from:`package`,package:`@tanstack/router-core`,name:`Redirect`}]}],...t}}]}const Me=Object.fromEntries(le.standard.flatMap(({rules:e})=>Object.entries({...e})));function Ne(){return[{name:`2digits:toml`,files:[`**/*.toml`],language:`toml/toml`,plugins:{toml:ce},rules:{...Me,"toml/array-bracket-spacing":[`error`,`never`],"toml/array-element-newline":[`error`,`consistent`],"toml/indent":[`error`,2,{keyValuePairs:0,subTables:0}]}}]}async function Pe(e={}){let{overrides:t={}}=e,n=await G(import(`eslint-plugin-turbo`));return[{files:[k],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function Fe(e={}){let{overrides:n={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([G(import(`typescript-eslint`)),G(import(`@2digits/eslint-plugin`))]),c=t(a.strictTypeChecked,R),l=Object.fromEntries(c.flatMap(({rules:e})=>Object.entries(e??{})));return[{name:`2digits:typescript/setup`,plugins:{ts:i,"@2digits":s}},{name:`2digits:typescript/rules`,files:[k],languageOptions:{parser:o,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:`module`},rules:{...l,"ts/array-type":[`error`,{default:`generic`,readonly:`generic`}],"ts/restrict-template-expressions":[`error`,{allowNumber:!0}],"ts/ban-ts-comment":[`error`,{"ts-ignore":`allow-with-description`}],"ts/consistent-type-exports":[`error`],"ts/consistent-type-imports":[`error`,{prefer:`type-imports`,disallowTypeAnnotations:!1,fixStyle:`inline-type-imports`}],"ts/no-empty-object-type":[`error`,{allowInterfaces:`with-single-extends`,allowObjectTypes:`never`}],"ts/no-explicit-any":[`error`],"ts/no-import-type-side-effects":[`error`],"ts/no-misused-promises":`off`,"ts/no-confusing-void-expression":`off`,"ts/no-unused-vars":[`error`,{ignoreRestSiblings:!0,argsIgnorePattern:`^_`,varsIgnorePattern:`^_`}],"ts/unbound-method":`off`,"ts/no-unnecessary-type-assertion":`off`,...s.configs.recommended.rules,...n}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],rules:{"unicorn/no-abusive-eslint-disable":`off`,"no-duplicate-imports":`off`,"no-restricted-syntax":`off`,"ts/no-unused-vars":`off`}},{name:`2digits:typescript/disables/test`,files:[`**/*.{test,spec}.ts?(x)`],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function Ie(){return[{files:[k],name:`2digits:unicorn`,plugins:{unicorn:D},rules:{...D.configs.recommended.rules,"unicorn/no-array-callback-reference":`off`,"unicorn/filename-case":`off`,"unicorn/prefer-module":`off`,"unicorn/prevent-abbreviations":`off`,"unicorn/prefer-ternary":[`error`,`only-single-line`],"unicorn/no-useless-undefined":[`error`,{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":`off`,"unicorn/no-nested-ternary":`off`}}]}async function Le(e={}){let{files:t=[`**/*.{test,spec}.ts?(x)`],overrides:n={},typecheck:r=!0,vitestImports:i}=e,a=await G(import(`@vitest/eslint-plugin`));return[{name:`2digits:vitest/setup`,plugins:{vitest:a}},{name:`2digits:vitest/rules`,files:t,languageOptions:{globals:a.environments.env.globals},settings:{vitest:{typecheck:r,...i?{vitestImports:i}:{}}},rules:{"vitest/consistent-each-for":[`error`,{describe:`for`,suite:`for`,it:`for`,test:`for`}],"vitest/consistent-test-filename":[`error`,{pattern:String.raw`.*\.spec\.[tj]sx?$`,allTestPattern:String.raw`.*\.(test|spec)\.[tj]sx?$`}],"vitest/consistent-test-it":[`error`,{fn:`it`,withinDescribe:`it`}],"vitest/consistent-vitest-vi":[`error`,{fn:`vi`}],"vitest/expect-expect":`error`,"vitest/hoisted-apis-on-top":`error`,"vitest/max-expects":`error`,"vitest/max-nested-describe":`error`,"vitest/no-alias-methods":`error`,"vitest/no-commented-out-tests":`error`,"vitest/no-conditional-expect":`error`,"vitest/no-conditional-in-test":`error`,"vitest/no-conditional-tests":`error`,"vitest/no-disabled-tests":`error`,"vitest/no-duplicate-hooks":`error`,"vitest/no-focused-tests":`error`,"vitest/no-identical-title":`error`,"vitest/no-import-node-test":`error`,"vitest/no-interpolation-in-snapshots":`error`,"vitest/no-mocks-import":`error`,"vitest/no-standalone-expect":`error`,"vitest/no-test-prefixes":`error`,"vitest/no-test-return-statement":`error`,"vitest/no-unneeded-async-expect-function":`error`,"vitest/prefer-called-exactly-once-with":`error`,"vitest/prefer-called-once":`error`,"vitest/prefer-called-with":`error`,"vitest/prefer-comparison-matcher":`error`,"vitest/prefer-describe-function-title":`error`,"vitest/prefer-each":`error`,"vitest/prefer-equality-matcher":`error`,"vitest/prefer-expect-resolves":`error`,"vitest/prefer-expect-type-of":`error`,"vitest/prefer-hooks-in-order":`error`,"vitest/prefer-hooks-on-top":`error`,"vitest/prefer-import-in-mock":`error`,"vitest/prefer-lowercase-title":`error`,"vitest/prefer-mock-promise-shorthand":`error`,"vitest/prefer-mock-return-shorthand":`error`,"vitest/prefer-snapshot-hint":[`error`,`always`],"vitest/prefer-spy-on":`error`,"vitest/prefer-strict-equal":`error`,"vitest/prefer-to-be":`error`,"vitest/prefer-to-be-falsy":`error`,"vitest/prefer-to-be-object":`error`,"vitest/prefer-to-be-truthy":`error`,"vitest/prefer-to-contain":`error`,"vitest/prefer-to-have-been-called-times":`error`,"vitest/prefer-to-have-length":`error`,"vitest/prefer-todo":`error`,"vitest/require-awaited-expect-poll":`error`,"vitest/require-local-test-context-for-concurrent-snapshots":`error`,"vitest/require-mock-type-parameters":`error`,"vitest/require-to-throw-message":`error`,"vitest/require-top-level-describe":`error`,"vitest/valid-describe-callback":`error`,"vitest/valid-expect":`error`,"vitest/valid-expect-in-promise":`error`,"vitest/warn-todo":`error`,...n}}]}function Re(){return[{name:`2digits:yaml/setup`,plugins:{yml:O}},{name:`2digits:yaml/base`,...X,rules:{"no-irregular-whitespace":`off`,"no-unused-vars":`off`,"spaced-comment":`off`}},{name:`2digits:yaml/recommended`,...X,rules:{"yml/no-empty-document":`error`,"yml/no-empty-key":`error`,"yml/no-empty-mapping-value":`error`,"yml/no-empty-sequence-entry":`error`,"yml/no-irregular-whitespace":`error`,"yml/no-tab-indent":`error`,"yml/vue-custom-block/no-parsing-error":`error`}},{name:`2digits:yaml/standard`,...X,rules:{"yml/block-mapping":`error`,"yml/block-sequence":`error`,"yml/plain-scalar":`error`,"yml/spaced-comment":`error`}},{name:`2digits:yaml/prettier`,...X,rules:{"yml/block-mapping-colon-indicator-newline":`off`,"yml/block-mapping-question-indicator-newline":`off`,"yml/block-sequence-hyphen-indicator-newline":`off`,"yml/flow-mapping-curly-newline":`off`,"yml/flow-mapping-curly-spacing":`off`,"yml/flow-sequence-bracket-newline":`off`,"yml/flow-sequence-bracket-spacing":`off`,"yml/indent":`off`,"yml/key-spacing":`off`,"yml/no-multiple-empty-lines":`off`,"yml/no-trailing-zeros":`off`,"yml/quotes":`off`}}]}const X={files:[`**/*.y?(a)ml`],languageOptions:{parser:v}};async function ze(e={}){let{overrides:t={}}=e,n=await G(import(`eslint-plugin-zod`));return[{files:[k],name:`2digits:zod`,plugins:{zod:n},rules:{"zod/array-style":[`error`,{style:`function`}],"zod/consistent-import":[`error`,{syntax:`namespace`}],"zod/consistent-schema-output-type-style":[`error`,{style:`infer`}],"zod/consistent-schema-var-name":[`warn`,{after:`Schema`}],"zod/no-any-schema":`error`,"zod/no-empty-custom-schema":`error`,"zod/no-native-enum":`error`,"zod/no-number-schema-with-finite":`error`,"zod/no-number-schema-with-int":`error`,"zod/no-number-schema-with-is-finite":`error`,"zod/no-number-schema-with-is-int":`error`,"zod/no-number-schema-with-safe":`error`,"zod/no-number-schema-with-step":`error`,"zod/no-optional-and-default-together":[`warn`,{preferredMethod:`default`}],"zod/no-schema-with-is-nullable":`error`,"zod/no-schema-with-is-optional":`error`,"zod/no-throw-in-refine":`error`,"zod/no-transform-in-record-key":`error`,"zod/prefer-enum-over-literal-union":`error`,"zod/prefer-loose-object":`error`,"zod/prefer-meta":`error`,"zod/prefer-meta-last":`error`,"zod/prefer-strict-object":`error`,"zod/prefer-string-schema-with-trim":`error`,"zod/prefer-top-level-string-formats":`error`,"zod/prefer-trim-before-string-length-checks":`error`,"zod/require-brand-type-parameter":`error`,"zod/schema-error-property-style":[`error`,{selector:`Literal,TemplateLiteral`,example:`"This is an error message"`}],...t}}]}function Z(e,t){return typeof e==`boolean`?e:e?.enable??t??!1}function Q(e){if(typeof e==`boolean`||e===void 0)return{};let{enable:t,...n}=e;return n}async function $(t={},...n){let r;t.pnpm===void 0&&(r=a());let o=new e(me(t.ignores),he(t.js),L(),Ce(),V(),ge(),Ie(),Oe(),De(),I(),_e(),Ne(),Re(),ve(),fe());Z(t.css)&&(o=o.append(U(Q(t.css)))),Z(t.depend,!0)&&(o=o.append(W())),Z(t.turbo,i(`turbo`))&&(o=o.append(Pe(Q(t.turbo))));let{overrides:s,...c}=Q(t.ts);return Z(t.ts,i(`typescript`))&&(o=o.append(Fe(Q(t.ts)))),Z(t.react,i(`react`))&&(o=o.append(Ee({...Q(t.react),...c}))),Z(t.next,i(`next`))&&(o=o.append(xe({...Q(t.next),...c}))),Z(t.storybook,z.some(e=>i(e)))&&(o=o.append(ke({...Q(t.storybook),...c}))),Z(t.vitest,i(`vitest`))&&(o=o.append(Le(Q(t.vitest)))),Z(t.tailwind,i(`tailwindcss`))&&(o=o.append(Ae(Q(t.tailwind)))),Z(t.tanstackQuery,i(`react-query`)||i(`@tanstack/react-query`)||i(`@tanstack/react-query-devtools`))&&(o=o.append(je(Q(t.tanstackQuery)))),Z(t.tanstackRouter,i(`@tanstack/react-router`))&&(o=o.append(Y(Q(t.tanstackRouter)))),Z(t.drizzle,i(`drizzle-kit`)||i(`drizzle-orm`))&&(o=o.append(ue(Q(t.drizzle)))),Z(t.zod,i(`zod`))&&(o=o.append(ze(Q(t.zod)))),Z(t.graphql,i(`graphql`))&&(o=o.append(pe(Q(t.graphql)))),Z(t.pnpm,!!await r)&&(o=o.append(we())),o=o.append(...n),i(`prettier`)&&(o=o.append(Te())),o=o.append(ye()),o.renamePlugins(R).toConfigs()}export{$ as default,$ as twoDigits};
1
+ import{FlatConfigComposer as e,renamePluginsInConfigs as t,renamePluginsInRules as n}from"eslint-flat-config-utils";import{getPackageInfo as r,isPackageExists as i}from"local-pkg";import{findWorkspaceDir as a}from"pkg-types";import o from"eslint-plugin-antfu";import s,{configs as c}from"eslint-plugin-de-morgan";import l from"@eslint-community/eslint-plugin-eslint-comments";import u from"@eslint-community/eslint-plugin-eslint-comments/configs";import d from"@eslint/css";import{tailwind3 as f,tailwind4 as p}from"tailwind-csstree";import m from"eslint-plugin-depend";import{fixupPluginRules as h}from"@eslint/compat";import ee,{configs as g}from"eslint-plugin-github-action";import*as _ from"yaml-eslint-parser";import v from"eslint-config-flat-gitignore";import te from"@eslint/js";import ne from"@stylistic/eslint-plugin";import y from"globals";import re from"eslint-plugin-jsdoc";import ie,{configs as b}from"eslint-plugin-jsonc";import*as x from"jsonc-eslint-parser";import S from"@eslint/markdown";import{mergeProcessors as C,processorPassThrough as ae}from"eslint-merge-processors";import oe from"eslint-plugin-n";import se,{merge as ce}from"@eslint-react/kit";import{AST_NODE_TYPES as w}from"@typescript-eslint/utils";import le,{configs as ue}from"eslint-plugin-regexp";import de from"eslint-plugin-sonarjs";import*as T from"empathic/find";import fe,{configs as pe}from"eslint-plugin-toml";import E from"eslint-plugin-unicorn";import me from"eslint-plugin-yml";const D=`**/*.?([cm])[jt]s?(x)`,O=`**/*.?([cm])ts`,k=`**/*.?([cm])tsx`,A=`.github/workflows/*.y?(a)ml`,j=`**/*.md`,M=`${j}/${D}`,N=`**/node_modules,**/dist,**/package-lock.json,**/yarn.lock,**/pnpm-lock.yaml,**/bun.lockb,**/bun.lock,**/output,**/coverage,**/temp,**/.temp,**/tmp,**/.tmp,**/.history,**/.vitepress/cache,**/.nuxt,**/.next,**/.vercel,**/.changeset,**/.idea,**/.cache,**/.output,**/.vite-inspect,**/.yarn,**/CHANGELOG*.md,**/*.min.*,**/LICENSE*,**/__snapshots__,**/auto-import?(s).d.ts,**/components.d.ts`.split(`,`);function P(){return[{files:[D],name:`2digits:antfu`,plugins:{antfu:o},rules:{"antfu/top-level-function":`error`}}]}function F(){return[{files:[D],name:`2digits:boolean`,plugins:{boolean:s},rules:{...c.recommended.rules}}]}const I={"@next/next":`next`,"@eslint-react":`react-extra`,"react-hooks":`react-hooks`,"react-compiler":`react-compiler`,"@stylistic/eslint-plugin":`stylistic`,"@typescript-eslint":`ts`,vitest:`vitest`,node:`node`,"@eslint-community/eslint-comments":`comments`,storybook:`storybook`,turbo:`turbo`,jsdoc:`jsdoc`,unicorn:`unicorn`,tailwindcss:`tailwindcss`,"@tanstack/query":`tanstack-query`,"@tanstack/router":`tanstack-router`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`,antfu:`antfu`,css:`css`,depend:`depend`,"github-action":`github-action`,jsonc:`jsonc`,markdown:`markdown`,pnpm:`pnpm`,regexp:`regexp`,yml:`yml`,zod:`zod`,toml:`toml`},L=[`storybook`,`@storybook/nextjs`,`@storybook/nextjs-vite`,`@storybook/react-vite`,`@storybook/react-webpack5`,`@storybook/react-native-web-vite`],R=n(u.recommended.rules,I);function z(){return[{files:[D],name:`2digits:comments`,plugins:{comments:l},rules:{...R,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}async function he(e){if(e?.customSyntax)return e.customSyntax;if(e?.tailwindMajor===3)return f;if(e?.tailwindMajor===4)return p;try{let e=(await r(`tailwindcss`))?.version??``,t=Number.parseInt(e.split(`.`)[0]??`0`,10);if(Number.isFinite(t)&&t>=4)return p}catch{}return f}async function ge(e={}){let t=await he(e);return[{name:`2digits:css`,files:[`**/*.css`],language:`css/css`,plugins:{css:d},languageOptions:{tolerant:!0,customSyntax:t},rules:{...d.configs.recommended.rules,...e.overrides}}]}function _e(){return[{files:[D],name:`2digits:depend`,plugins:{depend:m},rules:{"depend/ban-dependencies":`warn`}}]}async function B(e){let t=await e;return t.default??t}async function ve(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await B(import(`eslint-plugin-drizzle`));return[{files:[D],name:`2digits:drizzle`,plugins:{drizzle:h(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}const ye=Object.fromEntries(g.recommended.flatMap(({rules:e})=>Object.entries({...e})));function be(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":ee}},{name:`2digits:github-actions/recommended`,files:[A],ignores:[`!**/${A}`],languageOptions:{parser:_},rules:{...ye}}]}async function xe(e={}){let{overrides:t={},files:r=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([B(import(`@graphql-eslint/eslint-plugin`)),import(`graphql-config`).then(({loadConfig:e})=>e({throwOnEmpty:!1,throwOnMissing:!1}).then(e=>e?.getDefault().schema))]),o=i.configs[`flat/operations-recommended`].rules,s={};if(a)s=o;else for(let e of Object.keys(o)){let t=e.replace(`@graphql-eslint/`,``);t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings)||(s[e]=o[e])}let c=n(s,I);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:r,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function Se(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[N,n].flat(),name:`2digits:ignores`},v({strict:!1,...t,name:`2digits:gitignore`})]}function Ce(e={}){let{overrides:t={}}=e;return[{files:[D],name:`2digits:javascript`,plugins:{stylistic:ne},languageOptions:{ecmaVersion:2022,globals:{...y.browser,...y.es2021,...y.node,document:`readonly`,navigator:`readonly`,window:`readonly`},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:`module`},sourceType:`module`},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...te.configs.recommended.rules,"accessor-pairs":[`error`,{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":`error`,"block-scoped-var":`error`,"constructor-super":`error`,"default-case-last":`error`,"dot-notation":[`error`,{allowKeywords:!0}],eqeqeq:[`error`,`smart`],"new-cap":[`error`,{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":`error`,"no-array-constructor":`error`,"no-async-promise-executor":`error`,"no-caller":`error`,"no-case-declarations":`error`,"no-class-assign":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-const-assign":`error`,"no-control-regex":`error`,"no-debugger":`error`,"no-delete-var":`error`,"no-dupe-args":`error`,"no-dupe-class-members":`error`,"no-dupe-keys":`error`,"no-duplicate-case":`error`,"no-empty":[`error`,{allowEmptyCatch:!0}],"no-empty-character-class":`error`,"no-empty-pattern":`error`,"no-eval":`error`,"no-ex-assign":`error`,"no-extend-native":`error`,"no-extra-bind":`error`,"no-extra-boolean-cast":`error`,"no-fallthrough":`error`,"no-func-assign":`error`,"no-global-assign":`error`,"no-implied-eval":`error`,"no-import-assign":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-iterator":`error`,"no-labels":[`error`,{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-multi-str":`error`,"no-new":`error`,"no-new-func":`error`,"no-new-native-nonconstructor":`error`,"no-new-wrappers":`error`,"no-obj-calls":`error`,"no-octal":`error`,"no-octal-escape":`error`,"no-proto":`error`,"no-prototype-builtins":`error`,"no-redeclare":[`error`,{builtinGlobals:!1}],"no-regex-spaces":`error`,"no-restricted-globals":[`error`,{message:"Use `globalThis` instead.",name:`global`},{message:"Use `globalThis` instead.",name:`self`}],"no-restricted-properties":[`error`,{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:`__proto__`},{message:"Use `Object.defineProperty` instead.",property:`__defineGetter__`},{message:"Use `Object.defineProperty` instead.",property:`__defineSetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupGetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupSetter__`}],"no-restricted-syntax":[`error`,`DebuggerStatement`,`LabeledStatement`,`WithStatement`,`TSEnumDeclaration`,`TSExportAssignment`],"no-self-assign":[`error`,{props:!0}],"no-self-compare":`error`,"no-sequences":`error`,"no-shadow-restricted-names":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-this-before-super":`error`,"no-throw-literal":`error`,"no-undef":`error`,"no-undef-init":`error`,"no-unexpected-multiline":`error`,"no-unmodified-loop-condition":`error`,"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"no-unreachable":`error`,"no-unreachable-loop":`error`,"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-unused-expressions":[`error`,{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":[`error`,{args:`none`,caughtErrors:`none`,ignoreRestSiblings:!0,vars:`all`}],"no-useless-assignment":`off`,"no-useless-backreference":`error`,"no-useless-call":`error`,"no-useless-catch":`error`,"no-useless-computed-key":`error`,"no-useless-constructor":`error`,"no-useless-rename":`error`,"no-var":`error`,"no-with":`error`,"object-shorthand":[`error`,`always`,{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":[`error`,{initialized:`never`}],"prefer-arrow-callback":[`error`,{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":[`error`,{destructuring:`all`,ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":`error`,"prefer-promise-reject-errors":`error`,"prefer-regex-literals":[`error`,{disallowRedundantWrapping:!0}],"prefer-rest-params":`error`,"prefer-spread":`error`,"prefer-template":`error`,"symbol-description":`error`,"unicode-bom":[`error`,`never`],"use-isnan":[`error`,{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":[`error`,{requireStringLiterals:!0}],"vars-on-top":`error`,yoda:[`error`,`never`],"stylistic/padding-line-between-statements":[`error`,{blankLine:`always`,prev:[`const`,`let`],next:`*`},{blankLine:`any`,prev:[`const`,`let`],next:[`const`,`let`]},{blankLine:`always`,prev:`*`,next:`return`}],...t}}]}function we(){return[{files:[D],name:`2digits:jsdoc`,plugins:{jsdoc:re},rules:{"jsdoc/check-access":`error`,"jsdoc/check-param-names":`error`,"jsdoc/check-property-names":`error`,"jsdoc/check-tag-names":[`error`,{typed:!0}],"jsdoc/check-types":`error`,"jsdoc/empty-tags":`error`,"jsdoc/implements-on-classes":`error`,"jsdoc/no-defaults":`error`,"jsdoc/no-multi-asterisks":`error`,"jsdoc/require-param":`error`,"jsdoc/require-param-name":`error`,"jsdoc/require-property":`error`,"jsdoc/require-property-description":`error`,"jsdoc/require-property-name":`error`,"jsdoc/require-returns-check":`error`,"jsdoc/require-returns-description":`error`,"jsdoc/require-yields":`error`,"jsdoc/require-yields-check":`error`}}]}function Te(){return[...b[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...V,rules:{...H(b[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...V,rules:{...H(b[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...V,rules:{...H(b[`flat/recommended-with-json5`])}},{name:`2digits:jsonc/package.json`,...V,files:[`**/package.json`],rules:{"jsonc/sort-array-values":[`error`,{order:{type:`asc`},pathPattern:`^files$`}],"jsonc/sort-keys":[`error`,{order:{type:`asc`},pathPattern:`^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$`},{order:[`types`,`import`,`module`,`require`,`default`],pathPattern:`^exports.*$`}]}},{name:`2digits:jsonc/tsconfig.json`,...V,files:[`**/tsconfig.json`,`**/tsconfig.*.json`,`**/tsconfig-*.json`,`**/jsconfig.json`,`**/jsconfig.*.json`,`**/jsconfig-*.json`],rules:{"jsonc/sort-keys":[`error`,{order:[`$schema`,`extends`,`compilerOptions`,`references`,`files`,`include`,`exclude`],pathPattern:`^$`},{order:`incremental.composite.tsBuildInfoFile.disableSourceOfProjectReferenceRedirect.disableSolutionSearching.disableReferencedProjectLoad.target.lib.jsx.experimentalDecorators.emitDecoratorMetadata.jsxFactory.jsxFragmentFactory.jsxImportSource.reactNamespace.noLib.useDefineForClassFields.moduleDetection.module.rootDir.moduleResolution.baseUrl.paths.rootDirs.typeRoots.types.allowUmdGlobalAccess.moduleSuffixes.allowImportingTsExtensions.resolvePackageJsonExports.resolvePackageJsonImports.customConditions.resolveJsonModule.allowArbitraryExtensions.noResolve.allowJs.checkJs.maxNodeModuleJsDepth.declaration.declarationMap.emitDeclarationOnly.sourceMap.inlineSourceMap.outFile.outDir.removeComments.noEmit.importHelpers.importsNotUsedAsValues.downlevelIteration.sourceRoot.mapRoot.inlineSources.emitBOM.newLine.stripInternal.noEmitHelpers.noEmitOnError.preserveConstEnums.declarationDir.preserveValueImports.isolatedModules.verbatimModuleSyntax.allowSyntheticDefaultImports.esModuleInterop.preserveSymlinks.forceConsistentCasingInFileNames.strict.strictBindCallApply.strictFunctionTypes.strictNullChecks.strictPropertyInitialization.allowUnreachableCode.allowUnusedLabels.alwaysStrict.exactOptionalPropertyTypes.noFallthroughCasesInSwitch.noImplicitAny.noImplicitOverride.noImplicitReturns.noImplicitThis.noPropertyAccessFromIndexSignature.noUncheckedIndexedAccess.noUnusedLocals.noUnusedParameters.useUnknownInCatchVariables.skipDefaultLibCheck.skipLibCheck`.split(`.`),pathPattern:`^compilerOptions$`}]}},...b[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const V={languageOptions:{parser:x},plugins:{jsonc:ie}};function H(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const U=[j];function Ee(){return[{name:`2digits:markdown/setup`,plugins:{markdown:S}},{name:`2digits:markdown/processor`,files:U,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:C([S.processors.markdown,ae])},{name:`2digits:markdown/parser`,files:U,language:`markdown/gfm`,languageOptions:{parser:Oe}},{name:`2digits:markdown/rules`,files:U,language:`markdown/gfm`,rules:{"markdown/fenced-code-language":`error`,"markdown/heading-increment":`error`,"markdown/no-empty-links":`error`,"markdown/no-invalid-label-refs":`error`,"markdown/no-missing-label-refs":`error`}}]}async function De(){let e=await B(import(`typescript-eslint`)),t=await B(import(`@eslint-react/eslint-plugin`)),r=n({...e.configs.disableTypeChecked.rules,...t.configs[`disable-type-checked`].rules},I);return[{name:`2digits:markdown/disables`,files:[M],languageOptions:{parser:e.parser,parserOptions:{project:!1,projectService:!1,ecmaFeatures:{impliedStrict:!0}}},rules:{...r,"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`,"node/prefer-global/process":`off`,"ts/consistent-type-imports":`off`,"ts/explicit-function-return-type":`off`,"ts/no-namespace":`off`,"ts/no-redeclare":`off`,"ts/no-require-imports":`off`,"ts/no-unused-expressions":`off`,"ts/no-unused-vars":`off`,"ts/no-use-before-define":`off`,"unicode-bom":`off`}}]}const Oe={meta:{name:`parser-plain`},parseForESLint:e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:`Program`},scopeManager:null,services:{isPlain:!0},visitorKeys:{Program:[]}})};async function ke(e={}){let{files:t=[O,k],overrides:r={},parserOptions:i}=e,[a,o]=await Promise.all([B(import(`@next/eslint-plugin-next`)),B(import(`@typescript-eslint/parser`))]),s=n({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},I);return[{name:`2digits:next/setup`,plugins:{next:h(a)}},{name:`2digits:next/rules`,files:t,languageOptions:{parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:`module`},rules:{...s,"next/no-html-link-for-pages":`off`,...r}},{files:[`**/middleware.ts`,`**/proxy.ts`],name:`2digits:next/proxy`,rules:{"unicorn/prefer-string-raw":`off`}}]}var Ae={node:`24.14.1`};function je(){return[{files:[D],name:`2digits:node`,settings:{node:{version:Ae.node}},plugins:{node:oe},rules:{"node/handle-callback-err":[`error`,`^(err|error)$`],"node/no-deprecated-api":`error`,"node/no-exports-assign":`error`,"node/no-new-require":`error`,"node/no-path-concat":`error`,"node/no-unsupported-features/node-builtins":[`error`,{allowExperimental:!0}],"node/prefer-global/buffer":`error`,"node/prefer-global/process":`error`,"node/prefer-global/text-encoder":`error`,"node/prefer-global/url":`error`,"node/prefer-global/console":`error`,"node/prefer-global/url-search-params":`error`,"node/prefer-global/text-decoder":`error`,"node/process-exit-as-throw":`error`}}]}async function Me(){let e=await B(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`package.json`,`**/package.json`],languageOptions:{parser:x},plugins:{pnpm:e},rules:{"pnpm/json-enforce-catalog":`error`,"pnpm/json-prefer-workspace-settings":`error`,"pnpm/json-valid-catalog":`error`}},{name:`2digits:pnpm/pnpm-workspace-yaml`,files:[`pnpm-workspace.yaml`],languageOptions:{parser:await B(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`,"pnpm/yaml-valid-packages":`error`,"pnpm/yaml-enforce-settings":[`error`,{autofix:!0,settings:{catalogMode:`strict`,savePrefix:``,preferWorkspacePackages:!0,cleanupUnusedCatalogs:!0}}]}}]}async function Ne(){let[e,t]=await Promise.all([B(import(`eslint-config-prettier`)),B(import(`@stylistic/eslint-plugin`))]);return[{name:`2digits:prettier`,plugins:{stylistic:t},rules:{...e.rules,"tailwindcss/classnames-order":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}]}}]}function Pe(){return Fe}function Fe(e,{ast:t,is:n}){return e.sourceCode.text.includes(`useCallback`)?{VariableDeclarator(r){let{id:i,init:a}=r;if(i.type!==w.Identifier||!n.useCallbackCall(a))return;let[o,...s]=e.sourceCode.getDeclaredVariables(r);if(!o||s.length>0)return;let c=Ie(e.sourceCode,(e,n)=>t.findParent(e,n)??void 0,a,i.name,n.useEffectLikeCall),l=e.sourceCode.getScope(a).block;if(!ze(l))return;let[u,d]=a.arguments;if(!u||!d)return;if(!Re(d)){G(e,c);return}let f=Le(u);if(f){if(!W(e.sourceCode.getScope(f)).flatMap(e=>e.references).some(e=>e.resolved?.scope.block===l)){e.report({message:`An 'useCallback' with empty deps and no references to the component scope may be unnecessary.`,node:r});return}G(e,c)}}}:{}}function Ie(e,t,n,r,i){if(!/use\w*Effect/u.test(e.text))return;let a=(e.getDeclaredVariables(n.parent)[0]?.references??[]).filter(e=>!e.init);if(a.length===0)return;let o=new Set;for(let e of a){let n=t(e.identifier,i);if(!n||o.add(n).size>1)return}return{message:`${r} is only used inside 1 useEffect, which may be unnecessary. You can move the computation into useEffect directly and merge the dependency arrays.`,node:n}}function Le(e){if(!(e.type!==w.ArrowFunctionExpression&&e.type!==w.FunctionExpression))return e.body.type===w.ArrowFunctionExpression?e.body:e}function W(e){let t=[e];for(let n of e.childScopes)t.push(...W(n));return t}function Re(e){return e.type===w.ArrayExpression&&e.elements.length===0}function ze(e){return e.type===w.ArrowFunctionExpression||e.type===w.FunctionDeclaration||e.type===w.FunctionExpression}function G(e,t){t&&e.report(t)}function Be(){return Ve}function Ve(e,{ast:t,is:n}){return e.sourceCode.text.includes(`useMemo`)?{VariableDeclarator(r){let{id:i,init:a}=r;if(i.type!==w.Identifier||!n.useMemoCall(a))return;let[o,...s]=e.sourceCode.getDeclaredVariables(r);if(o===void 0||s.length>0)return;let c=He(e.sourceCode,(e,n)=>t.findParent(e,n)??void 0,a,i.name,n.useEffectLikeCall),l=e.sourceCode.getScope(a).block;if(!Ge(l))return;let[u,d]=a.arguments;if(u===void 0||d===void 0)return;if(!We(d)){q(e,c);return}let f=Ue(u);if(f!==void 0){if(!K(e.sourceCode.getScope(f)).flatMap(e=>e.references).some(e=>e.resolved?.scope.block===l)){e.report({message:`An 'useMemo' with empty deps and no references to the component scope may be unnecessary.`,node:r});return}q(e,c)}}}:{}}function He(e,t,n,r,i){if(!/use\w*Effect/u.test(e.text))return;let a=(e.getDeclaredVariables(n.parent)[0]?.references??[]).filter(e=>!e.init);if(a.length===0)return;let o=new Set;for(let e of a){let n=t(e.identifier,i);if(!n||o.add(n).size>1)return}return{message:`${r} is only used inside 1 useEffect, which may be unnecessary. You can move the computation into useEffect directly and merge the dependency arrays.`,node:n}}function Ue(e){if(!(e.type!==w.ArrowFunctionExpression&&e.type!==w.FunctionExpression))return e.body.type===w.ArrowFunctionExpression?e.body:e}function K(e){let t=[e];for(let n of e.childScopes)t.push(...K(n));return t}function We(e){return e.type===w.ArrayExpression&&e.elements.length===0}function Ge(e){return e.type===w.ArrowFunctionExpression||e.type===w.FunctionDeclaration||e.type===w.FunctionExpression}function q(e,t){t&&e.report(t)}function Ke(){return qe}function qe(e,{collect:t}){let{query:n,visitor:r}=t.components(e);function i(t){for(let{node:r}of n.all(t)){let[t]=r.params;if(t===void 0||t.type!==w.Identifier)continue;let n=e.sourceCode.getScope(r).variables.find(e=>e.name===t.name)?.references??[];for(let t of n){let{parent:n}=t.identifier;n.type===w.MemberExpression&&e.report({message:`Use destructuring assignment for component props.`,node:n})}}}return ce(r,{"Program:exit":i})}function Je(){return Ye}function Ye(e,{settings:t}){return{ImportDeclaration(n){if(n.source.value!==t.importSource)return;let r=n.specifiers.find(e=>e.type===w.ImportDefaultSpecifier);r!==void 0&&e.report({fix(r){let i=e.sourceCode.getText(n),a=i.endsWith(`;`)?`;`:``,o=n.source.raw.at(0)??`'`,s=`import${n.importKind===`type`?` type`:``}`,c=`${o}${t.importSource}${o}`;if(n.specifiers.length===1)return r.remove(n);let l=i.slice(i.indexOf(`{`),i.indexOf(`}`)+1);return r.replaceText(n,`${s} ${l} from ${c}${a}`)},message:`Prefer importing React as 'import * as React from "${t.importSource}"';`,node:n.specifiers.length>1?r:n})}}}async function Xe(e={}){let{files:t=[O,k],overrides:r={},parserOptions:i,tsconfigRootDir:a,reactCompiler:o=!0}=e,[s,c,l,u]=await Promise.all([B(import(`@eslint-react/eslint-plugin`)),B(import(`@typescript-eslint/parser`)),o?B(import(`eslint-plugin-react-compiler`)):Promise.resolve(void 0),B(import(`@stylistic/eslint-plugin`))]),d=s.configs.all.plugins?.[`@eslint-react`]??{},f=n({...s.configs[`disable-conflict-eslint-plugin-react`].rules,...s.configs[`disable-conflict-eslint-plugin-react-hooks`].rules,...s.configs[`strict-type-checked`].rules},I);return[{name:`2digits:react/setup`,plugins:{stylistic:u,"react-extra":{...d,rules:{...d.rules,...Ze.rules}},...o?{"react-compiler":l}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:t,languageOptions:{parser:c,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:a,projectService:!0,...i},sourceType:`module`},rules:{...f,...o?{"react-compiler/react-compiler":`error`}:{},"react-extra/exhaustive-deps":`error`,"react-extra/globals":`error`,"react-extra/purity":`error`,"react-extra/no-unused-class-component-members":`error`,"react-extra/no-unnecessary-use-callback":`error`,"react-extra/no-unnecessary-use-prefix":`error`,"react-extra/no-unnecessary-use-memo":`error`,"react-extra/set-state-in-effect":`error`,"react-extra/no-unused-state":`error`,"react-extra/use-state":`error`,"react-extra/no-unstable-context-value":`error`,"react-extra/no-unstable-default-props":`error`,"react-extra/no-unused-props":`error`,"react-extra/no-context-provider":`error`,"react-extra/no-forward-ref":`error`,"react-extra/no-use-context":`error`,"react-extra/immutability":`error`,"react-extra/refs":`error`,"react-extra/no-duplicate-key":`error`,"react-extra/static-components":`error`,"react-extra/dom-no-missing-button-type":`error`,"react-extra/dom-no-missing-iframe-sandbox":`error`,"react-extra/dom-no-unsafe-target-blank":`error`,"react-extra/web-api-no-leaked-fetch":`error`,"react-extra/naming-convention-context-name":`error`,"react-extra/naming-convention-id-name":`error`,"react-extra/naming-convention-ref-name":`error`,"react-extra/prefer-destructuring-assignment":`error`,"react-extra/prefer-namespace-import":`error`,"react-extra/jsx-no-leaked-dollar":`error`,"react-extra/jsx-no-useless-fragment":`off`,"stylistic/jsx-curly-newline":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}],"stylistic/jsx-self-closing-comp":`error`,...r}}]}const Ze=se().use(J(Pe,`noUnnecessaryUseCallback`)).use(J(Be,`noUnnecessaryUseMemo`)).use(J(Ke,`preferDestructuringAssignment`)).use(J(Je,`preferNamespaceImport`)).getPlugin();function J(e,t){return Object.defineProperty(e,`name`,{value:t}),e}function Qe(){return[{files:[D],name:`2digits:regexp`,plugins:{regexp:le},rules:{...ue[`flat/recommended`].rules}}]}function Y(){return[{files:[D],name:`2digits:sonar`,plugins:{sonar:de},rules:{"sonar/cognitive-complexity":`error`,"sonar/comma-or-logical-or-case":`error`,"sonar/concise-regex":`error`,"sonar/confidential-information-logging":`error`,"sonar/constructor-for-side-effects":`error`,"sonar/content-length":`error`,"sonar/content-security-policy":`error`,"sonar/cookie-no-httponly":`error`,"sonar/cors":`error`,"sonar/csrf":`error`,"sonar/max-switch-cases":`error`,"sonar/no-all-duplicated-branches":`error`,"sonar/no-collapsible-if":`error`,"sonar/no-collection-size-mischeck":`error`,"sonar/no-duplicate-string":[`error`,{threshold:5}],"sonar/no-duplicated-branches":`error`,"sonar/no-element-overwrite":`error`,"sonar/no-empty-collection":`error`,"sonar/no-extra-arguments":`error`,"sonar/no-for-in-iterable":`error`,"sonar/no-gratuitous-expressions":`error`,"sonar/no-identical-conditions":`error`,"sonar/no-identical-expressions":`error`,"sonar/no-identical-functions":`error`,"sonar/no-ignored-return":`error`,"sonar/no-inverted-boolean-check":`error`,"sonar/no-nested-switch":`error`,"sonar/no-nested-template-literals":`error`,"sonar/no-redundant-boolean":`error`,"sonar/no-same-line-conditional":`error`,"sonar/no-small-switch":`error`,"sonar/no-unused-collection":`error`,"sonar/no-use-of-empty-return-value":`error`,"sonar/no-useless-catch":`error`,"sonar/non-existent-operator":`error`,"sonar/prefer-immediate-return":`error`,"sonar/prefer-object-literal":`error`,"sonar/prefer-single-boolean-return":`error`,"sonar/prefer-while":`error`,"sonar/elseif-without-else":`off`,"sonar/no-redundant-jump":`off`}}]}async function $e(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([B(import(`eslint-plugin-storybook`)),B(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook:a}},{name:`2digits:storybook/rules`,files:t,languageOptions:s,rules:{"storybook/await-interactions":`error`,"storybook/context-in-play-function":`error`,"storybook/csf-component":`error`,"storybook/default-exports":`error`,"storybook/hierarchy-separator":`error`,"storybook/meta-inline-properties":`error`,"storybook/no-redundant-story-name":`error`,"storybook/no-stories-of":`error`,"storybook/no-title-property-in-meta":`error`,"storybook/no-uninstalled-addons":`error`,"storybook/prefer-pascal-case":`error`,"storybook/story-exports":`error`,"storybook/use-storybook-expect":`error`,"storybook/use-storybook-testing-library":`error`,"storybook/meta-satisfies-type":`error`,"storybook/no-renderer-packages":`error`,...n}},{name:`2digits:storybook/disables`,files:t,rules:{"sonar/no-duplicate-string":`off`}},{name:`2digits:storybook/config`,files:[`${i}/main.@(js|cjs|mjs|ts)`],languageOptions:s,rules:{"storybook/no-uninstalled-addons":`error`}}]}async function et(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:r},i]=await Promise.all([B(import(`eslint-plugin-tailwindcss`)),B(import(`@2digits/constants`)),a().catch(()=>void 0)]),o=T.file(`tailwind.config.ts`,{last:i})??T.file(`tailwind.config.js`,{last:i});return[{files:[D],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:r,config:o}},rules:{...n.configs.recommended.rules,...t}}]}async function tt(e={}){let{overrides:t={}}=e,r=await B(import(`@tanstack/eslint-plugin-query`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[D],name:`2digits:tanstack-query`,plugins:{"tanstack-query":r},rules:{...i,"tanstack-query/prefer-query-options":`error`,...t}}]}async function nt(e={}){let{overrides:t={}}=e,r=await B(import(`@tanstack/eslint-plugin-router`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[D],name:`2digits:tanstack-router`,plugins:{"tanstack-router":r},rules:{...i,"ts/only-throw-error":[`error`,{allow:[{from:`package`,package:`@tanstack/router-core`,name:`Redirect`}]}],...t}}]}const rt=Object.fromEntries(pe.standard.flatMap(({rules:e})=>Object.entries({...e})));function it(){return[{name:`2digits:toml`,files:[`**/*.toml`],language:`toml/toml`,plugins:{toml:fe},rules:{...rt,"toml/array-bracket-spacing":[`error`,`never`],"toml/array-element-newline":[`error`,`consistent`],"toml/indent":[`error`,2,{keyValuePairs:0,subTables:0}]}}]}async function at(e={}){let{overrides:t={}}=e,n=await B(import(`eslint-plugin-turbo`));return[{files:[D],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function ot(e={}){let{overrides:n={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([B(import(`typescript-eslint`)),B(import(`@2digits/eslint-plugin`))]),c=t(a.strictTypeChecked,I),l=Object.fromEntries(c.flatMap(({rules:e})=>Object.entries(e??{})));return[{name:`2digits:typescript/setup`,plugins:{ts:i,"@2digits":s}},{name:`2digits:typescript/rules`,files:[D],languageOptions:{parser:o,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:`module`},rules:{...l,"ts/array-type":[`error`,{default:`generic`,readonly:`generic`}],"ts/restrict-template-expressions":[`error`,{allowNumber:!0}],"ts/ban-ts-comment":[`error`,{"ts-ignore":`allow-with-description`}],"ts/consistent-type-exports":[`error`],"ts/consistent-type-imports":[`error`,{prefer:`type-imports`,disallowTypeAnnotations:!1,fixStyle:`inline-type-imports`}],"ts/no-empty-object-type":[`error`,{allowInterfaces:`with-single-extends`,allowObjectTypes:`never`}],"ts/no-explicit-any":[`error`],"ts/no-import-type-side-effects":[`error`],"ts/no-misused-promises":`off`,"ts/no-confusing-void-expression":`off`,"ts/no-unused-vars":[`error`,{ignoreRestSiblings:!0,argsIgnorePattern:`^_`,varsIgnorePattern:`^_`}],"ts/unbound-method":`off`,"ts/no-unnecessary-type-assertion":`off`,...s.configs.recommended.rules,...n}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],rules:{"unicorn/no-abusive-eslint-disable":`off`,"no-duplicate-imports":`off`,"no-restricted-syntax":`off`,"ts/no-unused-vars":`off`}},{name:`2digits:typescript/disables/test`,files:[`**/*.{test,spec}.ts?(x)`],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function st(){return[{files:[D],name:`2digits:unicorn`,plugins:{unicorn:E},rules:{...E.configs.recommended.rules,"unicorn/no-array-callback-reference":`off`,"unicorn/filename-case":`off`,"unicorn/prefer-module":`off`,"unicorn/prevent-abbreviations":`off`,"unicorn/prefer-ternary":[`error`,`only-single-line`],"unicorn/no-useless-undefined":[`error`,{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":`off`,"unicorn/no-nested-ternary":`off`}}]}async function ct(e={}){let{files:t=[`**/*.{test,spec}.ts?(x)`],overrides:n={},typecheck:r=!0,vitestImports:i}=e,a=await B(import(`@vitest/eslint-plugin`));return[{name:`2digits:vitest/setup`,plugins:{vitest:a}},{name:`2digits:vitest/rules`,files:t,languageOptions:{globals:a.environments.env.globals},settings:{vitest:{typecheck:r,...i?{vitestImports:i}:{}}},rules:{"vitest/consistent-each-for":[`error`,{describe:`for`,suite:`for`,it:`for`,test:`for`}],"vitest/consistent-test-filename":[`error`,{pattern:String.raw`.*\.spec\.[tj]sx?$`,allTestPattern:String.raw`.*\.(test|spec)\.[tj]sx?$`}],"vitest/consistent-test-it":[`error`,{fn:`it`,withinDescribe:`it`}],"vitest/consistent-vitest-vi":[`error`,{fn:`vi`}],"vitest/expect-expect":`error`,"vitest/hoisted-apis-on-top":`error`,"vitest/max-expects":`error`,"vitest/max-nested-describe":`error`,"vitest/no-alias-methods":`error`,"vitest/no-commented-out-tests":`error`,"vitest/no-conditional-expect":`error`,"vitest/no-conditional-in-test":`error`,"vitest/no-conditional-tests":`error`,"vitest/no-disabled-tests":`error`,"vitest/no-duplicate-hooks":`error`,"vitest/no-focused-tests":`error`,"vitest/no-identical-title":`error`,"vitest/no-import-node-test":`error`,"vitest/no-interpolation-in-snapshots":`error`,"vitest/no-mocks-import":`error`,"vitest/no-standalone-expect":`error`,"vitest/no-test-prefixes":`error`,"vitest/no-test-return-statement":`error`,"vitest/no-unneeded-async-expect-function":`error`,"vitest/prefer-called-exactly-once-with":`error`,"vitest/prefer-called-once":`error`,"vitest/prefer-called-with":`error`,"vitest/prefer-comparison-matcher":`error`,"vitest/prefer-describe-function-title":`error`,"vitest/prefer-each":`error`,"vitest/prefer-equality-matcher":`error`,"vitest/prefer-expect-resolves":`error`,"vitest/prefer-expect-type-of":`error`,"vitest/prefer-hooks-in-order":`error`,"vitest/prefer-hooks-on-top":`error`,"vitest/prefer-import-in-mock":`error`,"vitest/prefer-lowercase-title":`error`,"vitest/prefer-mock-promise-shorthand":`error`,"vitest/prefer-mock-return-shorthand":`error`,"vitest/prefer-snapshot-hint":[`error`,`always`],"vitest/prefer-spy-on":`error`,"vitest/prefer-strict-equal":`error`,"vitest/prefer-to-be":`error`,"vitest/prefer-to-be-falsy":`error`,"vitest/prefer-to-be-object":`error`,"vitest/prefer-to-be-truthy":`error`,"vitest/prefer-to-contain":`error`,"vitest/prefer-to-have-been-called-times":`error`,"vitest/prefer-to-have-length":`error`,"vitest/prefer-todo":`error`,"vitest/require-awaited-expect-poll":`error`,"vitest/require-local-test-context-for-concurrent-snapshots":`error`,"vitest/require-mock-type-parameters":`error`,"vitest/require-to-throw-message":`error`,"vitest/require-top-level-describe":`error`,"vitest/valid-describe-callback":`error`,"vitest/valid-expect":`error`,"vitest/valid-expect-in-promise":`error`,"vitest/warn-todo":`error`,...n}}]}function lt(){return[{name:`2digits:yaml/setup`,plugins:{yml:me}},{name:`2digits:yaml/base`,...X,rules:{"no-irregular-whitespace":`off`,"no-unused-vars":`off`,"spaced-comment":`off`}},{name:`2digits:yaml/recommended`,...X,rules:{"yml/no-empty-document":`error`,"yml/no-empty-key":`error`,"yml/no-empty-mapping-value":`error`,"yml/no-empty-sequence-entry":`error`,"yml/no-irregular-whitespace":`error`,"yml/no-tab-indent":`error`,"yml/vue-custom-block/no-parsing-error":`error`}},{name:`2digits:yaml/standard`,...X,rules:{"yml/block-mapping":`error`,"yml/block-sequence":`error`,"yml/plain-scalar":`error`,"yml/spaced-comment":`error`}},{name:`2digits:yaml/prettier`,...X,rules:{"yml/block-mapping-colon-indicator-newline":`off`,"yml/block-mapping-question-indicator-newline":`off`,"yml/block-sequence-hyphen-indicator-newline":`off`,"yml/flow-mapping-curly-newline":`off`,"yml/flow-mapping-curly-spacing":`off`,"yml/flow-sequence-bracket-newline":`off`,"yml/flow-sequence-bracket-spacing":`off`,"yml/indent":`off`,"yml/key-spacing":`off`,"yml/no-multiple-empty-lines":`off`,"yml/no-trailing-zeros":`off`,"yml/quotes":`off`}}]}const X={files:[`**/*.y?(a)ml`],languageOptions:{parser:_}};async function ut(e={}){let{overrides:t={}}=e,n=await B(import(`eslint-plugin-zod`));return[{files:[D],name:`2digits:zod`,plugins:{zod:n},rules:{"zod/array-style":[`error`,{style:`function`}],"zod/consistent-import":[`error`,{syntax:`namespace`}],"zod/consistent-schema-output-type-style":[`error`,{style:`infer`}],"zod/consistent-schema-var-name":[`warn`,{after:`Schema`}],"zod/no-any-schema":`error`,"zod/no-empty-custom-schema":`error`,"zod/no-native-enum":`error`,"zod/no-number-schema-with-finite":`error`,"zod/no-number-schema-with-int":`error`,"zod/no-number-schema-with-is-finite":`error`,"zod/no-number-schema-with-is-int":`error`,"zod/no-number-schema-with-safe":`error`,"zod/no-number-schema-with-step":`error`,"zod/no-optional-and-default-together":[`warn`,{preferredMethod:`default`}],"zod/no-schema-with-is-nullable":`error`,"zod/no-schema-with-is-optional":`error`,"zod/no-throw-in-refine":`error`,"zod/no-transform-in-record-key":`error`,"zod/prefer-enum-over-literal-union":`error`,"zod/prefer-loose-object":`error`,"zod/prefer-meta":`error`,"zod/prefer-meta-last":`error`,"zod/prefer-strict-object":`error`,"zod/prefer-string-schema-with-trim":`error`,"zod/prefer-top-level-string-formats":`error`,"zod/prefer-trim-before-string-length-checks":`error`,"zod/require-brand-type-parameter":`error`,"zod/schema-error-property-style":[`error`,{selector:`Literal,TemplateLiteral`,example:`"This is an error message"`}],...t}}]}function Z(e,t){return typeof e==`boolean`?e:e?.enable??t??!1}function Q(e){if(typeof e==`boolean`||e===void 0)return{};let{enable:t,...n}=e;return n}async function $(t={},...n){let r;t.pnpm===void 0&&(r=a());let o=new e(Se(t.ignores),Ce(t.js),F(),je(),z(),we(),st(),Y(),Qe(),P(),Te(),it(),lt(),Ee(),be());Z(t.css)&&(o=o.append(ge(Q(t.css)))),Z(t.depend,!0)&&(o=o.append(_e())),Z(t.turbo,i(`turbo`))&&(o=o.append(at(Q(t.turbo))));let{overrides:s,...c}=Q(t.ts);return Z(t.ts,i(`typescript`))&&(o=o.append(ot(Q(t.ts)))),Z(t.react,i(`react`))&&(o=o.append(Xe({...Q(t.react),...c}))),Z(t.next,i(`next`))&&(o=o.append(ke({...Q(t.next),...c}))),Z(t.storybook,L.some(e=>i(e)))&&(o=o.append($e({...Q(t.storybook),...c}))),Z(t.vitest,i(`vitest`))&&(o=o.append(ct(Q(t.vitest)))),Z(t.tailwind,i(`tailwindcss`))&&(o=o.append(et(Q(t.tailwind)))),Z(t.tanstackQuery,i(`react-query`)||i(`@tanstack/react-query`)||i(`@tanstack/react-query-devtools`))&&(o=o.append(tt(Q(t.tanstackQuery)))),Z(t.tanstackRouter,i(`@tanstack/react-router`))&&(o=o.append(nt(Q(t.tanstackRouter)))),Z(t.drizzle,i(`drizzle-kit`)||i(`drizzle-orm`))&&(o=o.append(ve(Q(t.drizzle)))),Z(t.zod,i(`zod`))&&(o=o.append(ut(Q(t.zod)))),Z(t.graphql,i(`graphql`))&&(o=o.append(xe(Q(t.graphql)))),Z(t.pnpm,!!await r)&&(o=o.append(Me())),o=o.append(...n),i(`prettier`)&&(o=o.append(Ne())),o=o.append(De()),o.renamePlugins(I).toConfigs()}export{$ as default,$ as twoDigits};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2digits/eslint-config",
3
- "version": "5.4.15",
3
+ "version": "5.5.1",
4
4
  "description": "Effortlessly enforce best practices and catch errors with this comprehensive ESLint configuration for TypeScript, featuring popular plugins like @typescript-eslint, eslint-plugin-react, and eslint-plugin-unicorn.",
5
5
  "keywords": [
6
6
  "eslint-config"
@@ -24,7 +24,8 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@eslint-community/eslint-plugin-eslint-comments": "4.7.1",
27
- "@eslint-react/eslint-plugin": "4.2.3",
27
+ "@eslint-react/eslint-plugin": "5.7.9",
28
+ "@eslint-react/kit": "5.7.9",
28
29
  "@eslint/compat": "2.1.0",
29
30
  "@eslint/css": "1.2.0",
30
31
  "@eslint/js": "10.0.1",
@@ -33,7 +34,7 @@
33
34
  "@next/eslint-plugin-next": "16.2.6",
34
35
  "@stylistic/eslint-plugin": "5.10.0",
35
36
  "@tanstack/eslint-plugin-query": "5.100.10",
36
- "@tanstack/eslint-plugin-router": "1.161.6",
37
+ "@tanstack/eslint-plugin-router": "1.162.0",
37
38
  "@typescript-eslint/parser": "8.59.3",
38
39
  "@typescript-eslint/utils": "8.59.3",
39
40
  "@vitest/eslint-plugin": "1.6.17",
@@ -54,10 +55,10 @@
54
55
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
55
56
  "eslint-plugin-regexp": "3.1.0",
56
57
  "eslint-plugin-sonarjs": "4.0.3",
57
- "eslint-plugin-storybook": "10.3.6",
58
+ "eslint-plugin-storybook": "10.4.0",
58
59
  "eslint-plugin-tailwindcss": "3.18.2",
59
60
  "eslint-plugin-toml": "1.3.1",
60
- "eslint-plugin-turbo": "2.9.12",
61
+ "eslint-plugin-turbo": "2.9.14",
61
62
  "eslint-plugin-unicorn": "64.0.0",
62
63
  "eslint-plugin-yml": "3.3.2",
63
64
  "eslint-plugin-zod": "4.4.0",
@@ -70,15 +71,16 @@
70
71
  "typescript-eslint": "8.59.3",
71
72
  "yaml-eslint-parser": "2.0.0",
72
73
  "@2digits/constants": "1.1.18",
73
- "@2digits/eslint-plugin": "4.0.15"
74
+ "@2digits/eslint-plugin": "4.0.16"
74
75
  },
75
76
  "devDependencies": {
76
77
  "@arethetypeswrong/core": "0.18.2",
77
78
  "@eslint/config-inspector": "3.0.2",
78
79
  "@types/react": "19.2.14",
79
- "@typescript/native-preview": "7.0.0-dev.20260513.1",
80
+ "@typescript-eslint/scope-manager": "8.59.3",
81
+ "@typescript/native-preview": "7.0.0-dev.20260516.1",
80
82
  "dedent": "1.7.2",
81
- "eslint": "10.3.0",
83
+ "eslint": "10.4.0",
82
84
  "eslint-typegen": "2.3.1",
83
85
  "publint": "0.3.21",
84
86
  "react": "19.2.6",
@@ -91,7 +93,7 @@
91
93
  "@2digits/tsconfig": "0.8.7"
92
94
  },
93
95
  "peerDependencies": {
94
- "eslint": "10.3.0"
96
+ "eslint": "10.4.0"
95
97
  },
96
98
  "engines": {
97
99
  "node": "24.14.1"