@2digits/eslint-config 4.0.2 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +439 -5
- package/dist/index.d.ts +439 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +10 -8
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import ie from'eslint-plugin-antfu';import D from'eslint-plugin-de-morgan';import ae from'@eslint-community/eslint-plugin-eslint-comments';import pe from'@eslint-community/eslint-plugin-eslint-comments/configs';import {renamePluginsInRules,composer,renamePluginsInConfigs,FlatConfigComposer}from'eslint-flat-config-utils';import G from'@eslint/css';import {tailwindSyntax}from'@eslint/css/syntax';import {fixupPluginRules}from'@eslint/compat';import {loadConfig}from'graphql-config';import ye from'@eslint/js';import be from'@stylistic/eslint-plugin';import v from'globals';import he,{configs}from'eslint-plugin-jsonc';import Oe from'jsonc-eslint-parser';import j from'eslint-plugin-unicorn';import J from'eslint-plugin-n';import $ from'eslint-plugin-sonarjs';import K from'eslint-plugin-regexp';import {findUp}from'find-up';import {isPackageExists}from'local-pkg';var n="**/*.?([cm])[jt]s?(x)",k="**/*.?([cm])ts",w="**/*.?([cm])tsx",C="**/*.stories.tsx",S="**/*.json",I="**/*.json5",F="**/*.jsonc",P="**/*.css",_=["**/node_modules","**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/bun.lockb","**/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"];function L(){return [{files:[n],name:"2digits:antfu",plugins:{antfu:ie},rules:{"antfu/if-newline":"error","antfu/top-level-function":"error"}}]}function R(){return [{files:[n],name:"2digits:boolean",plugins:{boolean:D},rules:{...D.configs.recommended.rules}}]}var l={"@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"};var ce=renamePluginsInRules(pe.recommended.rules,l);function z(){return [{files:[n],name:"2digits:comments",plugins:{comments:ae},rules:{...ce,"comments/no-unused-disable":"error","comments/disable-enable-pair":["error",{allowWholeFile:true}]}}]}function q(){return [{name:"2digits:css",files:[P],language:"css/css",plugins:{css:G},languageOptions:{tolerant:true,customSyntax:tailwindSyntax},rules:{...G.configs.recommended.rules}}]}async function t(e){let o=await e;return o.default||o}async function B(e={}){let{overrides:o={},drizzleObjectName:r=["drizzle","db"]}=e,a=await t(import('eslint-plugin-drizzle'));return [{files:[n],name:"2digits:drizzle",plugins:{drizzle:fixupPluginRules(a)},rules:{"drizzle/enforce-update-with-where":["error",{drizzleObjectName:r}],"drizzle/enforce-delete-with-where":["error",{drizzleObjectName:r}],...o}}]}async function W(e={}){let{overrides:o={},files:r=["**/*.graphql","**/*.gql"]}=e,[a,p]=await Promise.all([t(import('@graphql-eslint/eslint-plugin')),loadConfig({throwOnEmpty:false,throwOnMissing:false}).then(g=>g?.getDefault().schema)]),c=a.configs["flat/operations-recommended"].rules,m={};if(p)m=c;else for(let g of Object.keys(c)){let b=g.replace("@graphql-eslint/","");b in a.rules&&(a.rules[b].meta.docs?.requiresSchema||a.rules[b].meta.docs?.requiresSiblings)||(m[g]=c[g]);}let f=renamePluginsInRules(m,l);return [{name:"2digits:graphql",plugins:{gql:a},languageOptions:{parser:a.parser},files:r,rules:{...f,"gql/naming-convention":["error",{allowLeadingUnderscore:true}],...o}}]}async function N(e={}){let{gitIgnore:o,ignores:r=[]}=e;return composer({ignores:[_,r].flat(),name:"2digits:ignores"},t(import('eslint-config-flat-gitignore')).then(a=>a({strict:false,...o,name:"2digits:gitignore"})))}function E(e={}){let{overrides:o={}}=e;return [{files:[n],name:"2digits:javascript",plugins:{stylistic:be},languageOptions:{ecmaVersion:2022,globals:{...v.browser,...v.es2021,...v.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:true},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:true},rules:{...ye.configs.recommended.rules,"accessor-pairs":["error",{enforceForClassMembers:true,setWithoutGet:true}],"array-callback-return":"error","block-scoped-var":"error","constructor-super":"error","default-case-last":"error","dot-notation":["error",{allowKeywords:true}],eqeqeq:["error","smart"],"new-cap":["error",{capIsNew:false,newIsCap:true,properties:true}],"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:true}],"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:false,allowSwitch:false}],"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:false}],"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:true}],"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:false}],"no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unused-expressions":["error",{allowShortCircuit:true,allowTaggedTemplates:true,allowTernary:true}],"no-unused-vars":["error",{args:"none",caughtErrors:"none",ignoreRestSiblings:true,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:true,ignoreConstructors:false}],"one-var":["error",{initialized:"never"}],"prefer-arrow-callback":["error",{allowNamedFunctions:true,allowUnboundThis:true}],"prefer-const":["error",{destructuring:"all",ignoreReadBeforeAssign:true}],"prefer-exponentiation-operator":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:true}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","symbol-description":"error","unicode-bom":["error","never"],"use-isnan":["error",{enforceForIndexOf:true,enforceForSwitchCase:true}],"valid-typeof":["error",{requireStringLiterals:true}],"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"}],...o}}]}async function U(){return [{files:[n],name:"2digits:jsdoc",plugins:{jsdoc:await t(import('eslint-plugin-jsdoc'))},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 M(){return [...configs["flat/base"].map(e=>({...e,name:"2digits:jsonc/base"})),{name:"2digits:jsonc/json",files:[S],...x,rules:{...T(configs["flat/recommended-with-json"])}},{name:"2digits:jsonc/jsonc",files:[F],...x,rules:{...T(configs["flat/recommended-with-jsonc"])}},{name:"2digits:jsonc/json5",files:[I],...x,rules:{...T(configs["flat/recommended-with-json5"])}},{name:"2digits:jsonc/package.json",...x,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"],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",...x,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"],pathPattern:"^compilerOptions$"}]}},...configs["flat/prettier"].map(e=>({...e,name:"2digits:jsonc/prettier"}))]}var x={languageOptions:{parser:Oe},plugins:{jsonc:he}};function T(e){return Object.fromEntries(e.flatMap(({rules:o})=>Object.entries(o??{})))}async function A(e={}){let{files:o=[k,w],overrides:r={},parserOptions:a}=e,[p,c]=await Promise.all([t(import('@next/eslint-plugin-next')),t(import('@typescript-eslint/parser'))]),m=renamePluginsInRules({...p.configs.recommended.rules,...p.configs["core-web-vitals"].rules},l);return [{name:"2digits:next/setup",plugins:{next:fixupPluginRules(p)}},{name:"2digits:next/rules",files:o,languageOptions:{parser:c,parserOptions:{ecmaFeatures:{jsx:true},projectService:true,...a},sourceType:"module"},rules:{...m,"next/no-html-link-for-pages":"off",...r}}]}function V(){return [{files:[n],name:"2digits:node",settings:{node:{version:">= 22.0.0"}},plugins:{node:J},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:true}],"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 H(){let[e,o]=await Promise.all([t(import('eslint-config-prettier')),t(import('@stylistic/eslint-plugin'))]);return [{name:"2digits:prettier",plugins:{stylistic:o},rules:{...e.rules,"tailwindcss/classnames-order":"off","stylistic/jsx-newline":["error",{prevent:false}]}}]}async function X(e={}){let{files:o=[k,w],overrides:r={},parserOptions:a,tsconfigRootDir:p,reactCompiler:c=true}=e,[m,f,g,b]=await Promise.all([t(import('@eslint-react/eslint-plugin')),t(import('eslint-plugin-react-hooks')),t(import('@typescript-eslint/parser')),c?t(import('eslint-plugin-react-compiler')):void 0]),h=m.configs.all.plugins,se=renamePluginsInRules({...f.configs["recommended-latest"].rules,...m.configs["recommended-type-checked"].rules},l);return [{name:"2digits:react/setup",plugins:{stylistic:be,"react-dom":h["@eslint-react/dom"],"react-web-api":h["@eslint-react/web-api"],"react-extra":h["@eslint-react"],"react-hooks":f,"react-hooks-extra":h["@eslint-react/hooks-extra"],"react-naming-convention":h["@eslint-react/naming-convention"],...c?{"react-compiler":b}:{}},settings:{react:{version:"detect"}}},{name:"2digits:react/rules",files:o,languageOptions:{parser:g,parserOptions:{ecmaFeatures:{jsx:true},tsconfigRootDir:p,projectService:true,...a},sourceType:"module"},rules:{...se,...c?{"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/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:false}],"stylistic/jsx-self-closing-comp":"error",...r}}]}function Q(){return [{files:[n],name:"2digits:regexp",plugins:{regexp:K},rules:{...K.configs["flat/recommended"].rules}}]}function Y(){return [{files:[n],name:"2digits:sonar",plugins:{sonar:$},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 Z(e={}){let{files:o=[C],overrides:r={},parserOptions:a,storybookDirectory:p=".storybook"}=e,[c,m]=await Promise.all([t(import('eslint-plugin-storybook')),t(import('@typescript-eslint/parser'))]),f={parser:m,parserOptions:{ecmaFeatures:{jsx:true},projectService:true,...a},sourceType:"module"};return [{name:"2digits:storybook/setup",plugins:{storybook:fixupPluginRules(c)}},{name:"2digits:storybook/rules",files:o,languageOptions:f,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",...r}},{name:"2digits:storybook/disables",files:o,rules:{"react-hooks/rules-of-hooks":"off","react/display-name":"off","sonar/no-duplicate-string":"off"}},{name:"2digits:storybook/config",files:[`${p}/main.@(js|cjs|mjs|ts)`],languageOptions:f,rules:{"storybook/no-uninstalled-addons":"error"}}]}async function ee(e={}){let{overrides:o={}}=e,[r,{tailwindFunctions:a},p]=await Promise.all([t(import('eslint-plugin-tailwindcss')),t(import('@2digits/constants')),findUp(["tailwind.config.ts","tailwind.config.js"])]);return [{files:[n],name:"2digits:tailwind",plugins:{tailwindcss:r},settings:{tailwindcss:{callees:a,config:p}},rules:{...r.configs.recommended.rules,...o}}]}async function re(e={}){let{overrides:o={}}=e,r=await t(import('@tanstack/eslint-plugin-query')),a=renamePluginsInRules(r.configs["flat/recommended"].at(0)?.rules??{},l);return [{files:[n],name:"2digits:tanstack",plugins:{tanstack:r},rules:{...a,...o}}]}async function oe(e={}){let{overrides:o={}}=e,r=await t(import('eslint-plugin-turbo'));return [{files:[n],name:"2digits:turbo",plugins:{turbo:r},rules:{"turbo/no-undeclared-env-vars":"error",...o}}]}async function te(e={}){let{overrides:o={},parserOptions:r={}}=e,[{plugin:a,configs:p,parser:c},m]=await Promise.all([t(import('typescript-eslint')),t(import('@2digits/eslint-plugin'))]),f=renamePluginsInConfigs(p.strictTypeChecked,l),g=Object.fromEntries(f.flatMap(({rules:b})=>Object.entries(b??{})));return [{name:"2digits:typescript/setup",plugins:{ts:a,"@2digits":m}},{name:"2digits:typescript/rules",files:[n],languageOptions:{parser:c,parserOptions:{tsconfigRootDir:process.cwd(),projectService:true,warnOnUnsupportedTypeScriptVersion:false,...r},sourceType:"module"},rules:{...g,"ts/restrict-template-expressions":["error",{allowNumber:true}],"ts/ban-ts-comment":["error",{"ts-ignore":"allow-with-description"}],"ts/consistent-type-exports":["error"],"ts/consistent-type-imports":["error",{prefer:"type-imports",disallowTypeAnnotations:false,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:true,argsIgnorePattern:"^_",varsIgnorePattern:"^_"}],"ts/unbound-method":"off",...m.configs.recommended.rules,...o}},{files:["**/*.d.ts"],name:"2digits:typescript/disables/dts",rules:{"unicorn/no-abusive-eslint-disable":"off","no-duplicate-imports":"off","no-restricted-syntax":"off","ts/no-unused-vars":"off"}},{files:["**/*.{test,spec}.ts?(x)"],name:"2digits:typescript/disables/test",rules:{"no-unused-expressions":"off"}},{files:["**/*.js","**/*.cjs","**/*.cts"],name:"2digits:typescript/disables/cjs",rules:{"ts/no-require-imports":"off","ts/no-var-requires":"off"}}]}function ne(){return [{files:[n],name:"2digits:unicorn",plugins:{unicorn:j},rules:{...j.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:false,checkArrowFunctionBody:false}],"unicorn/prefer-top-level-await":["off"]}}]}function y(e,o){return typeof e=="boolean"?e:e?.enable??o??false}function u(e){if(typeof e=="boolean"||e===void 0)return {};let{enable:o,...r}=e;return r}function Fe(e={},...o){let r=new FlatConfigComposer(N(e.ignores),E(e.js),R(),V(),z(),U(),ne(),Y(),Q(),L(),M(),q());y(e.turbo,isPackageExists("turbo"))&&(r=r.append(oe(u(e.turbo))));let{overrides:a,...p}=u(e.ts);return y(e.ts,isPackageExists("typescript"))&&(r=r.append(te(u(e.ts)))),y(e.react,isPackageExists("react"))&&(r=r.append(X({...u(e.react),...p}))),y(e.next,isPackageExists("next"))&&(r=r.append(A({...u(e.next),...p}))),y(e.storybook,isPackageExists("storybook"))&&(r=r.append(Z({...u(e.storybook),...p}))),y(e.tailwind,isPackageExists("tailwindcss"))&&(r=r.append(ee(u(e.tailwind)))),y(e.tanstack,isPackageExists("react-query")||isPackageExists("@tanstack/react-query")||isPackageExists("@tanstack/react-query-devtools"))&&(r=r.append(re(u(e.tanstack)))),y(e.drizzle,isPackageExists("drizzle-kit")||isPackageExists("drizzle-orm"))&&(r=r.append(B(u(e.drizzle)))),y(e.graphql,isPackageExists("graphql"))&&(r=r.append(W(u(e.graphql)))),r=r.append(...o),isPackageExists("prettier")&&(r=r.append(H())),r.renamePlugins(l).toConfigs()}export{L as antfu,R as boolean,z as comments,q as css,Fe as default,B as drizzle,W as graphql,N as ignores,E as javascript,U as jsdoc,M as jsonc,A as next,V as node,H as prettier,X as react,Q as regexp,Y as sonar,Z as storybook,ee as tailwind,re as tanstack,oe as turbo,Fe as twoDigits,te as typescript,ne as unicorn};//# sourceMappingURL=index.js.map
|
|
1
|
+
import ce from'eslint-plugin-antfu';import z from'eslint-plugin-de-morgan';import me from'@eslint-community/eslint-plugin-eslint-comments';import de from'@eslint-community/eslint-plugin-eslint-comments/configs';import {renamePluginsInRules,composer,renamePluginsInConfigs,FlatConfigComposer}from'eslint-flat-config-utils';import G from'@eslint/css';import {tailwindSyntax}from'@eslint/css/syntax';import {fixupPluginRules}from'@eslint/compat';import {loadConfig}from'graphql-config';import xe from'@eslint/js';import ke from'@stylistic/eslint-plugin';import T from'globals';import we,{configs}from'eslint-plugin-jsonc';import ve from'jsonc-eslint-parser';import C from'eslint-plugin-unicorn';import V from'eslint-plugin-n';import H from'eslint-plugin-sonarjs';import Se from'yaml-eslint-parser';import Z from'eslint-plugin-regexp';import {findUp}from'find-up';import Re from'eslint-plugin-yml';import {isPackageExists}from'local-pkg';var i="**/*.?([cm])[jt]s?(x)",w="**/*.?([cm])ts",v="**/*.?([cm])tsx",S="**/*.stories.tsx",I="**/*.json",F="**/*.json5",P="**/*.jsonc",D="**/*.css",_="**/*.ya?ml",L=["**/node_modules","**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/bun.lockb","**/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"];function R(){return [{files:[i],name:"2digits:antfu",plugins:{antfu:ce},rules:{"antfu/if-newline":"error","antfu/top-level-function":"error"}}]}function q(){return [{files:[i],name:"2digits:boolean",plugins:{boolean:z},rules:{...z.configs.recommended.rules}}]}var c={"@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"};var fe=renamePluginsInRules(de.recommended.rules,c);function B(){return [{files:[i],name:"2digits:comments",plugins:{comments:me},rules:{...fe,"comments/no-unused-disable":"error","comments/disable-enable-pair":["error",{allowWholeFile:true}]}}]}function W(){return [{name:"2digits:css",files:[D],language:"css/css",plugins:{css:G},languageOptions:{tolerant:true,customSyntax:tailwindSyntax},rules:{...G.configs.recommended.rules}}]}async function t(e){let o=await e;return o.default||o}async function N(e={}){let{overrides:o={},drizzleObjectName:a=["drizzle","db"]}=e,r=await t(import('eslint-plugin-drizzle'));return [{files:[i],name:"2digits:drizzle",plugins:{drizzle:fixupPluginRules(r)},rules:{"drizzle/enforce-update-with-where":["error",{drizzleObjectName:a}],"drizzle/enforce-delete-with-where":["error",{drizzleObjectName:a}],...o}}]}async function E(e={}){let{overrides:o={},files:a=["**/*.graphql","**/*.gql"]}=e,[r,l]=await Promise.all([t(import('@graphql-eslint/eslint-plugin')),loadConfig({throwOnEmpty:false,throwOnMissing:false}).then(y=>y?.getDefault().schema)]),p=r.configs["flat/operations-recommended"].rules,m={};if(l)m=p;else for(let y of Object.keys(p)){let b=y.replace("@graphql-eslint/","");b in r.rules&&(r.rules[b].meta.docs?.requiresSchema||r.rules[b].meta.docs?.requiresSiblings)||(m[y]=p[y]);}let g=renamePluginsInRules(m,c);return [{name:"2digits:graphql",plugins:{gql:r},languageOptions:{parser:r.parser},files:a,rules:{...g,"gql/naming-convention":["error",{allowLeadingUnderscore:true}],...o}}]}async function M(e={}){let{gitIgnore:o,ignores:a=[]}=e;return composer({ignores:[L,a].flat(),name:"2digits:ignores"},t(import('eslint-config-flat-gitignore')).then(r=>r({strict:false,...o,name:"2digits:gitignore"})))}function U(e={}){let{overrides:o={}}=e;return [{files:[i],name:"2digits:javascript",plugins:{stylistic:ke},languageOptions:{ecmaVersion:2022,globals:{...T.browser,...T.es2021,...T.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:true},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:true},rules:{...xe.configs.recommended.rules,"accessor-pairs":["error",{enforceForClassMembers:true,setWithoutGet:true}],"array-callback-return":"error","block-scoped-var":"error","constructor-super":"error","default-case-last":"error","dot-notation":["error",{allowKeywords:true}],eqeqeq:["error","smart"],"new-cap":["error",{capIsNew:false,newIsCap:true,properties:true}],"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:true}],"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:false,allowSwitch:false}],"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:false}],"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:true}],"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:false}],"no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unused-expressions":["error",{allowShortCircuit:true,allowTaggedTemplates:true,allowTernary:true}],"no-unused-vars":["error",{args:"none",caughtErrors:"none",ignoreRestSiblings:true,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:true,ignoreConstructors:false}],"one-var":["error",{initialized:"never"}],"prefer-arrow-callback":["error",{allowNamedFunctions:true,allowUnboundThis:true}],"prefer-const":["error",{destructuring:"all",ignoreReadBeforeAssign:true}],"prefer-exponentiation-operator":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:true}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","symbol-description":"error","unicode-bom":["error","never"],"use-isnan":["error",{enforceForIndexOf:true,enforceForSwitchCase:true}],"valid-typeof":["error",{requireStringLiterals:true}],"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"}],...o}}]}async function A(){return [{files:[i],name:"2digits:jsdoc",plugins:{jsdoc:await t(import('eslint-plugin-jsdoc'))},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 J(){return [...configs["flat/base"].map(e=>({...e,name:"2digits:jsonc/base"})),{name:"2digits:jsonc/json",files:[I],...x,rules:{...j(configs["flat/recommended-with-json"])}},{name:"2digits:jsonc/jsonc",files:[P],...x,rules:{...j(configs["flat/recommended-with-jsonc"])}},{name:"2digits:jsonc/json5",files:[F],...x,rules:{...j(configs["flat/recommended-with-json5"])}},{name:"2digits:jsonc/package.json",...x,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"],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",...x,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"],pathPattern:"^compilerOptions$"}]}},...configs["flat/prettier"].map(e=>({...e,name:"2digits:jsonc/prettier"}))]}var x={languageOptions:{parser:ve},plugins:{jsonc:we}};function j(e){return Object.fromEntries(e.flatMap(({rules:o})=>Object.entries(o??{})))}async function $(e={}){let{files:o=[w,v],overrides:a={},parserOptions:r}=e,[l,p]=await Promise.all([t(import('@next/eslint-plugin-next')),t(import('@typescript-eslint/parser'))]),m=renamePluginsInRules({...l.configs.recommended.rules,...l.configs["core-web-vitals"].rules},c);return [{name:"2digits:next/setup",plugins:{next:fixupPluginRules(l)}},{name:"2digits:next/rules",files:o,languageOptions:{parser:p,parserOptions:{ecmaFeatures:{jsx:true},projectService:true,...r},sourceType:"module"},rules:{...m,"next/no-html-link-for-pages":"off",...a}}]}function X(){return [{files:[i],name:"2digits:node",settings:{node:{version:">= 22.0.0"}},plugins:{node:V},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:true}],"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 Y(){let e=await t(import('eslint-plugin-pnpm'));return [{name:"2digits:pnpm/package-json",files:["**/package.json"],languageOptions:{parser:ve},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:Se},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":"error","pnpm/yaml-no-unused-catalog-item":"error"}}]}async function K(){let[e,o]=await Promise.all([t(import('eslint-config-prettier')),t(import('@stylistic/eslint-plugin'))]);return [{name:"2digits:prettier",plugins:{stylistic:o},rules:{...e.rules,"tailwindcss/classnames-order":"off","stylistic/jsx-newline":["error",{prevent:false}]}}]}async function Q(e={}){let{files:o=[w,v],overrides:a={},parserOptions:r,tsconfigRootDir:l,reactCompiler:p=true}=e,[m,g,y,b]=await Promise.all([t(import('@eslint-react/eslint-plugin')),t(import('eslint-plugin-react-hooks')),t(import('@typescript-eslint/parser')),p?t(import('eslint-plugin-react-compiler')):void 0]),h=m.configs.all.plugins,le=renamePluginsInRules({...g.configs["recommended-latest"].rules,...m.configs["recommended-type-checked"].rules},c);return [{name:"2digits:react/setup",plugins:{stylistic:ke,"react-dom":h["@eslint-react/dom"],"react-web-api":h["@eslint-react/web-api"],"react-extra":h["@eslint-react"],"react-hooks":g,"react-hooks-extra":h["@eslint-react/hooks-extra"],"react-naming-convention":h["@eslint-react/naming-convention"],...p?{"react-compiler":b}:{}},settings:{react:{version:"detect"}}},{name:"2digits:react/rules",files:o,languageOptions:{parser:y,parserOptions:{ecmaFeatures:{jsx:true},tsconfigRootDir:l,projectService:true,...r},sourceType:"module"},rules:{...le,...p?{"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/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:false}],"stylistic/jsx-self-closing-comp":"error",...a}}]}function ee(){return [{files:[i],name:"2digits:regexp",plugins:{regexp:Z},rules:{...Z.configs["flat/recommended"].rules}}]}function re(){return [{files:[i],name:"2digits:sonar",plugins:{sonar:H},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 oe(e={}){let{files:o=[S],overrides:a={},parserOptions:r,storybookDirectory:l=".storybook"}=e,[p,m]=await Promise.all([t(import('eslint-plugin-storybook')),t(import('@typescript-eslint/parser'))]),g={parser:m,parserOptions:{ecmaFeatures:{jsx:true},projectService:true,...r},sourceType:"module"};return [{name:"2digits:storybook/setup",plugins:{storybook:fixupPluginRules(p)}},{name:"2digits:storybook/rules",files:o,languageOptions:g,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",...a}},{name:"2digits:storybook/disables",files:o,rules:{"react-hooks/rules-of-hooks":"off","react/display-name":"off","sonar/no-duplicate-string":"off"}},{name:"2digits:storybook/config",files:[`${l}/main.@(js|cjs|mjs|ts)`],languageOptions:g,rules:{"storybook/no-uninstalled-addons":"error"}}]}async function te(e={}){let{overrides:o={}}=e,[a,{tailwindFunctions:r},l]=await Promise.all([t(import('eslint-plugin-tailwindcss')),t(import('@2digits/constants')),findUp(["tailwind.config.ts","tailwind.config.js"])]);return [{files:[i],name:"2digits:tailwind",plugins:{tailwindcss:a},settings:{tailwindcss:{callees:r,config:l}},rules:{...a.configs.recommended.rules,...o}}]}async function ne(e={}){let{overrides:o={}}=e,a=await t(import('@tanstack/eslint-plugin-query')),r=renamePluginsInRules(a.configs["flat/recommended"].at(0)?.rules??{},c);return [{files:[i],name:"2digits:tanstack",plugins:{tanstack:a},rules:{...r,...o}}]}async function se(e={}){let{overrides:o={}}=e,a=await t(import('eslint-plugin-turbo'));return [{files:[i],name:"2digits:turbo",plugins:{turbo:a},rules:{"turbo/no-undeclared-env-vars":"error",...o}}]}async function ie(e={}){let{overrides:o={},parserOptions:a={}}=e,[{plugin:r,configs:l,parser:p},m]=await Promise.all([t(import('typescript-eslint')),t(import('@2digits/eslint-plugin'))]),g=renamePluginsInConfigs(l.strictTypeChecked,c),y=Object.fromEntries(g.flatMap(({rules:b})=>Object.entries(b??{})));return [{name:"2digits:typescript/setup",plugins:{ts:r,"@2digits":m}},{name:"2digits:typescript/rules",files:[i],languageOptions:{parser:p,parserOptions:{tsconfigRootDir:process.cwd(),projectService:true,warnOnUnsupportedTypeScriptVersion:false,...a},sourceType:"module"},rules:{...y,"ts/restrict-template-expressions":["error",{allowNumber:true}],"ts/ban-ts-comment":["error",{"ts-ignore":"allow-with-description"}],"ts/consistent-type-exports":["error"],"ts/consistent-type-imports":["error",{prefer:"type-imports",disallowTypeAnnotations:false,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:true,argsIgnorePattern:"^_",varsIgnorePattern:"^_"}],"ts/unbound-method":"off",...m.configs.recommended.rules,...o}},{files:["**/*.d.ts"],name:"2digits:typescript/disables/dts",rules:{"unicorn/no-abusive-eslint-disable":"off","no-duplicate-imports":"off","no-restricted-syntax":"off","ts/no-unused-vars":"off"}},{files:["**/*.{test,spec}.ts?(x)"],name:"2digits:typescript/disables/test",rules:{"no-unused-expressions":"off"}},{files:["**/*.js","**/*.cjs","**/*.cts"],name:"2digits:typescript/disables/cjs",rules:{"ts/no-require-imports":"off","ts/no-var-requires":"off"}}]}function ae(){return [{files:[i],name:"2digits:unicorn",plugins:{unicorn:C},rules:{...C.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:false,checkArrowFunctionBody:false}],"unicorn/prefer-top-level-await":["off"]}}]}function pe(){return [{name:"2digits:yaml/setup",plugins:{yml:Re}},{name:"2digits:yaml/base",...k,rules:{"no-irregular-whitespace":"off","no-unused-vars":"off","spaced-comment":"off"}},{name:"2digits:yaml/recommended",...k,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",...k,rules:{"yml/block-mapping":"error","yml/block-sequence":"error","yml/plain-scalar":"error","yml/spaced-comment":"error"}},{name:"2digits:yaml/pnpm-workspace",...k,files:["pnpm-workspace.yaml"],rules:{"yml/sort-keys":["error",{order:["packages","overrides","patchedDependencies","hoistPattern","catalog","catalogs","allowedDeprecatedVersions","allowNonAppliedPatches","configDependencies","ignoredBuiltDependencies","ignoredOptionalDependencies","neverBuiltDependencies","onlyBuiltDependencies","onlyBuiltDependenciesFile","packageExtensions","peerDependencyRules","supportedArchitectures"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:".*"}]}},{name:"2digits:yaml/prettier",...k,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"}}]}var k={files:[_],languageOptions:{parser:Se}};function u(e,o){return typeof e=="boolean"?e:e?.enable??o??false}function f(e){if(typeof e=="boolean"||e===void 0)return {};let{enable:o,...a}=e;return a}async function Ge(e={},...o){let a;e.pnpm===void 0&&(a=findUp("pnpm-workspace.yaml"));let r=new FlatConfigComposer(M(e.ignores),U(e.js),q(),X(),B(),A(),ae(),re(),ee(),R(),J(),W(),pe());u(e.turbo,isPackageExists("turbo"))&&(r=r.append(se(f(e.turbo))));let{overrides:l,...p}=f(e.ts);return u(e.ts,isPackageExists("typescript"))&&(r=r.append(ie(f(e.ts)))),u(e.react,isPackageExists("react"))&&(r=r.append(Q({...f(e.react),...p}))),u(e.next,isPackageExists("next"))&&(r=r.append($({...f(e.next),...p}))),u(e.storybook,isPackageExists("storybook"))&&(r=r.append(oe({...f(e.storybook),...p}))),u(e.tailwind,isPackageExists("tailwindcss"))&&(r=r.append(te(f(e.tailwind)))),u(e.tanstack,isPackageExists("react-query")||isPackageExists("@tanstack/react-query")||isPackageExists("@tanstack/react-query-devtools"))&&(r=r.append(ne(f(e.tanstack)))),u(e.drizzle,isPackageExists("drizzle-kit")||isPackageExists("drizzle-orm"))&&(r=r.append(N(f(e.drizzle)))),u(e.graphql,isPackageExists("graphql"))&&(r=r.append(E(f(e.graphql)))),u(e.pnpm,!!await a)&&(r=r.append(Y())),r=r.append(...o),isPackageExists("prettier")&&(r=r.append(K())),r.renamePlugins(c).toConfigs()}export{R as antfu,q as boolean,B as comments,W as css,Ge as default,N as drizzle,E as graphql,M as ignores,U as javascript,A as jsdoc,J as jsonc,$ as next,X as node,Y as pnpm,K as prettier,Q as react,ee as regexp,re as sonar,oe as storybook,te as tailwind,ne as tanstack,se as turbo,Ge as twoDigits,ie as typescript,ae as unicorn,pe as yaml};//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/globs.ts","../src/configs/antfu.ts","../src/configs/boolean.ts","../src/constants.ts","../src/configs/comments.ts","../src/configs/css.ts","../src/utils.ts","../src/configs/drizzle.ts","../src/configs/graphql.ts","../src/configs/ignores.ts","../src/configs/javascript.ts","../src/configs/jsdoc.ts","../src/configs/jsonc.ts","../src/configs/next.ts","../src/configs/node.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/regexp.ts","../src/configs/sonar.ts","../src/configs/storybook.ts","../src/configs/tailwind.ts","../src/configs/tanstack.ts","../src/configs/turbo.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/factory.ts"],"names":["GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_JSON","GLOB_JSON5","GLOB_JSONC","GLOB_CSS","GLOB_EXCLUDE","antfu","pluginAntfu","boolean","pluginDeMorgan","PluginNameMap","recommended","renamePluginsInRules","configs","comments","pluginComments","css","plugin","tailwindSyntax","interopDefault","m","resolved","drizzle","options","overrides","drizzleObjectName","fixupPluginRules","graphql","files","gql","gqlSchema","loadConfig","flatRecommended","rules","rule","ruleName","ignores","gitIgnore","composer","javascript","stylistic","globals","eslint","jsdoc","jsonc","config","SHARED_OPTIONS","collectRules","parser","next","parserOptions","node","default","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","regexp","pluginRegexp","sonar","storybook","storybookDirectory","languageOptions","tailwind","tailwindcss","tailwindFunctions","findUp","tanstack","turbo","typescript","twoDigits","strictConfig","renamePluginsInConfigs","unicorn","enabled","defaults","enable","rest","userConfig","FlatConfigComposer","isPackageExists","typescriptOptions"],"mappings":"i2BAAO,IAAMA,EAAW,uBAEXC,CAAAA,CAAAA,CAAU,iBACVC,CAAW,CAAA,iBAAA,CAEXC,EAAe,kBAEfC,CAAAA,CAAAA,CAAY,YACZC,CAAa,CAAA,YAAA,CACbC,EAAa,YAEbC,CAAAA,CAAAA,CAAW,WAEXC,CAAe,CAAA,CAC1B,kBACA,SACA,CAAA,sBAAA,CACA,eACA,mBACA,CAAA,cAAA,CAEA,YACA,aACA,CAAA,SAAA,CACA,WACA,QACA,CAAA,SAAA,CACA,cACA,qBACA,CAAA,UAAA,CACA,WACA,YACA,CAAA,eAAA,CACA,WACA,WACA,CAAA,YAAA,CACA,mBACA,UAEA,CAAA,kBAAA,CACA,aACA,aACA,CAAA,kBAAA,CACA,0BACA,oBACF,CAAA,CCxCO,SAASC,CAA+B,EAAA,CAC7C,OAAO,CACL,CACE,MAAO,CAACT,CAAQ,EAChB,IAAM,CAAA,eAAA,CACN,QAAS,CACP,KAAA,CAAOU,EACT,CACA,CAAA,KAAA,CAAO,CACL,kBAAoB,CAAA,OAAA,CACpB,2BAA4B,OAC9B,CACF,CACF,CACF,CCdO,SAASC,CAAiC,EAAA,CAC/C,OAAO,CACL,CACE,MAAO,CAACX,CAAQ,EAChB,IAAM,CAAA,iBAAA,CACN,QAAS,CACP,OAAA,CAASY,CACX,CACA,CAAA,KAAA,CAAO,CACL,GAAGA,CAAAA,CAAe,QAAQ,WAAY,CAAA,KACxC,CACF,CACF,CACF,CClBO,IAAMC,EAAgB,CAC3B,YAAA,CAAc,OACd,iCAAmC,CAAA,yBAAA,CACnC,4BAA6B,mBAC7B,CAAA,mBAAA,CAAqB,YACrB,uBAAyB,CAAA,eAAA,CACzB,gBAAiB,aACjB,CAAA,aAAA,CAAe,cACf,gBAAkB,CAAA,gBAAA,CAClB,2BAA4B,W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CACA,cACA,SACA,CAAA,UAAA,CACA,SACA,SACA,CAAA,YAAA,CACA,eACA,iBACA,CAAA,kBAAA,CACA,uBACA,sBACA,CAAA,gBAAA,CACA,UACA,MACA,CAAA,WAAA,CACA,cACA,OACA,CAAA,kBAAA,CACA,cACA,cACA,CAAA,UACF,EACA,WAAa,CAAA,IACf,EACA,CACE,KAAA,CAAO,CAAE,IAAM,CAAA,KAAM,EACrB,WAAa,CAAA,wDACf,EACA,CACE,KAAA,CAAO,CAAC,OAAS,CAAA,QAAA,CAAU,SAAU,SAAW,CAAA,SAAS,EACzD,WAAa,CAAA,aACf,CACF,CACF,CACF,EAEA,CACE,IAAA,CAAM,8BACN,GAAGA,CAAAA,CACH,MAAO,CACL,kBAAA,CACA,qBACA,oBACA,CAAA,kBAAA,CACA,qBACA,oBACF,CAAA,CACA,MAAO,CACL,iBAAA,CAAmB,CACjB,OACA,CAAA,CACE,MAAO,CAAC,SAAA,CAAW,UAAW,iBAAmB,CAAA,YAAA,CAAc,QAAS,SAAW,CAAA,SAAS,EAC5F,WAAa,CAAA,IACf,EACA,CACE,KAAA,CAAO,CAEL,aACA,CAAA,WAAA,CACA,kBACA,yCACA,CAAA,0BAAA,CACA,+BAEA,QACA,CAAA,KAAA,CACA,MACA,wBACA,CAAA,uBAAA,CACA,aACA,oBACA,CAAA,iBAAA,CACA,iBACA,OACA,CAAA,yBAAA,CACA,kBAEA,QACA,CAAA,SAAA,CACA,mBACA,SACA,CAAA,OAAA,CACA,WACA,WACA,CAAA,OAAA,CACA,uBACA,gBACA,CAAA,4BAAA,CACA,4BACA,2BACA,CAAA,kBAAA,CACA,oBACA,0BACA,CAAA,WAAA,CAEA,UACA,SACA,CAAA,sBAAA,CAEA,cACA,gBACA,CAAA,qBAAA,CACA,YACA,iBACA,CAAA,SAAA,CACA,SACA,gBACA,CAAA,QAAA,CACA,gBACA,wBACA,CAAA,oBAAA,CACA,aACA,SACA,CAAA,eAAA,CACA,UACA,SACA,CAAA,eAAA,C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x';\n\nexport const GLOB_STORIES = '**/*.stories.tsx';\n\nexport const GLOB_JSON = '**/*.json';\nexport const GLOB_JSON5 = '**/*.json5';\nexport const GLOB_JSONC = '**/*.jsonc';\n\nexport const GLOB_CSS = '**/*.css';\n\nexport const GLOB_EXCLUDE = [\n '**/node_modules',\n '**/dist',\n '**/package-lock.json',\n '**/yarn.lock',\n '**/pnpm-lock.yaml',\n '**/bun.lockb',\n\n '**/output',\n '**/coverage',\n '**/temp',\n '**/.temp',\n '**/tmp',\n '**/.tmp',\n '**/.history',\n '**/.vitepress/cache',\n '**/.nuxt',\n '**/.next',\n '**/.vercel',\n '**/.changeset',\n '**/.idea',\n '**/.cache',\n '**/.output',\n '**/.vite-inspect',\n '**/.yarn',\n\n '**/CHANGELOG*.md',\n '**/*.min.*',\n '**/LICENSE*',\n '**/__snapshots__',\n '**/auto-import?(s).d.ts',\n '**/components.d.ts',\n] as const;\n","import pluginAntfu from 'eslint-plugin-antfu';\n\nimport { GLOB_SRC } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function antfu(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:antfu',\n plugins: {\n antfu: pluginAntfu,\n },\n rules: {\n 'antfu/if-newline': 'error',\n 'antfu/top-level-function': 'error',\n },\n },\n ];\n}\n","import pluginDeMorgan from 'eslint-plugin-de-morgan';\n\nimport { GLOB_SRC } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function boolean(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:boolean',\n plugins: {\n boolean: pluginDeMorgan,\n },\n rules: {\n ...pluginDeMorgan.configs.recommended.rules,\n },\n },\n ];\n}\n","export const PluginNameMap = {\n '@next/next': 'next',\n '@eslint-react/naming-convention': 'react-naming-convention',\n '@eslint-react/hooks-extra': 'react-hooks-extra',\n '@eslint-react/dom': 'react-dom',\n '@eslint-react/web-api': 'react-web-api',\n '@eslint-react': 'react-extra',\n 'react-hooks': 'react-hooks',\n 'react-compiler': 'react-compiler',\n '@stylistic/eslint-plugin': 'stylistic',\n '@typescript-eslint': 'ts',\n node: 'node',\n '@eslint-community/eslint-comments': 'comments',\n storybook: 'storybook',\n turbo: 'turbo',\n jsdoc: 'jsdoc',\n unicorn: 'unicorn',\n tailwindcss: 'tailwindcss',\n '@tanstack/query': 'tanstack',\n '@2digits': '@2digits',\n '@graphql-eslint': 'gql',\n sonarjs: 'sonar',\n drizzle: 'drizzle',\n 'de-morgan': 'boolean',\n} as const;\n","import pluginComments from '@eslint-community/eslint-plugin-eslint-comments';\nimport configs from '@eslint-community/eslint-plugin-eslint-comments/configs';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_SRC } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nconst recommended = renamePluginsInRules(configs.recommended.rules as never, PluginNameMap);\n\nexport function comments(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:comments',\n plugins: {\n comments: pluginComments,\n },\n rules: {\n ...recommended,\n\n 'comments/no-unused-disable': 'error',\n 'comments/disable-enable-pair': ['error', { allowWholeFile: true }],\n },\n },\n ];\n}\n","import plugin from '@eslint/css';\nimport { tailwindSyntax } from '@eslint/css/syntax';\n\nimport { GLOB_CSS } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function css(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:css',\n files: [GLOB_CSS],\n language: 'css/css',\n plugins: {\n css: plugin,\n },\n languageOptions: {\n tolerant: true,\n customSyntax: tailwindSyntax,\n },\n rules: {\n ...plugin.configs.recommended.rules,\n },\n },\n ];\n}\n","import type { Awaitable } from 'eslint-flat-config-utils';\n\nexport async function interopDefault<T>(m: Awaitable<T>): Promise<T extends { default: infer U } ? U : T> {\n const resolved = await m;\n\n return ((resolved as Record<string, unknown>).default || resolved) as never;\n}\n","import { fixupPluginRules } from '@eslint/compat';\n\nimport { GLOB_SRC } from '../globs';\nimport type { OptionsWithDrizzle, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function drizzle(options: OptionsWithDrizzle = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, drizzleObjectName = ['drizzle', 'db'] } = options;\n\n const drizzle = await interopDefault(import('eslint-plugin-drizzle'));\n\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:drizzle',\n plugins: {\n drizzle: fixupPluginRules(drizzle as never),\n },\n rules: {\n 'drizzle/enforce-update-with-where': ['error', { drizzleObjectName }],\n 'drizzle/enforce-delete-with-where': ['error', { drizzleObjectName }],\n\n ...overrides,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\nimport { loadConfig } from 'graphql-config';\n\nimport { PluginNameMap } from '../constants';\nimport type { OptionsWithFiles, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function graphql(options: OptionsWithFiles = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, files = ['**/*.graphql', '**/*.gql'] } = options;\n\n const [gql, gqlSchema] = await Promise.all([\n interopDefault(import('@graphql-eslint/eslint-plugin')),\n loadConfig({ throwOnEmpty: false, throwOnMissing: false }).then((g) => g?.getDefault().schema),\n ]);\n\n const flatRecommended = gql.configs['flat/operations-recommended'].rules;\n\n let rules = {} as typeof flatRecommended;\n\n if (gqlSchema) {\n rules = flatRecommended;\n } else {\n for (const rule of Object.keys(flatRecommended) as Array<keyof typeof rules>) {\n const ruleName = rule.replace('@graphql-eslint/', '') as keyof typeof gql.rules;\n\n if (\n ruleName in gql.rules\n && (gql.rules[ruleName].meta.docs?.requiresSchema || gql.rules[ruleName].meta.docs?.requiresSiblings)\n ) {\n continue;\n }\n rules[rule] = flatRecommended[rule] as never;\n }\n }\n\n const recommended = renamePluginsInRules(rules, PluginNameMap);\n\n return [\n {\n name: '2digits:graphql',\n plugins: {\n gql,\n },\n languageOptions: {\n parser: gql.parser,\n },\n files,\n rules: {\n ...recommended,\n\n 'gql/naming-convention': ['error', { allowLeadingUnderscore: true } as never],\n\n ...overrides,\n },\n },\n ];\n}\n","import { composer } from 'eslint-flat-config-utils';\n\nimport { GLOB_EXCLUDE } from '../globs';\nimport type { OptionsWithIgnores, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function ignores(options: OptionsWithIgnores = {}): Promise<TypedFlatConfigItem[]> {\n const { gitIgnore, ignores = [] } = options;\n\n return composer(\n {\n ignores: [GLOB_EXCLUDE, ignores].flat(),\n name: '2digits:ignores',\n },\n interopDefault(import('eslint-config-flat-gitignore')).then((m) =>\n m({ strict: false, ...gitIgnore, name: '2digits:gitignore' }),\n ),\n );\n}\n","import eslint from '@eslint/js';\nimport stylistic from '@stylistic/eslint-plugin';\nimport globals from 'globals';\n\nimport { GLOB_SRC } from '../globs';\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\n\nexport function javascript(options: OptionsOverrides = {}): TypedFlatConfigItem[] {\n const { overrides = {} } = options;\n\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:javascript',\n plugins: {\n stylistic,\n },\n languageOptions: {\n ecmaVersion: 2022,\n globals: {\n ...globals.browser,\n ...globals.es2021,\n ...globals.node,\n document: 'readonly',\n navigator: 'readonly',\n window: 'readonly',\n },\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n ecmaVersion: 2022,\n sourceType: 'module',\n },\n sourceType: 'module',\n },\n linterOptions: {\n reportUnusedDisableDirectives: true,\n },\n rules: {\n ...eslint.configs.recommended.rules,\n\n 'accessor-pairs': ['error', { enforceForClassMembers: true, setWithoutGet: true }],\n 'array-callback-return': 'error',\n 'block-scoped-var': 'error',\n 'constructor-super': 'error',\n 'default-case-last': 'error',\n 'dot-notation': ['error', { allowKeywords: true }],\n eqeqeq: ['error', 'smart'],\n 'new-cap': ['error', { capIsNew: false, newIsCap: true, properties: true }],\n 'no-alert': 'error',\n 'no-array-constructor': 'error',\n 'no-async-promise-executor': 'error',\n 'no-caller': 'error',\n 'no-case-declarations': 'error',\n 'no-class-assign': 'error',\n 'no-compare-neg-zero': 'error',\n 'no-cond-assign': ['error', 'always'],\n 'no-const-assign': 'error',\n 'no-control-regex': 'error',\n 'no-debugger': 'error',\n 'no-delete-var': 'error',\n 'no-dupe-args': 'error',\n 'no-dupe-class-members': 'error',\n 'no-dupe-keys': 'error',\n 'no-duplicate-case': 'error',\n 'no-empty': ['error', { allowEmptyCatch: true }],\n 'no-empty-character-class': 'error',\n 'no-empty-pattern': 'error',\n 'no-eval': 'error',\n 'no-ex-assign': 'error',\n 'no-extend-native': 'error',\n 'no-extra-bind': 'error',\n 'no-extra-boolean-cast': 'error',\n 'no-fallthrough': 'error',\n 'no-func-assign': 'error',\n 'no-global-assign': 'error',\n 'no-implied-eval': 'error',\n 'no-import-assign': 'error',\n 'no-invalid-regexp': 'error',\n 'no-irregular-whitespace': 'error',\n 'no-iterator': 'error',\n 'no-labels': ['error', { allowLoop: false, allowSwitch: false }],\n 'no-lone-blocks': 'error',\n 'no-loss-of-precision': 'error',\n 'no-misleading-character-class': 'error',\n 'no-multi-str': 'error',\n 'no-new': 'error',\n 'no-new-func': 'error',\n 'no-new-native-nonconstructor': 'error',\n 'no-new-wrappers': 'error',\n 'no-obj-calls': 'error',\n 'no-octal': 'error',\n 'no-octal-escape': 'error',\n 'no-proto': 'error',\n 'no-prototype-builtins': 'error',\n 'no-redeclare': ['error', { builtinGlobals: false }],\n 'no-regex-spaces': 'error',\n 'no-restricted-globals': [\n 'error',\n { message: 'Use `globalThis` instead.', name: 'global' },\n { message: 'Use `globalThis` instead.', name: 'self' },\n ],\n 'no-restricted-properties': [\n 'error',\n {\n message: 'Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.',\n property: '__proto__',\n },\n {\n message: 'Use `Object.defineProperty` instead.',\n property: '__defineGetter__',\n },\n {\n message: 'Use `Object.defineProperty` instead.',\n property: '__defineSetter__',\n },\n {\n message: 'Use `Object.getOwnPropertyDescriptor` instead.',\n property: '__lookupGetter__',\n },\n {\n message: 'Use `Object.getOwnPropertyDescriptor` instead.',\n property: '__lookupSetter__',\n },\n ],\n 'no-restricted-syntax': [\n 'error',\n 'DebuggerStatement',\n 'LabeledStatement',\n 'WithStatement',\n 'TSEnumDeclaration',\n 'TSExportAssignment',\n ],\n 'no-self-assign': ['error', { props: true }],\n 'no-self-compare': 'error',\n 'no-sequences': 'error',\n 'no-shadow-restricted-names': 'error',\n 'no-sparse-arrays': 'error',\n 'no-template-curly-in-string': 'error',\n 'no-this-before-super': 'error',\n 'no-throw-literal': 'error',\n 'no-undef': 'error',\n 'no-undef-init': 'error',\n 'no-unexpected-multiline': 'error',\n 'no-unmodified-loop-condition': 'error',\n 'no-unneeded-ternary': ['error', { defaultAssignment: false }],\n 'no-unreachable': 'error',\n 'no-unreachable-loop': 'error',\n 'no-unsafe-finally': 'error',\n 'no-unsafe-negation': 'error',\n 'no-unused-expressions': [\n 'error',\n {\n allowShortCircuit: true,\n allowTaggedTemplates: true,\n allowTernary: true,\n },\n ],\n 'no-unused-vars': [\n 'error',\n {\n args: 'none',\n caughtErrors: 'none',\n ignoreRestSiblings: true,\n vars: 'all',\n },\n ],\n 'no-useless-backreference': 'error',\n 'no-useless-call': 'error',\n 'no-useless-catch': 'error',\n 'no-useless-computed-key': 'error',\n 'no-useless-constructor': 'error',\n 'no-useless-rename': 'error',\n 'no-var': 'error',\n 'no-with': 'error',\n 'object-shorthand': [\n 'error',\n 'always',\n {\n avoidQuotes: true,\n ignoreConstructors: false,\n },\n ],\n 'one-var': ['error', { initialized: 'never' }],\n 'prefer-arrow-callback': [\n 'error',\n {\n allowNamedFunctions: true,\n allowUnboundThis: true,\n },\n ],\n 'prefer-const': [\n 'error',\n {\n destructuring: 'all',\n ignoreReadBeforeAssign: true,\n },\n ],\n 'prefer-exponentiation-operator': 'error',\n 'prefer-promise-reject-errors': 'error',\n 'prefer-regex-literals': ['error', { disallowRedundantWrapping: true }],\n 'prefer-rest-params': 'error',\n 'prefer-spread': 'error',\n 'prefer-template': 'error',\n 'symbol-description': 'error',\n 'unicode-bom': ['error', 'never'],\n 'use-isnan': ['error', { enforceForIndexOf: true, enforceForSwitchCase: true }],\n 'valid-typeof': ['error', { requireStringLiterals: true }],\n 'vars-on-top': 'error',\n yoda: ['error', 'never'],\n\n 'stylistic/padding-line-between-statements': [\n 'error',\n { blankLine: 'always', prev: ['const', 'let'], next: '*' },\n {\n blankLine: 'any',\n prev: ['const', 'let'],\n next: ['const', 'let'],\n },\n { blankLine: 'always', prev: '*', next: 'return' },\n ],\n\n ...overrides,\n },\n },\n ];\n}\n","import { GLOB_SRC } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function jsdoc(): Promise<TypedFlatConfigItem[]> {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:jsdoc',\n plugins: {\n jsdoc: await interopDefault(import('eslint-plugin-jsdoc')),\n },\n rules: {\n 'jsdoc/check-access': 'error',\n 'jsdoc/check-param-names': 'error',\n 'jsdoc/check-property-names': 'error',\n 'jsdoc/check-types': 'error',\n 'jsdoc/empty-tags': 'error',\n 'jsdoc/implements-on-classes': 'error',\n 'jsdoc/no-defaults': 'error',\n 'jsdoc/no-multi-asterisks': 'error',\n 'jsdoc/require-param-name': 'error',\n 'jsdoc/require-property': 'error',\n 'jsdoc/require-property-description': 'error',\n 'jsdoc/require-property-name': 'error',\n 'jsdoc/require-returns-check': 'error',\n 'jsdoc/require-returns-description': 'error',\n 'jsdoc/require-yields-check': 'error',\n },\n },\n ];\n}\n","import plugin, { configs } from 'eslint-plugin-jsonc';\nimport parser from 'jsonc-eslint-parser';\n\nimport { GLOB_JSON, GLOB_JSON5, GLOB_JSONC } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function jsonc(): TypedFlatConfigItem[] {\n return [\n ...configs['flat/base'].map((config) => ({ ...config, name: '2digits:jsonc/base' })),\n\n {\n name: '2digits:jsonc/json',\n files: [GLOB_JSON],\n ...SHARED_OPTIONS,\n rules: {\n ...collectRules(configs['flat/recommended-with-json']),\n },\n },\n {\n name: '2digits:jsonc/jsonc',\n files: [GLOB_JSONC],\n ...SHARED_OPTIONS,\n rules: {\n ...collectRules(configs['flat/recommended-with-jsonc']),\n },\n },\n {\n name: '2digits:jsonc/json5',\n files: [GLOB_JSON5],\n ...SHARED_OPTIONS,\n rules: {\n ...collectRules(configs['flat/recommended-with-json5']),\n },\n },\n\n {\n name: '2digits:jsonc/package.json',\n ...SHARED_OPTIONS,\n files: ['**/package.json'],\n rules: {\n 'jsonc/sort-array-values': [\n 'error',\n {\n order: { type: 'asc' },\n pathPattern: '^files$',\n },\n ],\n 'jsonc/sort-keys': [\n 'error',\n {\n order: [\n '$schema',\n 'publisher',\n 'name',\n 'displayName',\n 'version',\n 'private',\n 'description',\n 'funding',\n 'homepage',\n 'repository',\n 'bugs',\n 'categories',\n 'type',\n 'main',\n 'module',\n 'types',\n 'typesVersions',\n 'bin',\n 'files',\n 'exports',\n 'icon',\n 'unpkg',\n 'jsdelivr',\n 'sideEffects',\n 'activationEvents',\n 'contributes',\n 'scripts',\n 'keywords',\n 'author',\n 'license',\n 'workspaces',\n 'dependencies',\n 'devDependencies',\n 'peerDependencies',\n 'peerDependenciesMeta',\n 'optionalDependencies',\n 'packageManager',\n 'engines',\n 'pnpm',\n 'overrides',\n 'resolutions',\n 'husky',\n 'simple-git-hooks',\n 'lint-staged',\n 'eslintConfig',\n 'prettier',\n ],\n pathPattern: '^$',\n },\n {\n order: { type: 'asc' },\n pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$',\n },\n {\n order: ['types', 'import', 'module', 'require', 'default'],\n pathPattern: '^exports.*$',\n },\n ],\n },\n },\n\n {\n name: '2digits:jsonc/tsconfig.json',\n ...SHARED_OPTIONS,\n files: [\n '**/tsconfig.json',\n '**/tsconfig.*.json',\n '**/tsconfig-*.json',\n '**/jsconfig.json',\n '**/jsconfig.*.json',\n '**/jsconfig-*.json',\n ],\n rules: {\n 'jsonc/sort-keys': [\n 'error',\n {\n order: ['$schema', 'extends', 'compilerOptions', 'references', 'files', 'include', 'exclude'],\n pathPattern: '^$',\n },\n {\n order: [\n /* Projects */\n 'incremental',\n 'composite',\n 'tsBuildInfoFile',\n 'disableSourceOfProjectReferenceRedirect',\n 'disableSolutionSearching',\n 'disableReferencedProjectLoad',\n /* Language and Environment */\n 'target',\n 'lib',\n 'jsx',\n 'experimentalDecorators',\n 'emitDecoratorMetadata',\n 'jsxFactory',\n 'jsxFragmentFactory',\n 'jsxImportSource',\n 'reactNamespace',\n 'noLib',\n 'useDefineForClassFields',\n 'moduleDetection',\n /* Modules */\n 'module',\n 'rootDir',\n 'moduleResolution',\n 'baseUrl',\n 'paths',\n 'rootDirs',\n 'typeRoots',\n 'types',\n 'allowUmdGlobalAccess',\n 'moduleSuffixes',\n 'allowImportingTsExtensions',\n 'resolvePackageJsonExports',\n 'resolvePackageJsonImports',\n 'customConditions',\n 'resolveJsonModule',\n 'allowArbitraryExtensions',\n 'noResolve',\n /* JavaScript Support */\n 'allowJs',\n 'checkJs',\n 'maxNodeModuleJsDepth',\n /* Emit */\n 'declaration',\n 'declarationMap',\n 'emitDeclarationOnly',\n 'sourceMap',\n 'inlineSourceMap',\n 'outFile',\n 'outDir',\n 'removeComments',\n 'noEmit',\n 'importHelpers',\n 'importsNotUsedAsValues',\n 'downlevelIteration',\n 'sourceRoot',\n 'mapRoot',\n 'inlineSources',\n 'emitBOM',\n 'newLine',\n 'stripInternal',\n 'noEmitHelpers',\n 'noEmitOnError',\n 'preserveConstEnums',\n 'declarationDir',\n 'preserveValueImports',\n /* Interop Constraints */\n 'isolatedModules',\n 'verbatimModuleSyntax',\n 'allowSyntheticDefaultImports',\n 'esModuleInterop',\n 'preserveSymlinks',\n 'forceConsistentCasingInFileNames',\n /* Type Checking */\n 'strict',\n 'strictBindCallApply',\n 'strictFunctionTypes',\n 'strictNullChecks',\n 'strictPropertyInitialization',\n 'allowUnreachableCode',\n 'allowUnusedLabels',\n 'alwaysStrict',\n 'exactOptionalPropertyTypes',\n 'noFallthroughCasesInSwitch',\n 'noImplicitAny',\n 'noImplicitOverride',\n 'noImplicitReturns',\n 'noImplicitThis',\n 'noPropertyAccessFromIndexSignature',\n 'noUncheckedIndexedAccess',\n 'noUnusedLocals',\n 'noUnusedParameters',\n 'useUnknownInCatchVariables',\n /* Completeness */\n 'skipDefaultLibCheck',\n 'skipLibCheck',\n ],\n pathPattern: '^compilerOptions$',\n },\n ],\n },\n },\n\n ...configs['flat/prettier'].map((config) => ({ ...config, name: '2digits:jsonc/prettier' })),\n ];\n}\n\nconst SHARED_OPTIONS = {\n languageOptions: {\n parser,\n },\n plugins: {\n jsonc: plugin,\n },\n} satisfies Pick<TypedFlatConfigItem, 'plugins' | 'languageOptions'>;\n\ntype FlatConfigName = Extract<keyof typeof configs, `flat/${string}`>;\n\nfunction collectRules(config: (typeof configs)[FlatConfigName]) {\n return Object.fromEntries(config.flatMap(({ rules }) => Object.entries(rules ?? {})));\n}\n","import { fixupPluginRules } from '@eslint/compat';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_TS, GLOB_TSX } from '../globs';\nimport type { OptionsTypeScriptWithTypes, OptionsWithFiles, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function next(\n options: OptionsWithFiles & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const { files = [GLOB_TS, GLOB_TSX], overrides = {}, parserOptions } = options;\n\n const [next, parser] = await Promise.all([\n interopDefault(import('@next/eslint-plugin-next')),\n interopDefault(import('@typescript-eslint/parser')),\n ]);\n\n const recommended = renamePluginsInRules(\n {\n ...next.configs.recommended.rules,\n ...next.configs['core-web-vitals'].rules,\n },\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:next/setup',\n plugins: {\n next: fixupPluginRules(next as never),\n },\n },\n {\n name: '2digits:next/rules',\n files,\n languageOptions: {\n parser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n projectService: true,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...recommended,\n\n 'next/no-html-link-for-pages': 'off',\n\n ...overrides,\n },\n },\n ];\n}\n","import { GLOB_SRC } from '../globs';\nimport { pluginNode } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function node(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:node',\n settings: {\n node: {\n version: '>= 22.0.0',\n },\n },\n plugins: {\n node: pluginNode,\n },\n rules: {\n 'node/handle-callback-err': ['error', '^(err|error)$'],\n 'node/no-deprecated-api': 'error',\n 'node/no-exports-assign': 'error',\n 'node/no-new-require': 'error',\n 'node/no-path-concat': 'error',\n 'node/no-unsupported-features/node-builtins': ['error', { allowExperimental: true }],\n 'node/prefer-global/buffer': 'error',\n 'node/prefer-global/process': 'error',\n 'node/prefer-global/text-encoder': 'error',\n 'node/prefer-global/url': 'error',\n 'node/prefer-global/console': 'error',\n 'node/prefer-global/url-search-params': 'error',\n 'node/prefer-global/text-decoder': 'error',\n 'node/process-exit-as-throw': 'error',\n },\n },\n ];\n}\n","import type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function prettier(): Promise<TypedFlatConfigItem[]> {\n const [prettier, stylistic] = await Promise.all([\n interopDefault(import('eslint-config-prettier')),\n interopDefault(import('@stylistic/eslint-plugin')),\n ]);\n\n return [\n {\n name: '2digits:prettier',\n plugins: {\n stylistic,\n },\n rules: {\n ...prettier.rules,\n\n 'tailwindcss/classnames-order': 'off',\n 'stylistic/jsx-newline': ['error', { prevent: false }],\n },\n },\n ];\n}\n","import stylistic from '@stylistic/eslint-plugin';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_TS, GLOB_TSX } from '../globs';\nimport type { OptionsTypeScriptWithTypes, OptionsWithReact, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function react(\n options: OptionsWithReact & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const { files = [GLOB_TS, GLOB_TSX], overrides = {}, parserOptions, tsconfigRootDir, reactCompiler = true } = options;\n\n const [pluginReact, pluginReactHooks, parser, pluginReactCompiler] = await Promise.all([\n interopDefault(import('@eslint-react/eslint-plugin')),\n interopDefault(import('eslint-plugin-react-hooks')),\n interopDefault(import('@typescript-eslint/parser')),\n reactCompiler ? interopDefault(import('eslint-plugin-react-compiler')) : undefined,\n ]);\n\n const plugins = pluginReact.configs.all.plugins;\n\n const recommended = renamePluginsInRules(\n {\n ...pluginReactHooks.configs['recommended-latest'].rules,\n ...pluginReact.configs['recommended-type-checked'].rules,\n },\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:react/setup',\n plugins: {\n stylistic,\n 'react-dom': plugins['@eslint-react/dom'],\n 'react-web-api': plugins['@eslint-react/web-api'],\n 'react-extra': plugins['@eslint-react'],\n 'react-hooks': pluginReactHooks,\n 'react-hooks-extra': plugins['@eslint-react/hooks-extra'],\n 'react-naming-convention': plugins['@eslint-react/naming-convention'],\n ...(reactCompiler ? { 'react-compiler': pluginReactCompiler } : {}),\n },\n settings: {\n react: {\n version: 'detect',\n },\n },\n },\n {\n name: '2digits:react/rules',\n files,\n languageOptions: {\n parser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n tsconfigRootDir,\n projectService: true,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...recommended,\n\n ...(reactCompiler ? { 'react-compiler/react-compiler': 'error' } : {}),\n\n 'react-hooks-extra/no-unnecessary-use-callback': 'error',\n 'react-hooks-extra/prefer-use-state-lazy-initialization': 'error',\n 'react-hooks-extra/no-redundant-custom-hook': 'error',\n 'react-hooks-extra/no-unnecessary-use-memo': 'error',\n\n 'react-extra/prefer-read-only-props': 'off',\n 'react-extra/prefer-shorthand-boolean': 'error',\n 'react-extra/prefer-shorthand-fragment': 'error',\n 'react-extra/prefer-react-namespace-import': 'error',\n\n 'react-naming-convention/use-state': 'error',\n\n 'stylistic/jsx-curly-newline': 'off',\n 'stylistic/jsx-newline': ['error', { prevent: false }],\n 'stylistic/jsx-self-closing-comp': 'error',\n\n ...overrides,\n },\n },\n ];\n}\n","import pluginRegexp from 'eslint-plugin-regexp';\n\nimport { GLOB_SRC } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function regexp(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:regexp',\n plugins: {\n regexp: pluginRegexp,\n },\n rules: {\n ...pluginRegexp.configs['flat/recommended'].rules,\n },\n },\n ];\n}\n","import { GLOB_SRC } from '../globs';\nimport { pluginSonar } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function sonar(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:sonar',\n plugins: {\n sonar: pluginSonar,\n },\n rules: {\n 'sonar/code-eval': 'error',\n 'sonar/cognitive-complexity': 'error',\n 'sonar/comma-or-logical-or-case': 'error',\n 'sonar/concise-regex': 'error',\n 'sonar/confidential-information-logging': 'error',\n 'sonar/constructor-for-side-effects': 'error',\n 'sonar/content-length': 'error',\n 'sonar/content-security-policy': 'error',\n 'sonar/cookie-no-httponly': 'error',\n 'sonar/cors': 'error',\n 'sonar/csrf': 'error',\n 'sonar/max-switch-cases': 'error',\n 'sonar/no-all-duplicated-branches': 'error',\n 'sonar/no-collapsible-if': 'error',\n 'sonar/no-collection-size-mischeck': 'error',\n 'sonar/no-duplicate-string': ['error', { threshold: 5 }],\n 'sonar/no-duplicated-branches': 'error',\n 'sonar/no-element-overwrite': 'error',\n 'sonar/no-empty-collection': 'error',\n 'sonar/no-extra-arguments': 'error',\n 'sonar/no-for-in-iterable': 'error',\n 'sonar/no-gratuitous-expressions': 'error',\n 'sonar/no-identical-conditions': 'error',\n 'sonar/no-identical-expressions': 'error',\n 'sonar/no-identical-functions': 'error',\n 'sonar/no-ignored-return': 'error',\n 'sonar/no-inverted-boolean-check': 'error',\n 'sonar/no-nested-switch': 'error',\n 'sonar/no-nested-template-literals': 'error',\n 'sonar/no-one-iteration-loop': 'error',\n 'sonar/no-redundant-boolean': 'error',\n 'sonar/no-same-line-conditional': 'error',\n 'sonar/no-small-switch': 'error',\n 'sonar/no-unused-collection': 'error',\n 'sonar/no-use-of-empty-return-value': 'error',\n 'sonar/no-useless-catch': 'error',\n 'sonar/non-existent-operator': 'error',\n 'sonar/prefer-immediate-return': 'error',\n 'sonar/prefer-object-literal': 'error',\n 'sonar/prefer-single-boolean-return': 'error',\n 'sonar/prefer-while': 'error',\n\n 'sonar/elseif-without-else': 'off',\n 'sonar/no-redundant-jump': 'off',\n },\n },\n ];\n}\n","import { fixupPluginRules } from '@eslint/compat';\nimport type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';\n\nimport { GLOB_STORIES } from '../globs';\nimport type { OptionsTypeScriptWithTypes, OptionsWithStorybook, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function storybook(\n options: OptionsWithStorybook & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const { files = [GLOB_STORIES], overrides = {}, parserOptions, storybookDirectory = '.storybook' } = options;\n\n const [storybook, parser] = await Promise.all([\n interopDefault(import('eslint-plugin-storybook')),\n interopDefault(import('@typescript-eslint/parser')),\n ]);\n\n const languageOptions = {\n parser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n projectService: true,\n ...parserOptions,\n },\n sourceType: 'module',\n } satisfies FlatConfig.LanguageOptions;\n\n return [\n {\n name: '2digits:storybook/setup',\n plugins: {\n storybook: fixupPluginRules(storybook as never),\n },\n },\n {\n name: '2digits:storybook/rules',\n files,\n languageOptions,\n rules: {\n 'storybook/await-interactions': 'error',\n 'storybook/context-in-play-function': 'error',\n 'storybook/csf-component': 'error',\n 'storybook/default-exports': 'error',\n 'storybook/hierarchy-separator': 'error',\n 'storybook/meta-inline-properties': 'error',\n 'storybook/no-redundant-story-name': 'error',\n 'storybook/no-stories-of': 'error',\n 'storybook/no-title-property-in-meta': 'error',\n 'storybook/no-uninstalled-addons': 'error',\n 'storybook/prefer-pascal-case': 'error',\n 'storybook/story-exports': 'error',\n 'storybook/use-storybook-expect': 'error',\n 'storybook/use-storybook-testing-library': 'error',\n\n ...overrides,\n },\n },\n {\n name: '2digits:storybook/disables',\n files,\n rules: {\n 'react-hooks/rules-of-hooks': 'off',\n 'react/display-name': 'off',\n 'sonar/no-duplicate-string': 'off',\n },\n },\n {\n name: '2digits:storybook/config',\n files: [`${storybookDirectory}/main.@(js|cjs|mjs|ts)`],\n languageOptions,\n rules: {\n 'storybook/no-uninstalled-addons': 'error',\n },\n },\n ];\n}\n","import { findUp } from 'find-up';\n\nimport { GLOB_SRC } from '../globs';\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function tailwind(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options;\n\n const [tailwindcss, { tailwindFunctions }, config] = await Promise.all([\n interopDefault(import('eslint-plugin-tailwindcss')),\n interopDefault(import('@2digits/constants')),\n findUp(['tailwind.config.ts', 'tailwind.config.js']),\n ]);\n\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:tailwind',\n plugins: {\n tailwindcss,\n },\n settings: {\n tailwindcss: {\n callees: tailwindFunctions,\n config,\n },\n },\n rules: {\n ...tailwindcss.configs.recommended.rules,\n\n ...overrides,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_SRC } from '../globs';\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function tanstack(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options;\n\n const tanstack = await interopDefault(import('@tanstack/eslint-plugin-query'));\n\n const recommended = renamePluginsInRules(tanstack.configs['flat/recommended'].at(0)?.rules ?? {}, PluginNameMap);\n\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:tanstack',\n plugins: { tanstack },\n rules: {\n ...recommended,\n\n ...overrides,\n },\n },\n ];\n}\n","import { GLOB_SRC } from '../globs';\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function turbo(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options;\n\n const turbo = await interopDefault(import('eslint-plugin-turbo'));\n\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:turbo',\n plugins: {\n turbo,\n },\n rules: {\n 'turbo/no-undeclared-env-vars': 'error',\n\n ...overrides,\n },\n },\n ];\n}\n","import { renamePluginsInConfigs } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_SRC } from '../globs';\nimport type { OptionsTypeScriptWithTypes, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function typescript(options: OptionsTypeScriptWithTypes = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, parserOptions = {} } = options;\n\n const [{ plugin, configs, parser }, twoDigits] = await Promise.all([\n interopDefault(import('typescript-eslint')),\n interopDefault(import('@2digits/eslint-plugin')),\n ]);\n\n const strictConfig = renamePluginsInConfigs(configs.strictTypeChecked as never, PluginNameMap);\n\n const rules = Object.fromEntries(strictConfig.flatMap(({ rules }) => Object.entries(rules ?? {})));\n\n return [\n {\n name: '2digits:typescript/setup',\n plugins: {\n ts: plugin,\n '@2digits': twoDigits,\n },\n },\n {\n name: '2digits:typescript/rules',\n files: [GLOB_SRC],\n languageOptions: {\n parser,\n parserOptions: {\n tsconfigRootDir: process.cwd(),\n projectService: true,\n warnOnUnsupportedTypeScriptVersion: false,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...rules,\n 'ts/restrict-template-expressions': ['error', { allowNumber: true }],\n 'ts/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],\n 'ts/consistent-type-exports': ['error'],\n 'ts/consistent-type-imports': [\n 'error',\n {\n prefer: 'type-imports',\n disallowTypeAnnotations: false,\n fixStyle: 'inline-type-imports',\n },\n ],\n 'ts/no-empty-object-type': ['error', { allowInterfaces: 'with-single-extends', allowObjectTypes: 'never' }],\n 'ts/no-explicit-any': ['error'],\n 'ts/no-import-type-side-effects': ['error'],\n 'ts/no-misused-promises': 'off',\n 'ts/no-confusing-void-expression': 'off',\n 'ts/no-unused-vars': [\n 'error',\n {\n ignoreRestSiblings: true,\n argsIgnorePattern: '^_',\n varsIgnorePattern: '^_',\n },\n ],\n 'ts/unbound-method': 'off',\n\n ...(twoDigits.configs.recommended.rules as object),\n\n ...overrides,\n },\n },\n {\n files: ['**/*.d.ts'],\n name: '2digits:typescript/disables/dts',\n rules: {\n 'unicorn/no-abusive-eslint-disable': 'off',\n 'no-duplicate-imports': 'off',\n 'no-restricted-syntax': 'off',\n 'ts/no-unused-vars': 'off',\n },\n },\n {\n files: ['**/*.{test,spec}.ts?(x)'],\n name: '2digits:typescript/disables/test',\n rules: {\n 'no-unused-expressions': 'off',\n },\n },\n {\n files: ['**/*.js', '**/*.cjs', '**/*.cts'],\n name: '2digits:typescript/disables/cjs',\n rules: {\n 'ts/no-require-imports': 'off',\n 'ts/no-var-requires': 'off',\n },\n },\n ];\n}\n","import { GLOB_SRC } from '../globs';\nimport { pluginUnicorn } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function unicorn(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:unicorn',\n plugins: {\n unicorn: pluginUnicorn,\n },\n rules: {\n ...pluginUnicorn.configs.recommended.rules,\n\n 'unicorn/filename-case': ['off'],\n 'unicorn/prefer-module': ['off'],\n 'unicorn/prevent-abbreviations': ['off'],\n 'unicorn/prefer-ternary': ['error', 'only-single-line'],\n 'unicorn/no-useless-undefined': [\n 'error',\n {\n checkArguments: false,\n checkArrowFunctionBody: false,\n },\n ],\n 'unicorn/prefer-top-level-await': ['off'],\n },\n },\n ];\n}\n","import { FlatConfigComposer } from 'eslint-flat-config-utils';\nimport { isPackageExists } from 'local-pkg';\n\nimport {\n antfu,\n boolean,\n comments,\n css,\n drizzle,\n graphql,\n ignores,\n javascript,\n jsdoc,\n jsonc,\n next,\n node,\n prettier,\n react,\n regexp,\n sonar,\n storybook,\n tailwind,\n tanstack,\n turbo,\n typescript,\n unicorn,\n} from './configs';\nimport { PluginNameMap } from './constants';\nimport type {\n ConfigNames,\n OptionsOverrides,\n OptionsTypeScriptWithTypes,\n OptionsWithDrizzle,\n OptionsWithFiles,\n OptionsWithIgnores,\n OptionsWithReact,\n OptionsWithStorybook,\n TypedFlatConfigItem,\n} from './types';\n\ntype SharedOptions<T = unknown> = T & {\n enable?: boolean;\n};\n\ninterface ESLint2DigitsOptions {\n ignores?: OptionsWithIgnores;\n turbo?: SharedOptions<OptionsOverrides> | boolean;\n js?: OptionsOverrides;\n ts?: SharedOptions<OptionsTypeScriptWithTypes> | boolean;\n graphql?: SharedOptions<OptionsWithFiles> | boolean;\n react?: SharedOptions<OptionsWithReact> | boolean;\n next?: SharedOptions<OptionsWithFiles> | boolean;\n tailwind?: SharedOptions<OptionsOverrides> | boolean;\n storybook?: SharedOptions<OptionsWithStorybook> | boolean;\n tanstack?: SharedOptions<OptionsOverrides> | boolean;\n drizzle?: SharedOptions<OptionsWithDrizzle> | boolean;\n}\n\nfunction enabled<T extends SharedOptions>(options: T | boolean | undefined, defaults?: boolean): options is T {\n if (typeof options === 'boolean') {\n return options;\n }\n\n return options?.enable ?? defaults ?? false;\n}\n\nfunction config<T>(options: SharedOptions<T> | undefined | boolean): T {\n if (typeof options === 'boolean' || options === undefined) {\n return {} as T;\n }\n\n const { enable, ...rest } = options;\n\n return rest as T;\n}\n\nexport function twoDigits(\n options: ESLint2DigitsOptions = {},\n ...userConfig: TypedFlatConfigItem[]\n): Promise<TypedFlatConfigItem[]> {\n let composer = new FlatConfigComposer<TypedFlatConfigItem, ConfigNames>(\n ignores(options.ignores),\n javascript(options.js),\n boolean(),\n node(),\n comments(),\n jsdoc(),\n unicorn(),\n sonar(),\n regexp(),\n antfu(),\n jsonc(),\n css(),\n );\n\n if (enabled(options.turbo, isPackageExists('turbo'))) {\n composer = composer.append(turbo(config(options.turbo)));\n }\n\n const { overrides, ...typescriptOptions } = config(options.ts);\n\n if (enabled(options.ts, isPackageExists('typescript'))) {\n composer = composer.append(typescript(config(options.ts)));\n }\n\n if (enabled(options.react, isPackageExists('react'))) {\n composer = composer.append(\n react({\n ...config(options.react),\n ...typescriptOptions,\n }),\n );\n }\n\n if (enabled(options.next, isPackageExists('next'))) {\n composer = composer.append(\n next({\n ...config(options.next),\n ...typescriptOptions,\n }),\n );\n }\n\n if (enabled(options.storybook, isPackageExists('storybook'))) {\n composer = composer.append(\n storybook({\n ...config(options.storybook),\n ...typescriptOptions,\n }),\n );\n }\n\n if (enabled(options.tailwind, isPackageExists('tailwindcss'))) {\n composer = composer.append(tailwind(config(options.tailwind)));\n }\n\n if (\n enabled(\n options.tanstack,\n isPackageExists('react-query')\n || isPackageExists('@tanstack/react-query')\n || isPackageExists('@tanstack/react-query-devtools'),\n )\n ) {\n composer = composer.append(tanstack(config(options.tanstack)));\n }\n\n if (enabled(options.drizzle, isPackageExists('drizzle-kit') || isPackageExists('drizzle-orm'))) {\n composer = composer.append(drizzle(config(options.drizzle)));\n }\n\n if (enabled(options.graphql, isPackageExists('graphql'))) {\n composer = composer.append(graphql(config(options.graphql)));\n }\n\n composer = composer.append(...userConfig);\n\n if (isPackageExists('prettier')) {\n composer = composer.append(prettier());\n }\n\n return composer.renamePlugins(PluginNameMap).toConfigs();\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/globs.ts","../src/configs/antfu.ts","../src/configs/boolean.ts","../src/constants.ts","../src/configs/comments.ts","../src/configs/css.ts","../src/utils.ts","../src/configs/drizzle.ts","../src/configs/graphql.ts","../src/configs/ignores.ts","../src/configs/javascript.ts","../src/configs/jsdoc.ts","../src/configs/jsonc.ts","../src/configs/next.ts","../src/configs/node.ts","../src/configs/pnpm.ts","../src/configs/prettier.ts","../src/configs/react.ts","../src/configs/regexp.ts","../src/configs/sonar.ts","../src/configs/storybook.ts","../src/configs/tailwind.ts","../src/configs/tanstack.ts","../src/configs/turbo.ts","../src/configs/typescript.ts","../src/configs/unicorn.ts","../src/configs/yaml.ts","../src/factory.ts"],"names":["GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_JSON","GLOB_JSON5","GLOB_JSONC","GLOB_CSS","GLOB_YAML","GLOB_EXCLUDE","antfu","pluginAntfu","boolean","pluginDeMorgan","PluginNameMap","recommended","renamePluginsInRules","configs","comments","pluginComments","css","plugin","tailwindSyntax","interopDefault","m","resolved","drizzle","options","overrides","drizzleObjectName","fixupPluginRules","graphql","files","gql","gqlSchema","loadConfig","g","flatRecommended","rules","rule","ruleName","ignores","gitIgnore","composer","javascript","stylistic","globals","eslint","jsdoc","jsonc","config","SHARED_OPTIONS","collectRules","parser","next","parserOptions","node","default","pnpm","jsoncParser","yamlParser","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","regexp","pluginRegexp","sonar","storybook","storybookDirectory","languageOptions","tailwind","tailwindcss","tailwindFunctions","findUp","tanstack","turbo","typescript","twoDigits","strictConfig","renamePluginsInConfigs","unicorn","yaml","yml","enabled","defaults","enable","rest","userConfig","pnpmPromise","FlatConfigComposer","isPackageExists","typescriptOptions"],"mappings":"s6BAAO,IAAMA,CAAAA,CAAW,wBAEXC,CAAU,CAAA,gBAAA,CACVC,CAAW,CAAA,iBAAA,CAEXC,CAAe,CAAA,kBAAA,CAEfC,EAAY,WACZC,CAAAA,CAAAA,CAAa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,CAAS,CAAA,MAAA,CAAOjB,EAAQwB,CAAOvB,CAAAA,CAAAA,CAAQ,OAAO,CAAC,CAAC,CAAA,CAAA,CAGzD6D,EAAQ7D,CAAQ,CAAA,OAAA,CAASoE,gBAAgB,SAAS,CAAC,IACrDpD,CAAWA,CAAAA,CAAAA,CAAS,MAAOZ,CAAAA,CAAAA,CAAQmB,CAAOvB,CAAAA,CAAAA,CAAQ,OAAO,CAAC,CAAC,GAGzD6D,CAAQ7D,CAAAA,CAAAA,CAAQ,KAAM,CAAC,CAAE,MAAMkE,CAAY,CAC7ClD,GAAAA,CAAAA,CAAWA,EAAS,MAAOe,CAAAA,CAAAA,EAAM,CAGnCf,CAAAA,CAAAA,CAAAA,CAAWA,EAAS,MAAO,CAAA,GAAGiD,CAAU,CAAA,CAEpCG,eAAgB,CAAA,UAAU,IAC5BpD,CAAWA,CAAAA,CAAAA,CAAS,MAAOkB,CAAAA,CAAAA,EAAU,CAAA,CAAA,CAGhClB,EAAS,aAAc7B,CAAAA,CAAa,CAAE,CAAA,SAAA,EAC/C","file":"index.js","sourcesContent":["export const GLOB_SRC = '**/*.?([cm])[jt]s?(x)';\n\nexport const GLOB_TS = '**/*.?([cm])ts';\nexport const GLOB_TSX = '**/*.?([cm])tsx';\n\nexport const GLOB_STORIES = '**/*.stories.tsx';\n\nexport const GLOB_JSON = '**/*.json';\nexport const GLOB_JSON5 = '**/*.json5';\nexport const GLOB_JSONC = '**/*.jsonc';\n\nexport const GLOB_CSS = '**/*.css';\n\nexport const GLOB_YAML = '**/*.ya?ml';\n\nexport const GLOB_EXCLUDE = [\n '**/node_modules',\n '**/dist',\n '**/package-lock.json',\n '**/yarn.lock',\n '**/pnpm-lock.yaml',\n '**/bun.lockb',\n\n '**/output',\n '**/coverage',\n '**/temp',\n '**/.temp',\n '**/tmp',\n '**/.tmp',\n '**/.history',\n '**/.vitepress/cache',\n '**/.nuxt',\n '**/.next',\n '**/.vercel',\n '**/.changeset',\n '**/.idea',\n '**/.cache',\n '**/.output',\n '**/.vite-inspect',\n '**/.yarn',\n\n '**/CHANGELOG*.md',\n '**/*.min.*',\n '**/LICENSE*',\n '**/__snapshots__',\n '**/auto-import?(s).d.ts',\n '**/components.d.ts',\n] as const;\n","import pluginAntfu from 'eslint-plugin-antfu';\n\nimport { GLOB_SRC } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function antfu(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:antfu',\n plugins: {\n antfu: pluginAntfu,\n },\n rules: {\n 'antfu/if-newline': 'error',\n 'antfu/top-level-function': 'error',\n },\n },\n ];\n}\n","import pluginDeMorgan from 'eslint-plugin-de-morgan';\n\nimport { GLOB_SRC } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function boolean(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:boolean',\n plugins: {\n boolean: pluginDeMorgan,\n },\n rules: {\n ...pluginDeMorgan.configs.recommended.rules,\n },\n },\n ];\n}\n","export const PluginNameMap = {\n '@next/next': 'next',\n '@eslint-react/naming-convention': 'react-naming-convention',\n '@eslint-react/hooks-extra': 'react-hooks-extra',\n '@eslint-react/dom': 'react-dom',\n '@eslint-react/web-api': 'react-web-api',\n '@eslint-react': 'react-extra',\n 'react-hooks': 'react-hooks',\n 'react-compiler': 'react-compiler',\n '@stylistic/eslint-plugin': 'stylistic',\n '@typescript-eslint': 'ts',\n node: 'node',\n '@eslint-community/eslint-comments': 'comments',\n storybook: 'storybook',\n turbo: 'turbo',\n jsdoc: 'jsdoc',\n unicorn: 'unicorn',\n tailwindcss: 'tailwindcss',\n '@tanstack/query': 'tanstack',\n '@2digits': '@2digits',\n '@graphql-eslint': 'gql',\n sonarjs: 'sonar',\n drizzle: 'drizzle',\n 'de-morgan': 'boolean',\n} as const;\n","import pluginComments from '@eslint-community/eslint-plugin-eslint-comments';\nimport configs from '@eslint-community/eslint-plugin-eslint-comments/configs';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_SRC } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nconst recommended = renamePluginsInRules(configs.recommended.rules as never, PluginNameMap);\n\nexport function comments(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:comments',\n plugins: {\n comments: pluginComments,\n },\n rules: {\n ...recommended,\n\n 'comments/no-unused-disable': 'error',\n 'comments/disable-enable-pair': ['error', { allowWholeFile: true }],\n },\n },\n ];\n}\n","import plugin from '@eslint/css';\nimport { tailwindSyntax } from '@eslint/css/syntax';\n\nimport { GLOB_CSS } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function css(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:css',\n files: [GLOB_CSS],\n language: 'css/css',\n plugins: {\n css: plugin,\n },\n languageOptions: {\n tolerant: true,\n customSyntax: tailwindSyntax,\n },\n rules: {\n ...plugin.configs.recommended.rules,\n },\n },\n ];\n}\n","import type { Awaitable } from 'eslint-flat-config-utils';\n\nexport async function interopDefault<T>(m: Awaitable<T>): Promise<T extends { default: infer U } ? U : T> {\n const resolved = await m;\n\n return ((resolved as Record<string, unknown>).default || resolved) as never;\n}\n","import { fixupPluginRules } from '@eslint/compat';\n\nimport { GLOB_SRC } from '../globs';\nimport type { OptionsWithDrizzle, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function drizzle(options: OptionsWithDrizzle = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, drizzleObjectName = ['drizzle', 'db'] } = options;\n\n const drizzle = await interopDefault(import('eslint-plugin-drizzle'));\n\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:drizzle',\n plugins: {\n drizzle: fixupPluginRules(drizzle as never),\n },\n rules: {\n 'drizzle/enforce-update-with-where': ['error', { drizzleObjectName }],\n 'drizzle/enforce-delete-with-where': ['error', { drizzleObjectName }],\n\n ...overrides,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\nimport { loadConfig } from 'graphql-config';\n\nimport { PluginNameMap } from '../constants';\nimport type { OptionsWithFiles, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function graphql(options: OptionsWithFiles = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, files = ['**/*.graphql', '**/*.gql'] } = options;\n\n const [gql, gqlSchema] = await Promise.all([\n interopDefault(import('@graphql-eslint/eslint-plugin')),\n loadConfig({ throwOnEmpty: false, throwOnMissing: false }).then((g) => g?.getDefault().schema),\n ]);\n\n const flatRecommended = gql.configs['flat/operations-recommended'].rules;\n\n let rules = {} as typeof flatRecommended;\n\n if (gqlSchema) {\n rules = flatRecommended;\n } else {\n for (const rule of Object.keys(flatRecommended) as Array<keyof typeof rules>) {\n const ruleName = rule.replace('@graphql-eslint/', '') as keyof typeof gql.rules;\n\n if (\n ruleName in gql.rules\n && (gql.rules[ruleName].meta.docs?.requiresSchema || gql.rules[ruleName].meta.docs?.requiresSiblings)\n ) {\n continue;\n }\n rules[rule] = flatRecommended[rule] as never;\n }\n }\n\n const recommended = renamePluginsInRules(rules, PluginNameMap);\n\n return [\n {\n name: '2digits:graphql',\n plugins: {\n gql,\n },\n languageOptions: {\n parser: gql.parser,\n },\n files,\n rules: {\n ...recommended,\n\n 'gql/naming-convention': ['error', { allowLeadingUnderscore: true } as never],\n\n ...overrides,\n },\n },\n ];\n}\n","import { composer } from 'eslint-flat-config-utils';\n\nimport { GLOB_EXCLUDE } from '../globs';\nimport type { OptionsWithIgnores, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function ignores(options: OptionsWithIgnores = {}): Promise<TypedFlatConfigItem[]> {\n const { gitIgnore, ignores = [] } = options;\n\n return composer(\n {\n ignores: [GLOB_EXCLUDE, ignores].flat(),\n name: '2digits:ignores',\n },\n interopDefault(import('eslint-config-flat-gitignore')).then((m) =>\n m({ strict: false, ...gitIgnore, name: '2digits:gitignore' }),\n ),\n );\n}\n","import eslint from '@eslint/js';\nimport stylistic from '@stylistic/eslint-plugin';\nimport globals from 'globals';\n\nimport { GLOB_SRC } from '../globs';\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\n\nexport function javascript(options: OptionsOverrides = {}): TypedFlatConfigItem[] {\n const { overrides = {} } = options;\n\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:javascript',\n plugins: {\n stylistic,\n },\n languageOptions: {\n ecmaVersion: 2022,\n globals: {\n ...globals.browser,\n ...globals.es2021,\n ...globals.node,\n document: 'readonly',\n navigator: 'readonly',\n window: 'readonly',\n },\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n ecmaVersion: 2022,\n sourceType: 'module',\n },\n sourceType: 'module',\n },\n linterOptions: {\n reportUnusedDisableDirectives: true,\n },\n rules: {\n ...eslint.configs.recommended.rules,\n\n 'accessor-pairs': ['error', { enforceForClassMembers: true, setWithoutGet: true }],\n 'array-callback-return': 'error',\n 'block-scoped-var': 'error',\n 'constructor-super': 'error',\n 'default-case-last': 'error',\n 'dot-notation': ['error', { allowKeywords: true }],\n eqeqeq: ['error', 'smart'],\n 'new-cap': ['error', { capIsNew: false, newIsCap: true, properties: true }],\n 'no-alert': 'error',\n 'no-array-constructor': 'error',\n 'no-async-promise-executor': 'error',\n 'no-caller': 'error',\n 'no-case-declarations': 'error',\n 'no-class-assign': 'error',\n 'no-compare-neg-zero': 'error',\n 'no-cond-assign': ['error', 'always'],\n 'no-const-assign': 'error',\n 'no-control-regex': 'error',\n 'no-debugger': 'error',\n 'no-delete-var': 'error',\n 'no-dupe-args': 'error',\n 'no-dupe-class-members': 'error',\n 'no-dupe-keys': 'error',\n 'no-duplicate-case': 'error',\n 'no-empty': ['error', { allowEmptyCatch: true }],\n 'no-empty-character-class': 'error',\n 'no-empty-pattern': 'error',\n 'no-eval': 'error',\n 'no-ex-assign': 'error',\n 'no-extend-native': 'error',\n 'no-extra-bind': 'error',\n 'no-extra-boolean-cast': 'error',\n 'no-fallthrough': 'error',\n 'no-func-assign': 'error',\n 'no-global-assign': 'error',\n 'no-implied-eval': 'error',\n 'no-import-assign': 'error',\n 'no-invalid-regexp': 'error',\n 'no-irregular-whitespace': 'error',\n 'no-iterator': 'error',\n 'no-labels': ['error', { allowLoop: false, allowSwitch: false }],\n 'no-lone-blocks': 'error',\n 'no-loss-of-precision': 'error',\n 'no-misleading-character-class': 'error',\n 'no-multi-str': 'error',\n 'no-new': 'error',\n 'no-new-func': 'error',\n 'no-new-native-nonconstructor': 'error',\n 'no-new-wrappers': 'error',\n 'no-obj-calls': 'error',\n 'no-octal': 'error',\n 'no-octal-escape': 'error',\n 'no-proto': 'error',\n 'no-prototype-builtins': 'error',\n 'no-redeclare': ['error', { builtinGlobals: false }],\n 'no-regex-spaces': 'error',\n 'no-restricted-globals': [\n 'error',\n { message: 'Use `globalThis` instead.', name: 'global' },\n { message: 'Use `globalThis` instead.', name: 'self' },\n ],\n 'no-restricted-properties': [\n 'error',\n {\n message: 'Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.',\n property: '__proto__',\n },\n {\n message: 'Use `Object.defineProperty` instead.',\n property: '__defineGetter__',\n },\n {\n message: 'Use `Object.defineProperty` instead.',\n property: '__defineSetter__',\n },\n {\n message: 'Use `Object.getOwnPropertyDescriptor` instead.',\n property: '__lookupGetter__',\n },\n {\n message: 'Use `Object.getOwnPropertyDescriptor` instead.',\n property: '__lookupSetter__',\n },\n ],\n 'no-restricted-syntax': [\n 'error',\n 'DebuggerStatement',\n 'LabeledStatement',\n 'WithStatement',\n 'TSEnumDeclaration',\n 'TSExportAssignment',\n ],\n 'no-self-assign': ['error', { props: true }],\n 'no-self-compare': 'error',\n 'no-sequences': 'error',\n 'no-shadow-restricted-names': 'error',\n 'no-sparse-arrays': 'error',\n 'no-template-curly-in-string': 'error',\n 'no-this-before-super': 'error',\n 'no-throw-literal': 'error',\n 'no-undef': 'error',\n 'no-undef-init': 'error',\n 'no-unexpected-multiline': 'error',\n 'no-unmodified-loop-condition': 'error',\n 'no-unneeded-ternary': ['error', { defaultAssignment: false }],\n 'no-unreachable': 'error',\n 'no-unreachable-loop': 'error',\n 'no-unsafe-finally': 'error',\n 'no-unsafe-negation': 'error',\n 'no-unused-expressions': [\n 'error',\n {\n allowShortCircuit: true,\n allowTaggedTemplates: true,\n allowTernary: true,\n },\n ],\n 'no-unused-vars': [\n 'error',\n {\n args: 'none',\n caughtErrors: 'none',\n ignoreRestSiblings: true,\n vars: 'all',\n },\n ],\n 'no-useless-backreference': 'error',\n 'no-useless-call': 'error',\n 'no-useless-catch': 'error',\n 'no-useless-computed-key': 'error',\n 'no-useless-constructor': 'error',\n 'no-useless-rename': 'error',\n 'no-var': 'error',\n 'no-with': 'error',\n 'object-shorthand': [\n 'error',\n 'always',\n {\n avoidQuotes: true,\n ignoreConstructors: false,\n },\n ],\n 'one-var': ['error', { initialized: 'never' }],\n 'prefer-arrow-callback': [\n 'error',\n {\n allowNamedFunctions: true,\n allowUnboundThis: true,\n },\n ],\n 'prefer-const': [\n 'error',\n {\n destructuring: 'all',\n ignoreReadBeforeAssign: true,\n },\n ],\n 'prefer-exponentiation-operator': 'error',\n 'prefer-promise-reject-errors': 'error',\n 'prefer-regex-literals': ['error', { disallowRedundantWrapping: true }],\n 'prefer-rest-params': 'error',\n 'prefer-spread': 'error',\n 'prefer-template': 'error',\n 'symbol-description': 'error',\n 'unicode-bom': ['error', 'never'],\n 'use-isnan': ['error', { enforceForIndexOf: true, enforceForSwitchCase: true }],\n 'valid-typeof': ['error', { requireStringLiterals: true }],\n 'vars-on-top': 'error',\n yoda: ['error', 'never'],\n\n 'stylistic/padding-line-between-statements': [\n 'error',\n { blankLine: 'always', prev: ['const', 'let'], next: '*' },\n {\n blankLine: 'any',\n prev: ['const', 'let'],\n next: ['const', 'let'],\n },\n { blankLine: 'always', prev: '*', next: 'return' },\n ],\n\n ...overrides,\n },\n },\n ];\n}\n","import { GLOB_SRC } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function jsdoc(): Promise<TypedFlatConfigItem[]> {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:jsdoc',\n plugins: {\n jsdoc: await interopDefault(import('eslint-plugin-jsdoc')),\n },\n rules: {\n 'jsdoc/check-access': 'error',\n 'jsdoc/check-param-names': 'error',\n 'jsdoc/check-property-names': 'error',\n 'jsdoc/check-types': 'error',\n 'jsdoc/empty-tags': 'error',\n 'jsdoc/implements-on-classes': 'error',\n 'jsdoc/no-defaults': 'error',\n 'jsdoc/no-multi-asterisks': 'error',\n 'jsdoc/require-param-name': 'error',\n 'jsdoc/require-property': 'error',\n 'jsdoc/require-property-description': 'error',\n 'jsdoc/require-property-name': 'error',\n 'jsdoc/require-returns-check': 'error',\n 'jsdoc/require-returns-description': 'error',\n 'jsdoc/require-yields-check': 'error',\n },\n },\n ];\n}\n","import plugin, { configs } from 'eslint-plugin-jsonc';\nimport parser from 'jsonc-eslint-parser';\n\nimport { GLOB_JSON, GLOB_JSON5, GLOB_JSONC } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function jsonc(): TypedFlatConfigItem[] {\n return [\n ...configs['flat/base'].map((config) => ({ ...config, name: '2digits:jsonc/base' })),\n\n {\n name: '2digits:jsonc/json',\n files: [GLOB_JSON],\n ...SHARED_OPTIONS,\n rules: {\n ...collectRules(configs['flat/recommended-with-json']),\n },\n },\n {\n name: '2digits:jsonc/jsonc',\n files: [GLOB_JSONC],\n ...SHARED_OPTIONS,\n rules: {\n ...collectRules(configs['flat/recommended-with-jsonc']),\n },\n },\n {\n name: '2digits:jsonc/json5',\n files: [GLOB_JSON5],\n ...SHARED_OPTIONS,\n rules: {\n ...collectRules(configs['flat/recommended-with-json5']),\n },\n },\n\n {\n name: '2digits:jsonc/package.json',\n ...SHARED_OPTIONS,\n files: ['**/package.json'],\n rules: {\n 'jsonc/sort-array-values': [\n 'error',\n {\n order: { type: 'asc' },\n pathPattern: '^files$',\n },\n ],\n 'jsonc/sort-keys': [\n 'error',\n {\n order: [\n '$schema',\n 'publisher',\n 'name',\n 'displayName',\n 'version',\n 'private',\n 'description',\n 'funding',\n 'homepage',\n 'repository',\n 'bugs',\n 'categories',\n 'type',\n 'main',\n 'module',\n 'types',\n 'typesVersions',\n 'bin',\n 'files',\n 'exports',\n 'icon',\n 'unpkg',\n 'jsdelivr',\n 'sideEffects',\n 'activationEvents',\n 'contributes',\n 'scripts',\n 'keywords',\n 'author',\n 'license',\n 'workspaces',\n 'dependencies',\n 'devDependencies',\n 'peerDependencies',\n 'peerDependenciesMeta',\n 'optionalDependencies',\n 'packageManager',\n 'engines',\n 'pnpm',\n 'overrides',\n 'resolutions',\n 'husky',\n 'simple-git-hooks',\n 'lint-staged',\n 'eslintConfig',\n 'prettier',\n ],\n pathPattern: '^$',\n },\n {\n order: { type: 'asc' },\n pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$',\n },\n {\n order: ['types', 'import', 'module', 'require', 'default'],\n pathPattern: '^exports.*$',\n },\n ],\n },\n },\n\n {\n name: '2digits:jsonc/tsconfig.json',\n ...SHARED_OPTIONS,\n files: [\n '**/tsconfig.json',\n '**/tsconfig.*.json',\n '**/tsconfig-*.json',\n '**/jsconfig.json',\n '**/jsconfig.*.json',\n '**/jsconfig-*.json',\n ],\n rules: {\n 'jsonc/sort-keys': [\n 'error',\n {\n order: ['$schema', 'extends', 'compilerOptions', 'references', 'files', 'include', 'exclude'],\n pathPattern: '^$',\n },\n {\n order: [\n /* Projects */\n 'incremental',\n 'composite',\n 'tsBuildInfoFile',\n 'disableSourceOfProjectReferenceRedirect',\n 'disableSolutionSearching',\n 'disableReferencedProjectLoad',\n /* Language and Environment */\n 'target',\n 'lib',\n 'jsx',\n 'experimentalDecorators',\n 'emitDecoratorMetadata',\n 'jsxFactory',\n 'jsxFragmentFactory',\n 'jsxImportSource',\n 'reactNamespace',\n 'noLib',\n 'useDefineForClassFields',\n 'moduleDetection',\n /* Modules */\n 'module',\n 'rootDir',\n 'moduleResolution',\n 'baseUrl',\n 'paths',\n 'rootDirs',\n 'typeRoots',\n 'types',\n 'allowUmdGlobalAccess',\n 'moduleSuffixes',\n 'allowImportingTsExtensions',\n 'resolvePackageJsonExports',\n 'resolvePackageJsonImports',\n 'customConditions',\n 'resolveJsonModule',\n 'allowArbitraryExtensions',\n 'noResolve',\n /* JavaScript Support */\n 'allowJs',\n 'checkJs',\n 'maxNodeModuleJsDepth',\n /* Emit */\n 'declaration',\n 'declarationMap',\n 'emitDeclarationOnly',\n 'sourceMap',\n 'inlineSourceMap',\n 'outFile',\n 'outDir',\n 'removeComments',\n 'noEmit',\n 'importHelpers',\n 'importsNotUsedAsValues',\n 'downlevelIteration',\n 'sourceRoot',\n 'mapRoot',\n 'inlineSources',\n 'emitBOM',\n 'newLine',\n 'stripInternal',\n 'noEmitHelpers',\n 'noEmitOnError',\n 'preserveConstEnums',\n 'declarationDir',\n 'preserveValueImports',\n /* Interop Constraints */\n 'isolatedModules',\n 'verbatimModuleSyntax',\n 'allowSyntheticDefaultImports',\n 'esModuleInterop',\n 'preserveSymlinks',\n 'forceConsistentCasingInFileNames',\n /* Type Checking */\n 'strict',\n 'strictBindCallApply',\n 'strictFunctionTypes',\n 'strictNullChecks',\n 'strictPropertyInitialization',\n 'allowUnreachableCode',\n 'allowUnusedLabels',\n 'alwaysStrict',\n 'exactOptionalPropertyTypes',\n 'noFallthroughCasesInSwitch',\n 'noImplicitAny',\n 'noImplicitOverride',\n 'noImplicitReturns',\n 'noImplicitThis',\n 'noPropertyAccessFromIndexSignature',\n 'noUncheckedIndexedAccess',\n 'noUnusedLocals',\n 'noUnusedParameters',\n 'useUnknownInCatchVariables',\n /* Completeness */\n 'skipDefaultLibCheck',\n 'skipLibCheck',\n ],\n pathPattern: '^compilerOptions$',\n },\n ],\n },\n },\n\n ...configs['flat/prettier'].map((config) => ({ ...config, name: '2digits:jsonc/prettier' })),\n ];\n}\n\nconst SHARED_OPTIONS = {\n languageOptions: {\n parser,\n },\n plugins: {\n jsonc: plugin,\n },\n} satisfies Pick<TypedFlatConfigItem, 'plugins' | 'languageOptions'>;\n\ntype FlatConfigName = Extract<keyof typeof configs, `flat/${string}`>;\n\nfunction collectRules(config: (typeof configs)[FlatConfigName]) {\n return Object.fromEntries(config.flatMap(({ rules }) => Object.entries(rules ?? {})));\n}\n","import { fixupPluginRules } from '@eslint/compat';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_TS, GLOB_TSX } from '../globs';\nimport type { OptionsTypeScriptWithTypes, OptionsWithFiles, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function next(\n options: OptionsWithFiles & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const { files = [GLOB_TS, GLOB_TSX], overrides = {}, parserOptions } = options;\n\n const [next, parser] = await Promise.all([\n interopDefault(import('@next/eslint-plugin-next')),\n interopDefault(import('@typescript-eslint/parser')),\n ]);\n\n const recommended = renamePluginsInRules(\n {\n ...next.configs.recommended.rules,\n ...next.configs['core-web-vitals'].rules,\n },\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:next/setup',\n plugins: {\n next: fixupPluginRules(next as never),\n },\n },\n {\n name: '2digits:next/rules',\n files,\n languageOptions: {\n parser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n projectService: true,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...recommended,\n\n 'next/no-html-link-for-pages': 'off',\n\n ...overrides,\n },\n },\n ];\n}\n","import { GLOB_SRC } from '../globs';\nimport { pluginNode } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function node(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:node',\n settings: {\n node: {\n version: '>= 22.0.0',\n },\n },\n plugins: {\n node: pluginNode,\n },\n rules: {\n 'node/handle-callback-err': ['error', '^(err|error)$'],\n 'node/no-deprecated-api': 'error',\n 'node/no-exports-assign': 'error',\n 'node/no-new-require': 'error',\n 'node/no-path-concat': 'error',\n 'node/no-unsupported-features/node-builtins': ['error', { allowExperimental: true }],\n 'node/prefer-global/buffer': 'error',\n 'node/prefer-global/process': 'error',\n 'node/prefer-global/text-encoder': 'error',\n 'node/prefer-global/url': 'error',\n 'node/prefer-global/console': 'error',\n 'node/prefer-global/url-search-params': 'error',\n 'node/prefer-global/text-decoder': 'error',\n 'node/process-exit-as-throw': 'error',\n },\n },\n ];\n}\n","import jsoncParser from 'jsonc-eslint-parser';\nimport yamlParser from 'yaml-eslint-parser';\n\nimport type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function pnpm(): Promise<TypedFlatConfigItem[]> {\n const plugin = await interopDefault(import('eslint-plugin-pnpm'));\n\n return [\n {\n name: '2digits:pnpm/package-json',\n files: ['**/package.json'],\n languageOptions: {\n parser: jsoncParser,\n },\n plugins: {\n pnpm: plugin,\n },\n rules: {\n 'pnpm/json-enforce-catalog': 'error',\n 'pnpm/json-prefer-workspace-settings': 'error',\n 'pnpm/json-valid-catalog': 'error',\n },\n },\n {\n name: '2digits:pnpm/pnpm-workspace-yaml',\n files: ['pnpm-workspace.yaml'],\n languageOptions: {\n parser: yamlParser,\n },\n plugins: {\n pnpm: plugin,\n },\n rules: {\n 'pnpm/yaml-no-duplicate-catalog-item': 'error',\n 'pnpm/yaml-no-unused-catalog-item': 'error',\n },\n },\n ];\n}\n","import type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function prettier(): Promise<TypedFlatConfigItem[]> {\n const [prettier, stylistic] = await Promise.all([\n interopDefault(import('eslint-config-prettier')),\n interopDefault(import('@stylistic/eslint-plugin')),\n ]);\n\n return [\n {\n name: '2digits:prettier',\n plugins: {\n stylistic,\n },\n rules: {\n ...prettier.rules,\n\n 'tailwindcss/classnames-order': 'off',\n 'stylistic/jsx-newline': ['error', { prevent: false }],\n },\n },\n ];\n}\n","import stylistic from '@stylistic/eslint-plugin';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_TS, GLOB_TSX } from '../globs';\nimport type { OptionsTypeScriptWithTypes, OptionsWithReact, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function react(\n options: OptionsWithReact & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const { files = [GLOB_TS, GLOB_TSX], overrides = {}, parserOptions, tsconfigRootDir, reactCompiler = true } = options;\n\n const [pluginReact, pluginReactHooks, parser, pluginReactCompiler] = await Promise.all([\n interopDefault(import('@eslint-react/eslint-plugin')),\n interopDefault(import('eslint-plugin-react-hooks')),\n interopDefault(import('@typescript-eslint/parser')),\n reactCompiler ? interopDefault(import('eslint-plugin-react-compiler')) : undefined,\n ]);\n\n const plugins = pluginReact.configs.all.plugins;\n\n const recommended = renamePluginsInRules(\n {\n ...pluginReactHooks.configs['recommended-latest'].rules,\n ...pluginReact.configs['recommended-type-checked'].rules,\n },\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:react/setup',\n plugins: {\n stylistic,\n 'react-dom': plugins['@eslint-react/dom'],\n 'react-web-api': plugins['@eslint-react/web-api'],\n 'react-extra': plugins['@eslint-react'],\n 'react-hooks': pluginReactHooks,\n 'react-hooks-extra': plugins['@eslint-react/hooks-extra'],\n 'react-naming-convention': plugins['@eslint-react/naming-convention'],\n ...(reactCompiler ? { 'react-compiler': pluginReactCompiler } : {}),\n },\n settings: {\n react: {\n version: 'detect',\n },\n },\n },\n {\n name: '2digits:react/rules',\n files,\n languageOptions: {\n parser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n tsconfigRootDir,\n projectService: true,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...recommended,\n\n ...(reactCompiler ? { 'react-compiler/react-compiler': 'error' } : {}),\n\n 'react-hooks-extra/no-unnecessary-use-callback': 'error',\n 'react-hooks-extra/prefer-use-state-lazy-initialization': 'error',\n 'react-hooks-extra/no-redundant-custom-hook': 'error',\n 'react-hooks-extra/no-unnecessary-use-memo': 'error',\n\n 'react-extra/prefer-read-only-props': 'off',\n 'react-extra/prefer-shorthand-boolean': 'error',\n 'react-extra/prefer-shorthand-fragment': 'error',\n 'react-extra/prefer-react-namespace-import': 'error',\n\n 'react-naming-convention/use-state': 'error',\n\n 'stylistic/jsx-curly-newline': 'off',\n 'stylistic/jsx-newline': ['error', { prevent: false }],\n 'stylistic/jsx-self-closing-comp': 'error',\n\n ...overrides,\n },\n },\n ];\n}\n","import pluginRegexp from 'eslint-plugin-regexp';\n\nimport { GLOB_SRC } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function regexp(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:regexp',\n plugins: {\n regexp: pluginRegexp,\n },\n rules: {\n ...pluginRegexp.configs['flat/recommended'].rules,\n },\n },\n ];\n}\n","import { GLOB_SRC } from '../globs';\nimport { pluginSonar } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function sonar(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:sonar',\n plugins: {\n sonar: pluginSonar,\n },\n rules: {\n 'sonar/code-eval': 'error',\n 'sonar/cognitive-complexity': 'error',\n 'sonar/comma-or-logical-or-case': 'error',\n 'sonar/concise-regex': 'error',\n 'sonar/confidential-information-logging': 'error',\n 'sonar/constructor-for-side-effects': 'error',\n 'sonar/content-length': 'error',\n 'sonar/content-security-policy': 'error',\n 'sonar/cookie-no-httponly': 'error',\n 'sonar/cors': 'error',\n 'sonar/csrf': 'error',\n 'sonar/max-switch-cases': 'error',\n 'sonar/no-all-duplicated-branches': 'error',\n 'sonar/no-collapsible-if': 'error',\n 'sonar/no-collection-size-mischeck': 'error',\n 'sonar/no-duplicate-string': ['error', { threshold: 5 }],\n 'sonar/no-duplicated-branches': 'error',\n 'sonar/no-element-overwrite': 'error',\n 'sonar/no-empty-collection': 'error',\n 'sonar/no-extra-arguments': 'error',\n 'sonar/no-for-in-iterable': 'error',\n 'sonar/no-gratuitous-expressions': 'error',\n 'sonar/no-identical-conditions': 'error',\n 'sonar/no-identical-expressions': 'error',\n 'sonar/no-identical-functions': 'error',\n 'sonar/no-ignored-return': 'error',\n 'sonar/no-inverted-boolean-check': 'error',\n 'sonar/no-nested-switch': 'error',\n 'sonar/no-nested-template-literals': 'error',\n 'sonar/no-one-iteration-loop': 'error',\n 'sonar/no-redundant-boolean': 'error',\n 'sonar/no-same-line-conditional': 'error',\n 'sonar/no-small-switch': 'error',\n 'sonar/no-unused-collection': 'error',\n 'sonar/no-use-of-empty-return-value': 'error',\n 'sonar/no-useless-catch': 'error',\n 'sonar/non-existent-operator': 'error',\n 'sonar/prefer-immediate-return': 'error',\n 'sonar/prefer-object-literal': 'error',\n 'sonar/prefer-single-boolean-return': 'error',\n 'sonar/prefer-while': 'error',\n\n 'sonar/elseif-without-else': 'off',\n 'sonar/no-redundant-jump': 'off',\n },\n },\n ];\n}\n","import { fixupPluginRules } from '@eslint/compat';\nimport type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';\n\nimport { GLOB_STORIES } from '../globs';\nimport type { OptionsTypeScriptWithTypes, OptionsWithStorybook, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function storybook(\n options: OptionsWithStorybook & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const { files = [GLOB_STORIES], overrides = {}, parserOptions, storybookDirectory = '.storybook' } = options;\n\n const [storybook, parser] = await Promise.all([\n interopDefault(import('eslint-plugin-storybook')),\n interopDefault(import('@typescript-eslint/parser')),\n ]);\n\n const languageOptions = {\n parser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n projectService: true,\n ...parserOptions,\n },\n sourceType: 'module',\n } satisfies FlatConfig.LanguageOptions;\n\n return [\n {\n name: '2digits:storybook/setup',\n plugins: {\n storybook: fixupPluginRules(storybook as never),\n },\n },\n {\n name: '2digits:storybook/rules',\n files,\n languageOptions,\n rules: {\n 'storybook/await-interactions': 'error',\n 'storybook/context-in-play-function': 'error',\n 'storybook/csf-component': 'error',\n 'storybook/default-exports': 'error',\n 'storybook/hierarchy-separator': 'error',\n 'storybook/meta-inline-properties': 'error',\n 'storybook/no-redundant-story-name': 'error',\n 'storybook/no-stories-of': 'error',\n 'storybook/no-title-property-in-meta': 'error',\n 'storybook/no-uninstalled-addons': 'error',\n 'storybook/prefer-pascal-case': 'error',\n 'storybook/story-exports': 'error',\n 'storybook/use-storybook-expect': 'error',\n 'storybook/use-storybook-testing-library': 'error',\n\n ...overrides,\n },\n },\n {\n name: '2digits:storybook/disables',\n files,\n rules: {\n 'react-hooks/rules-of-hooks': 'off',\n 'react/display-name': 'off',\n 'sonar/no-duplicate-string': 'off',\n },\n },\n {\n name: '2digits:storybook/config',\n files: [`${storybookDirectory}/main.@(js|cjs|mjs|ts)`],\n languageOptions,\n rules: {\n 'storybook/no-uninstalled-addons': 'error',\n },\n },\n ];\n}\n","import { findUp } from 'find-up';\n\nimport { GLOB_SRC } from '../globs';\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function tailwind(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options;\n\n const [tailwindcss, { tailwindFunctions }, config] = await Promise.all([\n interopDefault(import('eslint-plugin-tailwindcss')),\n interopDefault(import('@2digits/constants')),\n findUp(['tailwind.config.ts', 'tailwind.config.js']),\n ]);\n\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:tailwind',\n plugins: {\n tailwindcss,\n },\n settings: {\n tailwindcss: {\n callees: tailwindFunctions,\n config,\n },\n },\n rules: {\n ...tailwindcss.configs.recommended.rules,\n\n ...overrides,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_SRC } from '../globs';\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function tanstack(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options;\n\n const tanstack = await interopDefault(import('@tanstack/eslint-plugin-query'));\n\n const recommended = renamePluginsInRules(tanstack.configs['flat/recommended'].at(0)?.rules ?? {}, PluginNameMap);\n\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:tanstack',\n plugins: { tanstack },\n rules: {\n ...recommended,\n\n ...overrides,\n },\n },\n ];\n}\n","import { GLOB_SRC } from '../globs';\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function turbo(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options;\n\n const turbo = await interopDefault(import('eslint-plugin-turbo'));\n\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:turbo',\n plugins: {\n turbo,\n },\n rules: {\n 'turbo/no-undeclared-env-vars': 'error',\n\n ...overrides,\n },\n },\n ];\n}\n","import { renamePluginsInConfigs } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { GLOB_SRC } from '../globs';\nimport type { OptionsTypeScriptWithTypes, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function typescript(options: OptionsTypeScriptWithTypes = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, parserOptions = {} } = options;\n\n const [{ plugin, configs, parser }, twoDigits] = await Promise.all([\n interopDefault(import('typescript-eslint')),\n interopDefault(import('@2digits/eslint-plugin')),\n ]);\n\n const strictConfig = renamePluginsInConfigs(configs.strictTypeChecked as never, PluginNameMap);\n\n const rules = Object.fromEntries(strictConfig.flatMap(({ rules }) => Object.entries(rules ?? {})));\n\n return [\n {\n name: '2digits:typescript/setup',\n plugins: {\n ts: plugin,\n '@2digits': twoDigits,\n },\n },\n {\n name: '2digits:typescript/rules',\n files: [GLOB_SRC],\n languageOptions: {\n parser,\n parserOptions: {\n tsconfigRootDir: process.cwd(),\n projectService: true,\n warnOnUnsupportedTypeScriptVersion: false,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...rules,\n 'ts/restrict-template-expressions': ['error', { allowNumber: true }],\n 'ts/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],\n 'ts/consistent-type-exports': ['error'],\n 'ts/consistent-type-imports': [\n 'error',\n {\n prefer: 'type-imports',\n disallowTypeAnnotations: false,\n fixStyle: 'inline-type-imports',\n },\n ],\n 'ts/no-empty-object-type': ['error', { allowInterfaces: 'with-single-extends', allowObjectTypes: 'never' }],\n 'ts/no-explicit-any': ['error'],\n 'ts/no-import-type-side-effects': ['error'],\n 'ts/no-misused-promises': 'off',\n 'ts/no-confusing-void-expression': 'off',\n 'ts/no-unused-vars': [\n 'error',\n {\n ignoreRestSiblings: true,\n argsIgnorePattern: '^_',\n varsIgnorePattern: '^_',\n },\n ],\n 'ts/unbound-method': 'off',\n\n ...(twoDigits.configs.recommended.rules as object),\n\n ...overrides,\n },\n },\n {\n files: ['**/*.d.ts'],\n name: '2digits:typescript/disables/dts',\n rules: {\n 'unicorn/no-abusive-eslint-disable': 'off',\n 'no-duplicate-imports': 'off',\n 'no-restricted-syntax': 'off',\n 'ts/no-unused-vars': 'off',\n },\n },\n {\n files: ['**/*.{test,spec}.ts?(x)'],\n name: '2digits:typescript/disables/test',\n rules: {\n 'no-unused-expressions': 'off',\n },\n },\n {\n files: ['**/*.js', '**/*.cjs', '**/*.cts'],\n name: '2digits:typescript/disables/cjs',\n rules: {\n 'ts/no-require-imports': 'off',\n 'ts/no-var-requires': 'off',\n },\n },\n ];\n}\n","import { GLOB_SRC } from '../globs';\nimport { pluginUnicorn } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function unicorn(): TypedFlatConfigItem[] {\n return [\n {\n files: [GLOB_SRC],\n name: '2digits:unicorn',\n plugins: {\n unicorn: pluginUnicorn,\n },\n rules: {\n ...pluginUnicorn.configs.recommended.rules,\n\n 'unicorn/filename-case': ['off'],\n 'unicorn/prefer-module': ['off'],\n 'unicorn/prevent-abbreviations': ['off'],\n 'unicorn/prefer-ternary': ['error', 'only-single-line'],\n 'unicorn/no-useless-undefined': [\n 'error',\n {\n checkArguments: false,\n checkArrowFunctionBody: false,\n },\n ],\n 'unicorn/prefer-top-level-await': ['off'],\n },\n },\n ];\n}\n","import yml from 'eslint-plugin-yml';\nimport parser from 'yaml-eslint-parser';\n\nimport { GLOB_YAML } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function yaml(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:yaml/setup',\n plugins: {\n yml,\n },\n },\n\n {\n name: '2digits:yaml/base',\n ...SHARED_OPTIONS,\n rules: {\n 'no-irregular-whitespace': 'off',\n 'no-unused-vars': 'off',\n 'spaced-comment': 'off',\n },\n },\n\n {\n name: '2digits:yaml/recommended',\n ...SHARED_OPTIONS,\n rules: {\n 'yml/no-empty-document': 'error',\n 'yml/no-empty-key': 'error',\n 'yml/no-empty-mapping-value': 'error',\n 'yml/no-empty-sequence-entry': 'error',\n 'yml/no-irregular-whitespace': 'error',\n 'yml/no-tab-indent': 'error',\n 'yml/vue-custom-block/no-parsing-error': 'error',\n },\n },\n\n {\n name: '2digits:yaml/standard',\n ...SHARED_OPTIONS,\n rules: {\n 'yml/block-mapping': 'error',\n 'yml/block-sequence': 'error',\n 'yml/plain-scalar': 'error',\n 'yml/spaced-comment': 'error',\n },\n },\n\n {\n name: '2digits:yaml/pnpm-workspace',\n ...SHARED_OPTIONS,\n files: ['pnpm-workspace.yaml'],\n rules: {\n 'yml/sort-keys': [\n 'error',\n {\n order: [\n 'packages',\n 'overrides',\n 'patchedDependencies',\n 'hoistPattern',\n 'catalog',\n 'catalogs',\n\n 'allowedDeprecatedVersions',\n 'allowNonAppliedPatches',\n 'configDependencies',\n 'ignoredBuiltDependencies',\n 'ignoredOptionalDependencies',\n 'neverBuiltDependencies',\n 'onlyBuiltDependencies',\n 'onlyBuiltDependenciesFile',\n 'packageExtensions',\n 'peerDependencyRules',\n 'supportedArchitectures',\n ],\n pathPattern: '^$',\n },\n {\n order: { type: 'asc' },\n pathPattern: '.*',\n },\n ],\n },\n },\n\n {\n name: '2digits:yaml/prettier',\n ...SHARED_OPTIONS,\n rules: {\n 'yml/block-mapping-colon-indicator-newline': 'off',\n 'yml/block-mapping-question-indicator-newline': 'off',\n 'yml/block-sequence-hyphen-indicator-newline': 'off',\n 'yml/flow-mapping-curly-newline': 'off',\n 'yml/flow-mapping-curly-spacing': 'off',\n 'yml/flow-sequence-bracket-newline': 'off',\n 'yml/flow-sequence-bracket-spacing': 'off',\n 'yml/indent': 'off',\n 'yml/key-spacing': 'off',\n 'yml/no-multiple-empty-lines': 'off',\n 'yml/no-trailing-zeros': 'off',\n 'yml/quotes': 'off',\n },\n },\n ];\n}\n\nconst SHARED_OPTIONS = {\n files: [GLOB_YAML],\n languageOptions: {\n parser,\n },\n} satisfies Pick<TypedFlatConfigItem, 'languageOptions' | 'files'>;\n","import { FlatConfigComposer } from 'eslint-flat-config-utils';\nimport { findUp } from 'find-up';\nimport { isPackageExists } from 'local-pkg';\n\nimport {\n antfu,\n boolean,\n comments,\n css,\n drizzle,\n graphql,\n ignores,\n javascript,\n jsdoc,\n jsonc,\n next,\n node,\n pnpm,\n prettier,\n react,\n regexp,\n sonar,\n storybook,\n tailwind,\n tanstack,\n turbo,\n typescript,\n unicorn,\n yaml,\n} from './configs';\nimport { PluginNameMap } from './constants';\nimport type {\n ConfigNames,\n OptionsOverrides,\n OptionsTypeScriptWithTypes,\n OptionsWithDrizzle,\n OptionsWithFiles,\n OptionsWithIgnores,\n OptionsWithReact,\n OptionsWithStorybook,\n TypedFlatConfigItem,\n} from './types';\n\ntype SharedOptions<T = unknown> = T & {\n enable?: boolean;\n};\n\ninterface ESLint2DigitsOptions {\n ignores?: OptionsWithIgnores;\n turbo?: SharedOptions<OptionsOverrides> | boolean;\n js?: OptionsOverrides;\n ts?: SharedOptions<OptionsTypeScriptWithTypes> | boolean;\n pnpm?: SharedOptions | boolean;\n graphql?: SharedOptions<OptionsWithFiles> | boolean;\n react?: SharedOptions<OptionsWithReact> | boolean;\n next?: SharedOptions<OptionsWithFiles> | boolean;\n tailwind?: SharedOptions<OptionsOverrides> | boolean;\n storybook?: SharedOptions<OptionsWithStorybook> | boolean;\n tanstack?: SharedOptions<OptionsOverrides> | boolean;\n drizzle?: SharedOptions<OptionsWithDrizzle> | boolean;\n}\n\nfunction enabled<T extends SharedOptions>(options: T | boolean | undefined, defaults?: boolean): options is T {\n if (typeof options === 'boolean') {\n return options;\n }\n\n return options?.enable ?? defaults ?? false;\n}\n\nfunction config<T>(options: SharedOptions<T> | undefined | boolean): T {\n if (typeof options === 'boolean' || options === undefined) {\n return {} as T;\n }\n\n const { enable, ...rest } = options;\n\n return rest as T;\n}\n\nexport async function twoDigits(\n options: ESLint2DigitsOptions = {},\n ...userConfig: TypedFlatConfigItem[]\n): Promise<TypedFlatConfigItem[]> {\n let pnpmPromise;\n\n if (options.pnpm === undefined) {\n pnpmPromise = findUp('pnpm-workspace.yaml');\n }\n\n let composer = new FlatConfigComposer<TypedFlatConfigItem, ConfigNames>(\n ignores(options.ignores),\n javascript(options.js),\n boolean(),\n node(),\n comments(),\n jsdoc(),\n unicorn(),\n sonar(),\n regexp(),\n antfu(),\n jsonc(),\n css(),\n yaml(),\n );\n\n if (enabled(options.turbo, isPackageExists('turbo'))) {\n composer = composer.append(turbo(config(options.turbo)));\n }\n\n const { overrides, ...typescriptOptions } = config(options.ts);\n\n if (enabled(options.ts, isPackageExists('typescript'))) {\n composer = composer.append(typescript(config(options.ts)));\n }\n\n if (enabled(options.react, isPackageExists('react'))) {\n composer = composer.append(\n react({\n ...config(options.react),\n ...typescriptOptions,\n }),\n );\n }\n\n if (enabled(options.next, isPackageExists('next'))) {\n composer = composer.append(\n next({\n ...config(options.next),\n ...typescriptOptions,\n }),\n );\n }\n\n if (enabled(options.storybook, isPackageExists('storybook'))) {\n composer = composer.append(\n storybook({\n ...config(options.storybook),\n ...typescriptOptions,\n }),\n );\n }\n\n if (enabled(options.tailwind, isPackageExists('tailwindcss'))) {\n composer = composer.append(tailwind(config(options.tailwind)));\n }\n\n if (\n enabled(\n options.tanstack,\n isPackageExists('react-query')\n || isPackageExists('@tanstack/react-query')\n || isPackageExists('@tanstack/react-query-devtools'),\n )\n ) {\n composer = composer.append(tanstack(config(options.tanstack)));\n }\n\n if (enabled(options.drizzle, isPackageExists('drizzle-kit') || isPackageExists('drizzle-orm'))) {\n composer = composer.append(drizzle(config(options.drizzle)));\n }\n\n if (enabled(options.graphql, isPackageExists('graphql'))) {\n composer = composer.append(graphql(config(options.graphql)));\n }\n\n if (enabled(options.pnpm, !!(await pnpmPromise))) {\n composer = composer.append(pnpm());\n }\n\n composer = composer.append(...userConfig);\n\n if (isPackageExists('prettier')) {\n composer = composer.append(prettier());\n }\n\n return composer.renamePlugins(PluginNameMap).toConfigs();\n}\n"]}
|