@2digits/eslint-config 5.1.12 → 5.1.13
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 +23 -2
- package/dist/index.mjs +1 -1
- package/package.json +13 -13
package/dist/index.d.mts
CHANGED
|
@@ -1834,7 +1834,7 @@ type CustomRuleVisitorWithExit$1<RuleVisitorType extends RuleVisitor$1> = { [Key
|
|
|
1834
1834
|
type RuleVisitor = RuleVisitor$1;
|
|
1835
1835
|
type CustomRuleVisitorWithExit<RuleVisitorType extends RuleVisitor> = CustomRuleVisitorWithExit$1<RuleVisitorType>;
|
|
1836
1836
|
//#endregion
|
|
1837
|
-
//#region ../../node_modules/.pnpm/eslint@10.0.
|
|
1837
|
+
//#region ../../node_modules/.pnpm/eslint@10.0.2_jiti@2.6.0/node_modules/eslint/lib/types/index.d.ts
|
|
1838
1838
|
//------------------------------------------------------------------------------
|
|
1839
1839
|
// Exports
|
|
1840
1840
|
//------------------------------------------------------------------------------
|
|
@@ -8951,11 +8951,21 @@ interface RuleOptions {
|
|
|
8951
8951
|
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/indent.html
|
|
8952
8952
|
*/
|
|
8953
8953
|
'toml/indent'?: Linter.RuleEntry<TomlIndent>;
|
|
8954
|
+
/**
|
|
8955
|
+
* enforce linebreaks after opening and before closing braces
|
|
8956
|
+
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-curly-newline.html
|
|
8957
|
+
*/
|
|
8958
|
+
'toml/inline-table-curly-newline'?: Linter.RuleEntry<TomlInlineTableCurlyNewline>;
|
|
8954
8959
|
/**
|
|
8955
8960
|
* enforce consistent spacing inside braces
|
|
8956
8961
|
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-curly-spacing.html
|
|
8957
8962
|
*/
|
|
8958
8963
|
'toml/inline-table-curly-spacing'?: Linter.RuleEntry<TomlInlineTableCurlySpacing>;
|
|
8964
|
+
/**
|
|
8965
|
+
* enforce placing inline table key-value pairs on separate lines
|
|
8966
|
+
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/inline-table-key-value-newline.html
|
|
8967
|
+
*/
|
|
8968
|
+
'toml/inline-table-key-value-newline'?: Linter.RuleEntry<TomlInlineTableKeyValueNewline>;
|
|
8959
8969
|
/**
|
|
8960
8970
|
* enforce consistent spacing between keys and values in key/value pairs
|
|
8961
8971
|
* @see https://ota-meshi.github.io/eslint-plugin-toml/rules/key-spacing.html
|
|
@@ -12174,6 +12184,7 @@ type JsoncObjectCurlyNewline = [] | [((("always" | "never") | {
|
|
|
12174
12184
|
type JsoncObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
12175
12185
|
arraysInObjects?: boolean;
|
|
12176
12186
|
objectsInObjects?: boolean;
|
|
12187
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
12177
12188
|
}]; // ----- jsonc/object-property-newline -----
|
|
12178
12189
|
type JsoncObjectPropertyNewline = [] | [{
|
|
12179
12190
|
allowAllPropertiesOnSameLine?: boolean;
|
|
@@ -15203,10 +15214,19 @@ type TomlCommaStyle = [] | [("first" | "last")] | [("first" | "last"), {
|
|
|
15203
15214
|
type TomlIndent = [] | [("tab" | number)] | [("tab" | number), {
|
|
15204
15215
|
subTables?: number;
|
|
15205
15216
|
keyValuePairs?: number;
|
|
15206
|
-
}]; // ----- toml/inline-table-curly-
|
|
15217
|
+
}]; // ----- toml/inline-table-curly-newline -----
|
|
15218
|
+
type TomlInlineTableCurlyNewline = [] | [(("always" | "never") | {
|
|
15219
|
+
multiline?: boolean;
|
|
15220
|
+
minProperties?: number;
|
|
15221
|
+
consistent?: boolean;
|
|
15222
|
+
})]; // ----- toml/inline-table-curly-spacing -----
|
|
15207
15223
|
type TomlInlineTableCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
15208
15224
|
arraysInObjects?: boolean;
|
|
15209
15225
|
objectsInObjects?: boolean;
|
|
15226
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
15227
|
+
}]; // ----- toml/inline-table-key-value-newline -----
|
|
15228
|
+
type TomlInlineTableKeyValueNewline = [] | [{
|
|
15229
|
+
allowAllPropertiesOnSameLine?: boolean;
|
|
15210
15230
|
}]; // ----- toml/key-spacing -----
|
|
15211
15231
|
type TomlKeySpacing = [] | [({
|
|
15212
15232
|
align?: (("equal" | "value") | {
|
|
@@ -16409,6 +16429,7 @@ type YmlFlowMappingCurlyNewline = [] | [(("always" | "never") | {
|
|
|
16409
16429
|
type YmlFlowMappingCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
16410
16430
|
arraysInObjects?: boolean;
|
|
16411
16431
|
objectsInObjects?: boolean;
|
|
16432
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
16412
16433
|
}]; // ----- yml/flow-sequence-bracket-newline -----
|
|
16413
16434
|
type YmlFlowSequenceBracketNewline = [] | [(("always" | "never" | "consistent") | {
|
|
16414
16435
|
multiline?: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./chunk-DM4wYaYk.mjs";import{FlatConfigComposer as t,renamePluginsInConfigs as n,renamePluginsInRules as r}from"eslint-flat-config-utils";import{getPackageInfo as i,isPackageExists as a}from"local-pkg";import{findWorkspaceDir as o}from"pkg-types";import s from"eslint-plugin-antfu";import 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 from"eslint-plugin-github-action";import*as _ from"yaml-eslint-parser";import ee from"eslint-config-flat-gitignore";import te from"@eslint/js";import ne from"@stylistic/eslint-plugin";import v from"globals";import re from"eslint-plugin-jsdoc";import y,{configs as b}from"eslint-plugin-jsonc";import*as x from"jsonc-eslint-parser";import S from"@eslint/markdown";import{mergeProcessors as ie,processorPassThrough as ae}from"eslint-merge-processors";import oe from"eslint-plugin-n";import C from"eslint-plugin-regexp";import w from"eslint-plugin-sonarjs";import*as T from"empathic/find";import E from"eslint-plugin-toml";import D from"eslint-plugin-unicorn";import se from"eslint-plugin-yml";const O=`**/*.?([cm])[jt]s?(x)`,k=`**/*.?([cm])ts`,A=`**/*.?([cm])tsx`,j=`.github/workflows/*.y?(a)ml`,M=`**/*.md`,ce=`${M}/${O}`,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:[O],name:`2digits:antfu`,plugins:{antfu:s},rules:{"antfu/top-level-function":`error`}}]}function F(){return[{files:[O],name:`2digits:boolean`,plugins:{boolean:c},rules:{...c.configs.recommended.rules}}]}const I={"@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/rsc":`react-rsc`,"@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-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=r(u.recommended.rules,I);function z(){return[{files:[O],name:`2digits:comments`,plugins:{comments:l},rules:{...R,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}async function B(e){if(e?.customSyntax)return e.customSyntax;if(e?.tailwindMajor===3)return f;if(e?.tailwindMajor===4)return p;try{let e=(await i(`tailwindcss`))?.version??``,t=Number.parseInt(e.split(`.`)[0]||`0`,10);if(Number.isFinite(t)&&t>=4)return p}catch{}return f}async function V(e={}){let t=await B(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 H(){return[{files:[O],name:`2digits:depend`,plugins:{depend:m},rules:{"depend/ban-dependencies":`warn`}}]}async function U(e){let t=await e;return t.default||t}async function W(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await U(import(`eslint-plugin-drizzle`));return[{files:[O],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 G=Object.fromEntries(g.configs.recommended.flatMap(({rules:e})=>Object.entries({...e})));function le(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":g}},{name:`2digits:github-actions/recommended`,files:[j],ignores:[`!**/${j}`],languageOptions:{parser:_},rules:{...G}}]}async function ue(e={}){let{overrides:t={},files:n=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([U(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=r(s,I);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:n,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function de(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[N,n].flat(),name:`2digits:ignores`},ee({strict:!1,...t,name:`2digits:gitignore`})]}function fe(e={}){let{overrides:t={}}=e;return[{files:[O],name:`2digits:javascript`,plugins:{stylistic:ne},languageOptions:{ecmaVersion:2022,globals:{...v.browser,...v.es2021,...v.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 pe(){return[{files:[O],name:`2digits:jsdoc`,plugins:{jsdoc:re},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 me(){return[...b[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...K,rules:{...q(b[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...K,rules:{...q(b[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...K,rules:{...q(b[`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$`}]}},...b[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const K={languageOptions:{parser:x},plugins:{jsonc:y}};function q(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const J=[M];function he(){return[{name:`2digits:markdown/setup`,plugins:{markdown:S}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:ie([S.processors.markdown,ae])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:_e}},{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 ge(){let e=await U(import(`typescript-eslint`)),t=await U(import(`@eslint-react/eslint-plugin`)),n=r({...e.configs.disableTypeChecked.rules,...t.configs[`disable-type-checked`].rules},I);return[{name:`2digits:markdown/disables`,files:[ce],languageOptions:{parser:e.parser,parserOptions:{project:!1,projectService:!1,ecmaFeatures:{impliedStrict:!0}}},rules:{...n,"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 _e={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 ve(e={}){let{files:t=[k,A],overrides:n={},parserOptions:i}=e,[a,o]=await Promise.all([U(import(`@next/eslint-plugin-next`)),U(import(`@typescript-eslint/parser`))]),s=r({...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`,...n}},{files:[`**/middleware.ts`,`**/proxy.ts`],name:`2digits:next/proxy`,rules:{"unicorn/prefer-string-raw":`off`}}]}var ye={node:`24.13.1`};function be(){return[{files:[O],name:`2digits:node`,settings:{node:{version:ye.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 xe(){let e=await U(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 U(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 Se(){let[e,t]=await Promise.all([U(import(`eslint-config-prettier`)),U(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 Ce(t={}){let{files:n=[k,A],overrides:i={},parserOptions:a,tsconfigRootDir:o,reactCompiler:s=!0}=t,[c,l,u,d,f]=await Promise.all([U(import(`@eslint-react/eslint-plugin`)),U(import(`./eslint-plugin-react-hooks-D4qV4W0R.mjs`).then(t=>e(t.default,1))),U(import(`@typescript-eslint/parser`)),s?U(import(`eslint-plugin-react-compiler`)):Promise.resolve(void 0),U(import(`@stylistic/eslint-plugin`))]),p=c.configs.all.plugins,m=r({...c.configs[`disable-conflict-eslint-plugin-react`].rules,...c.configs[`recommended-type-checked`].rules},I);return[{name:`2digits:react/setup`,plugins:{stylistic:f,"react-dom":p[`@eslint-react/dom`],"react-web-api":p[`@eslint-react/web-api`],"react-extra":p[`@eslint-react`],"react-hooks":l,"react-hooks-extra":p[`@eslint-react/hooks-extra`],"react-naming-convention":p[`@eslint-react/naming-convention`],"react-rsc":p[`@eslint-react/rsc`],...s?{"react-compiler":d}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:n,languageOptions:{parser:u,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:o,projectService:!0,...a},sourceType:`module`},rules:{...m,...s?{"react-compiler/react-compiler":`error`}:{},"react-extra/no-unnecessary-use-callback":`error`,"react-extra/prefer-use-state-lazy-initialization":`error`,"react-extra/no-unnecessary-use-prefix":`error`,"react-extra/no-unnecessary-use-memo":`error`,"react-extra/no-unnecessary-use-ref":`error`,"react-hooks-extra/no-direct-set-state-in-use-effect":`error`,"react-extra/no-useless-fragment":`off`,"react-extra/prefer-read-only-props":`off`,"react-extra/jsx-shorthand-boolean":`error`,"react-extra/jsx-shorthand-fragment":`error`,"react-extra/prefer-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`,"react-hooks/rules-of-hooks":`error`,"react-hooks/exhaustive-deps":`warn`,...i}}]}function we(){return[{files:[O],name:`2digits:regexp`,plugins:{regexp:C},rules:{...C.configs[`flat/recommended`].rules}}]}function Te(){return[{files:[O],name:`2digits:sonar`,plugins:{sonar:w},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 Ee(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([U(import(`eslint-plugin-storybook`)),U(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:{"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 De(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:r},i]=await Promise.all([U(import(`eslint-plugin-tailwindcss`)),U(import(`@2digits/constants`)),o().catch(()=>void 0)]),a=T.file(`tailwind.config.ts`,{last:i})??T.file(`tailwind.config.js`,{last:i});return[{files:[O],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:r,config:a}},rules:{...n.configs.recommended.rules,...t}}]}async function Oe(e={}){let{overrides:t={}}=e,n=await U(import(`@tanstack/eslint-plugin-query`)),i=r(n.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[O],name:`2digits:tanstack-query`,plugins:{"tanstack-query":n},rules:{...i,...t}}]}async function ke(e={}){let{overrides:t={}}=e,n=await U(import(`@tanstack/eslint-plugin-router`)),i=r(n.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[O],name:`2digits:tanstack-router`,plugins:{"tanstack-router":n},rules:{...i,"ts/only-throw-error":[`error`,{allow:[{from:`package`,package:`@tanstack/router-core`,name:`Redirect`}]}],...t}}]}const Ae=Object.fromEntries(E.configs.standard.flatMap(({rules:e})=>Object.entries({...e})));function je(){return[{name:`2digits:toml`,files:[`**/*.toml`],language:`toml/toml`,plugins:{toml:E},rules:{...Ae,"toml/array-bracket-spacing":[`error`,`never`],"toml/indent":[`error`,2,{keyValuePairs:1,subTables:1}]}}]}async function Y(e={}){let{overrides:t={}}=e,n=await U(import(`eslint-plugin-turbo`));return[{files:[O],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function Me(e={}){let{overrides:t={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([U(import(`typescript-eslint`)),U(import(`@2digits/eslint-plugin`))]),c=n(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:[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,...t}},{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 Ne(){return[{files:[O],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`}}]}function Pe(){return[{name:`2digits:yaml/setup`,plugins:{yml:se}},{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 Fe(e={}){let{overrides:t={}}=e,n=await U(import(`eslint-plugin-zod`));return[{files:[O],name:`2digits:zod`,plugins:{zod:n},rules:{"zod/array-style":[`error`,{style:`function`}],"zod/no-any-schema":`error`,"zod/no-empty-custom-schema":`error`,"zod/no-number-schema-with-int":`error`,"zod/no-optional-and-default-together":[`warn`,{preferredMethod:`default`}],"zod/no-throw-in-refine":`error`,"zod/prefer-enum-over-literal-union":`error`,"zod/prefer-meta":`error`,"zod/prefer-meta-last":`error`,"zod/consistent-import":[`error`,{syntax:`namespace`}],"zod/require-brand-type-parameter":`error`,"zod/require-schema-suffix":[`warn`,{suffix:`Schema`}],"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 $(e={},...n){let r;e.pnpm===void 0&&(r=o());let i=new t(de(e.ignores),fe(e.js),F(),be(),z(),pe(),Ne(),Te(),we(),P(),me(),je(),Pe(),he(),le());Z(e.css)&&(i=i.append(V(Q(e.css)))),Z(e.depend,!0)&&(i=i.append(H())),Z(e.turbo,a(`turbo`))&&(i=i.append(Y(Q(e.turbo))));let{overrides:s,...c}=Q(e.ts);return Z(e.ts,a(`typescript`))&&(i=i.append(Me(Q(e.ts)))),Z(e.react,a(`react`))&&(i=i.append(Ce({...Q(e.react),...c}))),Z(e.next,a(`next`))&&(i=i.append(ve({...Q(e.next),...c}))),Z(e.storybook,L.some(e=>a(e)))&&(i=i.append(Ee({...Q(e.storybook),...c}))),Z(e.tailwind,a(`tailwindcss`))&&(i=i.append(De(Q(e.tailwind)))),Z(e.tanstackQuery,a(`react-query`)||a(`@tanstack/react-query`)||a(`@tanstack/react-query-devtools`))&&(i=i.append(Oe(Q(e.tanstackQuery)))),Z(e.tanstackRouter,a(`@tanstack/react-router`))&&(i=i.append(ke(Q(e.tanstackRouter)))),Z(e.drizzle,a(`drizzle-kit`)||a(`drizzle-orm`))&&(i=i.append(W(Q(e.drizzle)))),Z(e.zod,a(`zod`))&&(i=i.append(Fe(Q(e.zod)))),Z(e.graphql,a(`graphql`))&&(i=i.append(ue(Q(e.graphql)))),Z(e.pnpm,!!await r)&&(i=i.append(xe())),i=i.append(...n),a(`prettier`)&&(i=i.append(Se())),i=i.append(ge()),i.renamePlugins(I).toConfigs()}export{$ as default,$ as twoDigits};
|
|
1
|
+
import{i as e}from"./chunk-DM4wYaYk.mjs";import{FlatConfigComposer as t,renamePluginsInConfigs as n,renamePluginsInRules as r}from"eslint-flat-config-utils";import{getPackageInfo as i,isPackageExists as a}from"local-pkg";import{findWorkspaceDir as o}from"pkg-types";import s from"eslint-plugin-antfu";import 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 from"eslint-plugin-github-action";import*as _ from"yaml-eslint-parser";import ee from"eslint-config-flat-gitignore";import te from"@eslint/js";import ne from"@stylistic/eslint-plugin";import v from"globals";import re from"eslint-plugin-jsdoc";import y,{configs as b}from"eslint-plugin-jsonc";import*as x from"jsonc-eslint-parser";import S from"@eslint/markdown";import{mergeProcessors as ie,processorPassThrough as ae}from"eslint-merge-processors";import oe from"eslint-plugin-n";import C from"eslint-plugin-regexp";import w from"eslint-plugin-sonarjs";import*as T from"empathic/find";import E from"eslint-plugin-toml";import D from"eslint-plugin-unicorn";import se from"eslint-plugin-yml";const O=`**/*.?([cm])[jt]s?(x)`,k=`**/*.?([cm])ts`,A=`**/*.?([cm])tsx`,j=`.github/workflows/*.y?(a)ml`,M=`**/*.md`,ce=`${M}/${O}`,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:[O],name:`2digits:antfu`,plugins:{antfu:s},rules:{"antfu/top-level-function":`error`}}]}function F(){return[{files:[O],name:`2digits:boolean`,plugins:{boolean:c},rules:{...c.configs.recommended.rules}}]}const I={"@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/rsc":`react-rsc`,"@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-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=r(u.recommended.rules,I);function z(){return[{files:[O],name:`2digits:comments`,plugins:{comments:l},rules:{...R,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}async function B(e){if(e?.customSyntax)return e.customSyntax;if(e?.tailwindMajor===3)return f;if(e?.tailwindMajor===4)return p;try{let e=(await i(`tailwindcss`))?.version??``,t=Number.parseInt(e.split(`.`)[0]||`0`,10);if(Number.isFinite(t)&&t>=4)return p}catch{}return f}async function V(e={}){let t=await B(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 H(){return[{files:[O],name:`2digits:depend`,plugins:{depend:m},rules:{"depend/ban-dependencies":`warn`}}]}async function U(e){let t=await e;return t.default||t}async function W(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await U(import(`eslint-plugin-drizzle`));return[{files:[O],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 G=Object.fromEntries(g.configs.recommended.flatMap(({rules:e})=>Object.entries({...e})));function le(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":g}},{name:`2digits:github-actions/recommended`,files:[j],ignores:[`!**/${j}`],languageOptions:{parser:_},rules:{...G}}]}async function ue(e={}){let{overrides:t={},files:n=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([U(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=r(s,I);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:n,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function de(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[N,n].flat(),name:`2digits:ignores`},ee({strict:!1,...t,name:`2digits:gitignore`})]}function fe(e={}){let{overrides:t={}}=e;return[{files:[O],name:`2digits:javascript`,plugins:{stylistic:ne},languageOptions:{ecmaVersion:2022,globals:{...v.browser,...v.es2021,...v.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 pe(){return[{files:[O],name:`2digits:jsdoc`,plugins:{jsdoc:re},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 me(){return[...b[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...K,rules:{...q(b[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...K,rules:{...q(b[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...K,rules:{...q(b[`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$`}]}},...b[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const K={languageOptions:{parser:x},plugins:{jsonc:y}};function q(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const J=[M];function he(){return[{name:`2digits:markdown/setup`,plugins:{markdown:S}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:ie([S.processors.markdown,ae])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:_e}},{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 ge(){let e=await U(import(`typescript-eslint`)),t=await U(import(`@eslint-react/eslint-plugin`)),n=r({...e.configs.disableTypeChecked.rules,...t.configs[`disable-type-checked`].rules},I);return[{name:`2digits:markdown/disables`,files:[ce],languageOptions:{parser:e.parser,parserOptions:{project:!1,projectService:!1,ecmaFeatures:{impliedStrict:!0}}},rules:{...n,"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 _e={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 ve(e={}){let{files:t=[k,A],overrides:n={},parserOptions:i}=e,[a,o]=await Promise.all([U(import(`@next/eslint-plugin-next`)),U(import(`@typescript-eslint/parser`))]),s=r({...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`,...n}},{files:[`**/middleware.ts`,`**/proxy.ts`],name:`2digits:next/proxy`,rules:{"unicorn/prefer-string-raw":`off`}}]}var ye={node:`24.14.0`};function be(){return[{files:[O],name:`2digits:node`,settings:{node:{version:ye.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 xe(){let e=await U(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 U(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 Se(){let[e,t]=await Promise.all([U(import(`eslint-config-prettier`)),U(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 Ce(t={}){let{files:n=[k,A],overrides:i={},parserOptions:a,tsconfigRootDir:o,reactCompiler:s=!0}=t,[c,l,u,d,f]=await Promise.all([U(import(`@eslint-react/eslint-plugin`)),U(import(`./eslint-plugin-react-hooks-D4qV4W0R.mjs`).then(t=>e(t.default,1))),U(import(`@typescript-eslint/parser`)),s?U(import(`eslint-plugin-react-compiler`)):Promise.resolve(void 0),U(import(`@stylistic/eslint-plugin`))]),p=c.configs.all.plugins,m=r({...c.configs[`disable-conflict-eslint-plugin-react`].rules,...c.configs[`recommended-type-checked`].rules},I);return[{name:`2digits:react/setup`,plugins:{stylistic:f,"react-dom":p[`@eslint-react/dom`],"react-web-api":p[`@eslint-react/web-api`],"react-extra":p[`@eslint-react`],"react-hooks":l,"react-hooks-extra":p[`@eslint-react/hooks-extra`],"react-naming-convention":p[`@eslint-react/naming-convention`],"react-rsc":p[`@eslint-react/rsc`],...s?{"react-compiler":d}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:n,languageOptions:{parser:u,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:o,projectService:!0,...a},sourceType:`module`},rules:{...m,...s?{"react-compiler/react-compiler":`error`}:{},"react-extra/no-unnecessary-use-callback":`error`,"react-extra/prefer-use-state-lazy-initialization":`error`,"react-extra/no-unnecessary-use-prefix":`error`,"react-extra/no-unnecessary-use-memo":`error`,"react-extra/no-unnecessary-use-ref":`error`,"react-hooks-extra/no-direct-set-state-in-use-effect":`error`,"react-extra/no-useless-fragment":`off`,"react-extra/prefer-read-only-props":`off`,"react-extra/jsx-shorthand-boolean":`error`,"react-extra/jsx-shorthand-fragment":`error`,"react-extra/prefer-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`,"react-hooks/rules-of-hooks":`error`,"react-hooks/exhaustive-deps":`warn`,...i}}]}function we(){return[{files:[O],name:`2digits:regexp`,plugins:{regexp:C},rules:{...C.configs[`flat/recommended`].rules}}]}function Te(){return[{files:[O],name:`2digits:sonar`,plugins:{sonar:w},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 Ee(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([U(import(`eslint-plugin-storybook`)),U(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:{"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 De(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:r},i]=await Promise.all([U(import(`eslint-plugin-tailwindcss`)),U(import(`@2digits/constants`)),o().catch(()=>void 0)]),a=T.file(`tailwind.config.ts`,{last:i})??T.file(`tailwind.config.js`,{last:i});return[{files:[O],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:r,config:a}},rules:{...n.configs.recommended.rules,...t}}]}async function Oe(e={}){let{overrides:t={}}=e,n=await U(import(`@tanstack/eslint-plugin-query`)),i=r(n.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[O],name:`2digits:tanstack-query`,plugins:{"tanstack-query":n},rules:{...i,...t}}]}async function ke(e={}){let{overrides:t={}}=e,n=await U(import(`@tanstack/eslint-plugin-router`)),i=r(n.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[O],name:`2digits:tanstack-router`,plugins:{"tanstack-router":n},rules:{...i,"ts/only-throw-error":[`error`,{allow:[{from:`package`,package:`@tanstack/router-core`,name:`Redirect`}]}],...t}}]}const Ae=Object.fromEntries(E.configs.standard.flatMap(({rules:e})=>Object.entries({...e})));function je(){return[{name:`2digits:toml`,files:[`**/*.toml`],language:`toml/toml`,plugins:{toml:E},rules:{...Ae,"toml/array-bracket-spacing":[`error`,`never`],"toml/indent":[`error`,2,{keyValuePairs:1,subTables:1}]}}]}async function Y(e={}){let{overrides:t={}}=e,n=await U(import(`eslint-plugin-turbo`));return[{files:[O],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function Me(e={}){let{overrides:t={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([U(import(`typescript-eslint`)),U(import(`@2digits/eslint-plugin`))]),c=n(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:[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,...t}},{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 Ne(){return[{files:[O],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`}}]}function Pe(){return[{name:`2digits:yaml/setup`,plugins:{yml:se}},{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 Fe(e={}){let{overrides:t={}}=e,n=await U(import(`eslint-plugin-zod`));return[{files:[O],name:`2digits:zod`,plugins:{zod:n},rules:{"zod/array-style":[`error`,{style:`function`}],"zod/no-any-schema":`error`,"zod/no-empty-custom-schema":`error`,"zod/no-number-schema-with-int":`error`,"zod/no-optional-and-default-together":[`warn`,{preferredMethod:`default`}],"zod/no-throw-in-refine":`error`,"zod/prefer-enum-over-literal-union":`error`,"zod/prefer-meta":`error`,"zod/prefer-meta-last":`error`,"zod/consistent-import":[`error`,{syntax:`namespace`}],"zod/require-brand-type-parameter":`error`,"zod/require-schema-suffix":[`warn`,{suffix:`Schema`}],"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 $(e={},...n){let r;e.pnpm===void 0&&(r=o());let i=new t(de(e.ignores),fe(e.js),F(),be(),z(),pe(),Ne(),Te(),we(),P(),me(),je(),Pe(),he(),le());Z(e.css)&&(i=i.append(V(Q(e.css)))),Z(e.depend,!0)&&(i=i.append(H())),Z(e.turbo,a(`turbo`))&&(i=i.append(Y(Q(e.turbo))));let{overrides:s,...c}=Q(e.ts);return Z(e.ts,a(`typescript`))&&(i=i.append(Me(Q(e.ts)))),Z(e.react,a(`react`))&&(i=i.append(Ce({...Q(e.react),...c}))),Z(e.next,a(`next`))&&(i=i.append(ve({...Q(e.next),...c}))),Z(e.storybook,L.some(e=>a(e)))&&(i=i.append(Ee({...Q(e.storybook),...c}))),Z(e.tailwind,a(`tailwindcss`))&&(i=i.append(De(Q(e.tailwind)))),Z(e.tanstackQuery,a(`react-query`)||a(`@tanstack/react-query`)||a(`@tanstack/react-query-devtools`))&&(i=i.append(Oe(Q(e.tanstackQuery)))),Z(e.tanstackRouter,a(`@tanstack/react-router`))&&(i=i.append(ke(Q(e.tanstackRouter)))),Z(e.drizzle,a(`drizzle-kit`)||a(`drizzle-orm`))&&(i=i.append(W(Q(e.drizzle)))),Z(e.zod,a(`zod`))&&(i=i.append(Fe(Q(e.zod)))),Z(e.graphql,a(`graphql`))&&(i=i.append(ue(Q(e.graphql)))),Z(e.pnpm,!!await r)&&(i=i.append(xe())),i=i.append(...n),a(`prettier`)&&(i=i.append(Se())),i=i.append(ge()),i.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.1.
|
|
3
|
+
"version": "5.1.13",
|
|
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": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@stylistic/eslint-plugin": "5.9.0",
|
|
36
36
|
"@tanstack/eslint-plugin-query": "5.91.4",
|
|
37
37
|
"@tanstack/eslint-plugin-router": "1.161.4",
|
|
38
|
-
"@typescript-eslint/parser": "8.56.
|
|
39
|
-
"@typescript-eslint/utils": "8.56.
|
|
38
|
+
"@typescript-eslint/parser": "8.56.1",
|
|
39
|
+
"@typescript-eslint/utils": "8.56.1",
|
|
40
40
|
"empathic": "2.0.0",
|
|
41
41
|
"eslint-config-flat-gitignore": "2.2.1",
|
|
42
42
|
"eslint-config-prettier": "10.1.8",
|
|
@@ -47,19 +47,19 @@
|
|
|
47
47
|
"eslint-plugin-depend": "1.4.0",
|
|
48
48
|
"eslint-plugin-drizzle": "0.2.3",
|
|
49
49
|
"eslint-plugin-github-action": "0.1.0",
|
|
50
|
-
"eslint-plugin-jsdoc": "62.7.
|
|
51
|
-
"eslint-plugin-jsonc": "3.
|
|
50
|
+
"eslint-plugin-jsdoc": "62.7.1",
|
|
51
|
+
"eslint-plugin-jsonc": "3.1.0",
|
|
52
52
|
"eslint-plugin-n": "17.24.0",
|
|
53
|
-
"eslint-plugin-pnpm": "1.
|
|
53
|
+
"eslint-plugin-pnpm": "1.6.0",
|
|
54
54
|
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
55
55
|
"eslint-plugin-regexp": "3.0.0",
|
|
56
56
|
"eslint-plugin-sonarjs": "4.0.0",
|
|
57
|
-
"eslint-plugin-storybook": "10.2.
|
|
57
|
+
"eslint-plugin-storybook": "10.2.12",
|
|
58
58
|
"eslint-plugin-tailwindcss": "3.18.2",
|
|
59
|
-
"eslint-plugin-toml": "1.
|
|
59
|
+
"eslint-plugin-toml": "1.3.0",
|
|
60
60
|
"eslint-plugin-turbo": "2.8.10",
|
|
61
61
|
"eslint-plugin-unicorn": "63.0.0",
|
|
62
|
-
"eslint-plugin-yml": "3.
|
|
62
|
+
"eslint-plugin-yml": "3.3.0",
|
|
63
63
|
"eslint-plugin-zod": "3.1.0",
|
|
64
64
|
"globals": "17.3.0",
|
|
65
65
|
"graphql-config": "5.1.5",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"local-pkg": "1.1.2",
|
|
68
68
|
"pkg-types": "2.3.0",
|
|
69
69
|
"tailwind-csstree": "0.1.4",
|
|
70
|
-
"typescript-eslint": "8.56.
|
|
70
|
+
"typescript-eslint": "8.56.1",
|
|
71
71
|
"yaml-eslint-parser": "2.0.0",
|
|
72
72
|
"@2digits/constants": "1.1.16",
|
|
73
73
|
"@2digits/eslint-plugin": "4.0.4"
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"@arethetypeswrong/core": "0.18.2",
|
|
77
77
|
"@eslint/config-inspector": "1.4.2",
|
|
78
78
|
"@types/react": "19.2.14",
|
|
79
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
79
|
+
"@typescript/native-preview": "7.0.0-dev.20260225.1",
|
|
80
80
|
"dedent": "1.7.1",
|
|
81
|
-
"eslint": "10.0.
|
|
81
|
+
"eslint": "10.0.2",
|
|
82
82
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
83
83
|
"eslint-typegen": "2.3.1",
|
|
84
84
|
"publint": "0.3.17",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@2digits/tsconfig": "0.8.6"
|
|
93
93
|
},
|
|
94
94
|
"engines": {
|
|
95
|
-
"node": "24.
|
|
95
|
+
"node": "24.14.0"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|
|
98
98
|
"build": "tsdown --minify --config-loader unconfig",
|