@2digits/eslint-config 1.5.0 → 2.0.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 +42 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +8997 -0
- package/dist/index.d.ts +8995 -92
- package/dist/index.js +13 -19
- package/dist/index.js.map +1 -1
- package/package.json +38 -31
- package/dist/index.d.mts +0 -94
- package/dist/index.mjs +0 -13
- package/dist/index.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var U__default = /*#__PURE__*/_interopDefault(U);
|
|
15
|
-
var I__default = /*#__PURE__*/_interopDefault(I);
|
|
16
|
-
|
|
17
|
-
var h={extends:["plugin:jsdoc/recommended-typescript-error"],rules:{"jsdoc/require-jsdoc":["error",{require:{FunctionDeclaration:!1}}],"jsdoc/tag-lines":["off"]}};var N=localPkg.getPackageInfoSync("next")?.version,v=N?{extends:["next"],rules:{"@next/next/no-html-link-for-pages":"off"}}:{extends:[],rules:void 0};var k=localPkg.getPackageInfoSync("react")?.version,p=k?{extends:["plugin:react/recommended","plugin:react-hooks/recommended"],settings:{react:{version:k}},rules:{"react/prop-types":["off"],"react/react-in-jsx-scope":["off"],"react/jsx-curly-newline":["off"],"react/jsx-newline":["error",{prevent:!1}]}}:{extends:[],settings:void 0,rules:void 0};var x={plugins:["storybook"],overrides:[{files:["*.stories.@(ts|tsx|js|jsx|mjs|cjs)"],rules:{"import/no-anonymous-default-export":"off","storybook/await-interactions":"error","storybook/context-in-play-function":"error","storybook/default-exports":"error","storybook/hierarchy-separator":"warn","storybook/no-redundant-story-name":"warn","storybook/prefer-pascal-case":"warn","storybook/story-exports":"error","storybook/use-storybook-expect":"error","storybook/use-storybook-testing-library":"error"}},{files:[".storybook/main.@(js|cjs|mjs|ts)"],rules:{"storybook/no-uninstalled-addons":"error"}}]};var P={directory:"isDirectory",file:"isFile"};function F(e){if(!Object.hasOwnProperty.call(P,e))throw new Error(`Invalid type specified: ${e}`)}var V=(e,r)=>r[P[e]](),A=e=>e instanceof URL?url.fileURLToPath(e):e;function g(e,{cwd:r=U__default.default.cwd(),type:o="file",allowSymlinks:l=!0}={}){F(o),r=A(r);let m=l?I__default.default.statSync:I__default.default.lstatSync;for(let c of e)try{let a=m(i__default.default.resolve(r,c),{throwIfNoEntry:!1});if(!a)continue;if(V(o,a))return c}catch{}}function w(e){return e instanceof URL?url.fileURLToPath(e):e}var R=Symbol("findUpStop");function M(e,r={}){let o=i__default.default.resolve(w(r.cwd)??""),{root:l}=i__default.default.parse(o),m=i__default.default.resolve(o,w(r.stopAt)??l),c=r.limit??Number.POSITIVE_INFINITY,a=[e].flat(),T=n=>{if(typeof e!="function")return g(a,n);let y=e(n.cwd);return typeof y=="string"?g([y],n):y},d=[];for(;;){let n=T({...r,cwd:o});if(n===R||(n&&d.push(i__default.default.resolve(o,n)),o===m||d.length>=c))break;o=i__default.default.dirname(o);}return d}function f(e,r={}){return M(e,{...r,limit:1})[0]}var S=f(["tailwind.config.ts","tailwind.config.js"]),O=localPkg.getPackageInfoSync("tailwindcss")?.version,u=O&&S?{extends:["plugin:tailwindcss/recommended"],settings:{tailwindcss:{callees:constants.tailwindFunctions,config:S}},rules:{"tailwindcss/classnames-order":["off"]}}:{extends:[],settings:void 0,rules:void 0};var j=f(["pnpm-workspace.yaml","pnpm-lock.yaml"]),Q=j&&pathe.dirname(j),s={parserOptions:{EXPERIMENTAL_useProjectService:!0,tsconfigRootDir:Q},plugins:["@typescript-eslint"],extends:["plugin:@typescript-eslint/strict-type-checked"],parser:"@typescript-eslint/parser",rules:{"@typescript-eslint/ban-ts-comment":["error",{"ts-ignore":"allow-with-description"}],"@typescript-eslint/consistent-type-exports":["error"],"@typescript-eslint/consistent-type-imports":["error",{prefer:"type-imports",disallowTypeAnnotations:!1,fixStyle:"inline-type-imports"}],"@typescript-eslint/no-empty-interface":["error",{allowSingleExtends:!0}],"@typescript-eslint/no-explicit-any":["warn"],"@typescript-eslint/no-import-type-side-effects":["error"],"@typescript-eslint/no-misused-promises":"off","@typescript-eslint/no-confusing-void-expression":["error",{ignoreArrowShorthand:!0,ignoreVoidOperator:!0}]}};var b={extends:["plugin:unicorn/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}],"unicorn/prefer-top-level-await":["off"]}};var rt={root:!0,parserOptions:{sourceType:"module",cacheLifetime:{glob:"Infinity"},...s.parserOptions},plugins:[...s.plugins,...x.plugins],extends:["eslint:recommended","turbo","plugin:@tanstack/eslint-plugin-query/recommended",...h.extends,...v.extends,...u.extends,...b.extends,...s.extends,"plugin:@2digits/recommended",...p.extends,"prettier"],parser:s.parser,env:{es6:!0,node:!0},ignorePatterns:["node_modules","dist","build","coverage","public","tmp","tmp-build","!.prettierrc.js","templates"],settings:{...p.settings,...u.settings},rules:{...h.rules,...s.rules,...p.rules,...b.rules,...u.rules,"sort-imports":["off"],"max-params":["warn"]},overrides:[...x.overrides]};
|
|
18
|
-
|
|
19
|
-
module.exports = rt;
|
|
1
|
+
import h from 'eslint-plugin-unicorn';
|
|
2
|
+
import T from 'eslint-plugin-eslint-comments';
|
|
3
|
+
import w from 'eslint-plugin-n';
|
|
4
|
+
import { composer, renamePluginsInRules, renamePluginsInConfigs, FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
5
|
+
import M from '@eslint/js';
|
|
6
|
+
import k from 'globals';
|
|
7
|
+
import { fixupPluginRules } from '@eslint/compat';
|
|
8
|
+
import { findUp } from 'find-up';
|
|
9
|
+
import { isPackageExists } from 'local-pkg';
|
|
10
|
+
|
|
11
|
+
function v(){return [{name:"2digits:comments",plugins:{"eslint-comments":T},rules:{"eslint-comments/no-aggregating-enable":"error","eslint-comments/no-duplicate-disable":"error","eslint-comments/no-unlimited-disable":"error","eslint-comments/no-unused-enable":"error","eslint-comments/no-unused-disable":"error"}}]}var j="**/*.?([cm])[jt]s?(x)",b="**/*.?([cm])ts",O="**/*.?([cm])tsx",S="**/*.stories.tsx",C=["**/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 o(e){let t=await e;return t.default||t}async function F(e={}){return composer({ignores:C,name:"2digits:ignores"},o(import('eslint-config-flat-gitignore')).then(t=>({...t(e),name:"2digits:gitignore"})))}function I(e={}){let{overrides:t={}}=e;return [{name:"2digits:javascript",languageOptions:{ecmaVersion:2022,globals:{...k.browser,...k.es2021,...k.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...M.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"}}]}var d={"@next/next":"next","@eslint-react/naming-convention":"react-naming-convention","@eslint-react/hooks-extra":"react-hooks-extra","@eslint-react/dom":"react-dom","@eslint-react":"react-extra","react-hooks":"react-hooks",react:"react","@typescript-eslint":"ts",node:"node","eslint-comments":"eslint-comments",storybook:"storybook",turbo:"turbo",jsdoc:"jsdoc",unicorn:"unicorn",tailwindcss:"tailwindcss","@tanstack/query":"tanstack","@2digits":"@2digits"};async function _(e={}){let{files:t=[b,O],overrides:r={},tsconfigPath:a,parserOptions:i}=e,[l,m]=await Promise.all([o(import('@next/eslint-plugin-next')),o(import('@typescript-eslint/parser'))]),c=renamePluginsInRules({...l.configs.recommended.rules,...l.configs["core-web-vitals"].rules},d);return [{name:"2digits:next/setup",plugins:{next:fixupPluginRules(l)}},{name:"2digits:next/rules",files:t,languageOptions:{parser:m,parserOptions:{ecmaFeatures:{jsx:!0},project:a,...i},sourceType:"module"},rules:{...c,"next/no-html-link-for-pages":"off",...r}}]}function D(){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 W(){return [{name:"2digits:prettier",rules:(await o(import('eslint-config-prettier'))).rules}]}async function G(e={}){let{files:t=[b,O],overrides:r={},tsconfigPath:a,parserOptions:i,tsconfigRootDir:l}=e,[m,c,u,x]=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'))]),y=m.configs.all.plugins,N=renamePluginsInRules({...u.configs.recommended.rules,...u.configs["jsx-runtime"].rules,...c.configs.recommended.rules,...m.configs["recommended-type-checked"].rules},d);return [{name:"2digits:react/setup",plugins:{react:u,"react-dom":y["@eslint-react/dom"],"react-extra":y["@eslint-react"],"react-hooks":fixupPluginRules(c),"react-hooks-extra":y["@eslint-react/hooks-extra"],"react-naming-convention":y["@eslint-react/naming-convention"]},settings:{react:{version:"detect"}}},{name:"2digits:react/rules",files:t,languageOptions:{parser:x,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:l,project:a,...i},sourceType:"module"},rules:{...N,"react-hooks-extra/ensure-use-memo-has-non-empty-deps":"error","react-hooks-extra/prefer-use-state-lazy-initialization":"error","react-hooks-extra/ensure-custom-hooks-using-other-hooks":"error","react-hooks-extra/ensure-use-callback-has-non-empty-deps":"error","react/jsx-curly-newline":"off","react/jsx-newline":["error",{prevent:!1}],...r}}]}async function L(e={}){let{files:t=[S],overrides:r={},parserOptions:a,tsconfigPath:i,storybookDirectory:l=".storybook"}=e,[m,c]=await Promise.all([o(import('eslint-plugin-storybook')),o(import('@typescript-eslint/parser'))]),u={parser:c,parserOptions:{ecmaFeatures:{jsx:!0},project:i,...a},sourceType:"module"};return [{name:"2digits:storybook/setup",plugins:{storybook:fixupPluginRules(m)}},{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/no-redundant-story-name":"error","storybook/no-stories-of":"error","storybook/no-title-property-in-meta":"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"}},{name:"2digits:storybook/config",files:[`${l}/main.@(js|cjs|mjs|ts)`],languageOptions:u,rules:{"storybook/no-uninstalled-addons":"error"}}]}async function q(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,"tailwindcss/classnames-order":"off",...t}}]}async function E(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 R(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 U(e={}){let{overrides:t={},parserOptions:r={},tsconfigPath:a=!0}=e,[{plugin:i,configs:l,parser:m},c]=await Promise.all([o(import('typescript-eslint')),o(import('@2digits/eslint-plugin'))]),u=renamePluginsInConfigs(l.strictTypeChecked,d),x=Object.fromEntries(u.flatMap(({rules:y})=>Object.entries(y??{})));return [{name:"2digits:typescript/setup",plugins:{ts:i,"@2digits":c},languageOptions:{parser:m,parserOptions:{sourceType:"module",tsconfigRootDir:process.cwd(),project:a,...r}}},{name:"2digits:typescript/rules",files:[j],rules:{...x,"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":["error",{ignoreArrowShorthand:!0,ignoreVoidOperator:!0}],"ts/no-unused-vars":["error",{ignoreRestSiblings:!0,argsIgnorePattern:"^_",varsIgnorePattern:"^_"}],...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 B(){return [{name:"2digits:unicorn",plugins:{unicorn:h},rules:{...h.configs.recommended.rules,"unicorn/filename-case":["off"],"unicorn/prefer-module":["off"],"unicorn/prevent-abbreviations":["off"],"unicorn/prefer-ternary":["error","only-single-line"],"unicorn/no-useless-undefined":["error",{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":["off"]}}]}function 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 Z(e={},...t){let r=new FlatConfigComposer(F(e.ignores),I(e.js),D(),v(),P(),B());g(e.turbo,isPackageExists("turbo"))&&(r=r.append(R(f(e.turbo))));let{overrides:a,...i}=f(e.ts);return g(e.ts,isPackageExists("typescript"))&&(r=r.append(U(f(e.ts)))),g(e.react,isPackageExists("react"))&&(r=r.append(G({...f(e.react),...i}))),g(e.next,isPackageExists("next"))&&(r=r.append(_({...f(e.next),...i}))),g(e.storybook,isPackageExists("storybook"))&&(r=r.append(L({...f(e.storybook),...i}))),g(e.tailwind,isPackageExists("tailwindcss"))&&(r=r.append(q(f(e.tailwind)))),g(e.tanstack,isPackageExists("react-query")||isPackageExists("@tanstack/react-query")||isPackageExists("@tanstack/react-query-devtools"))&&(r=r.append(E(f(e.tanstack)))),r=r.append(...t),isPackageExists("prettier")&&(r=r.append(W())),r.renamePlugins(d).toConfigs()}
|
|
12
|
+
|
|
13
|
+
export { v as comments, Z as default, F as ignores, I as javascript, P as jsdoc, _ as next, D as node, W as prettier, G as react, L as storybook, q as tailwind, E as tanstack, R as turbo, Z as twoDigits, U as typescript, B as unicorn };
|
|
20
14
|
//# sourceMappingURL=out.js.map
|
|
21
15
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/rules/jsdoc.ts","../src/rules/next.ts","../src/rules/react.ts","../src/rules/storybook.ts","../../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js","../../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js","../../../node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/node.js","../../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js","../src/rules/tailwind.ts","../src/rules/typescript.ts","../src/rules/unicorn.ts","../src/index.ts"],"names":["jsdoc","getPackageInfoSync","nextVersion","next","reactVersion","react","storybook","path","process","fs","fsPromises","fileURLToPath","typeMappings","checkType","type","matchType","stat","toPath","urlOrPath","locatePathSync","paths","cwd","allowSymlinks","statFunction","path_","findUpStop","findUpMultipleSync","name","options","directory","root","stopAt","limit","runMatcher","locateOptions","foundPath","matches","findUpSync","tailwindFunctions","tailwindConfig","tailwindVersion","tailwind","dirname","workspaceRoot","tsconfigRootDir","typescript","unicorn","src_default"],"mappings":"AAEO,IAAMA,EAAqB,CAChC,QAAS,CAAC,2CAA2C,EACrD,MAAO,CACL,sBAAuB,CAAC,QAAS,CAAE,QAAS,CAAE,oBAAqB,EAAM,CAAE,CAAC,EAC5E,kBAAmB,CAAC,KAAK,CAC3B,CACF,ECRA,OAAS,sBAAAC,MAA0B,YAInC,IAAMC,EAAcD,EAAmB,MAAM,GAAG,QAEnCE,EAAOD,EACH,CACX,QAAS,CAAC,MAAM,EAChB,MAAO,CACL,oCAAqC,KACvC,CACF,EACa,CACX,QAAS,CAAC,EACV,MAAO,MACT,EChBJ,OAAS,sBAAAD,MAA0B,YAInC,IAAMG,EAAeH,EAAmB,OAAO,GAAG,QAErCI,EAAQD,EACJ,CACX,QAAS,CAAC,2BAA4B,gCAAgC,EACtE,SAAU,CACR,MAAO,CACL,QAASA,CACX,CACF,EACA,MAAO,CACL,mBAAoB,CAAC,KAAK,EAC1B,2BAA4B,CAAC,KAAK,EAClC,0BAA2B,CAAC,KAAK,EACjC,oBAAqB,CACnB,QACA,CACE,QAAS,EACX,CACF,CACF,CACF,EACa,CACX,QAAS,CAAC,EACV,SAAU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GAAGvC,EAAU,OAAO,EACrD,QAAS,CACP,qBACA,QACA,mDAEA,GAAGN,EAAM,QAET,GAAGG,EAAK,QAER,GAAGsC,EAAS,QAEZ,GAAGK,EAAQ,QAEX,GAAGD,EAAW,QAEd,8BAEA,GAAGxC,EAAM,QAET,UACF,EACA,OAAQwC,EAAW,OACnB,IAAK,CACH,IAAK,GACL,KAAM,EACR,EACA,eAAgB,CACd,eACA,OACA,QACA,WACA,SACA,MACA,YACA,kBACA,WACF,EACA,SAAU,CACR,GAAGxC,EAAM,SAET,GAAGoC,EAAS,QACd,EACA,MAAO,CACL,GAAGzC,EAAM,MAET,GAAG6C,EAAW,MAEd,GAAGxC,EAAM,MAET,GAAGyC,EAAQ,MAEX,GAAGL,EAAS,MAEZ,eAAgB,CAAC,KAAK,EACtB,aAAc,CAAC,MAAM,CACvB,EACA,UAAW,CAAC,GAAGnC,EAAU,SAAS,CACpC","sourcesContent":["import { defineConfig } from '../utils';\n\nexport const jsdoc = defineConfig({\n extends: ['plugin:jsdoc/recommended-typescript-error'],\n rules: {\n 'jsdoc/require-jsdoc': ['error', { require: { FunctionDeclaration: false } }],\n 'jsdoc/tag-lines': ['off'],\n },\n});\n","import { getPackageInfoSync } from 'local-pkg';\n\nimport { defineConfig } from '../utils';\n\nconst nextVersion = getPackageInfoSync('next')?.version;\n\nexport const next = nextVersion\n ? defineConfig({\n extends: ['next'],\n rules: {\n '@next/next/no-html-link-for-pages': 'off',\n },\n })\n : defineConfig({\n extends: [],\n rules: undefined,\n });\n","import { getPackageInfoSync } from 'local-pkg';\n\nimport { defineConfig } from '../utils';\n\nconst reactVersion = getPackageInfoSync('react')?.version;\n\nexport const react = reactVersion\n ? defineConfig({\n extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],\n settings: {\n react: {\n version: reactVersion,\n },\n },\n rules: {\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['off'],\n 'react/jsx-curly-newline': ['off'],\n 'react/jsx-newline': [\n 'error',\n {\n prevent: false,\n },\n ],\n },\n })\n : defineConfig({\n extends: [],\n settings: undefined,\n rules: undefined,\n });\n","import { defineConfig } from '../utils';\n\nexport const storybook = defineConfig({\n plugins: ['storybook'],\n overrides: [\n {\n files: ['*.stories.@(ts|tsx|js|jsx|mjs|cjs)'],\n rules: {\n 'import/no-anonymous-default-export': 'off',\n 'storybook/await-interactions': 'error',\n 'storybook/context-in-play-function': 'error',\n 'storybook/default-exports': 'error',\n 'storybook/hierarchy-separator': 'warn',\n 'storybook/no-redundant-story-name': 'warn',\n 'storybook/prefer-pascal-case': 'warn',\n 'storybook/story-exports': 'error',\n 'storybook/use-storybook-expect': 'error',\n 'storybook/use-storybook-testing-library': 'error',\n },\n },\n {\n files: ['.storybook/main.@(js|cjs|mjs|ts)'],\n rules: {\n 'storybook/no-uninstalled-addons': 'error',\n },\n },\n ],\n});\n","import path from 'node:path';\nimport {locatePath, locatePathSync} from 'locate-path';\nimport {toPath} from 'unicorn-magic';\n\nexport const findUpStop = Symbol('findUpStop');\n\nexport async function findUpMultiple(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, toPath(options.stopAt ?? root));\n\tconst limit = options.limit ?? Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = async locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePath(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = await name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePath([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst foundPath = await runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport function findUpMultipleSync(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, toPath(options.stopAt) ?? root);\n\tconst limit = options.limit ?? Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePathSync(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePathSync([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\tconst foundPath = runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport async function findUp(name, options = {}) {\n\tconst matches = await findUpMultiple(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport function findUpSync(name, options = {}) {\n\tconst matches = findUpMultipleSync(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport {\n\tpathExists,\n\tpathExistsSync,\n} from 'path-exists';\n","import process from 'node:process';\nimport path from 'node:path';\nimport fs, {promises as fsPromises} from 'node:fs';\nimport {fileURLToPath} from 'node:url';\nimport pLocate from 'p-locate';\n\nconst typeMappings = {\n\tdirectory: 'isDirectory',\n\tfile: 'isFile',\n};\n\nfunction checkType(type) {\n\tif (Object.hasOwnProperty.call(typeMappings, type)) {\n\t\treturn;\n\t}\n\n\tthrow new Error(`Invalid type specified: ${type}`);\n}\n\nconst matchType = (type, stat) => stat[typeMappings[type]]();\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function locatePath(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t\tconcurrency,\n\t\tpreserveOrder,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;\n\n\treturn pLocate(paths, async path_ => {\n\t\ttry {\n\t\t\tconst stat = await statFunction(path.resolve(cwd, path_));\n\t\t\treturn matchType(type, stat);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, {concurrency, preserveOrder});\n}\n\nexport function locatePathSync(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;\n\n\tfor (const path_ of paths) {\n\t\ttry {\n\t\t\tconst stat = statFunction(path.resolve(cwd, path_), {\n\t\t\t\tthrowIfNoEntry: false,\n\t\t\t});\n\n\t\t\tif (!stat) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (matchType(type, stat)) {\n\t\t\t\treturn path_;\n\t\t\t}\n\t\t} catch {}\n\t}\n}\n","import {fileURLToPath} from 'node:url';\n\nexport function toPath(urlOrPath) {\n\treturn urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n}\n\nexport * from './default.js';\n","import fs, {promises as fsPromises} from 'node:fs';\n\nexport async function pathExists(path) {\n\ttry {\n\t\tawait fsPromises.access(path);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport function pathExistsSync(path) {\n\ttry {\n\t\tfs.accessSync(path);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n","import { findUpSync } from 'find-up';\nimport { getPackageInfoSync } from 'local-pkg';\n\nimport { tailwindFunctions } from '@2digits/constants';\n\nimport { defineConfig } from '../utils';\n\nconst tailwindConfig = findUpSync(['tailwind.config.ts', 'tailwind.config.js']);\n\nconst tailwindVersion = getPackageInfoSync('tailwindcss')?.version;\n\nexport const tailwind =\n tailwindVersion && tailwindConfig\n ? defineConfig({\n extends: ['plugin:tailwindcss/recommended'],\n settings: {\n tailwindcss: {\n callees: tailwindFunctions,\n config: tailwindConfig,\n },\n },\n rules: {\n 'tailwindcss/classnames-order': ['off'],\n },\n })\n : defineConfig({\n extends: [],\n settings: undefined,\n rules: undefined,\n });\n","import { findUpSync } from 'find-up';\nimport { dirname } from 'pathe';\n\nimport { defineConfig } from '../utils';\n\nconst workspaceRoot = findUpSync(['pnpm-workspace.yaml', 'pnpm-lock.yaml']);\n\nconst tsconfigRootDir = workspaceRoot && dirname(workspaceRoot);\n\nexport const typescript = defineConfig({\n parserOptions: {\n EXPERIMENTAL_useProjectService: true,\n tsconfigRootDir,\n },\n plugins: ['@typescript-eslint'],\n extends: ['plugin:@typescript-eslint/strict-type-checked'],\n parser: '@typescript-eslint/parser',\n rules: {\n '@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],\n '@typescript-eslint/consistent-type-exports': ['error'],\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n {\n prefer: 'type-imports',\n disallowTypeAnnotations: false,\n fixStyle: 'inline-type-imports',\n },\n ],\n '@typescript-eslint/no-empty-interface': ['error', { allowSingleExtends: true }],\n '@typescript-eslint/no-explicit-any': ['warn'],\n '@typescript-eslint/no-import-type-side-effects': ['error'],\n '@typescript-eslint/no-misused-promises': 'off',\n '@typescript-eslint/no-confusing-void-expression': [\n 'error',\n { ignoreArrowShorthand: true, ignoreVoidOperator: true },\n ],\n },\n});\n","import { defineConfig } from '../utils';\n\nexport const unicorn = defineConfig({\n extends: ['plugin:unicorn/recommended'],\n rules: {\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': ['error', { checkArguments: false }],\n 'unicorn/prefer-top-level-await': ['off'],\n },\n});\n","import { jsdoc } from './rules/jsdoc';\nimport { next } from './rules/next';\nimport { react } from './rules/react';\nimport { storybook } from './rules/storybook';\nimport { tailwind } from './rules/tailwind';\nimport { typescript } from './rules/typescript';\nimport { unicorn } from './rules/unicorn';\nimport { defineConfig } from './utils';\n\nexport default defineConfig({\n root: true,\n parserOptions: {\n sourceType: 'module',\n cacheLifetime: {\n glob: 'Infinity',\n },\n\n ...typescript.parserOptions,\n },\n plugins: [...typescript.plugins, ...storybook.plugins],\n extends: [\n 'eslint:recommended',\n 'turbo',\n 'plugin:@tanstack/eslint-plugin-query/recommended',\n\n ...jsdoc.extends,\n\n ...next.extends,\n\n ...tailwind.extends,\n\n ...unicorn.extends,\n\n ...typescript.extends,\n\n 'plugin:@2digits/recommended',\n\n ...react.extends,\n\n 'prettier',\n ],\n parser: typescript.parser,\n env: {\n es6: true,\n node: true,\n },\n ignorePatterns: [\n 'node_modules',\n 'dist',\n 'build',\n 'coverage',\n 'public',\n 'tmp',\n 'tmp-build',\n '!.prettierrc.js',\n 'templates',\n ],\n settings: {\n ...react.settings,\n\n ...tailwind.settings,\n },\n rules: {\n ...jsdoc.rules,\n\n ...typescript.rules,\n\n ...react.rules,\n\n ...unicorn.rules,\n\n ...tailwind.rules,\n\n 'sort-imports': ['off'],\n 'max-params': ['warn'],\n },\n overrides: [...storybook.overrides],\n});\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/plugins.ts","../src/configs/comments.ts","../src/configs/ignores.ts","../src/globs.ts","../src/utils.ts","../src/configs/javascript.ts","../src/configs/jsdoc.ts","../src/configs/next.ts","../src/constants.ts","../src/configs/node.ts","../src/configs/prettier.ts","../src/configs/react.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":["default","comments","composer","GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_EXCLUDE","interopDefault","m","resolved","ignores","options","eslint","globals","javascript","overrides","jsdoc","fixupPluginRules","renamePluginsInRules","PluginNameMap","next","files","tsconfigPath","parserOptions","parser","recommended","node","prettier","react","tsconfigRootDir","pluginReact","pluginReactHooks","plugins","storybook","storybookDirectory","languageOptions","findUp","tailwind","tailwindcss","tailwindFunctions","config","tanstack","turbo","renamePluginsInConfigs","typescript","plugin","configs","twoDigits","strictConfig","rules","unicorn","FlatConfigComposer","isPackageExists","enabled","defaults","_","rest","userConfig","typescriptOptions"],"mappings":"AAAA,OAAoB,WAAXA,MAAgC,wBACzC,OAAoB,WAAXA,MAAiC,gCAC1C,OAAoB,WAAXA,MAA6B,kBCC/B,SAASC,GAAkC,CAChD,MAAO,CACL,CACE,KAAM,mBACN,QAAS,CACP,kBAAmBD,CACrB,EACA,MAAO,CACL,wCAAyC,QACzC,uCAAwC,QACxC,uCAAwC,QACxC,mCAAoC,QACpC,oCAAqC,OACvC,CACF,CACF,CACF,CClBA,OAAS,YAAAE,MAAgB,2BCDlB,IAAMC,EAAW,wBAEXC,EAAU,iBACVC,EAAW,kBAEXC,EAAe,mBAEfC,EAAe,CAC1B,kBACA,UACA,uBACA,eACA,oBACA,eAEA,YACA,cACA,UACA,WACA,SACA,UACA,cACA,sBACA,WACA,WACA,aACA,gBACA,WACA,YACA,aACA,mBACA,WAEA,mBACA,aACA,cACA,mBACA,0BACA,oBACF,ECrCA,eAAsBC,EACpBC,EACiD,CACjD,IAAMC,EAAW,MAAMD,EAEvB,OAASC,EAAqC,SAAWA,CAC3D,CFDA,eAAsBC,EAAQC,EAAgC,CAAC,EAAmC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,CAAC,GAGzD,GAAM,CAAE,UAAW4C,EAAG,GAAGG,CAAkB,EAAIlB,EAAO7B,EAAQ,EAAE,EAEhE,OAAI0C,EAAQ1C,EAAQ,GAAIyC,EAAgB,YAAY,CAAC,IACnDnD,EAAWA,EAAS,OAAO2C,EAAWJ,EAAO7B,EAAQ,EAAE,CAAC,CAAC,GAGvD0C,EAAQ1C,EAAQ,MAAOyC,EAAgB,OAAO,CAAC,IACjDnD,EAAWA,EAAS,OAClB2B,EAAM,CACJ,GAAGY,EAAO7B,EAAQ,KAAK,EACvB,GAAG+C,CACL,CAAC,CACH,GAGEL,EAAQ1C,EAAQ,KAAMyC,EAAgB,MAAM,CAAC,IAC/CnD,EAAWA,EAAS,OAClBmB,EAAK,CACH,GAAGoB,EAAO7B,EAAQ,IAAI,EACtB,GAAG+C,CACL,CAAC,CACH,GAGEL,EAAQ1C,EAAQ,UAAWyC,EAAgB,WAAW,CAAC,IACzDnD,EAAWA,EAAS,OAClBgC,EAAU,CACR,GAAGO,EAAO7B,EAAQ,SAAS,EAC3B,GAAG+C,CACL,CAAC,CACH,GAGEL,EAAQ1C,EAAQ,SAAUyC,EAAgB,aAAa,CAAC,IAC1DnD,EAAWA,EAAS,OAAOoC,EAASG,EAAO7B,EAAQ,QAAQ,CAAC,CAAC,GAI7D0C,EACE1C,EAAQ,SACRyC,EAAgB,aAAa,GAC3BA,EAAgB,uBAAuB,GACvCA,EAAgB,gCAAgC,CACpD,IAEAnD,EAAWA,EAAS,OAAOwC,EAASD,EAAO7B,EAAQ,QAAQ,CAAC,CAAC,GAG/DV,EAAWA,EAAS,OAAO,GAAGwD,CAAU,EAEpCL,EAAgB,UAAU,IAC5BnD,EAAWA,EAAS,OAAO0B,EAAS,CAAC,GAGhC1B,EAAS,cAAckB,CAAa,EAAE,UAAU,CACzD","sourcesContent":["export { default as pluginUnicorn } from 'eslint-plugin-unicorn';\nexport { default as pluginComments } from 'eslint-plugin-eslint-comments';\nexport { default as pluginNode } from 'eslint-plugin-n';\n","import { pluginComments } from '../plugins';\nimport type { TypedFlatConfigItem } from '../types';\n\nexport function comments(): TypedFlatConfigItem[] {\n return [\n {\n name: '2digits:comments',\n plugins: {\n 'eslint-comments': pluginComments,\n },\n rules: {\n 'eslint-comments/no-aggregating-enable': 'error',\n 'eslint-comments/no-duplicate-disable': 'error',\n 'eslint-comments/no-unlimited-disable': 'error',\n 'eslint-comments/no-unused-enable': 'error',\n 'eslint-comments/no-unused-disable': 'error',\n },\n },\n ];\n}\n","import type { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';\nimport { composer } from 'eslint-flat-config-utils';\n\nimport { GLOB_EXCLUDE } from '../globs';\nimport type { TypedFlatConfigItem } from '../types';\nimport { interopDefault } from '../utils';\n\nexport async function ignores(options: FlatGitignoreOptions = {}): Promise<TypedFlatConfigItem[]> {\n return composer(\n {\n ignores: GLOB_EXCLUDE,\n name: '2digits:ignores',\n },\n interopDefault(import('eslint-config-flat-gitignore')).then((m) => ({\n ...m(options),\n name: '2digits:gitignore',\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];\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 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 { message: 'Use `Object.defineProperty` instead.', property: '__defineGetter__' },\n { message: 'Use `Object.defineProperty` instead.', property: '__defineSetter__' },\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 = {}, tsconfigPath, 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 project: tsconfigPath,\n ...(parserOptions as object),\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","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': 'react-extra',\n 'react-hooks': 'react-hooks',\n react: 'react',\n '@typescript-eslint': 'ts',\n node: 'node',\n 'eslint-comments': 'eslint-comments',\n storybook: 'storybook',\n turbo: 'turbo',\n jsdoc: 'jsdoc',\n unicorn: 'unicorn',\n tailwindcss: 'tailwindcss',\n '@tanstack/query': 'tanstack',\n '@2digits': '@2digits',\n} as const;\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 = await interopDefault(import('eslint-config-prettier'));\n\n return [\n {\n name: '2digits:prettier',\n rules: prettier.rules,\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 react(\n options: OptionsWithFiles & OptionsTypeScriptWithTypes = {},\n): Promise<TypedFlatConfigItem[]> {\n const {\n files = [GLOB_TS, GLOB_TSX],\n overrides = {},\n tsconfigPath,\n parserOptions,\n tsconfigRootDir,\n } = options;\n\n const [pluginReact, pluginReactHooks, react, parser] = 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 ]);\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-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 },\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 project: tsconfigPath,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...recommended,\n\n 'react-hooks-extra/ensure-use-memo-has-non-empty-deps': 'error',\n 'react-hooks-extra/prefer-use-state-lazy-initialization': 'error',\n 'react-hooks-extra/ensure-custom-hooks-using-other-hooks': 'error',\n 'react-hooks-extra/ensure-use-callback-has-non-empty-deps': 'error',\n\n 'react/jsx-curly-newline': 'off',\n 'react/jsx-newline': ['error', { prevent: false }],\n\n ...overrides,\n },\n },\n ];\n}\n","import { fixupPluginRules } from '@eslint/compat';\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 tsconfigPath,\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 project: tsconfigPath,\n ...(parserOptions as object),\n },\n sourceType: 'module' as const,\n };\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/no-redundant-story-name': 'error',\n 'storybook/no-stories-of': 'error',\n 'storybook/no-title-property-in-meta': '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 },\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 'tailwindcss/classnames-order': 'off',\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 = {}, tsconfigPath = true } = 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 sourceType: 'module',\n tsconfigRootDir: process.cwd(),\n project: tsconfigPath,\n ...parserOptions,\n },\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': [\n 'error',\n { ignoreArrowShorthand: true, ignoreVoidOperator: true },\n ],\n 'ts/no-unused-vars': [\n 'error',\n { ignoreRestSiblings: true, argsIgnorePattern: '^_', varsIgnorePattern: '^_' },\n ],\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.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 type { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';\nimport { FlatConfigComposer } from 'eslint-flat-config-utils';\nimport { isPackageExists } from 'local-pkg';\n\nimport {\n comments,\n ignores,\n javascript,\n jsdoc,\n next,\n node,\n prettier,\n react,\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 OptionsWithStorybook,\n TypedFlatConfigItem,\n} from './types';\n\ntype SharedOptions<T = unknown> = T & {\n enable?: boolean;\n};\n\ninterface ESLint2DigitsOptions {\n ignores?: FlatGitignoreOptions;\n turbo?: SharedOptions<OptionsOverrides> | boolean;\n js?: OptionsOverrides;\n ts?: SharedOptions<OptionsTypeScriptWithTypes> | boolean;\n react?: SharedOptions<OptionsWithFiles> | 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 | undefined,\n): options is T {\n if (typeof options === 'boolean') return options;\n return options?.enable ?? defaults ?? false;\n}\n\nfunction config<T>(options: SharedOptions<T> | undefined | boolean): T {\n if (typeof options === 'boolean' || options === undefined) return {} as T;\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 );\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 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,8 @@
|
|
|
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": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"public": true,
|
|
7
8
|
"sideEffects": false,
|
|
@@ -9,18 +10,17 @@
|
|
|
9
10
|
"./package.json": "./package.json",
|
|
10
11
|
".": {
|
|
11
12
|
"import": {
|
|
12
|
-
"default": "./dist/index.mjs",
|
|
13
|
-
"types": "./dist/index.d.mts"
|
|
14
|
-
},
|
|
15
|
-
"require": {
|
|
16
13
|
"default": "./dist/index.js",
|
|
17
14
|
"types": "./dist/index.d.ts"
|
|
15
|
+
},
|
|
16
|
+
"require": {
|
|
17
|
+
"default": "./dist/index.cjs",
|
|
18
|
+
"types": "./dist/index.d.cts"
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
},
|
|
21
22
|
"main": "./dist/index.js",
|
|
22
|
-
"
|
|
23
|
-
"types": "./dist/index.d.mts",
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
24
|
"keywords": [
|
|
25
25
|
"eslint-config"
|
|
26
26
|
],
|
|
@@ -28,39 +28,46 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@2digits/constants": "0.1.
|
|
32
|
-
"@2digits/eslint-plugin": "
|
|
33
|
-
"@
|
|
34
|
-
"@
|
|
35
|
-
"@typescript-eslint/parser": "^7.
|
|
36
|
-
"eslint-config-
|
|
31
|
+
"@2digits/constants": "0.1.6",
|
|
32
|
+
"@2digits/eslint-plugin": "2.0.0",
|
|
33
|
+
"@eslint/js": "^9.4.0",
|
|
34
|
+
"@next/eslint-plugin-next": "^14.2.3",
|
|
35
|
+
"@typescript-eslint/parser": "^7.11.0",
|
|
36
|
+
"eslint-config-flat-gitignore": "^0.1.5",
|
|
37
37
|
"eslint-config-prettier": "^9.1.0",
|
|
38
|
-
"eslint-config-
|
|
39
|
-
"eslint-plugin-
|
|
40
|
-
"eslint-plugin-
|
|
41
|
-
"eslint-plugin-
|
|
42
|
-
"eslint-plugin-
|
|
43
|
-
"eslint-plugin-tailwindcss": "^3.15.0",
|
|
44
|
-
"eslint-plugin-unicorn": "^51.0.1",
|
|
38
|
+
"eslint-flat-config-utils": "^0.2.5",
|
|
39
|
+
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
40
|
+
"eslint-plugin-jsdoc": "^48.2.7",
|
|
41
|
+
"eslint-plugin-n": "^17.7.0",
|
|
42
|
+
"eslint-plugin-unicorn": "^53.0.0",
|
|
45
43
|
"find-up": "^7.0.0",
|
|
44
|
+
"globals": "^15.3.0",
|
|
46
45
|
"local-pkg": "^0.5.0",
|
|
47
|
-
"
|
|
46
|
+
"typescript-eslint": "^7.11.0"
|
|
48
47
|
},
|
|
49
48
|
"devDependencies": {
|
|
50
|
-
"@2digits/tsconfig": "0.3.
|
|
51
|
-
"@eslint-
|
|
52
|
-
"@eslint
|
|
53
|
-
"@eslint
|
|
54
|
-
"@eslint-
|
|
55
|
-
"eslint": "^8.
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
49
|
+
"@2digits/tsconfig": "0.3.5",
|
|
50
|
+
"@eslint-react/eslint-plugin": "^1.5.14",
|
|
51
|
+
"@eslint/compat": "^1.0.3",
|
|
52
|
+
"@eslint/config-inspector": "^0.4.10",
|
|
53
|
+
"@tanstack/eslint-plugin-query": "^5.35.6",
|
|
54
|
+
"@types/eslint": "^8.56.10",
|
|
55
|
+
"@types/eslint__js": "^8.42.3",
|
|
56
|
+
"@types/node": "^20.14.0",
|
|
57
|
+
"eslint": "^9.4.0",
|
|
58
|
+
"eslint-plugin-react": "^7.34.2",
|
|
59
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
60
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
61
|
+
"eslint-plugin-tailwindcss": "^3.17.0",
|
|
62
|
+
"eslint-plugin-turbo": "^1.13.3",
|
|
63
|
+
"eslint-typegen": "^0.2.4",
|
|
64
|
+
"tsup": "^8.1.0",
|
|
65
|
+
"typescript": "^5.4.5"
|
|
59
66
|
},
|
|
60
67
|
"scripts": {
|
|
61
68
|
"build": "tsup",
|
|
62
69
|
"dev": "tsup --watch",
|
|
63
|
-
"lint": "eslint
|
|
70
|
+
"lint": "eslint .",
|
|
64
71
|
"types": "tsc --noEmit"
|
|
65
72
|
}
|
|
66
73
|
}
|
package/dist/index.d.mts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
readonly root: true;
|
|
3
|
-
readonly parserOptions: {
|
|
4
|
-
readonly EXPERIMENTAL_useProjectService: true;
|
|
5
|
-
readonly tsconfigRootDir: string | undefined;
|
|
6
|
-
readonly sourceType: "module";
|
|
7
|
-
readonly cacheLifetime: {
|
|
8
|
-
readonly glob: "Infinity";
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
readonly plugins: ["@typescript-eslint", "storybook"];
|
|
12
|
-
readonly extends: ["eslint:recommended", "turbo", "plugin:@tanstack/eslint-plugin-query/recommended", "plugin:jsdoc/recommended-typescript-error", "plugin:unicorn/recommended", "plugin:@typescript-eslint/strict-type-checked", "plugin:@2digits/recommended", "prettier"] | ["eslint:recommended", "turbo", "plugin:@tanstack/eslint-plugin-query/recommended", "plugin:jsdoc/recommended-typescript-error", "plugin:unicorn/recommended", "plugin:@typescript-eslint/strict-type-checked", "plugin:@2digits/recommended", "plugin:react/recommended", "plugin:react-hooks/recommended", "prettier"] | ["eslint:recommended", "turbo", "plugin:@tanstack/eslint-plugin-query/recommended", "plugin:jsdoc/recommended-typescript-error", "plugin:tailwindcss/recommended", "plugin:unicorn/recommended", "plugin:@typescript-eslint/strict-type-checked", "plugin:@2digits/recommended", "prettier"] | ["eslint:recommended", "turbo", "plugin:@tanstack/eslint-plugin-query/recommended", "plugin:jsdoc/recommended-typescript-error", "plugin:tailwindcss/recommended", "plugin:unicorn/recommended", "plugin:@typescript-eslint/strict-type-checked", "plugin:@2digits/recommended", "plugin:react/recommended", "plugin:react-hooks/recommended", "prettier"] | ["eslint:recommended", "turbo", "plugin:@tanstack/eslint-plugin-query/recommended", "plugin:jsdoc/recommended-typescript-error", "next", "plugin:unicorn/recommended", "plugin:@typescript-eslint/strict-type-checked", "plugin:@2digits/recommended", "prettier"] | ["eslint:recommended", "turbo", "plugin:@tanstack/eslint-plugin-query/recommended", "plugin:jsdoc/recommended-typescript-error", "next", "plugin:unicorn/recommended", "plugin:@typescript-eslint/strict-type-checked", "plugin:@2digits/recommended", "plugin:react/recommended", "plugin:react-hooks/recommended", "prettier"] | ["eslint:recommended", "turbo", "plugin:@tanstack/eslint-plugin-query/recommended", "plugin:jsdoc/recommended-typescript-error", "next", "plugin:tailwindcss/recommended", "plugin:unicorn/recommended", "plugin:@typescript-eslint/strict-type-checked", "plugin:@2digits/recommended", "prettier"] | ["eslint:recommended", "turbo", "plugin:@tanstack/eslint-plugin-query/recommended", "plugin:jsdoc/recommended-typescript-error", "next", "plugin:tailwindcss/recommended", "plugin:unicorn/recommended", "plugin:@typescript-eslint/strict-type-checked", "plugin:@2digits/recommended", "plugin:react/recommended", "plugin:react-hooks/recommended", "prettier"];
|
|
13
|
-
readonly parser: "@typescript-eslint/parser";
|
|
14
|
-
readonly env: {
|
|
15
|
-
readonly es6: true;
|
|
16
|
-
readonly node: true;
|
|
17
|
-
};
|
|
18
|
-
readonly ignorePatterns: ["node_modules", "dist", "build", "coverage", "public", "tmp", "tmp-build", "!.prettierrc.js", "templates"];
|
|
19
|
-
readonly settings: {
|
|
20
|
-
readonly tailwindcss?: {
|
|
21
|
-
readonly callees: string[];
|
|
22
|
-
readonly config: string;
|
|
23
|
-
} | undefined;
|
|
24
|
-
readonly react?: {
|
|
25
|
-
readonly version: string;
|
|
26
|
-
} | undefined;
|
|
27
|
-
};
|
|
28
|
-
readonly rules: {
|
|
29
|
-
readonly 'sort-imports': ["off"];
|
|
30
|
-
readonly 'max-params': ["warn"];
|
|
31
|
-
readonly 'tailwindcss/classnames-order'?: ["off"] | undefined;
|
|
32
|
-
readonly 'unicorn/filename-case': ["off"];
|
|
33
|
-
readonly 'unicorn/prefer-module': ["off"];
|
|
34
|
-
readonly 'unicorn/prevent-abbreviations': ["off"];
|
|
35
|
-
readonly 'unicorn/prefer-ternary': ["error", "only-single-line"];
|
|
36
|
-
readonly 'unicorn/no-useless-undefined': ["error", {
|
|
37
|
-
readonly checkArguments: false;
|
|
38
|
-
}];
|
|
39
|
-
readonly 'unicorn/prefer-top-level-await': ["off"];
|
|
40
|
-
readonly 'react/prop-types'?: ["off"] | undefined;
|
|
41
|
-
readonly 'react/react-in-jsx-scope'?: ["off"] | undefined;
|
|
42
|
-
readonly 'react/jsx-curly-newline'?: ["off"] | undefined;
|
|
43
|
-
readonly 'react/jsx-newline'?: ["error", {
|
|
44
|
-
readonly prevent: false;
|
|
45
|
-
}] | undefined;
|
|
46
|
-
readonly '@typescript-eslint/ban-ts-comment': ["error", {
|
|
47
|
-
readonly 'ts-ignore': "allow-with-description";
|
|
48
|
-
}];
|
|
49
|
-
readonly '@typescript-eslint/consistent-type-exports': ["error"];
|
|
50
|
-
readonly '@typescript-eslint/consistent-type-imports': ["error", {
|
|
51
|
-
readonly prefer: "type-imports";
|
|
52
|
-
readonly disallowTypeAnnotations: false;
|
|
53
|
-
readonly fixStyle: "inline-type-imports";
|
|
54
|
-
}];
|
|
55
|
-
readonly '@typescript-eslint/no-empty-interface': ["error", {
|
|
56
|
-
readonly allowSingleExtends: true;
|
|
57
|
-
}];
|
|
58
|
-
readonly '@typescript-eslint/no-explicit-any': ["warn"];
|
|
59
|
-
readonly '@typescript-eslint/no-import-type-side-effects': ["error"];
|
|
60
|
-
readonly '@typescript-eslint/no-misused-promises': "off";
|
|
61
|
-
readonly '@typescript-eslint/no-confusing-void-expression': ["error", {
|
|
62
|
-
readonly ignoreArrowShorthand: true;
|
|
63
|
-
readonly ignoreVoidOperator: true;
|
|
64
|
-
}];
|
|
65
|
-
readonly 'jsdoc/require-jsdoc': ["error", {
|
|
66
|
-
readonly require: {
|
|
67
|
-
readonly FunctionDeclaration: false;
|
|
68
|
-
};
|
|
69
|
-
}];
|
|
70
|
-
readonly 'jsdoc/tag-lines': ["off"];
|
|
71
|
-
};
|
|
72
|
-
readonly overrides: [{
|
|
73
|
-
readonly files: ["*.stories.@(ts|tsx|js|jsx|mjs|cjs)"];
|
|
74
|
-
readonly rules: {
|
|
75
|
-
readonly 'import/no-anonymous-default-export': "off";
|
|
76
|
-
readonly 'storybook/await-interactions': "error";
|
|
77
|
-
readonly 'storybook/context-in-play-function': "error";
|
|
78
|
-
readonly 'storybook/default-exports': "error";
|
|
79
|
-
readonly 'storybook/hierarchy-separator': "warn";
|
|
80
|
-
readonly 'storybook/no-redundant-story-name': "warn";
|
|
81
|
-
readonly 'storybook/prefer-pascal-case': "warn";
|
|
82
|
-
readonly 'storybook/story-exports': "error";
|
|
83
|
-
readonly 'storybook/use-storybook-expect': "error";
|
|
84
|
-
readonly 'storybook/use-storybook-testing-library': "error";
|
|
85
|
-
};
|
|
86
|
-
}, {
|
|
87
|
-
readonly files: [".storybook/main.@(js|cjs|mjs|ts)"];
|
|
88
|
-
readonly rules: {
|
|
89
|
-
readonly 'storybook/no-uninstalled-addons': "error";
|
|
90
|
-
};
|
|
91
|
-
}];
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
export { _default as default };
|
package/dist/index.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { getPackageInfoSync } from 'local-pkg';
|
|
2
|
-
import c from 'node:path';
|
|
3
|
-
import L from 'node:process';
|
|
4
|
-
import P from 'node:fs';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
import { tailwindFunctions } from '@2digits/constants';
|
|
7
|
-
import { dirname } from 'pathe';
|
|
8
|
-
|
|
9
|
-
var x={extends:["plugin:jsdoc/recommended-typescript-error"],rules:{"jsdoc/require-jsdoc":["error",{require:{FunctionDeclaration:!1}}],"jsdoc/tag-lines":["off"]}};var C=getPackageInfoSync("next")?.version,k=C?{extends:["next"],rules:{"@next/next/no-html-link-for-pages":"off"}}:{extends:[],rules:void 0};var I=getPackageInfoSync("react")?.version,f=I?{extends:["plugin:react/recommended","plugin:react-hooks/recommended"],settings:{react:{version:I}},rules:{"react/prop-types":["off"],"react/react-in-jsx-scope":["off"],"react/jsx-curly-newline":["off"],"react/jsx-newline":["error",{prevent:!1}]}}:{extends:[],settings:void 0,rules:void 0};var g={plugins:["storybook"],overrides:[{files:["*.stories.@(ts|tsx|js|jsx|mjs|cjs)"],rules:{"import/no-anonymous-default-export":"off","storybook/await-interactions":"error","storybook/context-in-play-function":"error","storybook/default-exports":"error","storybook/hierarchy-separator":"warn","storybook/no-redundant-story-name":"warn","storybook/prefer-pascal-case":"warn","storybook/story-exports":"error","storybook/use-storybook-expect":"error","storybook/use-storybook-testing-library":"error"}},{files:[".storybook/main.@(js|cjs|mjs|ts)"],rules:{"storybook/no-uninstalled-addons":"error"}}]};var S={directory:"isDirectory",file:"isFile"};function V(e){if(!Object.hasOwnProperty.call(S,e))throw new Error(`Invalid type specified: ${e}`)}var A=(e,o)=>o[S[e]](),_=e=>e instanceof URL?fileURLToPath(e):e;function w(e,{cwd:o=L.cwd(),type:n="file",allowSymlinks:m=!0}={}){V(n),o=_(o);let d=m?P.statSync:P.lstatSync;for(let a of e)try{let p=d(c.resolve(o,a),{throwIfNoEntry:!1});if(!p)continue;if(A(n,p))return a}catch{}}function b(e){return e instanceof URL?fileURLToPath(e):e}var M=Symbol("findUpStop");function z(e,o={}){let n=c.resolve(b(o.cwd)??""),{root:m}=c.parse(n),d=c.resolve(n,b(o.stopAt)??m),a=o.limit??Number.POSITIVE_INFINITY,p=[e].flat(),E=s=>{if(typeof e!="function")return w(p,s);let h=e(s.cwd);return typeof h=="string"?w([h],s):h},y=[];for(;;){let s=E({...o,cwd:n});if(s===M||(s&&y.push(c.resolve(n,s)),n===d||y.length>=a))break;n=c.dirname(n);}return y}function u(e,o={}){return z(e,{...o,limit:1})[0]}var j=u(["tailwind.config.ts","tailwind.config.js"]),D=getPackageInfoSync("tailwindcss")?.version,l=D&&j?{extends:["plugin:tailwindcss/recommended"],settings:{tailwindcss:{callees:tailwindFunctions,config:j}},rules:{"tailwindcss/classnames-order":["off"]}}:{extends:[],settings:void 0,rules:void 0};var T=u(["pnpm-workspace.yaml","pnpm-lock.yaml"]),X=T&&dirname(T),i={parserOptions:{EXPERIMENTAL_useProjectService:!0,tsconfigRootDir:X},plugins:["@typescript-eslint"],extends:["plugin:@typescript-eslint/strict-type-checked"],parser:"@typescript-eslint/parser",rules:{"@typescript-eslint/ban-ts-comment":["error",{"ts-ignore":"allow-with-description"}],"@typescript-eslint/consistent-type-exports":["error"],"@typescript-eslint/consistent-type-imports":["error",{prefer:"type-imports",disallowTypeAnnotations:!1,fixStyle:"inline-type-imports"}],"@typescript-eslint/no-empty-interface":["error",{allowSingleExtends:!0}],"@typescript-eslint/no-explicit-any":["warn"],"@typescript-eslint/no-import-type-side-effects":["error"],"@typescript-eslint/no-misused-promises":"off","@typescript-eslint/no-confusing-void-expression":["error",{ignoreArrowShorthand:!0,ignoreVoidOperator:!0}]}};var v={extends:["plugin:unicorn/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}],"unicorn/prefer-top-level-await":["off"]}};var et={root:!0,parserOptions:{sourceType:"module",cacheLifetime:{glob:"Infinity"},...i.parserOptions},plugins:[...i.plugins,...g.plugins],extends:["eslint:recommended","turbo","plugin:@tanstack/eslint-plugin-query/recommended",...x.extends,...k.extends,...l.extends,...v.extends,...i.extends,"plugin:@2digits/recommended",...f.extends,"prettier"],parser:i.parser,env:{es6:!0,node:!0},ignorePatterns:["node_modules","dist","build","coverage","public","tmp","tmp-build","!.prettierrc.js","templates"],settings:{...f.settings,...l.settings},rules:{...x.rules,...i.rules,...f.rules,...v.rules,...l.rules,"sort-imports":["off"],"max-params":["warn"]},overrides:[...g.overrides]};
|
|
10
|
-
|
|
11
|
-
export { et as default };
|
|
12
|
-
//# sourceMappingURL=out.js.map
|
|
13
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/rules/jsdoc.ts","../src/rules/next.ts","../src/rules/react.ts","../src/rules/storybook.ts","../../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js","../../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js","../../../node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/node.js","../src/rules/tailwind.ts","../src/rules/typescript.ts","../src/rules/unicorn.ts","../src/index.ts"],"names":["jsdoc","getPackageInfoSync","nextVersion","next","reactVersion","react","storybook","path","process","fs","fsPromises","fileURLToPath","typeMappings","checkType","type","matchType","stat","toPath","urlOrPath","locatePathSync","paths","cwd","allowSymlinks","statFunction","path_","findUpStop","findUpMultipleSync","name","options","directory","root","stopAt","limit","runMatcher","locateOptions","foundPath","matches","findUpSync","tailwindFunctions","tailwindConfig","tailwindVersion","tailwind","dirname","workspaceRoot","tsconfigRootDir","typescript","unicorn","src_default"],"mappings":"AAEO,IAAMA,EAAqB,CAChC,QAAS,CAAC,2CAA2C,EACrD,MAAO,CACL,sBAAuB,CAAC,QAAS,CAAE,QAAS,CAAE,oBAAqB,EAAM,CAAE,CAAC,EAC5E,kBAAmB,CAAC,KAAK,CAC3B,CACF,ECRA,OAAS,sBAAAC,MAA0B,YAInC,IAAMC,EAAcD,EAAmB,MAAM,GAAG,QAEnCE,EAAOD,EACH,CACX,QAAS,CAAC,MAAM,EAChB,MAAO,CACL,oCAAqC,KACvC,C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ACL,wBAAyB,CAAC,KAAK,EAC/B,wBAAyB,CAAC,KAAK,EAC/B,gCAAiC,CAAC,KAAK,EACvC,yBAA0B,CAAC,QAAS,kBAAkB,EACtD,+BAAgC,CAAC,QAAS,CAAE,eAAgB,EAAM,CAAC,EACnE,iCAAkC,CAAC,KAAK,CAC1C,CACF,ECHA,IAAOC,GAAqB,CAC1B,KAAM,GACN,cAAe,CACb,WAAY,SACZ,cAAe,CACb,KAAM,UACR,EAEA,GAAGF,EAAW,aAChB,EACA,QAAS,CAAC,GAAGA,EAAW,QAAS,GAAGvC,EAAU,OAAO,EACrD,QAAS,CACP,qBACA,QACA,mDAEA,GAAGN,EAAM,QAET,GAAGG,EAAK,QAER,GAAGsC,EAAS,QAEZ,GAAGK,EAAQ,QAEX,GAAGD,EAAW,QAEd,8BAEA,GAAGxC,EAAM,QAET,UACF,EACA,OAAQwC,EAAW,OACnB,IAAK,CACH,IAAK,GACL,KAAM,EACR,EACA,eAAgB,CACd,eACA,OACA,QACA,WACA,SACA,MACA,YACA,kBACA,WACF,EACA,SAAU,CACR,GAAGxC,EAAM,SAET,GAAGoC,EAAS,QACd,EACA,MAAO,CACL,GAAGzC,EAAM,MAET,GAAG6C,EAAW,MAEd,GAAGxC,EAAM,MAET,GAAGyC,EAAQ,MAEX,GAAGL,EAAS,MAEZ,eAAgB,CAAC,KAAK,EACtB,aAAc,CAAC,MAAM,CACvB,EACA,UAAW,CAAC,GAAGnC,EAAU,SAAS,CACpC","sourcesContent":["import { defineConfig } from '../utils';\n\nexport const jsdoc = defineConfig({\n extends: ['plugin:jsdoc/recommended-typescript-error'],\n rules: {\n 'jsdoc/require-jsdoc': ['error', { require: { FunctionDeclaration: false } }],\n 'jsdoc/tag-lines': ['off'],\n },\n});\n","import { getPackageInfoSync } from 'local-pkg';\n\nimport { defineConfig } from '../utils';\n\nconst nextVersion = getPackageInfoSync('next')?.version;\n\nexport const next = nextVersion\n ? defineConfig({\n extends: ['next'],\n rules: {\n '@next/next/no-html-link-for-pages': 'off',\n },\n })\n : defineConfig({\n extends: [],\n rules: undefined,\n });\n","import { getPackageInfoSync } from 'local-pkg';\n\nimport { defineConfig } from '../utils';\n\nconst reactVersion = getPackageInfoSync('react')?.version;\n\nexport const react = reactVersion\n ? defineConfig({\n extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],\n settings: {\n react: {\n version: reactVersion,\n },\n },\n rules: {\n 'react/prop-types': ['off'],\n 'react/react-in-jsx-scope': ['off'],\n 'react/jsx-curly-newline': ['off'],\n 'react/jsx-newline': [\n 'error',\n {\n prevent: false,\n },\n ],\n },\n })\n : defineConfig({\n extends: [],\n settings: undefined,\n rules: undefined,\n });\n","import { defineConfig } from '../utils';\n\nexport const storybook = defineConfig({\n plugins: ['storybook'],\n overrides: [\n {\n files: ['*.stories.@(ts|tsx|js|jsx|mjs|cjs)'],\n rules: {\n 'import/no-anonymous-default-export': 'off',\n 'storybook/await-interactions': 'error',\n 'storybook/context-in-play-function': 'error',\n 'storybook/default-exports': 'error',\n 'storybook/hierarchy-separator': 'warn',\n 'storybook/no-redundant-story-name': 'warn',\n 'storybook/prefer-pascal-case': 'warn',\n 'storybook/story-exports': 'error',\n 'storybook/use-storybook-expect': 'error',\n 'storybook/use-storybook-testing-library': 'error',\n },\n },\n {\n files: ['.storybook/main.@(js|cjs|mjs|ts)'],\n rules: {\n 'storybook/no-uninstalled-addons': 'error',\n },\n },\n ],\n});\n","import path from 'node:path';\nimport {locatePath, locatePathSync} from 'locate-path';\nimport {toPath} from 'unicorn-magic';\n\nexport const findUpStop = Symbol('findUpStop');\n\nexport async function findUpMultiple(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, toPath(options.stopAt ?? root));\n\tconst limit = options.limit ?? Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = async locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePath(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = await name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePath([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst foundPath = await runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport function findUpMultipleSync(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, toPath(options.stopAt) ?? root);\n\tconst limit = options.limit ?? Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePathSync(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePathSync([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\tconst foundPath = runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport async function findUp(name, options = {}) {\n\tconst matches = await findUpMultiple(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport function findUpSync(name, options = {}) {\n\tconst matches = findUpMultipleSync(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport {\n\tpathExists,\n\tpathExistsSync,\n} from 'path-exists';\n","import process from 'node:process';\nimport path from 'node:path';\nimport fs, {promises as fsPromises} from 'node:fs';\nimport {fileURLToPath} from 'node:url';\nimport pLocate from 'p-locate';\n\nconst typeMappings = {\n\tdirectory: 'isDirectory',\n\tfile: 'isFile',\n};\n\nfunction checkType(type) {\n\tif (Object.hasOwnProperty.call(typeMappings, type)) {\n\t\treturn;\n\t}\n\n\tthrow new Error(`Invalid type specified: ${type}`);\n}\n\nconst matchType = (type, stat) => stat[typeMappings[type]]();\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function locatePath(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t\tconcurrency,\n\t\tpreserveOrder,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;\n\n\treturn pLocate(paths, async path_ => {\n\t\ttry {\n\t\t\tconst stat = await statFunction(path.resolve(cwd, path_));\n\t\t\treturn matchType(type, stat);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, {concurrency, preserveOrder});\n}\n\nexport function locatePathSync(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;\n\n\tfor (const path_ of paths) {\n\t\ttry {\n\t\t\tconst stat = statFunction(path.resolve(cwd, path_), {\n\t\t\t\tthrowIfNoEntry: false,\n\t\t\t});\n\n\t\t\tif (!stat) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (matchType(type, stat)) {\n\t\t\t\treturn path_;\n\t\t\t}\n\t\t} catch {}\n\t}\n}\n","import {fileURLToPath} from 'node:url';\n\nexport function toPath(urlOrPath) {\n\treturn urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n}\n\nexport * from './default.js';\n","import { findUpSync } from 'find-up';\nimport { getPackageInfoSync } from 'local-pkg';\n\nimport { tailwindFunctions } from '@2digits/constants';\n\nimport { defineConfig } from '../utils';\n\nconst tailwindConfig = findUpSync(['tailwind.config.ts', 'tailwind.config.js']);\n\nconst tailwindVersion = getPackageInfoSync('tailwindcss')?.version;\n\nexport const tailwind =\n tailwindVersion && tailwindConfig\n ? defineConfig({\n extends: ['plugin:tailwindcss/recommended'],\n settings: {\n tailwindcss: {\n callees: tailwindFunctions,\n config: tailwindConfig,\n },\n },\n rules: {\n 'tailwindcss/classnames-order': ['off'],\n },\n })\n : defineConfig({\n extends: [],\n settings: undefined,\n rules: undefined,\n });\n","import { findUpSync } from 'find-up';\nimport { dirname } from 'pathe';\n\nimport { defineConfig } from '../utils';\n\nconst workspaceRoot = findUpSync(['pnpm-workspace.yaml', 'pnpm-lock.yaml']);\n\nconst tsconfigRootDir = workspaceRoot && dirname(workspaceRoot);\n\nexport const typescript = defineConfig({\n parserOptions: {\n EXPERIMENTAL_useProjectService: true,\n tsconfigRootDir,\n },\n plugins: ['@typescript-eslint'],\n extends: ['plugin:@typescript-eslint/strict-type-checked'],\n parser: '@typescript-eslint/parser',\n rules: {\n '@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],\n '@typescript-eslint/consistent-type-exports': ['error'],\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n {\n prefer: 'type-imports',\n disallowTypeAnnotations: false,\n fixStyle: 'inline-type-imports',\n },\n ],\n '@typescript-eslint/no-empty-interface': ['error', { allowSingleExtends: true }],\n '@typescript-eslint/no-explicit-any': ['warn'],\n '@typescript-eslint/no-import-type-side-effects': ['error'],\n '@typescript-eslint/no-misused-promises': 'off',\n '@typescript-eslint/no-confusing-void-expression': [\n 'error',\n { ignoreArrowShorthand: true, ignoreVoidOperator: true },\n ],\n },\n});\n","import { defineConfig } from '../utils';\n\nexport const unicorn = defineConfig({\n extends: ['plugin:unicorn/recommended'],\n rules: {\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': ['error', { checkArguments: false }],\n 'unicorn/prefer-top-level-await': ['off'],\n },\n});\n","import { jsdoc } from './rules/jsdoc';\nimport { next } from './rules/next';\nimport { react } from './rules/react';\nimport { storybook } from './rules/storybook';\nimport { tailwind } from './rules/tailwind';\nimport { typescript } from './rules/typescript';\nimport { unicorn } from './rules/unicorn';\nimport { defineConfig } from './utils';\n\nexport default defineConfig({\n root: true,\n parserOptions: {\n sourceType: 'module',\n cacheLifetime: {\n glob: 'Infinity',\n },\n\n ...typescript.parserOptions,\n },\n plugins: [...typescript.plugins, ...storybook.plugins],\n extends: [\n 'eslint:recommended',\n 'turbo',\n 'plugin:@tanstack/eslint-plugin-query/recommended',\n\n ...jsdoc.extends,\n\n ...next.extends,\n\n ...tailwind.extends,\n\n ...unicorn.extends,\n\n ...typescript.extends,\n\n 'plugin:@2digits/recommended',\n\n ...react.extends,\n\n 'prettier',\n ],\n parser: typescript.parser,\n env: {\n es6: true,\n node: true,\n },\n ignorePatterns: [\n 'node_modules',\n 'dist',\n 'build',\n 'coverage',\n 'public',\n 'tmp',\n 'tmp-build',\n '!.prettierrc.js',\n 'templates',\n ],\n settings: {\n ...react.settings,\n\n ...tailwind.settings,\n },\n rules: {\n ...jsdoc.rules,\n\n ...typescript.rules,\n\n ...react.rules,\n\n ...unicorn.rules,\n\n ...tailwind.rules,\n\n 'sort-imports': ['off'],\n 'max-params': ['warn'],\n },\n overrides: [...storybook.overrides],\n});\n"]}
|