@2digits/eslint-config 2.9.16 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var H=require('eslint-plugin-antfu'),$=require('@eslint-community/eslint-plugin-eslint-comments'),K=require('@eslint-community/eslint-plugin-eslint-comments/configs'),eslintFlatConfigUtils=require('eslint-flat-config-utils'),compat=require('@eslint/compat'),re=require('@eslint/js'),h=require('globals'),O=require('eslint-plugin-unicorn'),q=require('eslint-plugin-n'),T=require('eslint-plugin-sonarjs'),L=require('eslint-plugin-regexp'),findUp=require('find-up'),localPkg=require('local-pkg');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var H__default=/*#__PURE__*/_interopDefault(H);var $__default=/*#__PURE__*/_interopDefault($);var K__default=/*#__PURE__*/_interopDefault(K);var re__default=/*#__PURE__*/_interopDefault(re);var h__default=/*#__PURE__*/_interopDefault(h);var O__default=/*#__PURE__*/_interopDefault(O);var q__default=/*#__PURE__*/_interopDefault(q);var T__default=/*#__PURE__*/_interopDefault(T);var L__default=/*#__PURE__*/_interopDefault(L);function k(){return [{name:"2digits:antfu",plugins:{antfu:H__default.default},rules:{"antfu/if-newline":"error","antfu/top-level-function":"error"}}]}var a={"@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",react:"react","@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"};var J=eslintFlatConfigUtils.renamePluginsInRules(K__default.default.recommended.rules,a);function w(){return [{name:"2digits:comments",plugins:{comments:$__default.default},rules:{...J,"comments/no-unused-disable":"error","comments/disable-enable-pair":["error",{allowWholeFile:!0}]}}]}async function o(e){let t=await e;return t.default||t}async function v(e={}){let{overrides:t={},files:r=["**/*.graphql","**/*.gql"]}=e,i=await o(import('@graphql-eslint/eslint-plugin')),s=eslintFlatConfigUtils.renamePluginsInRules(i.flatConfigs["operations-recommended"].rules,a);return [{name:"2digits:graphql",plugins:{gql:compat.fixupPluginRules(i)},languageOptions:{parser:{...i,meta:{name:"graphql"}}},files:r,rules:{...s,"gql/naming-convention":["error",{allowLeadingUnderscore:!0}],...t}}]}var C="**/*.?([cm])[jt]s?(x)",y="**/*.?([cm])ts",b="**/*.?([cm])tsx",S="**/*.stories.tsx",j=["**/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"];async function F(e={}){let{gitIgnore:t,ignores:r=[]}=e;return eslintFlatConfigUtils.composer({ignores:[j,r].flat(),name:"2digits:ignores"},o(import('eslint-config-flat-gitignore')).then(i=>i({strict:!1,...t,name:"2digits:gitignore"})))}function I(e={}){let{overrides:t={}}=e;return [{name:"2digits:javascript",languageOptions:{ecmaVersion:2022,globals:{...h__default.default.browser,...h__default.default.es2021,...h__default.default.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...re__default.default.configs.recommended.rules,"accessor-pairs":["error",{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":"error","block-scoped-var":"error","constructor-super":"error","default-case-last":"error","dot-notation":["error",{allowKeywords:!0}],eqeqeq:["error","smart"],"new-cap":["error",{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":"error","no-array-constructor":"error","no-async-promise-executor":"error","no-caller":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":["error","always"],"no-const-assign":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-empty-character-class":"error","no-empty-pattern":"error","no-eval":"error","no-ex-assign":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-implied-eval":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-iterator":"error","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-native-nonconstructor":"error","no-new-wrappers":"error","no-obj-calls":"error","no-octal":"error","no-octal-escape":"error","no-proto":"error","no-prototype-builtins":"error","no-redeclare":["error",{builtinGlobals:!1}],"no-regex-spaces":"error","no-restricted-globals":["error",{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-restricted-properties":["error",{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:"__proto__"},{message:"Use `Object.defineProperty` instead.",property:"__defineGetter__"},{message:"Use `Object.defineProperty` instead.",property:"__defineSetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupGetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupSetter__"}],"no-restricted-syntax":["error","DebuggerStatement","LabeledStatement","WithStatement","TSEnumDeclaration","TSExportAssignment"],"no-self-assign":["error",{props:!0}],"no-self-compare":"error","no-sequences":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-this-before-super":"error","no-throw-literal":"error","no-undef":"error","no-undef-init":"error","no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":["error",{args:"none",caughtErrors:"none",ignoreRestSiblings:!0,vars:"all"}],"no-useless-backreference":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-constructor":"error","no-useless-rename":"error","no-var":"error","no-with":"error","object-shorthand":["error","always",{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":["error",{initialized:"never"}],"prefer-arrow-callback":["error",{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":["error",{destructuring:"all",ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","symbol-description":"error","unicode-bom":["error","never"],"use-isnan":["error",{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":["error",{requireStringLiterals:!0}],"vars-on-top":"error",yoda:["error","never"],...t}}]}async function P(){return [{name:"2digits:jsdoc",plugins:{jsdoc:await o(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"}}]}async function _(e={}){let{files:t=[y,b],overrides:r={},parserOptions:i}=e,[s,l]=await Promise.all([o(import('@next/eslint-plugin-next')),o(import('@typescript-eslint/parser'))]),c=eslintFlatConfigUtils.renamePluginsInRules({...s.configs.recommended.rules,...s.configs["core-web-vitals"].rules},a);return [{name:"2digits:next/setup",plugins:{next:compat.fixupPluginRules(s)}},{name:"2digits:next/rules",files:t,languageOptions:{parser:l,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:"module"},rules:{...c,"next/no-html-link-for-pages":"off",...r}}]}function W(){return [{name:"2digits:node",settings:{node:{version:">= 20.0.0"}},plugins:{node:q__default.default},rules:{"node/handle-callback-err":["error","^(err|error)$"],"node/no-deprecated-api":"error","node/no-exports-assign":"error","node/no-new-require":"error","node/no-path-concat":"error","node/no-unsupported-features/node-builtins":["error",{allowExperimental:!0}],"node/prefer-global/buffer":"error","node/prefer-global/process":"error","node/prefer-global/text-encoder":"error","node/prefer-global/url":"error","node/prefer-global/console":"error","node/prefer-global/url-search-params":"error","node/prefer-global/text-decoder":"error","node/process-exit-as-throw":"error"}}]}async function R(){let[e,t]=await Promise.all([o(import('eslint-config-prettier')),o(import('eslint-plugin-react'))]);return [{name:"2digits:prettier",plugins:{react:t},rules:{...e.rules,"tailwindcss/classnames-order":"off","react/jsx-newline":["error",{prevent:!1}]}}]}async function D(e={}){let{files:t=[y,b],overrides:r={},parserOptions:i,tsconfigRootDir:s,reactCompiler:l=!0}=e,[c,d,f,x,z]=await Promise.all([o(import('@eslint-react/eslint-plugin')),o(import('eslint-plugin-react-hooks')),o(import('eslint-plugin-react')),o(import('@typescript-eslint/parser')),l?o(import('eslint-plugin-react-compiler')):void 0]),g=c.configs.all.plugins,V=eslintFlatConfigUtils.renamePluginsInRules({...f.configs.recommended.rules,...f.configs["jsx-runtime"].rules,...d.configs.recommended.rules,...c.configs["recommended-type-checked"].rules},a);return [{name:"2digits:react/setup",plugins:{react:f,"react-dom":g["@eslint-react/dom"],"react-web-api":g["@eslint-react/web-api"],"react-extra":g["@eslint-react"],"react-hooks":compat.fixupPluginRules(d),"react-hooks-extra":g["@eslint-react/hooks-extra"],"react-naming-convention":g["@eslint-react/naming-convention"],...l?{"react-compiler":z}:{}},settings:{react:{version:"detect"}}},{name:"2digits:react/rules",files:t,languageOptions:{parser:x,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:s,projectService:!0,...i},sourceType:"module"},rules:{...V,...l?{"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/jsx-curly-newline":"off","react/jsx-newline":["error",{prevent:!1}],"react/prop-types":"off",...r}}]}function E(){return [{name:"2digits:regexp",plugins:{regexp:L__default.default},rules:{...L__default.default.configs["flat/recommended"].rules}}]}var ae=eslintFlatConfigUtils.renamePluginsInRules(T__default.default.configs.recommended.rules,a);function G(){return [{name:"2digits:sonar",plugins:{sonar:T__default.default},rules:{...ae,"sonar/no-redundant-jump":"off"}}]}async function U(e={}){let{files:t=[S],overrides:r={},parserOptions:i,storybookDirectory:s=".storybook"}=e,[l,c]=await Promise.all([o(import('eslint-plugin-storybook')),o(import('@typescript-eslint/parser'))]),d={parser:c,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:"module"};return [{name:"2digits:storybook/setup",plugins:{storybook:compat.fixupPluginRules(l)}},{name:"2digits:storybook/rules",files:t,languageOptions:d,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:t,rules:{"react-hooks/rules-of-hooks":"off","react/display-name":"off","sonar/no-duplicate-string":"off"}},{name:"2digits:storybook/config",files:[`${s}/main.@(js|cjs|mjs|ts)`],languageOptions:d,rules:{"storybook/no-uninstalled-addons":"error"}}]}async function N(e={}){let{overrides:t={}}=e,[r,{tailwindFunctions:i},s]=await Promise.all([o(import('eslint-plugin-tailwindcss')),o(import('@2digits/constants')),findUp.findUp(["tailwind.config.ts","tailwind.config.js"])]);return [{name:"2digits:tailwind",plugins:{tailwindcss:r},settings:{tailwindcss:{callees:i,config:s}},rules:{...r.configs.recommended.rules,...t}}]}async function B(e={}){let{overrides:t={}}=e,r=await o(import('@tanstack/eslint-plugin-query'));return [{name:"2digits:tanstack",plugins:{tanstack:compat.fixupPluginRules(r)},rules:{"tanstack/exhaustive-deps":"error","tanstack/stable-query-client":"error","tanstack/no-rest-destructuring":"error",...t}}]}async function A(e={}){let{overrides:t={}}=e;return [{name:"2digits:turbo",plugins:{turbo:await o(import('eslint-plugin-turbo'))},rules:{"turbo/no-undeclared-env-vars":"error",...t}}]}async function M(e={}){let{overrides:t={},parserOptions:r={}}=e,[{plugin:i,configs:s,parser:l},c]=await Promise.all([o(import('typescript-eslint')),o(import('@2digits/eslint-plugin'))]),d=eslintFlatConfigUtils.renamePluginsInConfigs(s.strictTypeChecked,a),f=Object.fromEntries(d.flatMap(({rules:x})=>Object.entries(x??{})));return [{name:"2digits:typescript/setup",plugins:{ts:i,"@2digits":c},languageOptions:{parser:l,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:"module"}},{name:"2digits:typescript/rules",files:[C],rules:{...f,"ts/restrict-template-expressions":["error",{allowNumber:!0}],"ts/ban-ts-comment":["error",{"ts-ignore":"allow-with-description"}],"ts/consistent-type-exports":["error"],"ts/consistent-type-imports":["error",{prefer:"type-imports",disallowTypeAnnotations:!1,fixStyle:"inline-type-imports"}],"ts/no-empty-interface":["error",{allowSingleExtends:!0}],"ts/no-explicit-any":["error"],"ts/no-import-type-side-effects":["error"],"ts/no-misused-promises":"off","ts/no-confusing-void-expression":"off","ts/no-unused-vars":["error",{ignoreRestSiblings:!0,argsIgnorePattern:"^_",varsIgnorePattern:"^_"}],"ts/unbound-method":"off",...c.configs.recommended.rules,...t}},{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 X(){return [{name:"2digits:unicorn",plugins:{unicorn:O__default.default},rules:{...O__default.default.configs["flat/recommended"].rules,"unicorn/filename-case":["off"],"unicorn/prefer-module":["off"],"unicorn/prevent-abbreviations":["off"],"unicorn/prefer-ternary":["error","only-single-line"],"unicorn/no-useless-undefined":["error",{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":["off"]}}]}function u(e,t){return typeof e=="boolean"?e:e?.enable??t??!1}function m(e){if(typeof e=="boolean"||e===void 0)return {};let{enable:t,...r}=e;return r}function de(e={},...t){let r=new eslintFlatConfigUtils.FlatConfigComposer(F(e.ignores),I(e.js),W(),w(),P(),X(),G(),E(),k());u(e.turbo,localPkg.isPackageExists("turbo"))&&(r=r.append(A(m(e.turbo))));let{overrides:i,...s}=m(e.ts);return u(e.ts,localPkg.isPackageExists("typescript"))&&(r=r.append(M(m(e.ts)))),u(e.react,localPkg.isPackageExists("react"))&&(r=r.append(D({...m(e.react),...s}))),u(e.next,localPkg.isPackageExists("next"))&&(r=r.append(_({...m(e.next),...s}))),u(e.storybook,localPkg.isPackageExists("storybook"))&&(r=r.append(U({...m(e.storybook),...s}))),u(e.tailwind,localPkg.isPackageExists("tailwindcss"))&&(r=r.append(N(m(e.tailwind)))),u(e.tanstack,localPkg.isPackageExists("react-query")||localPkg.isPackageExists("@tanstack/react-query")||localPkg.isPackageExists("@tanstack/react-query-devtools"))&&(r=r.append(B(m(e.tanstack)))),u(e.graphql,localPkg.isPackageExists("graphql"))&&(r=r.append(v(m(e.graphql)))),r=r.append(...t),localPkg.isPackageExists("prettier")&&(r=r.append(R())),r.renamePlugins(a).toConfigs()}exports.antfu=k;exports.comments=w;exports.default=de;exports.graphql=v;exports.ignores=F;exports.javascript=I;exports.jsdoc=P;exports.next=_;exports.node=W;exports.prettier=R;exports.react=D;exports.regexp=E;exports.sonar=G;exports.storybook=U;exports.tailwind=N;exports.tanstack=B;exports.turbo=A;exports.twoDigits=de;exports.typescript=M;exports.unicorn=X;//# sourceMappingURL=index.cjs.map
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var H=require('eslint-plugin-antfu'),$=require('@eslint-community/eslint-plugin-eslint-comments'),K=require('@eslint-community/eslint-plugin-eslint-comments/configs'),eslintFlatConfigUtils=require('eslint-flat-config-utils'),graphqlConfig=require('graphql-config'),re=require('@eslint/js'),O=require('globals'),compat=require('@eslint/compat'),x=require('eslint-plugin-unicorn'),q=require('eslint-plugin-n'),k=require('eslint-plugin-sonarjs'),L=require('eslint-plugin-regexp'),findUp=require('find-up'),localPkg=require('local-pkg');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var H__default=/*#__PURE__*/_interopDefault(H);var $__default=/*#__PURE__*/_interopDefault($);var K__default=/*#__PURE__*/_interopDefault(K);var re__default=/*#__PURE__*/_interopDefault(re);var O__default=/*#__PURE__*/_interopDefault(O);var x__default=/*#__PURE__*/_interopDefault(x);var q__default=/*#__PURE__*/_interopDefault(q);var k__default=/*#__PURE__*/_interopDefault(k);var L__default=/*#__PURE__*/_interopDefault(L);function T(){return [{name:"2digits:antfu",plugins:{antfu:H__default.default},rules:{"antfu/if-newline":"error","antfu/top-level-function":"error"}}]}var a={"@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",react:"react","@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"};var J=eslintFlatConfigUtils.renamePluginsInRules(K__default.default.recommended.rules,a);function w(){return [{name:"2digits:comments",plugins:{comments:$__default.default},rules:{...J,"comments/no-unused-disable":"error","comments/disable-enable-pair":["error",{allowWholeFile:!0}]}}]}async function o(e){let t=await e;return t.default||t}async function v(e={}){let{overrides:t={},files:r=["**/*.graphql","**/*.gql"]}=e,[s,i]=await Promise.all([o(import('@graphql-eslint/eslint-plugin')),graphqlConfig.loadConfig({throwOnEmpty:!1,throwOnMissing:!1}).then(c=>c?.getDefault().schema)]),p=s.configs["flat/operations-recommended"].rules,l={};if(i)l=p;else for(let c of Object.keys(p)){let g=c.replace("@graphql-eslint/","");g in s.rules&&(s.rules[g].meta.docs?.requiresSchema||s.rules[g].meta.docs?.requiresSiblings)||(l[c]=p[c]);}let u=eslintFlatConfigUtils.renamePluginsInRules(l,a);return [{name:"2digits:graphql",plugins:{gql:s},languageOptions:{parser:s.parser},files:r,rules:{...u,"gql/naming-convention":["error",{allowLeadingUnderscore:!0}],...t}}]}var C="**/*.?([cm])[jt]s?(x)",b="**/*.?([cm])ts",h="**/*.?([cm])tsx",S="**/*.stories.tsx",j=["**/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"];async function F(e={}){let{gitIgnore:t,ignores:r=[]}=e;return eslintFlatConfigUtils.composer({ignores:[j,r].flat(),name:"2digits:ignores"},o(import('eslint-config-flat-gitignore')).then(s=>s({strict:!1,...t,name:"2digits:gitignore"})))}function I(e={}){let{overrides:t={}}=e;return [{name:"2digits:javascript",languageOptions:{ecmaVersion:2022,globals:{...O__default.default.browser,...O__default.default.es2021,...O__default.default.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...re__default.default.configs.recommended.rules,"accessor-pairs":["error",{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":"error","block-scoped-var":"error","constructor-super":"error","default-case-last":"error","dot-notation":["error",{allowKeywords:!0}],eqeqeq:["error","smart"],"new-cap":["error",{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":"error","no-array-constructor":"error","no-async-promise-executor":"error","no-caller":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":["error","always"],"no-const-assign":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-empty-character-class":"error","no-empty-pattern":"error","no-eval":"error","no-ex-assign":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-implied-eval":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-iterator":"error","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-native-nonconstructor":"error","no-new-wrappers":"error","no-obj-calls":"error","no-octal":"error","no-octal-escape":"error","no-proto":"error","no-prototype-builtins":"error","no-redeclare":["error",{builtinGlobals:!1}],"no-regex-spaces":"error","no-restricted-globals":["error",{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-restricted-properties":["error",{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:"__proto__"},{message:"Use `Object.defineProperty` instead.",property:"__defineGetter__"},{message:"Use `Object.defineProperty` instead.",property:"__defineSetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupGetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupSetter__"}],"no-restricted-syntax":["error","DebuggerStatement","LabeledStatement","WithStatement","TSEnumDeclaration","TSExportAssignment"],"no-self-assign":["error",{props:!0}],"no-self-compare":"error","no-sequences":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-this-before-super":"error","no-throw-literal":"error","no-undef":"error","no-undef-init":"error","no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":["error",{args:"none",caughtErrors:"none",ignoreRestSiblings:!0,vars:"all"}],"no-useless-backreference":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-constructor":"error","no-useless-rename":"error","no-var":"error","no-with":"error","object-shorthand":["error","always",{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":["error",{initialized:"never"}],"prefer-arrow-callback":["error",{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":["error",{destructuring:"all",ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","symbol-description":"error","unicode-bom":["error","never"],"use-isnan":["error",{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":["error",{requireStringLiterals:!0}],"vars-on-top":"error",yoda:["error","never"],...t}}]}async function P(){return [{name:"2digits:jsdoc",plugins:{jsdoc:await o(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"}}]}async function _(e={}){let{files:t=[b,h],overrides:r={},parserOptions:s}=e,[i,p]=await Promise.all([o(import('@next/eslint-plugin-next')),o(import('@typescript-eslint/parser'))]),l=eslintFlatConfigUtils.renamePluginsInRules({...i.configs.recommended.rules,...i.configs["core-web-vitals"].rules},a);return [{name:"2digits:next/setup",plugins:{next:compat.fixupPluginRules(i)}},{name:"2digits:next/rules",files:t,languageOptions:{parser:p,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...s},sourceType:"module"},rules:{...l,"next/no-html-link-for-pages":"off",...r}}]}function W(){return [{name:"2digits:node",settings:{node:{version:">= 20.0.0"}},plugins:{node:q__default.default},rules:{"node/handle-callback-err":["error","^(err|error)$"],"node/no-deprecated-api":"error","node/no-exports-assign":"error","node/no-new-require":"error","node/no-path-concat":"error","node/no-unsupported-features/node-builtins":["error",{allowExperimental:!0}],"node/prefer-global/buffer":"error","node/prefer-global/process":"error","node/prefer-global/text-encoder":"error","node/prefer-global/url":"error","node/prefer-global/console":"error","node/prefer-global/url-search-params":"error","node/prefer-global/text-decoder":"error","node/process-exit-as-throw":"error"}}]}async function R(){let[e,t]=await Promise.all([o(import('eslint-config-prettier')),o(import('eslint-plugin-react'))]);return [{name:"2digits:prettier",plugins:{react:t},rules:{...e.rules,"tailwindcss/classnames-order":"off","react/jsx-newline":["error",{prevent:!1}]}}]}async function D(e={}){let{files:t=[b,h],overrides:r={},parserOptions:s,tsconfigRootDir:i,reactCompiler:p=!0}=e,[l,u,c,g,z]=await Promise.all([o(import('@eslint-react/eslint-plugin')),o(import('eslint-plugin-react-hooks')),o(import('eslint-plugin-react')),o(import('@typescript-eslint/parser')),p?o(import('eslint-plugin-react-compiler')):void 0]),y=l.configs.all.plugins,V=eslintFlatConfigUtils.renamePluginsInRules({...c.configs.recommended.rules,...c.configs["jsx-runtime"].rules,...u.configs.recommended.rules,...l.configs["recommended-type-checked"].rules},a);return [{name:"2digits:react/setup",plugins:{react:c,"react-dom":y["@eslint-react/dom"],"react-web-api":y["@eslint-react/web-api"],"react-extra":y["@eslint-react"],"react-hooks":compat.fixupPluginRules(u),"react-hooks-extra":y["@eslint-react/hooks-extra"],"react-naming-convention":y["@eslint-react/naming-convention"],...p?{"react-compiler":z}:{}},settings:{react:{version:"detect"}}},{name:"2digits:react/rules",files:t,languageOptions:{parser:g,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:i,projectService:!0,...s},sourceType:"module"},rules:{...V,...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/jsx-curly-newline":"off","react/jsx-newline":["error",{prevent:!1}],"react/prop-types":"off",...r}}]}function E(){return [{name:"2digits:regexp",plugins:{regexp:L__default.default},rules:{...L__default.default.configs["flat/recommended"].rules}}]}var ae=eslintFlatConfigUtils.renamePluginsInRules(k__default.default.configs.recommended.rules,a);function G(){return [{name:"2digits:sonar",plugins:{sonar:k__default.default},rules:{...ae,"sonar/no-redundant-jump":"off"}}]}async function N(e={}){let{files:t=[S],overrides:r={},parserOptions:s,storybookDirectory:i=".storybook"}=e,[p,l]=await Promise.all([o(import('eslint-plugin-storybook')),o(import('@typescript-eslint/parser'))]),u={parser:l,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...s},sourceType:"module"};return [{name:"2digits:storybook/setup",plugins:{storybook:compat.fixupPluginRules(p)}},{name:"2digits:storybook/rules",files:t,languageOptions:u,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:t,rules:{"react-hooks/rules-of-hooks":"off","react/display-name":"off","sonar/no-duplicate-string":"off"}},{name:"2digits:storybook/config",files:[`${i}/main.@(js|cjs|mjs|ts)`],languageOptions:u,rules:{"storybook/no-uninstalled-addons":"error"}}]}async function U(e={}){let{overrides:t={}}=e,[r,{tailwindFunctions:s},i]=await Promise.all([o(import('eslint-plugin-tailwindcss')),o(import('@2digits/constants')),findUp.findUp(["tailwind.config.ts","tailwind.config.js"])]);return [{name:"2digits:tailwind",plugins:{tailwindcss:r},settings:{tailwindcss:{callees:s,config:i}},rules:{...r.configs.recommended.rules,...t}}]}async function B(e={}){let{overrides:t={}}=e,r=await o(import('@tanstack/eslint-plugin-query'));return [{name:"2digits:tanstack",plugins:{tanstack:compat.fixupPluginRules(r)},rules:{"tanstack/exhaustive-deps":"error","tanstack/stable-query-client":"error","tanstack/no-rest-destructuring":"error",...t}}]}async function A(e={}){let{overrides:t={}}=e;return [{name:"2digits:turbo",plugins:{turbo:await o(import('eslint-plugin-turbo'))},rules:{"turbo/no-undeclared-env-vars":"error",...t}}]}async function M(e={}){let{overrides:t={},parserOptions:r={}}=e,[{plugin:s,configs:i,parser:p},l]=await Promise.all([o(import('typescript-eslint')),o(import('@2digits/eslint-plugin'))]),u=eslintFlatConfigUtils.renamePluginsInConfigs(i.strictTypeChecked,a),c=Object.fromEntries(u.flatMap(({rules:g})=>Object.entries(g??{})));return [{name:"2digits:typescript/setup",plugins:{ts:s,"@2digits":l},languageOptions:{parser:p,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:"module"}},{name:"2digits:typescript/rules",files:[C],rules:{...c,"ts/restrict-template-expressions":["error",{allowNumber:!0}],"ts/ban-ts-comment":["error",{"ts-ignore":"allow-with-description"}],"ts/consistent-type-exports":["error"],"ts/consistent-type-imports":["error",{prefer:"type-imports",disallowTypeAnnotations:!1,fixStyle:"inline-type-imports"}],"ts/no-empty-interface":["error",{allowSingleExtends:!0}],"ts/no-explicit-any":["error"],"ts/no-import-type-side-effects":["error"],"ts/no-misused-promises":"off","ts/no-confusing-void-expression":"off","ts/no-unused-vars":["error",{ignoreRestSiblings:!0,argsIgnorePattern:"^_",varsIgnorePattern:"^_"}],"ts/unbound-method":"off",...l.configs.recommended.rules,...t}},{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 X(){return [{name:"2digits:unicorn",plugins:{unicorn:x__default.default},rules:{...x__default.default.configs["flat/recommended"].rules,"unicorn/filename-case":["off"],"unicorn/prefer-module":["off"],"unicorn/prevent-abbreviations":["off"],"unicorn/prefer-ternary":["error","only-single-line"],"unicorn/no-useless-undefined":["error",{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":["off"]}}]}function f(e,t){return typeof e=="boolean"?e:e?.enable??t??!1}function d(e){if(typeof e=="boolean"||e===void 0)return {};let{enable:t,...r}=e;return r}function de(e={},...t){let r=new eslintFlatConfigUtils.FlatConfigComposer(F(e.ignores),I(e.js),W(),w(),P(),X(),G(),E(),T());f(e.turbo,localPkg.isPackageExists("turbo"))&&(r=r.append(A(d(e.turbo))));let{overrides:s,...i}=d(e.ts);return f(e.ts,localPkg.isPackageExists("typescript"))&&(r=r.append(M(d(e.ts)))),f(e.react,localPkg.isPackageExists("react"))&&(r=r.append(D({...d(e.react),...i}))),f(e.next,localPkg.isPackageExists("next"))&&(r=r.append(_({...d(e.next),...i}))),f(e.storybook,localPkg.isPackageExists("storybook"))&&(r=r.append(N({...d(e.storybook),...i}))),f(e.tailwind,localPkg.isPackageExists("tailwindcss"))&&(r=r.append(U(d(e.tailwind)))),f(e.tanstack,localPkg.isPackageExists("react-query")||localPkg.isPackageExists("@tanstack/react-query")||localPkg.isPackageExists("@tanstack/react-query-devtools"))&&(r=r.append(B(d(e.tanstack)))),f(e.graphql,localPkg.isPackageExists("graphql"))&&(r=r.append(v(d(e.graphql)))),r=r.append(...t),localPkg.isPackageExists("prettier")&&(r=r.append(R())),r.renamePlugins(a).toConfigs()}exports.antfu=T;exports.comments=w;exports.default=de;exports.graphql=v;exports.ignores=F;exports.javascript=I;exports.jsdoc=P;exports.next=_;exports.node=W;exports.prettier=R;exports.react=D;exports.regexp=E;exports.sonar=G;exports.storybook=N;exports.tailwind=U;exports.tanstack=B;exports.turbo=A;exports.twoDigits=de;exports.typescript=M;exports.unicorn=X;//# sourceMappingURL=index.cjs.map
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/configs/antfu.ts","../src/constants.ts","../src/configs/comments.ts","../src/utils.ts","../src/configs/graphql.ts","../src/globs.ts","../src/configs/ignores.ts","../src/configs/javascript.ts","../src/configs/jsdoc.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":["antfu","pluginAntfu","PluginNameMap","recommended","renamePluginsInRules","configs","comments","pluginComments","interopDefault","m","resolved","graphql","options","overrides","files","gql","fixupPluginRules","GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_EXCLUDE","ignores","gitIgnore","composer","javascript","globals","eslint","jsdoc","next","parserOptions","parser","node","default","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","regexp","pluginRegexp","rules","sonar","storybook","storybookDirectory","languageOptions","tailwind","tailwindcss","tailwindFunctions","config","findUp","tanstack","turbo","typescript","plugin","twoDigits","strictConfig","renamePluginsInConfigs","unicorn","enabled","defaults","enable","rest","userConfig","FlatConfigComposer","isPackageExists","typescriptOptions"],"mappings":"6hCAIO,SAASA,CAAAA,EAA+B,CAC7C,OAAO,CACL,CACE,IAAM,CAAA,eAAA,CACN,OAAS,CAAA,CACP,MAAOC,kBACT,CAAA,CACA,KAAO,CAAA,CACL,kBAAoB,CAAA,OAAA,CACpB,0BAA4B,CAAA,OAC9B,CACF,CACF,CACF,CCjBO,IAAMC,CAAAA,CAAgB,CAC3B,YAAA,CAAc,OACd,iCAAmC,CAAA,yBAAA,CACnC,2BAA6B,CAAA,mBAAA,CAC7B,mBAAqB,CAAA,WAAA,CACrB,uBAAyB,CAAA,eAAA,CACzB,gBAAiB,aACjB,CAAA,aAAA,CAAe,aACf,CAAA,gBAAA,CAAkB,gBAClB,CAAA,KAAA,CAAO,OACP,CAAA,oBAAA,CAAsB,KACtB,IAAM,CAAA,MAAA,CACN,mCAAqC,CAAA,UAAA,CACrC,SAAW,CAAA,WAAA,CACX,KAAO,CAAA,OAAA,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AA,CAAAA,CAAQ,QAAQ,CAAC,CAAC,CAAA,CAAA,CAG3DkD,EAAQlD,CAAQ,CAAA,OAAA,CAASwD,wBAAgB,CAAA,SAAS,CAAC,CAAA,GACrD5C,CAAWA,CAAAA,CAAAA,CAAS,OAAOb,CAAQyC,CAAAA,CAAAA,CAAOxC,CAAQ,CAAA,OAAO,CAAC,CAAC,CAG7DY,CAAAA,CAAAA,CAAAA,CAAWA,EAAS,MAAO,CAAA,GAAG0C,CAAU,CAAA,CAEpCE,wBAAgB,CAAA,UAAU,CAC5B5C,GAAAA,CAAAA,CAAWA,EAAS,MAAOU,CAAAA,CAAAA,EAAU,CAAA,CAAA,CAGhCV,CAAS,CAAA,aAAA,CAActB,CAAa,CAAA,CAAE,WAC/C","file":"index.cjs","sourcesContent":["import pluginAntfu from 'eslint-plugin-antfu';\n\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function antfu(): TypedFlatConfigItem[] {\n return [\n {\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","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 react: 'react',\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} 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 type { TypedFlatConfigItem } from '../types';\n\nconst recommended = renamePluginsInRules(configs.recommended.rules as never, PluginNameMap);\n\nexport function comments(): TypedFlatConfigItem[] {\n return [\n {\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 type { Awaitable } from 'eslint-flat-config-utils';\n\nexport async function interopDefault<T>(\n m: Awaitable<T>,\n): 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';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\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 = await interopDefault(import('@graphql-eslint/eslint-plugin'));\n\n const recommended = renamePluginsInRules(\n gql.flatConfigs['operations-recommended'].rules,\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:graphql',\n plugins: {\n gql: fixupPluginRules(gql as never),\n },\n languageOptions: {\n parser: { ...gql, meta: { name: 'graphql' } },\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","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_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 { 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 globals from 'globals';\n\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\n\nexport function javascript(options: OptionsOverrides = {}): TypedFlatConfigItem[] {\n const { overrides = {} } = options;\n\n return [\n {\n name: '2digits:javascript',\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 ...overrides,\n },\n },\n ];\n}\n","import type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function jsdoc(): Promise<TypedFlatConfigItem[]> {\n return [\n {\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 { 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 { pluginNode } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function node(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:node',\n settings: {\n node: {\n version: '>= 20.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, react] = await Promise.all([\n interopDefault(import('eslint-config-prettier')),\n interopDefault(import('eslint-plugin-react')),\n ]);\n\n return [\n {\n name: '2digits:prettier',\n plugins: {\n react,\n },\n rules: {\n ...prettier.rules,\n\n 'tailwindcss/classnames-order': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n },\n },\n ];\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, OptionsWithReact, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function react(\n options: OptionsWithReact & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const {\n files = [GLOB_TS, GLOB_TSX],\n overrides = {},\n parserOptions,\n tsconfigRootDir,\n reactCompiler = true,\n } = options;\n\n const [pluginReact, pluginReactHooks, react, parser, pluginReactCompiler] = await Promise.all([\n interopDefault(import('@eslint-react/eslint-plugin')),\n interopDefault(import('eslint-plugin-react-hooks')),\n interopDefault(import('eslint-plugin-react')),\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 ...react.configs.recommended.rules,\n ...react.configs['jsx-runtime'].rules,\n ...pluginReactHooks.configs.recommended.rules,\n ...pluginReact.configs['recommended-type-checked'].rules,\n },\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:react/setup',\n plugins: {\n react,\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': fixupPluginRules(pluginReactHooks as never),\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 'react-extra/prefer-read-only-props': 'off',\n\n 'react/jsx-curly-newline': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n 'react/prop-types': 'off',\n\n ...overrides,\n },\n },\n ];\n}\n","import pluginRegexp from 'eslint-plugin-regexp';\n\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function regexp(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:regexp',\n plugins: {\n regexp: pluginRegexp,\n },\n rules: {\n ...pluginRegexp.configs['flat/recommended'].rules,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { pluginSonar } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nconst rules = renamePluginsInRules(pluginSonar.configs.recommended.rules as never, PluginNameMap);\n\nexport function sonar(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:sonar',\n plugins: {\n sonar: pluginSonar,\n },\n rules: {\n ...rules,\n\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 {\n OptionsTypeScriptWithTypes,\n OptionsWithStorybook,\n TypedFlatConfigItem,\n} from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function storybook(\n options: OptionsWithStorybook & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const {\n files = [GLOB_STORIES],\n overrides = {},\n parserOptions,\n storybookDirectory = '.storybook',\n } = 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 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 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 { fixupPluginRules } from '@eslint/compat';\n\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 return [\n {\n name: '2digits:tanstack',\n plugins: {\n tanstack: fixupPluginRules(tanstack as never),\n },\n rules: {\n 'tanstack/exhaustive-deps': 'error',\n 'tanstack/stable-query-client': 'error',\n 'tanstack/no-rest-destructuring': 'error',\n\n ...overrides,\n },\n },\n ];\n}\n","import 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 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(\n options: OptionsTypeScriptWithTypes = {},\n): 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(\n strictConfig.flatMap(({ rules }) => Object.entries(rules ?? {})),\n );\n\n return [\n {\n name: '2digits:typescript/setup',\n plugins: {\n ts: plugin,\n '@2digits': twoDigits,\n },\n languageOptions: {\n parser,\n parserOptions: {\n tsconfigRootDir: process.cwd(),\n projectService: true,\n warnOnUnsupportedTypeScriptVersion: false,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n },\n\n {\n name: '2digits:typescript/rules',\n files: [GLOB_SRC],\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-interface': ['error', { allowSingleExtends: true }],\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 { pluginUnicorn } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function unicorn(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:unicorn',\n plugins: {\n unicorn: pluginUnicorn,\n },\n rules: {\n ...pluginUnicorn.configs['flat/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 comments,\n graphql,\n ignores,\n javascript,\n jsdoc,\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 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}\n\nfunction enabled<T extends SharedOptions>(\n options: T | boolean | undefined,\n defaults?: boolean,\n): 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 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 node(),\n comments(),\n jsdoc(),\n unicorn(),\n sonar(),\n regexp(),\n antfu(),\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.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/configs/antfu.ts","../src/constants.ts","../src/configs/comments.ts","../src/utils.ts","../src/configs/graphql.ts","../src/globs.ts","../src/configs/ignores.ts","../src/configs/javascript.ts","../src/configs/jsdoc.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":["antfu","pluginAntfu","PluginNameMap","recommended","renamePluginsInRules","configs","comments","pluginComments","interopDefault","m","resolved","graphql","options","overrides","files","gql","gqlSchema","loadConfig","g","flatRecommended","rules","rule","ruleName","GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_EXCLUDE","ignores","gitIgnore","composer","javascript","globals","eslint","jsdoc","next","parserOptions","parser","fixupPluginRules","node","default","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","regexp","pluginRegexp","sonar","storybook","storybookDirectory","languageOptions","tailwind","tailwindcss","tailwindFunctions","config","findUp","tanstack","turbo","typescript","plugin","twoDigits","strictConfig","renamePluginsInConfigs","unicorn","enabled","defaults","enable","rest","userConfig","FlatConfigComposer","isPackageExists","typescriptOptions"],"mappings":"qkCAIO,SAASA,CAAAA,EAA+B,CAC7C,OAAO,CACL,CACE,IAAA,CAAM,eACN,CAAA,OAAA,CAAS,CACP,KAAA,CAAOC,kBACT,CACA,CAAA,KAAA,CAAO,CACL,kBAAA,CAAoB,OACpB,CAAA,0BAAA,CAA4B,OAC9B,CACF,CACF,CACF,CCjBO,IAAMC,CAAgB,CAAA,CAC3B,YAAc,CAAA,MAAA,CACd,kCAAmC,yBACnC,CAAA,2BAAA,CAA6B,mBAC7B,CAAA,mBAAA,CAAqB,WACrB,CAAA,uBAAA,CAAyB,eACzB,CAAA,eAAA,CAAiB,cACjB,aAAe,CAAA,aAAA,CACf,gBA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\n\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function antfu(): TypedFlatConfigItem[] {\n return [\n {\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","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 react: 'react',\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} 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 type { TypedFlatConfigItem } from '../types';\n\nconst recommended = renamePluginsInRules(configs.recommended.rules as never, PluginNameMap);\n\nexport function comments(): TypedFlatConfigItem[] {\n return [\n {\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 type { Awaitable } from 'eslint-flat-config-utils';\n\nexport async function interopDefault<T>(\n m: Awaitable<T>,\n): 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 { 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 if (\n ruleName in gql.rules &&\n (gql.rules[ruleName].meta.docs?.requiresSchema ||\n 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","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_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 { 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 globals from 'globals';\n\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\n\nexport function javascript(options: OptionsOverrides = {}): TypedFlatConfigItem[] {\n const { overrides = {} } = options;\n\n return [\n {\n name: '2digits:javascript',\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 ...overrides,\n },\n },\n ];\n}\n","import type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function jsdoc(): Promise<TypedFlatConfigItem[]> {\n return [\n {\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 { 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 { pluginNode } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function node(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:node',\n settings: {\n node: {\n version: '>= 20.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, react] = await Promise.all([\n interopDefault(import('eslint-config-prettier')),\n interopDefault(import('eslint-plugin-react')),\n ]);\n\n return [\n {\n name: '2digits:prettier',\n plugins: {\n react,\n },\n rules: {\n ...prettier.rules,\n\n 'tailwindcss/classnames-order': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n },\n },\n ];\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, OptionsWithReact, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function react(\n options: OptionsWithReact & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const {\n files = [GLOB_TS, GLOB_TSX],\n overrides = {},\n parserOptions,\n tsconfigRootDir,\n reactCompiler = true,\n } = options;\n\n const [pluginReact, pluginReactHooks, react, parser, pluginReactCompiler] = await Promise.all([\n interopDefault(import('@eslint-react/eslint-plugin')),\n interopDefault(import('eslint-plugin-react-hooks')),\n interopDefault(import('eslint-plugin-react')),\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 ...react.configs.recommended.rules,\n ...react.configs['jsx-runtime'].rules,\n ...pluginReactHooks.configs.recommended.rules,\n ...pluginReact.configs['recommended-type-checked'].rules,\n },\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:react/setup',\n plugins: {\n react,\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': fixupPluginRules(pluginReactHooks as never),\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 'react-extra/prefer-read-only-props': 'off',\n\n 'react/jsx-curly-newline': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n 'react/prop-types': 'off',\n\n ...overrides,\n },\n },\n ];\n}\n","import pluginRegexp from 'eslint-plugin-regexp';\n\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function regexp(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:regexp',\n plugins: {\n regexp: pluginRegexp,\n },\n rules: {\n ...pluginRegexp.configs['flat/recommended'].rules,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { pluginSonar } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nconst rules = renamePluginsInRules(pluginSonar.configs.recommended.rules as never, PluginNameMap);\n\nexport function sonar(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:sonar',\n plugins: {\n sonar: pluginSonar,\n },\n rules: {\n ...rules,\n\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 {\n OptionsTypeScriptWithTypes,\n OptionsWithStorybook,\n TypedFlatConfigItem,\n} from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function storybook(\n options: OptionsWithStorybook & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const {\n files = [GLOB_STORIES],\n overrides = {},\n parserOptions,\n storybookDirectory = '.storybook',\n } = 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 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 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 { fixupPluginRules } from '@eslint/compat';\n\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 return [\n {\n name: '2digits:tanstack',\n plugins: {\n tanstack: fixupPluginRules(tanstack as never),\n },\n rules: {\n 'tanstack/exhaustive-deps': 'error',\n 'tanstack/stable-query-client': 'error',\n 'tanstack/no-rest-destructuring': 'error',\n\n ...overrides,\n },\n },\n ];\n}\n","import 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 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(\n options: OptionsTypeScriptWithTypes = {},\n): 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(\n strictConfig.flatMap(({ rules }) => Object.entries(rules ?? {})),\n );\n\n return [\n {\n name: '2digits:typescript/setup',\n plugins: {\n ts: plugin,\n '@2digits': twoDigits,\n },\n languageOptions: {\n parser,\n parserOptions: {\n tsconfigRootDir: process.cwd(),\n projectService: true,\n warnOnUnsupportedTypeScriptVersion: false,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n },\n\n {\n name: '2digits:typescript/rules',\n files: [GLOB_SRC],\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-interface': ['error', { allowSingleExtends: true }],\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 { pluginUnicorn } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function unicorn(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:unicorn',\n plugins: {\n unicorn: pluginUnicorn,\n },\n rules: {\n ...pluginUnicorn.configs['flat/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 comments,\n graphql,\n ignores,\n javascript,\n jsdoc,\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 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}\n\nfunction enabled<T extends SharedOptions>(\n options: T | boolean | undefined,\n defaults?: boolean,\n): 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 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 node(),\n comments(),\n jsdoc(),\n unicorn(),\n sonar(),\n regexp(),\n antfu(),\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.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"]}
package/dist/index.d.cts CHANGED
@@ -427,11 +427,6 @@ Using the same name for all input parameters will make your schemas easier to co
427
427
  * @see https://the-guild.dev/graphql/eslint/rules/no-anonymous-operations
428
428
  */
429
429
  'gql/no-anonymous-operations'?: Linter.RuleEntry<[]>
430
- /**
431
- * Disallow case-insensitive enum values duplicates.
432
- * @see https://the-guild.dev/graphql/eslint/rules/no-case-insensitive-enum-values-duplicates
433
- */
434
- 'gql/no-case-insensitive-enum-values-duplicates'?: Linter.RuleEntry<[]>
435
430
  /**
436
431
  * Enforce that deprecated fields or enum values are not in use by operations.
437
432
  * @see https://the-guild.dev/graphql/eslint/rules/no-deprecated
@@ -489,7 +484,7 @@ Allows to use hashtag for comments, as long as it's not attached to an AST defin
489
484
  * Requires all fields to be used at some level by siblings operations.
490
485
  * @see https://the-guild.dev/graphql/eslint/rules/no-unused-fields
491
486
  */
492
- 'gql/no-unused-fields'?: Linter.RuleEntry<[]>
487
+ 'gql/no-unused-fields'?: Linter.RuleEntry<GqlNoUnusedFields>
493
488
  /**
494
489
  * A GraphQL document is only valid if all fragment definitions are spread within operations, or spread within other fragments spread within operations.
495
490
  > This rule is a wrapper around a `graphql-js` validation function.
@@ -602,11 +597,6 @@ Backward pagination arguments
602
597
  * @see https://the-guild.dev/graphql/eslint/rules/require-field-of-type-query-in-mutation-result
603
598
  */
604
599
  'gql/require-field-of-type-query-in-mutation-result'?: Linter.RuleEntry<[]>
605
- /**
606
- * Enforce selecting specific fields when they are available on the GraphQL type.
607
- * @see https://the-guild.dev/graphql/eslint/rules/require-id-when-available
608
- */
609
- 'gql/require-id-when-available'?: Linter.RuleEntry<GqlRequireIdWhenAvailable>
610
600
  /**
611
601
  * Require fragments to be imported via an import expression.
612
602
  * @see https://the-guild.dev/graphql/eslint/rules/require-import-fragment
@@ -622,6 +612,11 @@ Backward pagination arguments
622
612
  * @see https://the-guild.dev/graphql/eslint/rules/require-nullable-result-in-root
623
613
  */
624
614
  'gql/require-nullable-result-in-root'?: Linter.RuleEntry<[]>
615
+ /**
616
+ * Enforce selecting specific fields when they are available on the GraphQL type.
617
+ * @see https://the-guild.dev/graphql/eslint/rules/require-selections
618
+ */
619
+ 'gql/require-selections'?: Linter.RuleEntry<GqlRequireSelections>
625
620
  /**
626
621
  * Enforce types with `@oneOf` directive have `error` and `ok` fields.
627
622
  * @see https://the-guild.dev/graphql/eslint/rules/require-type-pattern-with-oneof
@@ -663,7 +658,7 @@ Backward pagination arguments
663
658
  'gql/unique-directive-names-per-location'?: Linter.RuleEntry<[]>
664
659
  /**
665
660
  * A GraphQL enum type is only valid if all its values are uniquely named.
666
- > This rule is a wrapper around a `graphql-js` validation function.
661
+ > This rule disallows case-insensitive enum values duplicates too.
667
662
  * @see https://the-guild.dev/graphql/eslint/rules/unique-enum-value-names
668
663
  */
669
664
  'gql/unique-enum-value-names'?: Linter.RuleEntry<[]>
@@ -5858,11 +5853,11 @@ type GqlAlphabetize = [{
5858
5853
 
5859
5854
  fields?: [("ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition"), ...(("ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition"))[]]
5860
5855
 
5861
- values?: ["EnumTypeDefinition", ...("EnumTypeDefinition")[]]
5856
+ values?: boolean
5862
5857
 
5863
5858
  selections?: [("OperationDefinition" | "FragmentDefinition"), ...(("OperationDefinition" | "FragmentDefinition"))[]]
5864
5859
 
5865
- variables?: ["OperationDefinition", ...("OperationDefinition")[]]
5860
+ variables?: boolean
5866
5861
 
5867
5862
  arguments?: [("FieldDefinition" | "Field" | "DirectiveDefinition" | "Directive"), ...(("FieldDefinition" | "Field" | "DirectiveDefinition" | "Directive"))[]]
5868
5863
 
@@ -5966,6 +5961,11 @@ type GqlNoRootType = [{
5966
5961
 
5967
5962
  disallow: [("mutation" | "subscription"), ...(("mutation" | "subscription"))[]]
5968
5963
  }]
5964
+ // ----- gql/no-unused-fields -----
5965
+ type GqlNoUnusedFields = []|[{
5966
+
5967
+ ignoredFieldSelectors?: [string, ...(string)[]]
5968
+ }]
5969
5969
  // ----- gql/relay-arguments -----
5970
5970
  type GqlRelayArguments = []|[{
5971
5971
 
@@ -6013,12 +6013,12 @@ type GqlRequireDescription = [{
6013
6013
 
6014
6014
  UnionTypeDefinition?: boolean
6015
6015
  }]
6016
- // ----- gql/require-id-when-available -----
6017
- type GqlRequireIdWhenAvailable = []|[{
6018
- fieldName?: (_GqlRequireIdWhenAvailableAsString | _GqlRequireIdWhenAvailable_AsArray)
6016
+ // ----- gql/require-selections -----
6017
+ type GqlRequireSelections = []|[{
6018
+ fieldName?: (_GqlRequireSelectionsAsString | _GqlRequireSelections_AsArray)
6019
6019
  }]
6020
- type _GqlRequireIdWhenAvailableAsString = string
6021
- type _GqlRequireIdWhenAvailable_AsArray = [string, ...(string)[]]
6020
+ type _GqlRequireSelectionsAsString = string
6021
+ type _GqlRequireSelections_AsArray = [string, ...(string)[]]
6022
6022
  // ----- gql/selection-set-depth -----
6023
6023
  type GqlSelectionSetDepth = [{
6024
6024
  maxDepth: number
@@ -6245,6 +6245,7 @@ type JsdocInformativeDocs = []|[{
6245
6245
  }]
6246
6246
  // ----- jsdoc/lines-before-block -----
6247
6247
  type JsdocLinesBeforeBlock = []|[{
6248
+ checkBlockStarts?: boolean
6248
6249
  excludedTags?: string[]
6249
6250
  ignoreSameLine?: boolean
6250
6251
  lines?: number
package/dist/index.d.ts CHANGED
@@ -427,11 +427,6 @@ Using the same name for all input parameters will make your schemas easier to co
427
427
  * @see https://the-guild.dev/graphql/eslint/rules/no-anonymous-operations
428
428
  */
429
429
  'gql/no-anonymous-operations'?: Linter.RuleEntry<[]>
430
- /**
431
- * Disallow case-insensitive enum values duplicates.
432
- * @see https://the-guild.dev/graphql/eslint/rules/no-case-insensitive-enum-values-duplicates
433
- */
434
- 'gql/no-case-insensitive-enum-values-duplicates'?: Linter.RuleEntry<[]>
435
430
  /**
436
431
  * Enforce that deprecated fields or enum values are not in use by operations.
437
432
  * @see https://the-guild.dev/graphql/eslint/rules/no-deprecated
@@ -489,7 +484,7 @@ Allows to use hashtag for comments, as long as it's not attached to an AST defin
489
484
  * Requires all fields to be used at some level by siblings operations.
490
485
  * @see https://the-guild.dev/graphql/eslint/rules/no-unused-fields
491
486
  */
492
- 'gql/no-unused-fields'?: Linter.RuleEntry<[]>
487
+ 'gql/no-unused-fields'?: Linter.RuleEntry<GqlNoUnusedFields>
493
488
  /**
494
489
  * A GraphQL document is only valid if all fragment definitions are spread within operations, or spread within other fragments spread within operations.
495
490
  > This rule is a wrapper around a `graphql-js` validation function.
@@ -602,11 +597,6 @@ Backward pagination arguments
602
597
  * @see https://the-guild.dev/graphql/eslint/rules/require-field-of-type-query-in-mutation-result
603
598
  */
604
599
  'gql/require-field-of-type-query-in-mutation-result'?: Linter.RuleEntry<[]>
605
- /**
606
- * Enforce selecting specific fields when they are available on the GraphQL type.
607
- * @see https://the-guild.dev/graphql/eslint/rules/require-id-when-available
608
- */
609
- 'gql/require-id-when-available'?: Linter.RuleEntry<GqlRequireIdWhenAvailable>
610
600
  /**
611
601
  * Require fragments to be imported via an import expression.
612
602
  * @see https://the-guild.dev/graphql/eslint/rules/require-import-fragment
@@ -622,6 +612,11 @@ Backward pagination arguments
622
612
  * @see https://the-guild.dev/graphql/eslint/rules/require-nullable-result-in-root
623
613
  */
624
614
  'gql/require-nullable-result-in-root'?: Linter.RuleEntry<[]>
615
+ /**
616
+ * Enforce selecting specific fields when they are available on the GraphQL type.
617
+ * @see https://the-guild.dev/graphql/eslint/rules/require-selections
618
+ */
619
+ 'gql/require-selections'?: Linter.RuleEntry<GqlRequireSelections>
625
620
  /**
626
621
  * Enforce types with `@oneOf` directive have `error` and `ok` fields.
627
622
  * @see https://the-guild.dev/graphql/eslint/rules/require-type-pattern-with-oneof
@@ -663,7 +658,7 @@ Backward pagination arguments
663
658
  'gql/unique-directive-names-per-location'?: Linter.RuleEntry<[]>
664
659
  /**
665
660
  * A GraphQL enum type is only valid if all its values are uniquely named.
666
- > This rule is a wrapper around a `graphql-js` validation function.
661
+ > This rule disallows case-insensitive enum values duplicates too.
667
662
  * @see https://the-guild.dev/graphql/eslint/rules/unique-enum-value-names
668
663
  */
669
664
  'gql/unique-enum-value-names'?: Linter.RuleEntry<[]>
@@ -5858,11 +5853,11 @@ type GqlAlphabetize = [{
5858
5853
 
5859
5854
  fields?: [("ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition"), ...(("ObjectTypeDefinition" | "InterfaceTypeDefinition" | "InputObjectTypeDefinition"))[]]
5860
5855
 
5861
- values?: ["EnumTypeDefinition", ...("EnumTypeDefinition")[]]
5856
+ values?: boolean
5862
5857
 
5863
5858
  selections?: [("OperationDefinition" | "FragmentDefinition"), ...(("OperationDefinition" | "FragmentDefinition"))[]]
5864
5859
 
5865
- variables?: ["OperationDefinition", ...("OperationDefinition")[]]
5860
+ variables?: boolean
5866
5861
 
5867
5862
  arguments?: [("FieldDefinition" | "Field" | "DirectiveDefinition" | "Directive"), ...(("FieldDefinition" | "Field" | "DirectiveDefinition" | "Directive"))[]]
5868
5863
 
@@ -5966,6 +5961,11 @@ type GqlNoRootType = [{
5966
5961
 
5967
5962
  disallow: [("mutation" | "subscription"), ...(("mutation" | "subscription"))[]]
5968
5963
  }]
5964
+ // ----- gql/no-unused-fields -----
5965
+ type GqlNoUnusedFields = []|[{
5966
+
5967
+ ignoredFieldSelectors?: [string, ...(string)[]]
5968
+ }]
5969
5969
  // ----- gql/relay-arguments -----
5970
5970
  type GqlRelayArguments = []|[{
5971
5971
 
@@ -6013,12 +6013,12 @@ type GqlRequireDescription = [{
6013
6013
 
6014
6014
  UnionTypeDefinition?: boolean
6015
6015
  }]
6016
- // ----- gql/require-id-when-available -----
6017
- type GqlRequireIdWhenAvailable = []|[{
6018
- fieldName?: (_GqlRequireIdWhenAvailableAsString | _GqlRequireIdWhenAvailable_AsArray)
6016
+ // ----- gql/require-selections -----
6017
+ type GqlRequireSelections = []|[{
6018
+ fieldName?: (_GqlRequireSelectionsAsString | _GqlRequireSelections_AsArray)
6019
6019
  }]
6020
- type _GqlRequireIdWhenAvailableAsString = string
6021
- type _GqlRequireIdWhenAvailable_AsArray = [string, ...(string)[]]
6020
+ type _GqlRequireSelectionsAsString = string
6021
+ type _GqlRequireSelections_AsArray = [string, ...(string)[]]
6022
6022
  // ----- gql/selection-set-depth -----
6023
6023
  type GqlSelectionSetDepth = [{
6024
6024
  maxDepth: number
@@ -6245,6 +6245,7 @@ type JsdocInformativeDocs = []|[{
6245
6245
  }]
6246
6246
  // ----- jsdoc/lines-before-block -----
6247
6247
  type JsdocLinesBeforeBlock = []|[{
6248
+ checkBlockStarts?: boolean
6248
6249
  excludedTags?: string[]
6249
6250
  ignoreSameLine?: boolean
6250
6251
  lines?: number
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import $ from'eslint-plugin-antfu';import K from'@eslint-community/eslint-plugin-eslint-comments';import Q from'@eslint-community/eslint-plugin-eslint-comments/configs';import {renamePluginsInRules,composer,renamePluginsInConfigs,FlatConfigComposer}from'eslint-flat-config-utils';import {fixupPluginRules}from'@eslint/compat';import oe from'@eslint/js';import O from'globals';import T from'eslint-plugin-unicorn';import W from'eslint-plugin-n';import k from'eslint-plugin-sonarjs';import E from'eslint-plugin-regexp';import {findUp}from'find-up';import {isPackageExists}from'local-pkg';function w(){return [{name:"2digits:antfu",plugins:{antfu:$},rules:{"antfu/if-newline":"error","antfu/top-level-function":"error"}}]}var p={"@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",react:"react","@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"};var Y=renamePluginsInRules(Q.recommended.rules,p);function v(){return [{name:"2digits:comments",plugins:{comments:K},rules:{...Y,"comments/no-unused-disable":"error","comments/disable-enable-pair":["error",{allowWholeFile:!0}]}}]}async function o(e){let t=await e;return t.default||t}async function C(e={}){let{overrides:t={},files:r=["**/*.graphql","**/*.gql"]}=e,a=await o(import('@graphql-eslint/eslint-plugin')),i=renamePluginsInRules(a.flatConfigs["operations-recommended"].rules,p);return [{name:"2digits:graphql",plugins:{gql:fixupPluginRules(a)},languageOptions:{parser:{...a,meta:{name:"graphql"}}},files:r,rules:{...i,"gql/naming-convention":["error",{allowLeadingUnderscore:!0}],...t}}]}var S="**/*.?([cm])[jt]s?(x)",b="**/*.?([cm])ts",x="**/*.?([cm])tsx",j="**/*.stories.tsx",F=["**/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"];async function I(e={}){let{gitIgnore:t,ignores:r=[]}=e;return composer({ignores:[F,r].flat(),name:"2digits:ignores"},o(import('eslint-config-flat-gitignore')).then(a=>a({strict:!1,...t,name:"2digits:gitignore"})))}function P(e={}){let{overrides:t={}}=e;return [{name:"2digits:javascript",languageOptions:{ecmaVersion:2022,globals:{...O.browser,...O.es2021,...O.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...oe.configs.recommended.rules,"accessor-pairs":["error",{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":"error","block-scoped-var":"error","constructor-super":"error","default-case-last":"error","dot-notation":["error",{allowKeywords:!0}],eqeqeq:["error","smart"],"new-cap":["error",{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":"error","no-array-constructor":"error","no-async-promise-executor":"error","no-caller":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":["error","always"],"no-const-assign":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-empty-character-class":"error","no-empty-pattern":"error","no-eval":"error","no-ex-assign":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-implied-eval":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-iterator":"error","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-native-nonconstructor":"error","no-new-wrappers":"error","no-obj-calls":"error","no-octal":"error","no-octal-escape":"error","no-proto":"error","no-prototype-builtins":"error","no-redeclare":["error",{builtinGlobals:!1}],"no-regex-spaces":"error","no-restricted-globals":["error",{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-restricted-properties":["error",{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:"__proto__"},{message:"Use `Object.defineProperty` instead.",property:"__defineGetter__"},{message:"Use `Object.defineProperty` instead.",property:"__defineSetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupGetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupSetter__"}],"no-restricted-syntax":["error","DebuggerStatement","LabeledStatement","WithStatement","TSEnumDeclaration","TSExportAssignment"],"no-self-assign":["error",{props:!0}],"no-self-compare":"error","no-sequences":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-this-before-super":"error","no-throw-literal":"error","no-undef":"error","no-undef-init":"error","no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":["error",{args:"none",caughtErrors:"none",ignoreRestSiblings:!0,vars:"all"}],"no-useless-backreference":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-constructor":"error","no-useless-rename":"error","no-var":"error","no-with":"error","object-shorthand":["error","always",{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":["error",{initialized:"never"}],"prefer-arrow-callback":["error",{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":["error",{destructuring:"all",ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","symbol-description":"error","unicode-bom":["error","never"],"use-isnan":["error",{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":["error",{requireStringLiterals:!0}],"vars-on-top":"error",yoda:["error","never"],...t}}]}async function _(){return [{name:"2digits:jsdoc",plugins:{jsdoc:await o(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"}}]}async function q(e={}){let{files:t=[b,x],overrides:r={},parserOptions:a}=e,[i,c]=await Promise.all([o(import('@next/eslint-plugin-next')),o(import('@typescript-eslint/parser'))]),m=renamePluginsInRules({...i.configs.recommended.rules,...i.configs["core-web-vitals"].rules},p);return [{name:"2digits:next/setup",plugins:{next:fixupPluginRules(i)}},{name:"2digits:next/rules",files:t,languageOptions:{parser:c,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...a},sourceType:"module"},rules:{...m,"next/no-html-link-for-pages":"off",...r}}]}function R(){return [{name:"2digits:node",settings:{node:{version:">= 20.0.0"}},plugins:{node:W},rules:{"node/handle-callback-err":["error","^(err|error)$"],"node/no-deprecated-api":"error","node/no-exports-assign":"error","node/no-new-require":"error","node/no-path-concat":"error","node/no-unsupported-features/node-builtins":["error",{allowExperimental:!0}],"node/prefer-global/buffer":"error","node/prefer-global/process":"error","node/prefer-global/text-encoder":"error","node/prefer-global/url":"error","node/prefer-global/console":"error","node/prefer-global/url-search-params":"error","node/prefer-global/text-decoder":"error","node/process-exit-as-throw":"error"}}]}async function D(){let[e,t]=await Promise.all([o(import('eslint-config-prettier')),o(import('eslint-plugin-react'))]);return [{name:"2digits:prettier",plugins:{react:t},rules:{...e.rules,"tailwindcss/classnames-order":"off","react/jsx-newline":["error",{prevent:!1}]}}]}async function L(e={}){let{files:t=[b,x],overrides:r={},parserOptions:a,tsconfigRootDir:i,reactCompiler:c=!0}=e,[m,f,g,h,V]=await Promise.all([o(import('@eslint-react/eslint-plugin')),o(import('eslint-plugin-react-hooks')),o(import('eslint-plugin-react')),o(import('@typescript-eslint/parser')),c?o(import('eslint-plugin-react-compiler')):void 0]),y=m.configs.all.plugins,H=renamePluginsInRules({...g.configs.recommended.rules,...g.configs["jsx-runtime"].rules,...f.configs.recommended.rules,...m.configs["recommended-type-checked"].rules},p);return [{name:"2digits:react/setup",plugins:{react:g,"react-dom":y["@eslint-react/dom"],"react-web-api":y["@eslint-react/web-api"],"react-extra":y["@eslint-react"],"react-hooks":fixupPluginRules(f),"react-hooks-extra":y["@eslint-react/hooks-extra"],"react-naming-convention":y["@eslint-react/naming-convention"],...c?{"react-compiler":V}:{}},settings:{react:{version:"detect"}}},{name:"2digits:react/rules",files:t,languageOptions:{parser:h,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:i,projectService:!0,...a},sourceType:"module"},rules:{...H,...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/jsx-curly-newline":"off","react/jsx-newline":["error",{prevent:!1}],"react/prop-types":"off",...r}}]}function G(){return [{name:"2digits:regexp",plugins:{regexp:E},rules:{...E.configs["flat/recommended"].rules}}]}var pe=renamePluginsInRules(k.configs.recommended.rules,p);function U(){return [{name:"2digits:sonar",plugins:{sonar:k},rules:{...pe,"sonar/no-redundant-jump":"off"}}]}async function N(e={}){let{files:t=[j],overrides:r={},parserOptions:a,storybookDirectory:i=".storybook"}=e,[c,m]=await Promise.all([o(import('eslint-plugin-storybook')),o(import('@typescript-eslint/parser'))]),f={parser:m,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...a},sourceType:"module"};return [{name:"2digits:storybook/setup",plugins:{storybook:fixupPluginRules(c)}},{name:"2digits:storybook/rules",files:t,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:t,rules:{"react-hooks/rules-of-hooks":"off","react/display-name":"off","sonar/no-duplicate-string":"off"}},{name:"2digits:storybook/config",files:[`${i}/main.@(js|cjs|mjs|ts)`],languageOptions:f,rules:{"storybook/no-uninstalled-addons":"error"}}]}async function B(e={}){let{overrides:t={}}=e,[r,{tailwindFunctions:a},i]=await Promise.all([o(import('eslint-plugin-tailwindcss')),o(import('@2digits/constants')),findUp(["tailwind.config.ts","tailwind.config.js"])]);return [{name:"2digits:tailwind",plugins:{tailwindcss:r},settings:{tailwindcss:{callees:a,config:i}},rules:{...r.configs.recommended.rules,...t}}]}async function A(e={}){let{overrides:t={}}=e,r=await o(import('@tanstack/eslint-plugin-query'));return [{name:"2digits:tanstack",plugins:{tanstack:fixupPluginRules(r)},rules:{"tanstack/exhaustive-deps":"error","tanstack/stable-query-client":"error","tanstack/no-rest-destructuring":"error",...t}}]}async function M(e={}){let{overrides:t={}}=e;return [{name:"2digits:turbo",plugins:{turbo:await o(import('eslint-plugin-turbo'))},rules:{"turbo/no-undeclared-env-vars":"error",...t}}]}async function X(e={}){let{overrides:t={},parserOptions:r={}}=e,[{plugin:a,configs:i,parser:c},m]=await Promise.all([o(import('typescript-eslint')),o(import('@2digits/eslint-plugin'))]),f=renamePluginsInConfigs(i.strictTypeChecked,p),g=Object.fromEntries(f.flatMap(({rules:h})=>Object.entries(h??{})));return [{name:"2digits:typescript/setup",plugins:{ts:a,"@2digits":m},languageOptions:{parser:c,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:"module"}},{name:"2digits:typescript/rules",files:[S],rules:{...g,"ts/restrict-template-expressions":["error",{allowNumber:!0}],"ts/ban-ts-comment":["error",{"ts-ignore":"allow-with-description"}],"ts/consistent-type-exports":["error"],"ts/consistent-type-imports":["error",{prefer:"type-imports",disallowTypeAnnotations:!1,fixStyle:"inline-type-imports"}],"ts/no-empty-interface":["error",{allowSingleExtends:!0}],"ts/no-explicit-any":["error"],"ts/no-import-type-side-effects":["error"],"ts/no-misused-promises":"off","ts/no-confusing-void-expression":"off","ts/no-unused-vars":["error",{ignoreRestSiblings:!0,argsIgnorePattern:"^_",varsIgnorePattern:"^_"}],"ts/unbound-method":"off",...m.configs.recommended.rules,...t}},{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 z(){return [{name:"2digits:unicorn",plugins:{unicorn:T},rules:{...T.configs["flat/recommended"].rules,"unicorn/filename-case":["off"],"unicorn/prefer-module":["off"],"unicorn/prevent-abbreviations":["off"],"unicorn/prefer-ternary":["error","only-single-line"],"unicorn/no-useless-undefined":["error",{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":["off"]}}]}function d(e,t){return typeof e=="boolean"?e:e?.enable??t??!1}function u(e){if(typeof e=="boolean"||e===void 0)return {};let{enable:t,...r}=e;return r}function fe(e={},...t){let r=new FlatConfigComposer(I(e.ignores),P(e.js),R(),v(),_(),z(),U(),G(),w());d(e.turbo,isPackageExists("turbo"))&&(r=r.append(M(u(e.turbo))));let{overrides:a,...i}=u(e.ts);return d(e.ts,isPackageExists("typescript"))&&(r=r.append(X(u(e.ts)))),d(e.react,isPackageExists("react"))&&(r=r.append(L({...u(e.react),...i}))),d(e.next,isPackageExists("next"))&&(r=r.append(q({...u(e.next),...i}))),d(e.storybook,isPackageExists("storybook"))&&(r=r.append(N({...u(e.storybook),...i}))),d(e.tailwind,isPackageExists("tailwindcss"))&&(r=r.append(B(u(e.tailwind)))),d(e.tanstack,isPackageExists("react-query")||isPackageExists("@tanstack/react-query")||isPackageExists("@tanstack/react-query-devtools"))&&(r=r.append(A(u(e.tanstack)))),d(e.graphql,isPackageExists("graphql"))&&(r=r.append(C(u(e.graphql)))),r=r.append(...t),isPackageExists("prettier")&&(r=r.append(D())),r.renamePlugins(p).toConfigs()}export{w as antfu,v as comments,fe as default,C as graphql,I as ignores,P as javascript,_ as jsdoc,q as next,R as node,D as prettier,L as react,G as regexp,U as sonar,N as storybook,B as tailwind,A as tanstack,M as turbo,fe as twoDigits,X as typescript,z as unicorn};//# sourceMappingURL=index.js.map
1
+ import $ from'eslint-plugin-antfu';import K from'@eslint-community/eslint-plugin-eslint-comments';import Q from'@eslint-community/eslint-plugin-eslint-comments/configs';import {renamePluginsInRules,composer,renamePluginsInConfigs,FlatConfigComposer}from'eslint-flat-config-utils';import {loadConfig}from'graphql-config';import oe from'@eslint/js';import x from'globals';import {fixupPluginRules}from'@eslint/compat';import k from'eslint-plugin-unicorn';import W from'eslint-plugin-n';import T from'eslint-plugin-sonarjs';import E from'eslint-plugin-regexp';import {findUp}from'find-up';import {isPackageExists}from'local-pkg';function w(){return [{name:"2digits:antfu",plugins:{antfu:$},rules:{"antfu/if-newline":"error","antfu/top-level-function":"error"}}]}var p={"@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",react:"react","@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"};var Y=renamePluginsInRules(Q.recommended.rules,p);function v(){return [{name:"2digits:comments",plugins:{comments:K},rules:{...Y,"comments/no-unused-disable":"error","comments/disable-enable-pair":["error",{allowWholeFile:!0}]}}]}async function o(e){let t=await e;return t.default||t}async function C(e={}){let{overrides:t={},files:r=["**/*.graphql","**/*.gql"]}=e,[i,a]=await Promise.all([o(import('@graphql-eslint/eslint-plugin')),loadConfig({throwOnEmpty:!1,throwOnMissing:!1}).then(m=>m?.getDefault().schema)]),l=i.configs["flat/operations-recommended"].rules,c={};if(a)c=l;else for(let m of Object.keys(l)){let y=m.replace("@graphql-eslint/","");y in i.rules&&(i.rules[y].meta.docs?.requiresSchema||i.rules[y].meta.docs?.requiresSiblings)||(c[m]=l[m]);}let d=renamePluginsInRules(c,p);return [{name:"2digits:graphql",plugins:{gql:i},languageOptions:{parser:i.parser},files:r,rules:{...d,"gql/naming-convention":["error",{allowLeadingUnderscore:!0}],...t}}]}var S="**/*.?([cm])[jt]s?(x)",h="**/*.?([cm])ts",O="**/*.?([cm])tsx",j="**/*.stories.tsx",F=["**/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"];async function I(e={}){let{gitIgnore:t,ignores:r=[]}=e;return composer({ignores:[F,r].flat(),name:"2digits:ignores"},o(import('eslint-config-flat-gitignore')).then(i=>i({strict:!1,...t,name:"2digits:gitignore"})))}function P(e={}){let{overrides:t={}}=e;return [{name:"2digits:javascript",languageOptions:{ecmaVersion:2022,globals:{...x.browser,...x.es2021,...x.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...oe.configs.recommended.rules,"accessor-pairs":["error",{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":"error","block-scoped-var":"error","constructor-super":"error","default-case-last":"error","dot-notation":["error",{allowKeywords:!0}],eqeqeq:["error","smart"],"new-cap":["error",{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":"error","no-array-constructor":"error","no-async-promise-executor":"error","no-caller":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":["error","always"],"no-const-assign":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-empty-character-class":"error","no-empty-pattern":"error","no-eval":"error","no-ex-assign":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-implied-eval":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-iterator":"error","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-native-nonconstructor":"error","no-new-wrappers":"error","no-obj-calls":"error","no-octal":"error","no-octal-escape":"error","no-proto":"error","no-prototype-builtins":"error","no-redeclare":["error",{builtinGlobals:!1}],"no-regex-spaces":"error","no-restricted-globals":["error",{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-restricted-properties":["error",{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:"__proto__"},{message:"Use `Object.defineProperty` instead.",property:"__defineGetter__"},{message:"Use `Object.defineProperty` instead.",property:"__defineSetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupGetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupSetter__"}],"no-restricted-syntax":["error","DebuggerStatement","LabeledStatement","WithStatement","TSEnumDeclaration","TSExportAssignment"],"no-self-assign":["error",{props:!0}],"no-self-compare":"error","no-sequences":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-this-before-super":"error","no-throw-literal":"error","no-undef":"error","no-undef-init":"error","no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":["error",{args:"none",caughtErrors:"none",ignoreRestSiblings:!0,vars:"all"}],"no-useless-backreference":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-constructor":"error","no-useless-rename":"error","no-var":"error","no-with":"error","object-shorthand":["error","always",{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":["error",{initialized:"never"}],"prefer-arrow-callback":["error",{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":["error",{destructuring:"all",ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","symbol-description":"error","unicode-bom":["error","never"],"use-isnan":["error",{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":["error",{requireStringLiterals:!0}],"vars-on-top":"error",yoda:["error","never"],...t}}]}async function _(){return [{name:"2digits:jsdoc",plugins:{jsdoc:await o(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"}}]}async function q(e={}){let{files:t=[h,O],overrides:r={},parserOptions:i}=e,[a,l]=await Promise.all([o(import('@next/eslint-plugin-next')),o(import('@typescript-eslint/parser'))]),c=renamePluginsInRules({...a.configs.recommended.rules,...a.configs["core-web-vitals"].rules},p);return [{name:"2digits:next/setup",plugins:{next:fixupPluginRules(a)}},{name:"2digits:next/rules",files:t,languageOptions:{parser:l,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:"module"},rules:{...c,"next/no-html-link-for-pages":"off",...r}}]}function R(){return [{name:"2digits:node",settings:{node:{version:">= 20.0.0"}},plugins:{node:W},rules:{"node/handle-callback-err":["error","^(err|error)$"],"node/no-deprecated-api":"error","node/no-exports-assign":"error","node/no-new-require":"error","node/no-path-concat":"error","node/no-unsupported-features/node-builtins":["error",{allowExperimental:!0}],"node/prefer-global/buffer":"error","node/prefer-global/process":"error","node/prefer-global/text-encoder":"error","node/prefer-global/url":"error","node/prefer-global/console":"error","node/prefer-global/url-search-params":"error","node/prefer-global/text-decoder":"error","node/process-exit-as-throw":"error"}}]}async function D(){let[e,t]=await Promise.all([o(import('eslint-config-prettier')),o(import('eslint-plugin-react'))]);return [{name:"2digits:prettier",plugins:{react:t},rules:{...e.rules,"tailwindcss/classnames-order":"off","react/jsx-newline":["error",{prevent:!1}]}}]}async function L(e={}){let{files:t=[h,O],overrides:r={},parserOptions:i,tsconfigRootDir:a,reactCompiler:l=!0}=e,[c,d,m,y,V]=await Promise.all([o(import('@eslint-react/eslint-plugin')),o(import('eslint-plugin-react-hooks')),o(import('eslint-plugin-react')),o(import('@typescript-eslint/parser')),l?o(import('eslint-plugin-react-compiler')):void 0]),b=c.configs.all.plugins,H=renamePluginsInRules({...m.configs.recommended.rules,...m.configs["jsx-runtime"].rules,...d.configs.recommended.rules,...c.configs["recommended-type-checked"].rules},p);return [{name:"2digits:react/setup",plugins:{react:m,"react-dom":b["@eslint-react/dom"],"react-web-api":b["@eslint-react/web-api"],"react-extra":b["@eslint-react"],"react-hooks":fixupPluginRules(d),"react-hooks-extra":b["@eslint-react/hooks-extra"],"react-naming-convention":b["@eslint-react/naming-convention"],...l?{"react-compiler":V}:{}},settings:{react:{version:"detect"}}},{name:"2digits:react/rules",files:t,languageOptions:{parser:y,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:a,projectService:!0,...i},sourceType:"module"},rules:{...H,...l?{"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/jsx-curly-newline":"off","react/jsx-newline":["error",{prevent:!1}],"react/prop-types":"off",...r}}]}function G(){return [{name:"2digits:regexp",plugins:{regexp:E},rules:{...E.configs["flat/recommended"].rules}}]}var pe=renamePluginsInRules(T.configs.recommended.rules,p);function N(){return [{name:"2digits:sonar",plugins:{sonar:T},rules:{...pe,"sonar/no-redundant-jump":"off"}}]}async function U(e={}){let{files:t=[j],overrides:r={},parserOptions:i,storybookDirectory:a=".storybook"}=e,[l,c]=await Promise.all([o(import('eslint-plugin-storybook')),o(import('@typescript-eslint/parser'))]),d={parser:c,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:"module"};return [{name:"2digits:storybook/setup",plugins:{storybook:fixupPluginRules(l)}},{name:"2digits:storybook/rules",files:t,languageOptions:d,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:t,rules:{"react-hooks/rules-of-hooks":"off","react/display-name":"off","sonar/no-duplicate-string":"off"}},{name:"2digits:storybook/config",files:[`${a}/main.@(js|cjs|mjs|ts)`],languageOptions:d,rules:{"storybook/no-uninstalled-addons":"error"}}]}async function B(e={}){let{overrides:t={}}=e,[r,{tailwindFunctions:i},a]=await Promise.all([o(import('eslint-plugin-tailwindcss')),o(import('@2digits/constants')),findUp(["tailwind.config.ts","tailwind.config.js"])]);return [{name:"2digits:tailwind",plugins:{tailwindcss:r},settings:{tailwindcss:{callees:i,config:a}},rules:{...r.configs.recommended.rules,...t}}]}async function A(e={}){let{overrides:t={}}=e,r=await o(import('@tanstack/eslint-plugin-query'));return [{name:"2digits:tanstack",plugins:{tanstack:fixupPluginRules(r)},rules:{"tanstack/exhaustive-deps":"error","tanstack/stable-query-client":"error","tanstack/no-rest-destructuring":"error",...t}}]}async function M(e={}){let{overrides:t={}}=e;return [{name:"2digits:turbo",plugins:{turbo:await o(import('eslint-plugin-turbo'))},rules:{"turbo/no-undeclared-env-vars":"error",...t}}]}async function X(e={}){let{overrides:t={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:l},c]=await Promise.all([o(import('typescript-eslint')),o(import('@2digits/eslint-plugin'))]),d=renamePluginsInConfigs(a.strictTypeChecked,p),m=Object.fromEntries(d.flatMap(({rules:y})=>Object.entries(y??{})));return [{name:"2digits:typescript/setup",plugins:{ts:i,"@2digits":c},languageOptions:{parser:l,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:"module"}},{name:"2digits:typescript/rules",files:[S],rules:{...m,"ts/restrict-template-expressions":["error",{allowNumber:!0}],"ts/ban-ts-comment":["error",{"ts-ignore":"allow-with-description"}],"ts/consistent-type-exports":["error"],"ts/consistent-type-imports":["error",{prefer:"type-imports",disallowTypeAnnotations:!1,fixStyle:"inline-type-imports"}],"ts/no-empty-interface":["error",{allowSingleExtends:!0}],"ts/no-explicit-any":["error"],"ts/no-import-type-side-effects":["error"],"ts/no-misused-promises":"off","ts/no-confusing-void-expression":"off","ts/no-unused-vars":["error",{ignoreRestSiblings:!0,argsIgnorePattern:"^_",varsIgnorePattern:"^_"}],"ts/unbound-method":"off",...c.configs.recommended.rules,...t}},{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 z(){return [{name:"2digits:unicorn",plugins:{unicorn:k},rules:{...k.configs["flat/recommended"].rules,"unicorn/filename-case":["off"],"unicorn/prefer-module":["off"],"unicorn/prevent-abbreviations":["off"],"unicorn/prefer-ternary":["error","only-single-line"],"unicorn/no-useless-undefined":["error",{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":["off"]}}]}function g(e,t){return typeof e=="boolean"?e:e?.enable??t??!1}function f(e){if(typeof e=="boolean"||e===void 0)return {};let{enable:t,...r}=e;return r}function fe(e={},...t){let r=new FlatConfigComposer(I(e.ignores),P(e.js),R(),v(),_(),z(),N(),G(),w());g(e.turbo,isPackageExists("turbo"))&&(r=r.append(M(f(e.turbo))));let{overrides:i,...a}=f(e.ts);return g(e.ts,isPackageExists("typescript"))&&(r=r.append(X(f(e.ts)))),g(e.react,isPackageExists("react"))&&(r=r.append(L({...f(e.react),...a}))),g(e.next,isPackageExists("next"))&&(r=r.append(q({...f(e.next),...a}))),g(e.storybook,isPackageExists("storybook"))&&(r=r.append(U({...f(e.storybook),...a}))),g(e.tailwind,isPackageExists("tailwindcss"))&&(r=r.append(B(f(e.tailwind)))),g(e.tanstack,isPackageExists("react-query")||isPackageExists("@tanstack/react-query")||isPackageExists("@tanstack/react-query-devtools"))&&(r=r.append(A(f(e.tanstack)))),g(e.graphql,isPackageExists("graphql"))&&(r=r.append(C(f(e.graphql)))),r=r.append(...t),isPackageExists("prettier")&&(r=r.append(D())),r.renamePlugins(p).toConfigs()}export{w as antfu,v as comments,fe as default,C as graphql,I as ignores,P as javascript,_ as jsdoc,q as next,R as node,D as prettier,L as react,G as regexp,N as sonar,U as storybook,B as tailwind,A as tanstack,M as turbo,fe as twoDigits,X as typescript,z as unicorn};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/configs/antfu.ts","../src/constants.ts","../src/configs/comments.ts","../src/utils.ts","../src/configs/graphql.ts","../src/globs.ts","../src/configs/ignores.ts","../src/configs/javascript.ts","../src/configs/jsdoc.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":["antfu","pluginAntfu","PluginNameMap","recommended","renamePluginsInRules","configs","comments","pluginComments","interopDefault","m","resolved","graphql","options","overrides","files","gql","fixupPluginRules","GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_EXCLUDE","ignores","gitIgnore","composer","javascript","globals","eslint","jsdoc","next","parserOptions","parser","node","default","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","regexp","pluginRegexp","rules","sonar","storybook","storybookDirectory","languageOptions","tailwind","tailwindcss","tailwindFunctions","config","findUp","tanstack","turbo","typescript","plugin","twoDigits","strictConfig","renamePluginsInConfigs","unicorn","enabled","defaults","enable","rest","userConfig","FlatConfigComposer","isPackageExists","typescriptOptions"],"mappings":"0kBAIO,SAASA,CAAAA,EAA+B,CAC7C,OAAO,CACL,CACE,IAAM,CAAA,eAAA,CACN,OAAS,CAAA,CACP,MAAOC,CACT,CAAA,CACA,KAAO,CAAA,CACL,kBAAoB,CAAA,OAAA,CACpB,0BAA4B,CAAA,OAC9B,CACF,CACF,CACF,CCjBO,IAAMC,CAAAA,CAAgB,CAC3B,YAAA,CAAc,OACd,iCAAmC,CAAA,yBAAA,CACnC,2BAA6B,CAAA,mBAAA,CAC7B,mBAAqB,CAAA,WAAA,CACrB,uBAAyB,CAAA,eAAA,CACzB,gBAAiB,aACjB,CAAA,aAAA,CAAe,aACf,CAAA,gBAAA,CAAkB,gBAClB,CAAA,KA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AAAA,CAAgB,gCAAgC,CACpD,CAEA5C,GAAAA,CAAAA,CAAWA,EAAS,MAAO8B,CAAAA,CAAAA,CAASF,CAAOxC,CAAAA,CAAAA,CAAQ,QAAQ,CAAC,CAAC,CAAA,CAAA,CAG3DkD,EAAQlD,CAAQ,CAAA,OAAA,CAASwD,eAAgB,CAAA,SAAS,CAAC,CAAA,GACrD5C,CAAWA,CAAAA,CAAAA,CAAS,OAAOb,CAAQyC,CAAAA,CAAAA,CAAOxC,CAAQ,CAAA,OAAO,CAAC,CAAC,CAG7DY,CAAAA,CAAAA,CAAAA,CAAWA,EAAS,MAAO,CAAA,GAAG0C,CAAU,CAAA,CAEpCE,eAAgB,CAAA,UAAU,CAC5B5C,GAAAA,CAAAA,CAAWA,EAAS,MAAOU,CAAAA,CAAAA,EAAU,CAAA,CAAA,CAGhCV,CAAS,CAAA,aAAA,CAActB,CAAa,CAAA,CAAE,WAC/C","file":"index.js","sourcesContent":["import pluginAntfu from 'eslint-plugin-antfu';\n\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function antfu(): TypedFlatConfigItem[] {\n return [\n {\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","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 react: 'react',\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} 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 type { TypedFlatConfigItem } from '../types';\n\nconst recommended = renamePluginsInRules(configs.recommended.rules as never, PluginNameMap);\n\nexport function comments(): TypedFlatConfigItem[] {\n return [\n {\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 type { Awaitable } from 'eslint-flat-config-utils';\n\nexport async function interopDefault<T>(\n m: Awaitable<T>,\n): 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';\nimport { renamePluginsInRules } from 'eslint-flat-config-utils';\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 = await interopDefault(import('@graphql-eslint/eslint-plugin'));\n\n const recommended = renamePluginsInRules(\n gql.flatConfigs['operations-recommended'].rules,\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:graphql',\n plugins: {\n gql: fixupPluginRules(gql as never),\n },\n languageOptions: {\n parser: { ...gql, meta: { name: 'graphql' } },\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","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_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 { 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 globals from 'globals';\n\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\n\nexport function javascript(options: OptionsOverrides = {}): TypedFlatConfigItem[] {\n const { overrides = {} } = options;\n\n return [\n {\n name: '2digits:javascript',\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 ...overrides,\n },\n },\n ];\n}\n","import type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function jsdoc(): Promise<TypedFlatConfigItem[]> {\n return [\n {\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 { 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 { pluginNode } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function node(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:node',\n settings: {\n node: {\n version: '>= 20.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, react] = await Promise.all([\n interopDefault(import('eslint-config-prettier')),\n interopDefault(import('eslint-plugin-react')),\n ]);\n\n return [\n {\n name: '2digits:prettier',\n plugins: {\n react,\n },\n rules: {\n ...prettier.rules,\n\n 'tailwindcss/classnames-order': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n },\n },\n ];\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, OptionsWithReact, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function react(\n options: OptionsWithReact & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const {\n files = [GLOB_TS, GLOB_TSX],\n overrides = {},\n parserOptions,\n tsconfigRootDir,\n reactCompiler = true,\n } = options;\n\n const [pluginReact, pluginReactHooks, react, parser, pluginReactCompiler] = await Promise.all([\n interopDefault(import('@eslint-react/eslint-plugin')),\n interopDefault(import('eslint-plugin-react-hooks')),\n interopDefault(import('eslint-plugin-react')),\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 ...react.configs.recommended.rules,\n ...react.configs['jsx-runtime'].rules,\n ...pluginReactHooks.configs.recommended.rules,\n ...pluginReact.configs['recommended-type-checked'].rules,\n },\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:react/setup',\n plugins: {\n react,\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': fixupPluginRules(pluginReactHooks as never),\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 'react-extra/prefer-read-only-props': 'off',\n\n 'react/jsx-curly-newline': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n 'react/prop-types': 'off',\n\n ...overrides,\n },\n },\n ];\n}\n","import pluginRegexp from 'eslint-plugin-regexp';\n\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function regexp(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:regexp',\n plugins: {\n regexp: pluginRegexp,\n },\n rules: {\n ...pluginRegexp.configs['flat/recommended'].rules,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { pluginSonar } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nconst rules = renamePluginsInRules(pluginSonar.configs.recommended.rules as never, PluginNameMap);\n\nexport function sonar(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:sonar',\n plugins: {\n sonar: pluginSonar,\n },\n rules: {\n ...rules,\n\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 {\n OptionsTypeScriptWithTypes,\n OptionsWithStorybook,\n TypedFlatConfigItem,\n} from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function storybook(\n options: OptionsWithStorybook & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const {\n files = [GLOB_STORIES],\n overrides = {},\n parserOptions,\n storybookDirectory = '.storybook',\n } = 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 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 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 { fixupPluginRules } from '@eslint/compat';\n\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 return [\n {\n name: '2digits:tanstack',\n plugins: {\n tanstack: fixupPluginRules(tanstack as never),\n },\n rules: {\n 'tanstack/exhaustive-deps': 'error',\n 'tanstack/stable-query-client': 'error',\n 'tanstack/no-rest-destructuring': 'error',\n\n ...overrides,\n },\n },\n ];\n}\n","import 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 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(\n options: OptionsTypeScriptWithTypes = {},\n): 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(\n strictConfig.flatMap(({ rules }) => Object.entries(rules ?? {})),\n );\n\n return [\n {\n name: '2digits:typescript/setup',\n plugins: {\n ts: plugin,\n '@2digits': twoDigits,\n },\n languageOptions: {\n parser,\n parserOptions: {\n tsconfigRootDir: process.cwd(),\n projectService: true,\n warnOnUnsupportedTypeScriptVersion: false,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n },\n\n {\n name: '2digits:typescript/rules',\n files: [GLOB_SRC],\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-interface': ['error', { allowSingleExtends: true }],\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 { pluginUnicorn } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function unicorn(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:unicorn',\n plugins: {\n unicorn: pluginUnicorn,\n },\n rules: {\n ...pluginUnicorn.configs['flat/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 comments,\n graphql,\n ignores,\n javascript,\n jsdoc,\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 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}\n\nfunction enabled<T extends SharedOptions>(\n options: T | boolean | undefined,\n defaults?: boolean,\n): 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 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 node(),\n comments(),\n jsdoc(),\n unicorn(),\n sonar(),\n regexp(),\n antfu(),\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.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/configs/antfu.ts","../src/constants.ts","../src/configs/comments.ts","../src/utils.ts","../src/configs/graphql.ts","../src/globs.ts","../src/configs/ignores.ts","../src/configs/javascript.ts","../src/configs/jsdoc.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":["antfu","pluginAntfu","PluginNameMap","recommended","renamePluginsInRules","configs","comments","pluginComments","interopDefault","m","resolved","graphql","options","overrides","files","gql","gqlSchema","loadConfig","g","flatRecommended","rules","rule","ruleName","GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_EXCLUDE","ignores","gitIgnore","composer","javascript","globals","eslint","jsdoc","next","parserOptions","parser","fixupPluginRules","node","default","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","regexp","pluginRegexp","sonar","storybook","storybookDirectory","languageOptions","tailwind","tailwindcss","tailwindFunctions","config","findUp","tanstack","turbo","typescript","plugin","twoDigits","strictConfig","renamePluginsInConfigs","unicorn","enabled","defaults","enable","rest","userConfig","FlatConfigComposer","isPackageExists","typescriptOptions"],"mappings":"knBAIO,SAASA,CAAAA,EAA+B,CAC7C,OAAO,CACL,CACE,IAAA,CAAM,eACN,CAAA,OAAA,CAAS,CACP,KAAA,CAAOC,CACT,CACA,CAAA,KAAA,CAAO,CACL,kBAAA,CAAoB,OACpB,CAAA,0BAAA,CAA4B,OAC9B,CACF,CACF,CACF,CCjBO,IAAMC,CAAgB,CAAA,CAC3B,YAAc,CAAA,MAAA,CACd,kCAAmC,yBACnC,CAAA,2BAAA,CAA6B,mBAC7B,CAAA,m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CAAA,CAAE,WAC/C","file":"index.js","sourcesContent":["import pluginAntfu from 'eslint-plugin-antfu';\n\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function antfu(): TypedFlatConfigItem[] {\n return [\n {\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","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 react: 'react',\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} 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 type { TypedFlatConfigItem } from '../types';\n\nconst recommended = renamePluginsInRules(configs.recommended.rules as never, PluginNameMap);\n\nexport function comments(): TypedFlatConfigItem[] {\n return [\n {\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 type { Awaitable } from 'eslint-flat-config-utils';\n\nexport async function interopDefault<T>(\n m: Awaitable<T>,\n): 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 { 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 if (\n ruleName in gql.rules &&\n (gql.rules[ruleName].meta.docs?.requiresSchema ||\n 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","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_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 { 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 globals from 'globals';\n\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types';\n\nexport function javascript(options: OptionsOverrides = {}): TypedFlatConfigItem[] {\n const { overrides = {} } = options;\n\n return [\n {\n name: '2digits:javascript',\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 ...overrides,\n },\n },\n ];\n}\n","import type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function jsdoc(): Promise<TypedFlatConfigItem[]> {\n return [\n {\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 { 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 { pluginNode } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function node(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:node',\n settings: {\n node: {\n version: '>= 20.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, react] = await Promise.all([\n interopDefault(import('eslint-config-prettier')),\n interopDefault(import('eslint-plugin-react')),\n ]);\n\n return [\n {\n name: '2digits:prettier',\n plugins: {\n react,\n },\n rules: {\n ...prettier.rules,\n\n 'tailwindcss/classnames-order': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n },\n },\n ];\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, OptionsWithReact, TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function react(\n options: OptionsWithReact & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const {\n files = [GLOB_TS, GLOB_TSX],\n overrides = {},\n parserOptions,\n tsconfigRootDir,\n reactCompiler = true,\n } = options;\n\n const [pluginReact, pluginReactHooks, react, parser, pluginReactCompiler] = await Promise.all([\n interopDefault(import('@eslint-react/eslint-plugin')),\n interopDefault(import('eslint-plugin-react-hooks')),\n interopDefault(import('eslint-plugin-react')),\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 ...react.configs.recommended.rules,\n ...react.configs['jsx-runtime'].rules,\n ...pluginReactHooks.configs.recommended.rules,\n ...pluginReact.configs['recommended-type-checked'].rules,\n },\n PluginNameMap,\n );\n\n return [\n {\n name: '2digits:react/setup',\n plugins: {\n react,\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': fixupPluginRules(pluginReactHooks as never),\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 'react-extra/prefer-read-only-props': 'off',\n\n 'react/jsx-curly-newline': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n 'react/prop-types': 'off',\n\n ...overrides,\n },\n },\n ];\n}\n","import pluginRegexp from 'eslint-plugin-regexp';\n\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function regexp(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:regexp',\n plugins: {\n regexp: pluginRegexp,\n },\n rules: {\n ...pluginRegexp.configs['flat/recommended'].rules,\n },\n },\n ];\n}\n","import { renamePluginsInRules } from 'eslint-flat-config-utils';\n\nimport { PluginNameMap } from '../constants';\nimport { pluginSonar } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nconst rules = renamePluginsInRules(pluginSonar.configs.recommended.rules as never, PluginNameMap);\n\nexport function sonar(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:sonar',\n plugins: {\n sonar: pluginSonar,\n },\n rules: {\n ...rules,\n\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 {\n OptionsTypeScriptWithTypes,\n OptionsWithStorybook,\n TypedFlatConfigItem,\n} from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function storybook(\n options: OptionsWithStorybook & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const {\n files = [GLOB_STORIES],\n overrides = {},\n parserOptions,\n storybookDirectory = '.storybook',\n } = 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 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 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 { fixupPluginRules } from '@eslint/compat';\n\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 return [\n {\n name: '2digits:tanstack',\n plugins: {\n tanstack: fixupPluginRules(tanstack as never),\n },\n rules: {\n 'tanstack/exhaustive-deps': 'error',\n 'tanstack/stable-query-client': 'error',\n 'tanstack/no-rest-destructuring': 'error',\n\n ...overrides,\n },\n },\n ];\n}\n","import 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 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(\n options: OptionsTypeScriptWithTypes = {},\n): 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(\n strictConfig.flatMap(({ rules }) => Object.entries(rules ?? {})),\n );\n\n return [\n {\n name: '2digits:typescript/setup',\n plugins: {\n ts: plugin,\n '@2digits': twoDigits,\n },\n languageOptions: {\n parser,\n parserOptions: {\n tsconfigRootDir: process.cwd(),\n projectService: true,\n warnOnUnsupportedTypeScriptVersion: false,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n },\n\n {\n name: '2digits:typescript/rules',\n files: [GLOB_SRC],\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-interface': ['error', { allowSingleExtends: true }],\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 { pluginUnicorn } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function unicorn(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:unicorn',\n plugins: {\n unicorn: pluginUnicorn,\n },\n rules: {\n ...pluginUnicorn.configs['flat/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 comments,\n graphql,\n ignores,\n javascript,\n jsdoc,\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 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}\n\nfunction enabled<T extends SharedOptions>(\n options: T | boolean | undefined,\n defaults?: boolean,\n): 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 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 node(),\n comments(),\n jsdoc(),\n unicorn(),\n sonar(),\n regexp(),\n antfu(),\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.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"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@2digits/eslint-config",
3
3
  "description": "Effortlessly enforce best practices and catch errors with this comprehensive ESLint configuration for TypeScript, featuring popular plugins like @typescript-eslint, eslint-plugin-react, and eslint-plugin-unicorn.",
4
- "version": "2.9.16",
4
+ "version": "2.10.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "public": true,
@@ -32,15 +32,15 @@
32
32
  "@eslint-react/eslint-plugin": "1.17.1",
33
33
  "@eslint/compat": "1.2.3",
34
34
  "@eslint/js": "9.15.0",
35
- "@graphql-eslint/eslint-plugin": "3.20.1",
35
+ "@graphql-eslint/eslint-plugin": "4.0.0",
36
36
  "@next/eslint-plugin-next": "15.0.3",
37
- "@tanstack/eslint-plugin-query": "5.61.3",
37
+ "@tanstack/eslint-plugin-query": "5.61.4",
38
38
  "@typescript-eslint/parser": "8.16.0",
39
39
  "eslint-config-flat-gitignore": "0.3.0",
40
40
  "eslint-config-prettier": "9.1.0",
41
41
  "eslint-flat-config-utils": "0.4.0",
42
42
  "eslint-plugin-antfu": "2.7.0",
43
- "eslint-plugin-jsdoc": "50.5.0",
43
+ "eslint-plugin-jsdoc": "50.6.0",
44
44
  "eslint-plugin-n": "17.14.0",
45
45
  "eslint-plugin-react": "7.37.2",
46
46
  "eslint-plugin-react-compiler": "19.0.0-beta-df7b47d-20241124",
@@ -53,6 +53,7 @@
53
53
  "eslint-plugin-unicorn": "56.0.1",
54
54
  "find-up": "7.0.0",
55
55
  "globals": "15.12.0",
56
+ "graphql-config": "5.1.3",
56
57
  "local-pkg": "0.5.1",
57
58
  "typescript-eslint": "8.16.0",
58
59
  "@2digits/constants": "0.3.4",