@2digits/eslint-config 2.4.0 → 2.4.2
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 +27 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -8
- package/dist/index.d.ts +1 -8
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -2,45 +2,45 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var O = require('eslint-plugin-unicorn');
|
|
6
|
+
var T = require('eslint-plugin-eslint-comments');
|
|
7
7
|
var v = require('eslint-plugin-n');
|
|
8
|
-
var
|
|
8
|
+
var x = require('eslint-plugin-sonarjs');
|
|
9
9
|
var compat = require('@eslint/compat');
|
|
10
10
|
var eslintFlatConfigUtils = require('eslint-flat-config-utils');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
11
|
+
var $ = require('@eslint/js');
|
|
12
|
+
var k = require('globals');
|
|
13
13
|
var findUp = require('find-up');
|
|
14
14
|
var localPkg = require('local-pkg');
|
|
15
15
|
|
|
16
16
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
var
|
|
18
|
+
var O__default = /*#__PURE__*/_interopDefault(O);
|
|
19
|
+
var T__default = /*#__PURE__*/_interopDefault(T);
|
|
20
20
|
var v__default = /*#__PURE__*/_interopDefault(v);
|
|
21
|
+
var x__default = /*#__PURE__*/_interopDefault(x);
|
|
22
|
+
var $__default = /*#__PURE__*/_interopDefault($);
|
|
21
23
|
var k__default = /*#__PURE__*/_interopDefault(k);
|
|
22
|
-
var K__default = /*#__PURE__*/_interopDefault(K);
|
|
23
|
-
var T__default = /*#__PURE__*/_interopDefault(T);
|
|
24
24
|
|
|
25
|
-
function j(){return [{name:"2digits:comments",plugins:{"eslint-comments":w__default.default},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 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":"react-extra","react-hooks":"react-hooks","react-compiler":"react-compiler",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","@graphql-eslint":"gql",sonarjs:"sonar"};async function o(e){let t=await e;return t.default||t}async function C(e={}){let{overrides:t={},files:r=["**/*.graphql","**/*.gql"]}=e,s=await o(import('@graphql-eslint/eslint-plugin')),i=eslintFlatConfigUtils.renamePluginsInRules(s.flatConfigs["operations-recommended"].rules,a);return [{name:"2digits:graphql",plugins:{gql:compat.fixupPluginRules(s)},languageOptions:{parser:{...s,meta:{name:"graphql"}}},files:r,rules:{...i,...t}}]}var S="**/*.?([cm])[jt]s?(x)",b="**/*.?([cm])ts",h="**/*.?([cm])tsx",F="**/*.stories.tsx",I=["**/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 P(e={}){let{gitIgnore:t,ignores:r=[]}=e;return eslintFlatConfigUtils.composer({ignores:[I,r].flat(),name:"2digits:ignores"},o(import('eslint-config-flat-gitignore')).then(s=>({...s(t),name:"2digits:gitignore"})))}function _(e={}){let{overrides:t={}}=e;return [{name:"2digits:javascript",languageOptions:{ecmaVersion:2022,globals:{...T__default.default.browser,...T__default.default.es2021,...T__default.default.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...K__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 q(){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 W(e={}){let{files:t=[b,h],overrides:r={},tsconfigPath:s,parserOptions:i}=e,[l,c]=await Promise.all([o(import('@next/eslint-plugin-next')),o(import('@typescript-eslint/parser'))]),m=eslintFlatConfigUtils.renamePluginsInRules({...l.configs.recommended.rules,...l.configs["core-web-vitals"].rules},a);return [{name:"2digits:next/setup",plugins:{next:compat.fixupPluginRules(l)}},{name:"2digits:next/rules",files:t,languageOptions:{parser:c,parserOptions:{ecmaFeatures:{jsx:!0},project:s,...i},sourceType:"module"},rules:{...m,"next/no-html-link-for-pages":"off",...r}}]}function D(){return [{name:"2digits:node",settings:{node:{version:">= 20.0.0"}},plugins:{node:v__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 L(e={}){let{files:t=[b,h],overrides:r={},tsconfigPath:s,parserOptions:i,tsconfigRootDir:l,reactCompiler:c=!0}=e,[m,f,g,O,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')),c?o(import('eslint-plugin-react-compiler')):void 0]),y=m.configs.all.plugins,z=eslintFlatConfigUtils.renamePluginsInRules({...g.configs.recommended.rules,...g.configs["jsx-runtime"].rules,...f.configs.recommended.rules,...m.configs["recommended-type-checked"].rules},a);return [{name:"2digits:react/setup",plugins:{react:g,"react-dom":y["@eslint-react/dom"],"react-extra":y["@eslint-react"],"react-hooks":compat.fixupPluginRules(f),"react-hooks-extra":y["@eslint-react/hooks-extra"],"react-naming-convention":y["@eslint-react/naming-convention"],...c?{"react-compiler":X}:{}},settings:{react:{version:"detect"}}},{name:"2digits:react/rules",files:t,languageOptions:{parser:O,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:l,project:s,...i},sourceType:"module"},rules:{...z,...c?{"react-compiler/react-compiler":"error"}:{},"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}}]}var re=eslintFlatConfigUtils.renamePluginsInRules(k__default.default.configs.recommended.rules,a);function E(){return [{name:"2digits:sonar",plugins:{sonar:k__default.default},rules:{...re,"sonar/no-redundant-jump":"off"}}]}async function G(e={}){let{files:t=[F],overrides:r={},parserOptions:s,tsconfigPath:i,storybookDirectory:l=".storybook"}=e,[c,m]=await Promise.all([o(import('eslint-plugin-storybook')),o(import('@typescript-eslint/parser'))]),f={parser:m,parserOptions:{ecmaFeatures:{jsx:!0},project:i,...s},sourceType:"module"};return [{name:"2digits:storybook/setup",plugins:{storybook:compat.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/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:f,rules:{"storybook/no-uninstalled-addons":"error"}}]}async function N(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 U(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 B(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 A(e={}){let{overrides:t={},parserOptions:r={},tsconfigPath:s=!0}=e,[{plugin:i,configs:l,parser:c},m]=await Promise.all([o(import('typescript-eslint')),o(import('@2digits/eslint-plugin'))]),f=eslintFlatConfigUtils.renamePluginsInConfigs(l.strictTypeChecked,a),g=Object.fromEntries(f.flatMap(({rules:O})=>Object.entries(O??{})));return [{name:"2digits:typescript/setup",plugins:{ts:i,"@2digits":m},languageOptions:{parser:c,parserOptions:{sourceType:"module",tsconfigRootDir:process.cwd(),project:s,...r}}},{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:"^_"}],...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 M(){return [{name:"2digits:unicorn",plugins:{unicorn:x__default.default},rules:{...x__default.default.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 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 ae(e={},...t){let r=new eslintFlatConfigUtils.FlatConfigComposer(P(e.ignores),_(e.js),D(),j(),q(),M(),E());d(e.turbo,localPkg.isPackageExists("turbo"))&&(r=r.append(B(u(e.turbo))));let{overrides:s,...i}=u(e.ts);return d(e.ts,localPkg.isPackageExists("typescript"))&&(r=r.append(A(u(e.ts)))),d(e.react,localPkg.isPackageExists("react"))&&(r=r.append(L({...u(e.react),...i}))),d(e.next,localPkg.isPackageExists("next"))&&(r=r.append(W({...u(e.next),...i}))),d(e.storybook,localPkg.isPackageExists("storybook"))&&(r=r.append(G({...u(e.storybook),...i}))),d(e.tailwind,localPkg.isPackageExists("tailwindcss"))&&(r=r.append(N(u(e.tailwind)))),d(e.tanstack,localPkg.isPackageExists("react-query")||localPkg.isPackageExists("@tanstack/react-query")||localPkg.isPackageExists("@tanstack/react-query-devtools"))&&(r=r.append(U(u(e.tanstack)))),d(e.graphql,localPkg.isPackageExists("graphql"))&&(r=r.append(C(u(e.graphql)))),r=r.append(...t),localPkg.isPackageExists("prettier")&&(r=r.append(R())),r.renamePlugins(a).toConfigs()}
|
|
25
|
+
function w(){return [{name:"2digits:comments",plugins:{"eslint-comments":T__default.default},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 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":"react-extra","react-hooks":"react-hooks","react-compiler":"react-compiler",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","@graphql-eslint":"gql",sonarjs:"sonar"};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=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,...t}}]}var j="**/*.?([cm])[jt]s?(x)",y="**/*.?([cm])ts",b="**/*.?([cm])tsx",S="**/*.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 eslintFlatConfigUtils.composer({ignores:[F,r].flat(),name:"2digits:ignores"},o(import('eslint-config-flat-gitignore')).then(i=>({...i(t),name:"2digits:gitignore"})))}function P(e={}){let{overrides:t={}}=e;return [{name:"2digits:javascript",languageOptions:{ecmaVersion:2022,globals:{...k__default.default.browser,...k__default.default.es2021,...k__default.default.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...$__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 _(){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=[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:v__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 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 R(e={}){let{files:t=[y,b],overrides:r={},parserOptions:i,tsconfigRootDir:s,reactCompiler:l=!0}=e,[c,d,f,h,M]=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,X=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-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":M}:{}},settings:{react:{version:"detect"}}},{name:"2digits:react/rules",files:t,languageOptions:{parser:h,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:s,projectService:!0,...i},sourceType:"module"},rules:{...X,...l?{"react-compiler/react-compiler":"error"}:{},"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}}]}var ee=eslintFlatConfigUtils.renamePluginsInRules(x__default.default.configs.recommended.rules,a);function L(){return [{name:"2digits:sonar",plugins:{sonar:x__default.default},rules:{...ee,"sonar/no-redundant-jump":"off"}}]}async function E(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/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:[`${s}/main.@(js|cjs|mjs|ts)`],languageOptions:d,rules:{"storybook/no-uninstalled-addons":"error"}}]}async function G(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 N(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 U(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 B(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:h})=>Object.entries(h??{})));return [{name:"2digits:typescript/setup",plugins:{ts:i,"@2digits":c},languageOptions:{parser:l,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,...r},sourceType:"module"}},{name:"2digits:typescript/rules",files:[j],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 A(){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 ie(e={},...t){let r=new eslintFlatConfigUtils.FlatConfigComposer(I(e.ignores),P(e.js),W(),w(),_(),A(),L());u(e.turbo,localPkg.isPackageExists("turbo"))&&(r=r.append(U(m(e.turbo))));let{overrides:i,...s}=m(e.ts);return u(e.ts,localPkg.isPackageExists("typescript"))&&(r=r.append(B(m(e.ts)))),u(e.react,localPkg.isPackageExists("react"))&&(r=r.append(R({...m(e.react),...s}))),u(e.next,localPkg.isPackageExists("next"))&&(r=r.append(q({...m(e.next),...s}))),u(e.storybook,localPkg.isPackageExists("storybook"))&&(r=r.append(E({...m(e.storybook),...s}))),u(e.tailwind,localPkg.isPackageExists("tailwindcss"))&&(r=r.append(G(m(e.tailwind)))),u(e.tanstack,localPkg.isPackageExists("react-query")||localPkg.isPackageExists("@tanstack/react-query")||localPkg.isPackageExists("@tanstack/react-query-devtools"))&&(r=r.append(N(m(e.tanstack)))),u(e.graphql,localPkg.isPackageExists("graphql"))&&(r=r.append(C(m(e.graphql)))),r=r.append(...t),localPkg.isPackageExists("prettier")&&(r=r.append(D())),r.renamePlugins(a).toConfigs()}
|
|
26
26
|
|
|
27
|
-
exports.comments =
|
|
28
|
-
exports.default =
|
|
27
|
+
exports.comments = w;
|
|
28
|
+
exports.default = ie;
|
|
29
29
|
exports.graphql = C;
|
|
30
|
-
exports.ignores =
|
|
31
|
-
exports.javascript =
|
|
32
|
-
exports.jsdoc =
|
|
33
|
-
exports.next =
|
|
34
|
-
exports.node =
|
|
35
|
-
exports.prettier =
|
|
36
|
-
exports.react =
|
|
37
|
-
exports.sonar =
|
|
38
|
-
exports.storybook =
|
|
39
|
-
exports.tailwind =
|
|
40
|
-
exports.tanstack =
|
|
41
|
-
exports.turbo =
|
|
42
|
-
exports.twoDigits =
|
|
43
|
-
exports.typescript =
|
|
44
|
-
exports.unicorn =
|
|
30
|
+
exports.ignores = I;
|
|
31
|
+
exports.javascript = P;
|
|
32
|
+
exports.jsdoc = _;
|
|
33
|
+
exports.next = q;
|
|
34
|
+
exports.node = W;
|
|
35
|
+
exports.prettier = D;
|
|
36
|
+
exports.react = R;
|
|
37
|
+
exports.sonar = L;
|
|
38
|
+
exports.storybook = E;
|
|
39
|
+
exports.tailwind = G;
|
|
40
|
+
exports.tanstack = N;
|
|
41
|
+
exports.turbo = U;
|
|
42
|
+
exports.twoDigits = ie;
|
|
43
|
+
exports.typescript = B;
|
|
44
|
+
exports.unicorn = A;
|
|
45
45
|
//# sourceMappingURL=index.cjs.map
|
|
46
46
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/configs/comments.ts","../src/constants.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/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":["comments","default","PluginNameMap","interopDefault","m","resolved","graphql","options","overrides","files","gql","recommended","renamePluginsInRules","fixupPluginRules","GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_EXCLUDE","ignores","gitIgnore","composer","javascript","globals","eslint","jsdoc","next","tsconfigPath","parserOptions","parser","node","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","rules","sonar","storybook","storybookDirectory","languageOptions","tailwind","tailwindcss","tailwindFunctions","config","findUp","tanstack","turbo","typescript","plugin","configs","twoDigits","strictConfig","renamePluginsInConfigs","unicorn","enabled","defaults","_","rest","userConfig","FlatConf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AAQ,CAAA,QAAA,CACRyD,wBAAgB,CAAA,aAAa,CAC3BA,EAAAA,wBAAAA,CAAgB,uBAAuB,CACvCA,EAAAA,wBAAAA,CAAgB,gCAAgC,CACpD,CAEA3C,GAAAA,CAAAA,CAAWA,CAAS,CAAA,MAAA,CAAO4B,CAASF,CAAAA,CAAAA,CAAOxC,CAAQ,CAAA,QAAQ,CAAC,CAAC,CAG3DmD,CAAAA,CAAAA,CAAAA,CAAQnD,EAAQ,OAASyD,CAAAA,wBAAAA,CAAgB,SAAS,CAAC,CACrD3C,GAAAA,CAAAA,CAAWA,CAAS,CAAA,MAAA,CAAOf,CAAQyC,CAAAA,CAAAA,CAAOxC,CAAQ,CAAA,OAAO,CAAC,CAAC,CAG7Dc,CAAAA,CAAAA,CAAAA,CAAWA,EAAS,MAAO,CAAA,GAAGyC,CAAU,CAAA,CAEpCE,wBAAgB,CAAA,UAAU,CAC5B3C,GAAAA,CAAAA,CAAWA,EAAS,MAAOU,CAAAA,CAAAA,EAAU,CAAA,CAAA,CAGhCV,CAAS,CAAA,aAAA,CAAcnB,CAAa,CAAA,CAAE,WAC/C","file":"index.cjs","sourcesContent":["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","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-compiler': 'react-compiler',\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 '@graphql-eslint': 'gql',\n sonarjs: 'sonar',\n} as const;\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 ...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(gitIgnore),\n 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 = {}, 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","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 tsconfigPath,\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-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 project: tsconfigPath,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...recommended,\n\n ...(reactCompiler ? { 'react-compiler/react-compiler': 'error' } : {}),\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 { 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';\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\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': 'off',\n 'ts/no-unused-vars': [\n 'error',\n {\n ignoreRestSiblings: true,\n argsIgnorePattern: '^_',\n varsIgnorePattern: '^_',\n },\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 { FlatConfigComposer } from 'eslint-flat-config-utils';\nimport { isPackageExists } from 'local-pkg';\n\nimport {\n comments,\n graphql,\n ignores,\n javascript,\n jsdoc,\n next,\n node,\n prettier,\n react,\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 | 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 sonar(),\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/comments.ts","../src/constants.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/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":["comments","default","PluginNameMap","interopDefault","m","resolved","graphql","options","overrides","files","gql","recommended","renamePluginsInRules","fixupPluginRules","GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_EXCLUDE","ignores","gitIgnore","composer","javascript","globals","eslint","jsdoc","next","parserOptions","parser","node","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","rules","sonar","storybook","storybookDirectory","languageOptions","tailwind","tailwindcss","tailwindFunctions","config","findUp","tanstack","turbo","typescript","plugin","configs","twoDigits","strictConfig","renamePluginsInConfigs","unicorn","enabled","defaults","_","rest","userConfig","FlatConfigComposer","isPackageExists","typescriptOptions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGO,SAASA,CAAAA,EAAkC,CAChD,OAAO,CACL,CACE,IAAM,CAAA,kBAAA,CACN,OAAS,CAAA,CACP,iBAAmBC,CAAAA,kBACrB,CACA,CAAA,KAAA,CAAO,CACL,uCAAyC,CAAA,OAAA,CACzC,sCAAwC,CAAA,OAAA,CACxC,sCAAwC,CAAA,OAAA,CACxC,kCAAoC,CAAA,OAAA,CACpC,mCAAqC,CAAA,OACvC,CACF,CACF,CACF,CCnBO,IAAMC,CAAgB,CAAA,CAC3B,YAAc,CAAA,MAAA,CACd,iCAAmC,CAAA,yBAAA,CACnC,2BAA6B,CAAA,mBAAA,CAC7B,mBAAqB,CAAA,WAAA,CACrB,gBAAiB,aACjB,CAAA,aAAA,CAAe,aACf,CAAA,gBAAA,CAAkB,gBAClB,CAAA,KAAA,CAAO,OACP,CAAA,oBAAA,CAAsB,IACtB,CAAA,IAAA,CAAM,MACN,CAAA,iBAAA,CAAmB,iBACnB,CAAA,SAAA,CAAW,WACX,CAAA,KAAA,CAAO,QACP,KAAO,CAAA,OAAA,CACP,OAAS,CAAA,SAAA,CACT,WAAa,CAAA,aAAA,CACb,iBAAmB,CAAA,UAAA,CACnB,UAAY,CAAA,UAAA,CACZ,iBAAmB,CAAA,KAAA,CACnB,OAAS,CAAA,OACX,CCnBA,CAAA,eAAsBC,EACpBC,CACiD,CAAA,CACjD,IAAMC,CAAAA,CAAW,MAAMD,CAAAA,CAEvB,OAASC,CAAAA,CAAqC,OAAWA,EAAAA,CAC3D,CCDA,eAAsBC,CAAQC,CAAAA,CAAAA,CAA4B,EAAC,CAAmC,CAC5F,GAAM,CAAE,SAAAC,CAAAA,CAAAA,CAAY,EAAC,CAAG,KA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AA,CAAAA,CAAAA,CACElD,CAAQ,CAAA,QAAA,CACRwD,wBAAgB,CAAA,aAAa,CAC3BA,EAAAA,wBAAAA,CAAgB,uBAAuB,CACvCA,EAAAA,wBAAAA,CAAgB,gCAAgC,CACpD,CAEA1C,GAAAA,CAAAA,CAAWA,CAAS,CAAA,MAAA,CAAO2B,CAASF,CAAAA,CAAAA,CAAOvC,CAAQ,CAAA,QAAQ,CAAC,CAAC,CAG3DkD,CAAAA,CAAAA,CAAAA,CAAQlD,EAAQ,OAASwD,CAAAA,wBAAAA,CAAgB,SAAS,CAAC,CACrD1C,GAAAA,CAAAA,CAAWA,CAAS,CAAA,MAAA,CAAOf,CAAQwC,CAAAA,CAAAA,CAAOvC,CAAQ,CAAA,OAAO,CAAC,CAAC,CAG7Dc,CAAAA,CAAAA,CAAAA,CAAWA,EAAS,MAAO,CAAA,GAAGwC,CAAU,CAAA,CAEpCE,wBAAgB,CAAA,UAAU,CAC5B1C,GAAAA,CAAAA,CAAWA,EAAS,MAAOS,CAAAA,CAAAA,EAAU,CAAA,CAAA,CAGhCT,CAAS,CAAA,aAAA,CAAcnB,CAAa,CAAA,CAAE,WAC/C","file":"index.cjs","sourcesContent":["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","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-compiler': 'react-compiler',\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 '@graphql-eslint': 'gql',\n sonarjs: 'sonar',\n} as const;\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 ...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(gitIgnore),\n 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-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/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 { 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/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\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 ...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 comments,\n graphql,\n ignores,\n javascript,\n jsdoc,\n next,\n node,\n prettier,\n react,\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 | 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 sonar(),\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
|
@@ -10,7 +10,7 @@ import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
|
10
10
|
interface RuleOptions {
|
|
11
11
|
/**
|
|
12
12
|
* Enforce giving proper names to type parameters when there are two or more
|
|
13
|
-
* @see https://github.com/2digits-agency/configs/blob/@2digits/eslint-plugin@2.2.
|
|
13
|
+
* @see https://github.com/2digits-agency/configs/blob/@2digits/eslint-plugin@2.2.1/packages/eslint/src/rules/type-param-names.ts
|
|
14
14
|
*/
|
|
15
15
|
'@2digits/type-param-names'?: Linter.RuleEntry<[]>
|
|
16
16
|
/**
|
|
@@ -9187,13 +9187,6 @@ interface OptionsOverrides {
|
|
|
9187
9187
|
overrides?: TypedFlatConfigItem['rules'];
|
|
9188
9188
|
}
|
|
9189
9189
|
interface OptionsTypeScriptWithTypes extends OptionsOverrides {
|
|
9190
|
-
/**
|
|
9191
|
-
* When this options is provided, type aware rules will be enabled.
|
|
9192
|
-
*
|
|
9193
|
-
* @default true
|
|
9194
|
-
* @see https://typescript-eslint.io/linting/typed-linting/
|
|
9195
|
-
*/
|
|
9196
|
-
tsconfigPath?: string | string[] | true;
|
|
9197
9190
|
/**
|
|
9198
9191
|
* Root directory of the project.
|
|
9199
9192
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
|
10
10
|
interface RuleOptions {
|
|
11
11
|
/**
|
|
12
12
|
* Enforce giving proper names to type parameters when there are two or more
|
|
13
|
-
* @see https://github.com/2digits-agency/configs/blob/@2digits/eslint-plugin@2.2.
|
|
13
|
+
* @see https://github.com/2digits-agency/configs/blob/@2digits/eslint-plugin@2.2.1/packages/eslint/src/rules/type-param-names.ts
|
|
14
14
|
*/
|
|
15
15
|
'@2digits/type-param-names'?: Linter.RuleEntry<[]>
|
|
16
16
|
/**
|
|
@@ -9187,13 +9187,6 @@ interface OptionsOverrides {
|
|
|
9187
9187
|
overrides?: TypedFlatConfigItem['rules'];
|
|
9188
9188
|
}
|
|
9189
9189
|
interface OptionsTypeScriptWithTypes extends OptionsOverrides {
|
|
9190
|
-
/**
|
|
9191
|
-
* When this options is provided, type aware rules will be enabled.
|
|
9192
|
-
*
|
|
9193
|
-
* @default true
|
|
9194
|
-
* @see https://typescript-eslint.io/linting/typed-linting/
|
|
9195
|
-
*/
|
|
9196
|
-
tsconfigPath?: string | string[] | true;
|
|
9197
9190
|
/**
|
|
9198
9191
|
* Root directory of the project.
|
|
9199
9192
|
*
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import x from 'eslint-plugin-unicorn';
|
|
2
2
|
import v from 'eslint-plugin-eslint-comments';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import w from 'eslint-plugin-n';
|
|
4
|
+
import k from 'eslint-plugin-sonarjs';
|
|
5
5
|
import { fixupPluginRules } from '@eslint/compat';
|
|
6
6
|
import { renamePluginsInRules, composer, renamePluginsInConfigs, FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import K from '@eslint/js';
|
|
8
|
+
import T from 'globals';
|
|
9
9
|
import { findUp } from 'find-up';
|
|
10
10
|
import { isPackageExists } from 'local-pkg';
|
|
11
11
|
|
|
12
|
-
function C(){return [{name:"2digits:comments",plugins:{"eslint-comments":v},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 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":"react-extra","react-hooks":"react-hooks","react-compiler":"react-compiler",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","@graphql-eslint":"gql",sonarjs:"sonar"};async function o(e){let t=await e;return t.default||t}async function S(e={}){let{overrides:t={},files:r=["**/*.graphql","**/*.gql"]}=e,i=await o(import('@graphql-eslint/eslint-plugin')),a=renamePluginsInRules(i.flatConfigs["operations-recommended"].rules,p);return [{name:"2digits:graphql",plugins:{gql:fixupPluginRules(i)},languageOptions:{parser:{...i,meta:{name:"graphql"}}},files:r,rules:{...a,...t}}]}var F="**/*.?([cm])[jt]s?(x)",h="**/*.?([cm])ts",O="**/*.?([cm])tsx",I="**/*.stories.tsx",P=["**/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 _(e={}){let{gitIgnore:t,ignores:r=[]}=e;return composer({ignores:[P,r].flat(),name:"2digits:ignores"},o(import('eslint-config-flat-gitignore')).then(i=>({...i(t),name:"2digits:gitignore"})))}function q(e={}){let{overrides:t={}}=e;return [{name:"2digits:javascript",languageOptions:{ecmaVersion:2022,globals:{...w.browser,...w.es2021,...w.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...Q.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 W(){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 D(e={}){let{files:t=[h,O],overrides:r={},tsconfigPath:i,parserOptions:a}=e,[c,m]=await Promise.all([o(import('@next/eslint-plugin-next')),o(import('@typescript-eslint/parser'))]),u=renamePluginsInRules({...c.configs.recommended.rules,...c.configs["core-web-vitals"].rules},p);return [{name:"2digits:next/setup",plugins:{next:fixupPluginRules(c)}},{name:"2digits:next/rules",files:t,languageOptions:{parser:m,parserOptions:{ecmaFeatures:{jsx:!0},project:i,...a},sourceType:"module"},rules:{...u,"next/no-html-link-for-pages":"off",...r}}]}function R(){return [{name:"2digits:node",settings:{node:{version:">= 20.0.0"}},plugins:{node:j},rules:{"node/handle-callback-err":["error","^(err|error)$"],"node/no-deprecated-api":"error","node/no-exports-assign":"error","node/no-new-require":"error","node/no-path-concat":"error","node/no-unsupported-features/node-builtins":["error",{allowExperimental:!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 L(){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 E(e={}){let{files:t=[h,O],overrides:r={},tsconfigPath:i,parserOptions:a,tsconfigRootDir:c,reactCompiler:m=!0}=e,[u,g,y,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')),m?o(import('eslint-plugin-react-compiler')):void 0]),b=u.configs.all.plugins,H=renamePluginsInRules({...y.configs.recommended.rules,...y.configs["jsx-runtime"].rules,...g.configs.recommended.rules,...u.configs["recommended-type-checked"].rules},p);return [{name:"2digits:react/setup",plugins:{react:y,"react-dom":b["@eslint-react/dom"],"react-extra":b["@eslint-react"],"react-hooks":fixupPluginRules(g),"react-hooks-extra":b["@eslint-react/hooks-extra"],"react-naming-convention":b["@eslint-react/naming-convention"],...m?{"react-compiler":z}:{}},settings:{react:{version:"detect"}}},{name:"2digits:react/rules",files:t,languageOptions:{parser:x,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:c,project:i,...a},sourceType:"module"},rules:{...H,...m?{"react-compiler/react-compiler":"error"}:{},"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}}]}var oe=renamePluginsInRules(T.configs.recommended.rules,p);function G(){return [{name:"2digits:sonar",plugins:{sonar:T},rules:{...oe,"sonar/no-redundant-jump":"off"}}]}async function N(e={}){let{files:t=[I],overrides:r={},parserOptions:i,tsconfigPath:a,storybookDirectory:c=".storybook"}=e,[m,u]=await Promise.all([o(import('eslint-plugin-storybook')),o(import('@typescript-eslint/parser'))]),g={parser:u,parserOptions:{ecmaFeatures:{jsx:!0},project:a,...i},sourceType:"module"};return [{name:"2digits:storybook/setup",plugins:{storybook:fixupPluginRules(m)}},{name:"2digits:storybook/rules",files:t,languageOptions:g,rules:{"storybook/await-interactions":"error","storybook/context-in-play-function":"error","storybook/csf-component":"error","storybook/default-exports":"error","storybook/hierarchy-separator":"error","storybook/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:[`${c}/main.@(js|cjs|mjs|ts)`],languageOptions:g,rules:{"storybook/no-uninstalled-addons":"error"}}]}async function U(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 B(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 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={},tsconfigPath:i=!0}=e,[{plugin:a,configs:c,parser:m},u]=await Promise.all([o(import('typescript-eslint')),o(import('@2digits/eslint-plugin'))]),g=renamePluginsInConfigs(c.strictTypeChecked,p),y=Object.fromEntries(g.flatMap(({rules:x})=>Object.entries(x??{})));return [{name:"2digits:typescript/setup",plugins:{ts:a,"@2digits":u},languageOptions:{parser:m,parserOptions:{sourceType:"module",tsconfigRootDir:process.cwd(),project:i,...r}}},{name:"2digits:typescript/rules",files:[F],rules:{...y,"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:"^_"}],...u.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:k},rules:{...k.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 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 pe(e={},...t){let r=new FlatConfigComposer(_(e.ignores),q(e.js),R(),C(),W(),X(),G());f(e.turbo,isPackageExists("turbo"))&&(r=r.append(A(d(e.turbo))));let{overrides:i,...a}=d(e.ts);return f(e.ts,isPackageExists("typescript"))&&(r=r.append(M(d(e.ts)))),f(e.react,isPackageExists("react"))&&(r=r.append(E({...d(e.react),...a}))),f(e.next,isPackageExists("next"))&&(r=r.append(D({...d(e.next),...a}))),f(e.storybook,isPackageExists("storybook"))&&(r=r.append(N({...d(e.storybook),...a}))),f(e.tailwind,isPackageExists("tailwindcss"))&&(r=r.append(U(d(e.tailwind)))),f(e.tanstack,isPackageExists("react-query")||isPackageExists("@tanstack/react-query")||isPackageExists("@tanstack/react-query-devtools"))&&(r=r.append(B(d(e.tanstack)))),f(e.graphql,isPackageExists("graphql"))&&(r=r.append(S(d(e.graphql)))),r=r.append(...t),isPackageExists("prettier")&&(r=r.append(L())),r.renamePlugins(p).toConfigs()}
|
|
12
|
+
function C(){return [{name:"2digits:comments",plugins:{"eslint-comments":v},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 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":"react-extra","react-hooks":"react-hooks","react-compiler":"react-compiler",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","@graphql-eslint":"gql",sonarjs:"sonar"};async function o(e){let t=await e;return t.default||t}async function j(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,...t}}]}var S="**/*.?([cm])[jt]s?(x)",b="**/*.?([cm])ts",h="**/*.?([cm])tsx",F="**/*.stories.tsx",I=["**/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 P(e={}){let{gitIgnore:t,ignores:r=[]}=e;return composer({ignores:[I,r].flat(),name:"2digits:ignores"},o(import('eslint-config-flat-gitignore')).then(a=>({...a(t),name:"2digits:gitignore"})))}function _(e={}){let{overrides:t={}}=e;return [{name:"2digits:javascript",languageOptions:{ecmaVersion:2022,globals:{...T.browser,...T.es2021,...T.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...K.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 q(){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 W(e={}){let{files:t=[b,h],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 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 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 L(e={}){let{files:t=[b,h],overrides:r={},parserOptions:a,tsconfigRootDir:i,reactCompiler:c=!0}=e,[m,f,g,O,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')),c?o(import('eslint-plugin-react-compiler')):void 0]),y=m.configs.all.plugins,z=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-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":X}:{}},settings:{react:{version:"detect"}}},{name:"2digits:react/rules",files:t,languageOptions:{parser:O,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:i,projectService:!0,...a},sourceType:"module"},rules:{...z,...c?{"react-compiler/react-compiler":"error"}:{},"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}}]}var re=renamePluginsInRules(k.configs.recommended.rules,p);function E(){return [{name:"2digits:sonar",plugins:{sonar:k},rules:{...re,"sonar/no-redundant-jump":"off"}}]}async function G(e={}){let{files:t=[F],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/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:[`${i}/main.@(js|cjs|mjs|ts)`],languageOptions:f,rules:{"storybook/no-uninstalled-addons":"error"}}]}async function N(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 U(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 B(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 A(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:O})=>Object.entries(O??{})));return [{name:"2digits:typescript/setup",plugins:{ts:a,"@2digits":m},languageOptions:{parser:c,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,...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 M(){return [{name:"2digits:unicorn",plugins:{unicorn:x},rules:{...x.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 ae(e={},...t){let r=new FlatConfigComposer(P(e.ignores),_(e.js),D(),C(),q(),M(),E());d(e.turbo,isPackageExists("turbo"))&&(r=r.append(B(u(e.turbo))));let{overrides:a,...i}=u(e.ts);return d(e.ts,isPackageExists("typescript"))&&(r=r.append(A(u(e.ts)))),d(e.react,isPackageExists("react"))&&(r=r.append(L({...u(e.react),...i}))),d(e.next,isPackageExists("next"))&&(r=r.append(W({...u(e.next),...i}))),d(e.storybook,isPackageExists("storybook"))&&(r=r.append(G({...u(e.storybook),...i}))),d(e.tailwind,isPackageExists("tailwindcss"))&&(r=r.append(N(u(e.tailwind)))),d(e.tanstack,isPackageExists("react-query")||isPackageExists("@tanstack/react-query")||isPackageExists("@tanstack/react-query-devtools"))&&(r=r.append(U(u(e.tanstack)))),d(e.graphql,isPackageExists("graphql"))&&(r=r.append(j(u(e.graphql)))),r=r.append(...t),isPackageExists("prettier")&&(r=r.append(R())),r.renamePlugins(p).toConfigs()}
|
|
13
13
|
|
|
14
|
-
export { C as comments,
|
|
14
|
+
export { C as comments, ae as default, j as graphql, P as ignores, _ as javascript, q as jsdoc, W as next, D as node, R as prettier, L as react, E as sonar, G as storybook, N as tailwind, U as tanstack, B as turbo, ae as twoDigits, A as typescript, M as unicorn };
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/configs/comments.ts","../src/constants.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/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":["comments","default","PluginNameMap","interopDefault","m","resolved","graphql","options","overrides","files","gql","recommended","renamePluginsInRules","fixupPluginRules","GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_EXCLUDE","ignores","gitIgnore","composer","javascript","globals","eslint","jsdoc","next","tsconfigPath","parserOptions","parser","node","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","rules","sonar","storybook","storybookDirectory","languageOptions","tailwind","tailwindcss","tailwindFunctions","config","findUp","tanstack","turbo","typescript","plugin","configs","twoDigits","strictConfig","renamePluginsInConfigs","unicorn","enabled","defaults","_","rest","userConfig","FlatConfigComposer","isPackageExists","typescriptOptions"],"mappings":";;;;;;;;;;;AAGO,SAASA,CAAAA,EAAkC,CAChD,OAAO,CACL,CACE,IAAM,CAAA,kBAAA,CACN,OAAS,CAAA,CACP,iBAAmBC,CAAAA,CACrB,CACA,CAAA,KAAA,CAAO,CACL,uCAAyC,CAAA,OAAA,CACzC,sCAAwC,CAAA,OAAA,CACxC,sCAAwC,CAAA,OAAA,CACxC,kCAAoC,CAAA,OAAA,CACpC,mCAAqC,CAAA,OACvC,CACF,CACF,CACF,CCnBO,IAAMC,CAAgB,CAAA,CAC3B,YAAc,CAAA,MAAA,CACd,iCAAmC,CAAA,yBAAA,CACnC,2BAA6B,CAAA,mBAAA,CAC7B,mBAAqB,CAAA,WAAA,CACrB,gBAAiB,aACjB,CAAA,aAAA,CAAe,aACf,CAAA,gBAAA,CAAkB,gBAClB,CAAA,KAAA,CAAO,OACP,CAAA,oBAAA,CAAsB,IACtB,CAAA,IAAA,CAAM,MACN,CAAA,iBAAA,CAAmB,iBACnB,CAAA,SAAA,CAAW,WACX,CAAA,KAAA,CAAO,QACP,KAAO,CAAA,OAAA,CACP,OAAS,CAAA,SAAA,CACT,WAAa,CAAA,aAAA,CACb,iBAAmB,CAAA,UAAA,CACnB,UAAY,CAAA,UAAA,CACZ,iBAAmB,CAAA,KAAA,CACnB,OAAS,C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A,CAAS,CAAA,MAAA,CAClBoB,CAAU,CAAA,CACR,GAAGM,CAAOxC,CAAAA,CAAAA,CAAQ,SAAS,CAAA,CAC3B,GAAG0D,CACL,CAAC,CACH,CAGEP,CAAAA,CAAAA,CAAAA,CAAQnD,CAAQ,CAAA,QAAA,CAAUyD,eAAgB,CAAA,aAAa,CAAC,CAAA,GAC1D3C,EAAWA,CAAS,CAAA,MAAA,CAAOuB,CAASG,CAAAA,CAAAA,CAAOxC,CAAQ,CAAA,QAAQ,CAAC,CAAC,CAI7DmD,CAAAA,CAAAA,CAAAA,CACEnD,CAAQ,CAAA,QAAA,CACRyD,eAAgB,CAAA,aAAa,CAC3BA,EAAAA,eAAAA,CAAgB,uBAAuB,CACvCA,EAAAA,eAAAA,CAAgB,gCAAgC,CACpD,CAEA3C,GAAAA,CAAAA,CAAWA,CAAS,CAAA,MAAA,CAAO4B,CAASF,CAAAA,CAAAA,CAAOxC,CAAQ,CAAA,QAAQ,CAAC,CAAC,CAG3DmD,CAAAA,CAAAA,CAAAA,CAAQnD,EAAQ,OAASyD,CAAAA,eAAAA,CAAgB,SAAS,CAAC,CACrD3C,GAAAA,CAAAA,CAAWA,CAAS,CAAA,MAAA,CAAOf,CAAQyC,CAAAA,CAAAA,CAAOxC,CAAQ,CAAA,OAAO,CAAC,CAAC,CAG7Dc,CAAAA,CAAAA,CAAAA,CAAWA,EAAS,MAAO,CAAA,GAAGyC,CAAU,CAAA,CAEpCE,eAAgB,CAAA,UAAU,CAC5B3C,GAAAA,CAAAA,CAAWA,EAAS,MAAOU,CAAAA,CAAAA,EAAU,CAAA,CAAA,CAGhCV,CAAS,CAAA,aAAA,CAAcnB,CAAa,CAAA,CAAE,WAC/C","file":"index.js","sourcesContent":["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","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-compiler': 'react-compiler',\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 '@graphql-eslint': 'gql',\n sonarjs: 'sonar',\n} as const;\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 ...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(gitIgnore),\n 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 = {}, 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","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 tsconfigPath,\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-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 project: tsconfigPath,\n ...parserOptions,\n },\n sourceType: 'module',\n },\n rules: {\n ...recommended,\n\n ...(reactCompiler ? { 'react-compiler/react-compiler': 'error' } : {}),\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 { 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';\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\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': 'off',\n 'ts/no-unused-vars': [\n 'error',\n {\n ignoreRestSiblings: true,\n argsIgnorePattern: '^_',\n varsIgnorePattern: '^_',\n },\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 { FlatConfigComposer } from 'eslint-flat-config-utils';\nimport { isPackageExists } from 'local-pkg';\n\nimport {\n comments,\n graphql,\n ignores,\n javascript,\n jsdoc,\n next,\n node,\n prettier,\n react,\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 | 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 sonar(),\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/comments.ts","../src/constants.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/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":["comments","default","PluginNameMap","interopDefault","m","resolved","graphql","options","overrides","files","gql","recommended","renamePluginsInRules","fixupPluginRules","GLOB_SRC","GLOB_TS","GLOB_TSX","GLOB_STORIES","GLOB_EXCLUDE","ignores","gitIgnore","composer","javascript","globals","eslint","jsdoc","next","parserOptions","parser","node","prettier","react","tsconfigRootDir","reactCompiler","pluginReact","pluginReactHooks","pluginReactCompiler","plugins","rules","sonar","storybook","storybookDirectory","languageOptions","tailwind","tailwindcss","tailwindFunctions","config","findUp","tanstack","turbo","typescript","plugin","configs","twoDigits","strictConfig","renamePluginsInConfigs","unicorn","enabled","defaults","_","rest","userConfig","FlatConfigComposer","isPackageExists","typescriptOptions"],"mappings":";;;;;;;;;;;AAGO,SAASA,CAAAA,EAAkC,CAChD,OAAO,CACL,CACE,IAAM,CAAA,kBAAA,CACN,OAAS,CAAA,CACP,iBAAmBC,CAAAA,CACrB,CACA,CAAA,KAAA,CAAO,CACL,uCAAyC,CAAA,OAAA,CACzC,sCAAwC,CAAA,OAAA,CACxC,sCAAwC,CAAA,OAAA,CACxC,kCAAoC,CAAA,OAAA,CACpC,mCAAqC,CAAA,OACvC,CACF,CACF,CACF,CCnBO,IAAMC,CAAgB,CAAA,CAC3B,YAAc,CAAA,MAAA,CACd,iCAAmC,CAAA,yBAAA,CACnC,2BAA6B,CAAA,mBAAA,CAC7B,mBAAqB,CAAA,WAAA,CACrB,gBAAiB,aACjB,CAAA,aAAA,CAAe,aACf,CAAA,gBAAA,CAAkB,gBAClB,CAAA,KAAA,CAAO,OACP,CAAA,oBAAA,CAAsB,IACtB,CAAA,IAAA,CAAM,MACN,CAAA,iBAAA,CAAmB,iBACnB,CAAA,SAAA,CAAW,WACX,CAAA,KAAA,CAAO,QACP,KAAO,CAAA,OAAA,CACP,OAAS,CAAA,SAAA,CACT,WAAa,CAAA,aAAA,CACb,i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A,CAClBmB,CAAU,CAAA,CACR,GAAGM,CAAOvC,CAAAA,CAAAA,CAAQ,SAAS,CAAA,CAC3B,GAAGyD,CACL,CAAC,CACH,CAGEP,CAAAA,CAAAA,CAAAA,CAAQlD,CAAQ,CAAA,QAAA,CAAUwD,eAAgB,CAAA,aAAa,CAAC,CAAA,GAC1D1C,EAAWA,CAAS,CAAA,MAAA,CAAOsB,CAASG,CAAAA,CAAAA,CAAOvC,CAAQ,CAAA,QAAQ,CAAC,CAAC,CAI7DkD,CAAAA,CAAAA,CAAAA,CACElD,CAAQ,CAAA,QAAA,CACRwD,eAAgB,CAAA,aAAa,CAC3BA,EAAAA,eAAAA,CAAgB,uBAAuB,CACvCA,EAAAA,eAAAA,CAAgB,gCAAgC,CACpD,CAEA1C,GAAAA,CAAAA,CAAWA,CAAS,CAAA,MAAA,CAAO2B,CAASF,CAAAA,CAAAA,CAAOvC,CAAQ,CAAA,QAAQ,CAAC,CAAC,CAG3DkD,CAAAA,CAAAA,CAAAA,CAAQlD,EAAQ,OAASwD,CAAAA,eAAAA,CAAgB,SAAS,CAAC,CACrD1C,GAAAA,CAAAA,CAAWA,CAAS,CAAA,MAAA,CAAOf,CAAQwC,CAAAA,CAAAA,CAAOvC,CAAQ,CAAA,OAAO,CAAC,CAAC,CAG7Dc,CAAAA,CAAAA,CAAAA,CAAWA,EAAS,MAAO,CAAA,GAAGwC,CAAU,CAAA,CAEpCE,eAAgB,CAAA,UAAU,CAC5B1C,GAAAA,CAAAA,CAAWA,EAAS,MAAOS,CAAAA,CAAAA,EAAU,CAAA,CAAA,CAGhCT,CAAS,CAAA,aAAA,CAAcnB,CAAa,CAAA,CAAE,WAC/C","file":"index.js","sourcesContent":["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","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-compiler': 'react-compiler',\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 '@graphql-eslint': 'gql',\n sonarjs: 'sonar',\n} as const;\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 ...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(gitIgnore),\n 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-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/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 { 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/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\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 ...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 comments,\n graphql,\n ignores,\n javascript,\n jsdoc,\n next,\n node,\n prettier,\n react,\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 | 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 sonar(),\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.4.
|
|
4
|
+
"version": "2.4.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"public": true,
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@2digits/constants": "0.2.2",
|
|
32
|
-
"@2digits/eslint-plugin": "2.2.
|
|
33
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
32
|
+
"@2digits/eslint-plugin": "2.2.1",
|
|
33
|
+
"@eslint-react/eslint-plugin": "^1.8.2",
|
|
34
34
|
"@eslint/compat": "^1.1.1",
|
|
35
35
|
"@eslint/js": "^9.8.0",
|
|
36
36
|
"@graphql-eslint/eslint-plugin": "^3.20.1",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"eslint-config-prettier": "^9.1.0",
|
|
42
42
|
"eslint-flat-config-utils": "^0.3.0",
|
|
43
43
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
44
|
-
"eslint-plugin-jsdoc": "^48.
|
|
44
|
+
"eslint-plugin-jsdoc": "^48.11.0",
|
|
45
45
|
"eslint-plugin-n": "^17.10.1",
|
|
46
46
|
"eslint-plugin-react": "^7.35.0",
|
|
47
47
|
"eslint-plugin-react-compiler": "0.0.0-experimental-9ed098e-20240725",
|
|
@@ -52,19 +52,19 @@
|
|
|
52
52
|
"eslint-plugin-turbo": "^2.0.11",
|
|
53
53
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
54
54
|
"find-up": "^7.0.0",
|
|
55
|
-
"globals": "^15.
|
|
55
|
+
"globals": "^15.9.0",
|
|
56
56
|
"local-pkg": "^0.5.0",
|
|
57
57
|
"typescript-eslint": "^8.0.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@2digits/tsconfig": "0.
|
|
60
|
+
"@2digits/tsconfig": "0.5.0",
|
|
61
61
|
"@types/eslint": "^9.6.0",
|
|
62
62
|
"@types/eslint__js": "^8.42.3",
|
|
63
|
-
"@types/node": "^
|
|
63
|
+
"@types/node": "^20.14.14",
|
|
64
64
|
"@typescript-eslint/utils": "8.0.0",
|
|
65
65
|
"eslint": "^9.8.0",
|
|
66
66
|
"eslint-typegen": "^0.3.0",
|
|
67
|
-
"tsup": "^8.2.
|
|
67
|
+
"tsup": "^8.2.4",
|
|
68
68
|
"typescript": "^5.5.4"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|