@2digits/eslint-config 4.7.4 → 4.8.0

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
@@ -247,11 +247,21 @@ interface RuleOptions {
247
247
  * @see https://eslint.org/docs/latest/rules/constructor-super
248
248
  */
249
249
  'constructor-super'?: Linter.RuleEntry<[]>;
250
+ /**
251
+ * Enforce use of fallback fonts and a generic font last
252
+ * @see https://github.com/eslint/css/blob/main/docs/rules/font-family-fallbacks.md
253
+ */
254
+ 'css/font-family-fallbacks'?: Linter.RuleEntry<[]>;
250
255
  /**
251
256
  * Disallow duplicate @import rules
252
257
  * @see https://github.com/eslint/css/blob/main/docs/rules/no-duplicate-imports.md
253
258
  */
254
259
  'css/no-duplicate-imports'?: Linter.RuleEntry<[]>;
260
+ /**
261
+ * Disallow duplicate selectors within keyframe blocks
262
+ * @see https://github.com/eslint/css/blob/main/docs/rules/no-duplicate-keyframe-selectors.md
263
+ */
264
+ 'css/no-duplicate-keyframe-selectors'?: Linter.RuleEntry<[]>;
255
265
  /**
256
266
  * Disallow empty blocks
257
267
  * @see https://github.com/eslint/css/blob/main/docs/rules/no-empty-blocks.md
@@ -1486,7 +1496,7 @@ interface RuleOptions {
1486
1496
  * Enforce heading levels increment by one
1487
1497
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/heading-increment.md
1488
1498
  */
1489
- 'markdown/heading-increment'?: Linter.RuleEntry<[]>;
1499
+ 'markdown/heading-increment'?: Linter.RuleEntry<MarkdownHeadingIncrement>;
1490
1500
  /**
1491
1501
  * Disallow bare URLs
1492
1502
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-bare-urls.md
@@ -1531,7 +1541,7 @@ interface RuleOptions {
1531
1541
  * Disallow headings without a space after the hash characters
1532
1542
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-atx-heading-space.md
1533
1543
  */
1534
- 'markdown/no-missing-atx-heading-space'?: Linter.RuleEntry<[]>;
1544
+ 'markdown/no-missing-atx-heading-space'?: Linter.RuleEntry<MarkdownNoMissingAtxHeadingSpace>;
1535
1545
  /**
1536
1546
  * Disallow missing label references
1537
1547
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-label-refs.md
@@ -1552,6 +1562,11 @@ interface RuleOptions {
1552
1562
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reversed-media-syntax.md
1553
1563
  */
1554
1564
  'markdown/no-reversed-media-syntax'?: Linter.RuleEntry<[]>;
1565
+ /**
1566
+ * Disallow spaces around emphasis markers
1567
+ * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-space-in-emphasis.md
1568
+ */
1569
+ 'markdown/no-space-in-emphasis'?: Linter.RuleEntry<MarkdownNoSpaceInEmphasis>;
1555
1570
  /**
1556
1571
  * Disallow unused definitions
1557
1572
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-unused-definitions.md
@@ -3239,7 +3254,7 @@ interface RuleOptions {
3239
3254
  'react-extra/no-nested-components'?: Linter.RuleEntry<[]>;
3240
3255
  /**
3241
3256
  * Disallow nesting lazy component declarations inside other components.
3242
- * @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
3257
+ * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
3243
3258
  */
3244
3259
  'react-extra/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
3245
3260
  /**
@@ -4544,7 +4559,7 @@ interface RuleOptions {
4544
4559
  */
4545
4560
  'sonar/no-equals-in-for-termination'?: Linter.RuleEntry<[]>;
4546
4561
  /**
4547
- * Exclusive tests should not be commited to version control
4562
+ * Exclusive tests should not be committed to version control
4548
4563
  * @see https://sonarsource.github.io/rspec/#/rspec/S6426/javascript
4549
4564
  */
4550
4565
  'sonar/no-exclusive-tests'?: Linter.RuleEntry<[]>;
@@ -4748,11 +4763,6 @@ interface RuleOptions {
4748
4763
  * @see https://sonarsource.github.io/rspec/#/rspec/S4624/javascript
4749
4764
  */
4750
4765
  'sonar/no-nested-template-literals'?: Linter.RuleEntry<[]>;
4751
- /**
4752
- * Loops with at most one iteration should be refactored
4753
- * @see https://sonarsource.github.io/rspec/#/rspec/S1751/javascript
4754
- */
4755
- 'sonar/no-one-iteration-loop'?: Linter.RuleEntry<[]>;
4756
4766
  /**
4757
4767
  * Searching OS commands in PATH is security-sensitive
4758
4768
  * @see https://sonarsource.github.io/rspec/#/rspec/S4036/javascript
@@ -5213,7 +5223,6 @@ interface RuleOptions {
5213
5223
  /**
5214
5224
  * Loop counters should not be assigned within the loop body
5215
5225
  * @see https://sonarsource.github.io/rspec/#/rspec/S2310/javascript
5216
- * @deprecated
5217
5226
  */
5218
5227
  'sonar/updated-loop-counter'?: Linter.RuleEntry<[]>;
5219
5228
  /**
@@ -7701,11 +7710,13 @@ type CssPreferLogicalProperties = [] | [{
7701
7710
  // ----- css/relative-font-units -----
7702
7711
  type CssRelativeFontUnits = [] | [{
7703
7712
  allowUnits?: ("%" | "cap" | "ch" | "em" | "ex" | "ic" | "lh" | "rcap" | "rch" | "rem" | "rex" | "ric" | "rlh")[];
7704
- [k: string]: unknown | undefined;
7705
7713
  }];
7706
7714
  // ----- css/use-baseline -----
7707
7715
  type CssUseBaseline = [] | [{
7708
7716
  available?: (("widely" | "newly") | number);
7717
+ allowAtRules?: string[];
7718
+ allowProperties?: string[];
7719
+ allowSelectors?: string[];
7709
7720
  }];
7710
7721
  // ----- css/use-layers -----
7711
7722
  type CssUseLayers = [] | [{
@@ -9193,6 +9204,10 @@ type LogicalAssignmentOperators = (([] | ["always"] | ["always", {
9193
9204
  type MarkdownFencedCodeLanguage = [] | [{
9194
9205
  required?: string[];
9195
9206
  }];
9207
+ // ----- markdown/heading-increment -----
9208
+ type MarkdownHeadingIncrement = [] | [{
9209
+ frontmatterTitle?: string;
9210
+ }];
9196
9211
  // ----- markdown/no-duplicate-definitions -----
9197
9212
  type MarkdownNoDuplicateDefinitions = [] | [{
9198
9213
  allowDefinitions?: string[];
@@ -9211,6 +9226,11 @@ type MarkdownNoEmptyDefinitions = [] | [{
9211
9226
  // ----- markdown/no-html -----
9212
9227
  type MarkdownNoHtml = [] | [{
9213
9228
  allowed?: string[];
9229
+ allowedIgnoreCase?: boolean;
9230
+ }];
9231
+ // ----- markdown/no-missing-atx-heading-space -----
9232
+ type MarkdownNoMissingAtxHeadingSpace = [] | [{
9233
+ checkClosedHeadings?: boolean;
9214
9234
  }];
9215
9235
  // ----- markdown/no-missing-link-fragments -----
9216
9236
  type MarkdownNoMissingLinkFragments = [] | [{
@@ -9221,6 +9241,10 @@ type MarkdownNoMissingLinkFragments = [] | [{
9221
9241
  type MarkdownNoMultipleH1 = [] | [{
9222
9242
  frontmatterTitle?: string;
9223
9243
  }];
9244
+ // ----- markdown/no-space-in-emphasis -----
9245
+ type MarkdownNoSpaceInEmphasis = [] | [{
9246
+ checkStrikethrough?: boolean;
9247
+ }];
9224
9248
  // ----- markdown/no-unused-definitions -----
9225
9249
  type MarkdownNoUnusedDefinitions = [] | [{
9226
9250
  allowDefinitions?: string[];
@@ -13288,6 +13312,17 @@ interface OptionsWithIgnores {
13288
13312
  /** An array of glob patterns to ignore in addition to the default ignores. */
13289
13313
  ignores?: Array<string>;
13290
13314
  }
13315
+ interface OptionsCss extends OptionsOverrides {
13316
+ /**
13317
+ * Force Tailwind custom syntax major version.
13318
+ * When omitted, auto-detects installed Tailwind major and falls back to v3.
13319
+ */
13320
+ tailwindMajor?: 3 | 4;
13321
+ /**
13322
+ * Provide a custom CSS parser syntax object. Overrides tailwindMajor detection.
13323
+ */
13324
+ customSyntax?: unknown;
13325
+ }
13291
13326
  //#endregion
13292
13327
  //#region src/factory.d.ts
13293
13328
  type SharedOptions<T = unknown> = T & {
@@ -13295,6 +13330,7 @@ type SharedOptions<T = unknown> = T & {
13295
13330
  };
13296
13331
  interface ESLint2DigitsOptions {
13297
13332
  ignores?: OptionsWithIgnores;
13333
+ css?: SharedOptions<OptionsCss> | boolean;
13298
13334
  turbo?: SharedOptions<OptionsOverrides> | boolean;
13299
13335
  js?: OptionsOverrides;
13300
13336
  ts?: SharedOptions<OptionsTypeScriptWithTypes> | boolean;
@@ -13309,4 +13345,4 @@ interface ESLint2DigitsOptions {
13309
13345
  }
13310
13346
  declare function twoDigits(options?: ESLint2DigitsOptions, ...userConfig: Array<TypedFlatConfigItem>): Promise<Array<TypedFlatConfigItem>>;
13311
13347
  //#endregion
13312
- export { type ConfigNames, OptionsOverrides, OptionsTypeScriptWithTypes, OptionsWithDrizzle, OptionsWithFiles, OptionsWithIgnores, OptionsWithReact, OptionsWithStorybook, Rules, TypedFlatConfigItem, twoDigits as default, twoDigits };
13348
+ export { type ConfigNames, OptionsCss, OptionsOverrides, OptionsTypeScriptWithTypes, OptionsWithDrizzle, OptionsWithFiles, OptionsWithIgnores, OptionsWithReact, OptionsWithStorybook, Rules, TypedFlatConfigItem, twoDigits as default, twoDigits };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{FlatConfigComposer as e,renamePluginsInConfigs as t,renamePluginsInRules as n}from"eslint-flat-config-utils";import{findUp as r}from"find-up";import{isPackageExists as i}from"local-pkg";import a from"eslint-plugin-antfu";import o from"eslint-plugin-de-morgan";import s from"@eslint-community/eslint-plugin-eslint-comments";import c from"@eslint-community/eslint-plugin-eslint-comments/configs";import l from"@eslint/css";import{tailwind3 as u}from"tailwind-csstree";import{fixupPluginRules as d}from"@eslint/compat";import f from"eslint-plugin-github-action";import p from"yaml-eslint-parser";import m from"eslint-config-flat-gitignore";import ee from"@eslint/js";import te from"@stylistic/eslint-plugin";import h from"globals";import g from"eslint-plugin-jsdoc";import ne,{configs as _}from"eslint-plugin-jsonc";import re from"jsonc-eslint-parser";import v from"@eslint/markdown";import{mergeProcessors as ie,processorPassThrough as ae}from"eslint-merge-processors";import y from"eslint-plugin-n";import b from"eslint-plugin-regexp";import x from"eslint-plugin-sonarjs";import S from"eslint-plugin-unicorn";import C from"eslint-plugin-yml";const w=`**/*.?([cm])[jt]s?(x)`,T=`**/*.?([cm])ts`,E=`**/*.?([cm])tsx`,D=`.github/workflows/*.y?(a)ml`,O=`**/*.md`,k=`${O}/${w}`,A=`**/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 j(){return[{files:[w],name:`2digits:antfu`,plugins:{antfu:a},rules:{"antfu/if-newline":`error`,"antfu/top-level-function":`error`}}]}function M(){return[{files:[w],name:`2digits:boolean`,plugins:{boolean:o},rules:{...o.configs.recommended.rules}}]}const N={"@next/next":`next`,"@eslint-react/naming-convention":`react-naming-convention`,"@eslint-react/hooks-extra":`react-hooks-extra`,"@eslint-react/dom":`react-dom`,"@eslint-react/web-api":`react-web-api`,"@eslint-react":`react-extra`,"react-hooks":`react-hooks`,"react-compiler":`react-compiler`,"@stylistic/eslint-plugin":`stylistic`,"@typescript-eslint":`ts`,node:`node`,"@eslint-community/eslint-comments":`comments`,storybook:`storybook`,turbo:`turbo`,jsdoc:`jsdoc`,unicorn:`unicorn`,tailwindcss:`tailwindcss`,"@tanstack/query":`tanstack`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`},P=n(c.recommended.rules,N);function F(){return[{files:[w],name:`2digits:comments`,plugins:{comments:s},rules:{...P,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}function I(){return[{name:`2digits:css`,files:[`**/*.css`],language:`css/css`,plugins:{css:l},languageOptions:{tolerant:!0,customSyntax:u},rules:{...l.configs.recommended.rules}}]}async function L(e){let t=await e;return t.default||t}async function R(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await L(import(`eslint-plugin-drizzle`));return[{files:[w],name:`2digits:drizzle`,plugins:{drizzle:d(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}const z=Object.fromEntries(f.configs.recommended.flatMap(({rules:e})=>Object.entries({...e})));function B(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":f}},{name:`2digits:github-actions/recommended`,files:[D],ignores:[`!**/${D}`],languageOptions:{parser:p},rules:{...z}}]}async function V(e={}){let{overrides:t={},files:r=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([L(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/`,``);if(t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings))continue;s[e]=o[e]}let c=n(s,N);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:r,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function H(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[A,n].flat(),name:`2digits:ignores`},m({strict:!1,...t,name:`2digits:gitignore`})]}function U(e={}){let{overrides:t={}}=e;return[{files:[w],name:`2digits:javascript`,plugins:{stylistic:te},languageOptions:{ecmaVersion:2022,globals:{...h.browser,...h.es2021,...h.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-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 W(){return[{files:[w],name:`2digits:jsdoc`,plugins:{jsdoc:g},rules:{"jsdoc/check-access":`error`,"jsdoc/check-param-names":`error`,"jsdoc/check-property-names":`error`,"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-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-check":`error`}}]}function G(){return[..._[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...K,rules:{...q(_[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...K,rules:{...q(_[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...K,rules:{...q(_[`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:`$schema.publisher.name.displayName.version.private.description.funding.homepage.repository.bugs.categories.type.main.module.types.typesVersions.bin.files.exports.icon.unpkg.jsdelivr.sideEffects.activationEvents.contributes.scripts.keywords.author.license.workspaces.dependencies.devDependencies.peerDependencies.peerDependenciesMeta.optionalDependencies.packageManager.engines.pnpm.overrides.resolutions.husky.simple-git-hooks.lint-staged.eslintConfig.prettier`.split(`.`),pathPattern:`^$`},{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$`}]}},..._[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const K={languageOptions:{parser:re},plugins:{jsonc:ne}};function q(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const J=[O];function oe(){return[{name:`2digits:markdown/setup`,plugins:{markdown:v}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:ie([v.processors.markdown,ae])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:se}},{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`}},{name:`2digits:markdown/disables`,files:[k],languageOptions:{parserOptions:{ecmaFeatures:{impliedStrict:!0}}},rules:{"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 se={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 ce(e={}){let{files:t=[T,E],overrides:r={},parserOptions:i}=e,[a,o]=await Promise.all([L(import(`@next/eslint-plugin-next`)),L(import(`@typescript-eslint/parser`))]),s=n({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},N);return[{name:`2digits:next/setup`,plugins:{next:d(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}}]}function le(){return[{files:[w],name:`2digits:node`,settings:{node:{version:`>= 22.0.0`}},plugins:{node:y},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 ue(){let e=await L(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`**/package.json`],languageOptions:{parser:await L(import(`jsonc-eslint-parser`))},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 L(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`}}]}async function de(){let[e,t]=await Promise.all([L(import(`eslint-config-prettier`)),L(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 fe(e={}){let{files:t=[T,E],overrides:r={},parserOptions:i,tsconfigRootDir:a,reactCompiler:o=!0}=e,[s,c,l,u,d]=await Promise.all([L(import(`@eslint-react/eslint-plugin`)),L(import(`eslint-plugin-react-hooks`)),L(import(`@typescript-eslint/parser`)),o?L(import(`eslint-plugin-react-compiler`)):void 0,L(import(`@stylistic/eslint-plugin`))]),f=s.configs.all.plugins,p=n({...c.configs[`recommended-latest`].rules,...s.configs[`recommended-type-checked`].rules},N);return[{name:`2digits:react/setup`,plugins:{stylistic:d,"react-dom":f[`@eslint-react/dom`],"react-web-api":f[`@eslint-react/web-api`],"react-extra":f[`@eslint-react`],"react-hooks":c,"react-hooks-extra":f[`@eslint-react/hooks-extra`],"react-naming-convention":f[`@eslint-react/naming-convention`],...o?{"react-compiler":u}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:t,languageOptions:{parser:l,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:a,projectService:!0,...i},sourceType:`module`},rules:{...p,...o?{"react-compiler/react-compiler":`error`}:{},"react-hooks-extra/no-unnecessary-use-callback":`error`,"react-hooks-extra/prefer-use-state-lazy-initialization":`error`,"react-hooks-extra/no-redundant-custom-hook":`error`,"react-hooks-extra/no-unnecessary-use-memo":`error`,"react-extra/no-useless-fragment":`off`,"react-extra/prefer-read-only-props":`off`,"react-extra/prefer-shorthand-boolean":`error`,"react-extra/prefer-shorthand-fragment":`error`,"react-extra/prefer-react-namespace-import":`error`,"react-naming-convention/use-state":`error`,"stylistic/jsx-curly-newline":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}],"stylistic/jsx-self-closing-comp":`error`,...r}}]}function pe(){return[{files:[w],name:`2digits:regexp`,plugins:{regexp:b},rules:{...b.configs[`flat/recommended`].rules}}]}function me(){return[{files:[w],name:`2digits:sonar`,plugins:{sonar:x},rules:{"sonar/code-eval":`error`,"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-one-iteration-loop":`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 he(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([L(import(`eslint-plugin-storybook`)),L(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook:d(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`,...n}},{name:`2digits:storybook/disables`,files:t,rules:{"react-hooks/rules-of-hooks":`off`,"react/display-name":`off`,"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 ge(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:i},a]=await Promise.all([L(import(`eslint-plugin-tailwindcss`)),L(import(`@2digits/constants`)),r([`tailwind.config.ts`,`tailwind.config.js`])]);return[{files:[w],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:i,config:a}},rules:{...n.configs.recommended.rules,...t}}]}async function _e(e={}){let{overrides:t={}}=e,r=await L(import(`@tanstack/eslint-plugin-query`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},N);return[{files:[w],name:`2digits:tanstack`,plugins:{tanstack:r},rules:{...i,...t}}]}async function Y(e={}){let{overrides:t={}}=e,n=await L(import(`eslint-plugin-turbo`));return[{files:[w],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function ve(e={}){let{overrides:n={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([L(import(`typescript-eslint`)),L(import(`@2digits/eslint-plugin`))]),c=t(a.strictTypeChecked,N),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:[w],ignores:[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`,...s.configs.recommended.rules,...n}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],ignores:[k],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)`],ignores:[k],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],ignores:[k],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function ye(){return[{files:[w],name:`2digits:unicorn`,plugins:{unicorn:S},rules:{...S.configs.recommended.rules,"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`]}}]}function be(){return[{name:`2digits:yaml/setup`,plugins:{yml:C}},{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:p}};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 a;t.pnpm===void 0&&(a=r(`pnpm-workspace.yaml`));let o=new e(H(t.ignores),U(t.js),M(),le(),F(),W(),ye(),me(),pe(),j(),G(),I(),be(),oe(),B());Z(t.turbo,i(`turbo`))&&(o=o.append(Y(Q(t.turbo))));let{overrides:s,...c}=Q(t.ts);return Z(t.ts,i(`typescript`))&&(o=o.append(ve(Q(t.ts)))),Z(t.react,i(`react`))&&(o=o.append(fe({...Q(t.react),...c}))),Z(t.next,i(`next`))&&(o=o.append(ce({...Q(t.next),...c}))),Z(t.storybook,i(`storybook`))&&(o=o.append(he({...Q(t.storybook),...c}))),Z(t.tailwind,i(`tailwindcss`))&&(o=o.append(ge(Q(t.tailwind)))),Z(t.tanstack,i(`react-query`)||i(`@tanstack/react-query`)||i(`@tanstack/react-query-devtools`))&&(o=o.append(_e(Q(t.tanstack)))),Z(t.drizzle,i(`drizzle-kit`)||i(`drizzle-orm`))&&(o=o.append(R(Q(t.drizzle)))),Z(t.graphql,i(`graphql`))&&(o=o.append(V(Q(t.graphql)))),Z(t.pnpm,!!await a)&&(o=o.append(ue())),o=o.append(...n),i(`prettier`)&&(o=o.append(de())),o.renamePlugins(N).toConfigs()}export{$ as default,$ as twoDigits};
1
+ import{FlatConfigComposer as e,renamePluginsInConfigs as t,renamePluginsInRules as n}from"eslint-flat-config-utils";import{findUp as r}from"find-up";import{getPackageInfo as i,isPackageExists as a}from"local-pkg";import o from"eslint-plugin-antfu";import s from"eslint-plugin-de-morgan";import c from"@eslint-community/eslint-plugin-eslint-comments";import l from"@eslint-community/eslint-plugin-eslint-comments/configs";import u from"@eslint/css";import{tailwind3 as d,tailwind4 as f}from"tailwind-csstree";import{fixupPluginRules as p}from"@eslint/compat";import m from"eslint-plugin-github-action";import h from"yaml-eslint-parser";import g from"eslint-config-flat-gitignore";import ee from"@eslint/js";import te from"@stylistic/eslint-plugin";import _ from"globals";import ne from"eslint-plugin-jsdoc";import re,{configs as v}from"eslint-plugin-jsonc";import ie from"jsonc-eslint-parser";import y from"@eslint/markdown";import{mergeProcessors as ae,processorPassThrough as oe}from"eslint-merge-processors";import b from"eslint-plugin-n";import x from"eslint-plugin-regexp";import se from"eslint-plugin-sonarjs";import S from"eslint-plugin-unicorn";import ce from"eslint-plugin-yml";const C=`**/*.?([cm])[jt]s?(x)`,w=`**/*.?([cm])ts`,T=`**/*.?([cm])tsx`,E=`.github/workflows/*.y?(a)ml`,D=`**/*.md`,O=`${D}/${C}`,k=`**/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 A(){return[{files:[C],name:`2digits:antfu`,plugins:{antfu:o},rules:{"antfu/if-newline":`error`,"antfu/top-level-function":`error`}}]}function j(){return[{files:[C],name:`2digits:boolean`,plugins:{boolean:s},rules:{...s.configs.recommended.rules}}]}const M={"@next/next":`next`,"@eslint-react/naming-convention":`react-naming-convention`,"@eslint-react/hooks-extra":`react-hooks-extra`,"@eslint-react/dom":`react-dom`,"@eslint-react/web-api":`react-web-api`,"@eslint-react":`react-extra`,"react-hooks":`react-hooks`,"react-compiler":`react-compiler`,"@stylistic/eslint-plugin":`stylistic`,"@typescript-eslint":`ts`,node:`node`,"@eslint-community/eslint-comments":`comments`,storybook:`storybook`,turbo:`turbo`,jsdoc:`jsdoc`,unicorn:`unicorn`,tailwindcss:`tailwindcss`,"@tanstack/query":`tanstack`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`},N=n(l.recommended.rules,M);function P(){return[{files:[C],name:`2digits:comments`,plugins:{comments:c},rules:{...N,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}async function F(e){if(e?.customSyntax)return e.customSyntax;if(e?.tailwindMajor===3)return d;if(e?.tailwindMajor===4)return f;try{let e=await i(`tailwindcss`),t=e?.version??``,n=Number.parseInt(t.split(`.`)[0]||`0`,10);if(Number.isFinite(n)&&n>=4)return f}catch{}return d}async function I(e={}){let t=await F(e);return[{name:`2digits:css`,files:[`**/*.css`],language:`css/css`,plugins:{css:u},languageOptions:{tolerant:!0,customSyntax:t},rules:{...u.configs.recommended.rules,...e.overrides}}]}async function L(e){let t=await e;return t.default||t}async function R(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await L(import(`eslint-plugin-drizzle`));return[{files:[C],name:`2digits:drizzle`,plugins:{drizzle:p(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}const z=Object.fromEntries(m.configs.recommended.flatMap(({rules:e})=>Object.entries({...e})));function B(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":m}},{name:`2digits:github-actions/recommended`,files:[E],ignores:[`!**/${E}`],languageOptions:{parser:h},rules:{...z}}]}async function V(e={}){let{overrides:t={},files:r=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([L(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/`,``);if(t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings))continue;s[e]=o[e]}let c=n(s,M);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:r,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function H(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[k,n].flat(),name:`2digits:ignores`},g({strict:!1,...t,name:`2digits:gitignore`})]}function U(e={}){let{overrides:t={}}=e;return[{files:[C],name:`2digits:javascript`,plugins:{stylistic:te},languageOptions:{ecmaVersion:2022,globals:{..._.browser,..._.es2021,..._.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-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 W(){return[{files:[C],name:`2digits:jsdoc`,plugins:{jsdoc:ne},rules:{"jsdoc/check-access":`error`,"jsdoc/check-param-names":`error`,"jsdoc/check-property-names":`error`,"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-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-check":`error`}}]}function G(){return[...v[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...K,rules:{...q(v[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...K,rules:{...q(v[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...K,rules:{...q(v[`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:`$schema.publisher.name.displayName.version.private.description.funding.homepage.repository.bugs.categories.type.main.module.types.typesVersions.bin.files.exports.icon.unpkg.jsdelivr.sideEffects.activationEvents.contributes.scripts.keywords.author.license.workspaces.dependencies.devDependencies.peerDependencies.peerDependenciesMeta.optionalDependencies.packageManager.engines.pnpm.overrides.resolutions.husky.simple-git-hooks.lint-staged.eslintConfig.prettier`.split(`.`),pathPattern:`^$`},{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$`}]}},...v[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const K={languageOptions:{parser:ie},plugins:{jsonc:re}};function q(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const J=[D];function le(){return[{name:`2digits:markdown/setup`,plugins:{markdown:y}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:ae([y.processors.markdown,oe])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:ue}},{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`}},{name:`2digits:markdown/disables`,files:[O],languageOptions:{parserOptions:{ecmaFeatures:{impliedStrict:!0}}},rules:{"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 ue={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 de(e={}){let{files:t=[w,T],overrides:r={},parserOptions:i}=e,[a,o]=await Promise.all([L(import(`@next/eslint-plugin-next`)),L(import(`@typescript-eslint/parser`))]),s=n({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},M);return[{name:`2digits:next/setup`,plugins:{next:p(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}}]}function fe(){return[{files:[C],name:`2digits:node`,settings:{node:{version:`>= 22.0.0`}},plugins:{node:b},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 pe(){let e=await L(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`**/package.json`],languageOptions:{parser:await L(import(`jsonc-eslint-parser`))},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 L(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`}}]}async function me(){let[e,t]=await Promise.all([L(import(`eslint-config-prettier`)),L(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 he(e={}){let{files:t=[w,T],overrides:r={},parserOptions:i,tsconfigRootDir:a,reactCompiler:o=!0}=e,[s,c,l,u,d]=await Promise.all([L(import(`@eslint-react/eslint-plugin`)),L(import(`eslint-plugin-react-hooks`)),L(import(`@typescript-eslint/parser`)),o?L(import(`eslint-plugin-react-compiler`)):void 0,L(import(`@stylistic/eslint-plugin`))]),f=s.configs.all.plugins,p=n({...c.configs[`recommended-latest`].rules,...s.configs[`recommended-type-checked`].rules},M);return[{name:`2digits:react/setup`,plugins:{stylistic:d,"react-dom":f[`@eslint-react/dom`],"react-web-api":f[`@eslint-react/web-api`],"react-extra":f[`@eslint-react`],"react-hooks":c,"react-hooks-extra":f[`@eslint-react/hooks-extra`],"react-naming-convention":f[`@eslint-react/naming-convention`],...o?{"react-compiler":u}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:t,languageOptions:{parser:l,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:a,projectService:!0,...i},sourceType:`module`},rules:{...p,...o?{"react-compiler/react-compiler":`error`}:{},"react-hooks-extra/no-unnecessary-use-callback":`error`,"react-hooks-extra/prefer-use-state-lazy-initialization":`error`,"react-hooks-extra/no-redundant-custom-hook":`error`,"react-hooks-extra/no-unnecessary-use-memo":`error`,"react-extra/no-useless-fragment":`off`,"react-extra/prefer-read-only-props":`off`,"react-extra/prefer-shorthand-boolean":`error`,"react-extra/prefer-shorthand-fragment":`error`,"react-extra/prefer-react-namespace-import":`error`,"react-naming-convention/use-state":`error`,"stylistic/jsx-curly-newline":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}],"stylistic/jsx-self-closing-comp":`error`,...r}}]}function ge(){return[{files:[C],name:`2digits:regexp`,plugins:{regexp:x},rules:{...x.configs[`flat/recommended`].rules}}]}function _e(){return[{files:[C],name:`2digits:sonar`,plugins:{sonar:se},rules:{"sonar/code-eval":`error`,"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 Y(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([L(import(`eslint-plugin-storybook`)),L(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook:p(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`,...n}},{name:`2digits:storybook/disables`,files:t,rules:{"react-hooks/rules-of-hooks":`off`,"react/display-name":`off`,"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 ve(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:i},a]=await Promise.all([L(import(`eslint-plugin-tailwindcss`)),L(import(`@2digits/constants`)),r([`tailwind.config.ts`,`tailwind.config.js`])]);return[{files:[C],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:i,config:a}},rules:{...n.configs.recommended.rules,...t}}]}async function ye(e={}){let{overrides:t={}}=e,r=await L(import(`@tanstack/eslint-plugin-query`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},M);return[{files:[C],name:`2digits:tanstack`,plugins:{tanstack:r},rules:{...i,...t}}]}async function be(e={}){let{overrides:t={}}=e,n=await L(import(`eslint-plugin-turbo`));return[{files:[C],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function xe(e={}){let{overrides:n={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([L(import(`typescript-eslint`)),L(import(`@2digits/eslint-plugin`))]),c=t(a.strictTypeChecked,M),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:[C],ignores:[O],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`,...s.configs.recommended.rules,...n}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],ignores:[O],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)`],ignores:[O],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],ignores:[O],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function Se(){return[{files:[C],name:`2digits:unicorn`,plugins:{unicorn:S},rules:{...S.configs.recommended.rules,"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`]}}]}function Ce(){return[{name:`2digits:yaml/setup`,plugins:{yml:ce}},{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:h}};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 i;t.pnpm===void 0&&(i=r(`pnpm-workspace.yaml`));let o=new e(H(t.ignores),U(t.js),j(),fe(),P(),W(),Se(),_e(),ge(),A(),G(),Ce(),le(),B());Z(t.css)&&(o=o.append(I(Q(t.css)))),Z(t.turbo,a(`turbo`))&&(o=o.append(be(Q(t.turbo))));let{overrides:s,...c}=Q(t.ts);return Z(t.ts,a(`typescript`))&&(o=o.append(xe(Q(t.ts)))),Z(t.react,a(`react`))&&(o=o.append(he({...Q(t.react),...c}))),Z(t.next,a(`next`))&&(o=o.append(de({...Q(t.next),...c}))),Z(t.storybook,a(`storybook`))&&(o=o.append(Y({...Q(t.storybook),...c}))),Z(t.tailwind,a(`tailwindcss`))&&(o=o.append(ve(Q(t.tailwind)))),Z(t.tanstack,a(`react-query`)||a(`@tanstack/react-query`)||a(`@tanstack/react-query-devtools`))&&(o=o.append(ye(Q(t.tanstack)))),Z(t.drizzle,a(`drizzle-kit`)||a(`drizzle-orm`))&&(o=o.append(R(Q(t.drizzle)))),Z(t.graphql,a(`graphql`))&&(o=o.append(V(Q(t.graphql)))),Z(t.pnpm,!!await i)&&(o=o.append(pe())),o=o.append(...n),a(`prettier`)&&(o=o.append(me())),o.renamePlugins(M).toConfigs()}export{$ as default,$ as twoDigits};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2digits/eslint-config",
3
- "version": "4.7.4",
3
+ "version": "4.8.0",
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
  "homepage": "https://2d-configs.vercel.app/",
6
6
  "repository": {
@@ -27,17 +27,17 @@
27
27
  "public": true,
28
28
  "dependencies": {
29
29
  "@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
30
- "@eslint-react/eslint-plugin": "1.52.6",
30
+ "@eslint-react/eslint-plugin": "1.52.7",
31
31
  "@eslint/compat": "1.3.2",
32
- "@eslint/css": "0.10.0",
33
- "@eslint/js": "9.33.0",
34
- "@eslint/markdown": "7.1.0",
32
+ "@eslint/css": "0.11.0",
33
+ "@eslint/js": "9.34.0",
34
+ "@eslint/markdown": "7.2.0",
35
35
  "@graphql-eslint/eslint-plugin": "4.4.0",
36
- "@next/eslint-plugin-next": "15.5.0",
36
+ "@next/eslint-plugin-next": "15.5.2",
37
37
  "@stylistic/eslint-plugin": "5.2.3",
38
38
  "@tanstack/eslint-plugin-query": "5.83.1",
39
- "@typescript-eslint/parser": "8.40.0",
40
- "@typescript-eslint/utils": "8.40.0",
39
+ "@typescript-eslint/parser": "8.41.0",
40
+ "@typescript-eslint/utils": "8.41.0",
41
41
  "eslint-config-flat-gitignore": "2.1.0",
42
42
  "eslint-config-prettier": "10.1.8",
43
43
  "eslint-flat-config-utils": "2.1.1",
@@ -53,7 +53,7 @@
53
53
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
54
54
  "eslint-plugin-react-hooks": "5.2.0",
55
55
  "eslint-plugin-regexp": "2.10.0",
56
- "eslint-plugin-sonarjs": "3.0.4",
56
+ "eslint-plugin-sonarjs": "3.0.5",
57
57
  "eslint-plugin-storybook": "9.1.3",
58
58
  "eslint-plugin-tailwindcss": "3.18.2",
59
59
  "eslint-plugin-turbo": "2.5.6",
@@ -65,24 +65,24 @@
65
65
  "jsonc-eslint-parser": "2.4.0",
66
66
  "local-pkg": "1.1.2",
67
67
  "tailwind-csstree": "0.1.3",
68
- "typescript-eslint": "8.40.0",
68
+ "typescript-eslint": "8.41.0",
69
69
  "yaml-eslint-parser": "1.3.0",
70
- "@2digits/constants": "1.1.5",
71
- "@2digits/eslint-plugin": "3.1.13"
70
+ "@2digits/constants": "1.1.7",
71
+ "@2digits/eslint-plugin": "3.1.15"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@eslint/config-inspector": "1.2.0",
75
- "@types/react": "19.1.10",
75
+ "@types/react": "19.1.12",
76
76
  "dedent": "1.6.0",
77
- "eslint": "9.33.0",
77
+ "eslint": "9.34.0",
78
78
  "eslint-typegen": "2.3.0",
79
79
  "execa": "9.6.0",
80
80
  "react": "19.1.1",
81
81
  "tinyglobby": "0.2.14",
82
- "tsdown": "0.13.0",
82
+ "tsdown": "0.14.2",
83
83
  "typescript": "5.9.2",
84
84
  "vitest": "3.2.4",
85
- "@2digits/tsconfig": "0.8.1"
85
+ "@2digits/tsconfig": "0.8.2"
86
86
  },
87
87
  "scripts": {
88
88
  "build": "tsdown --minify",