@jimmy.codes/eslint-config 1.11.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +962 -952
- package/dist/index.d.mts +962 -952
- package/dist/index.mjs +1 -1
- package/package.json +17 -15
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var w=Object.defineProperty;var r=(e,s)=>w(e,"name",{value:s,configurable:!0});var C=require("eslint-config-prettier"),L=require("astro-eslint-parser"),R=require("eslint-plugin-astro"),l=require("eslint-plugin-jsx-a11y"),y=require("globals"),a=require("typescript-eslint"),p=require("eslint-plugin-import-x"),S=require("eslint-plugin-node-import"),G=require("eslint-plugin-simple-import-sort"),A=require("@tanstack/eslint-plugin-query"),P=require("eslint-plugin-react"),B=require("eslint-plugin-react-hooks"),I=require("eslint-plugin-react-refresh"),c=require("local-pkg"),f=require("eslint-plugin-jest"),$=require("eslint-plugin-jest-dom"),x=require("eslint-plugin-testing-library"),N=require("@eslint/js");function m(e){var s=Object.create(null);return e&&Object.keys(e).forEach(function(t){if(t!=="default"){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,i.get?i:{enumerable:!0,get:r(function(){return e[t]},"get")})}}),s.default=e,Object.freeze(s)}r(m,"_interopNamespaceDefault");var F=m(L),J=m(A),V=m(I),h=m($);const o="?([cm])[jt]s?(x)",Q=["**/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","**/storybook-static","**/.eslint-config-inspector","**/playwright-report","**/.astro","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts","**/vite.config.ts.*.mjs","!.storybook"],X="**/*.?([cm])js",j="**/*.?([cm])jsx",b="**/*.?([cm])tsx",u=[`**/__tests__/**/*.${o}`,`**/*.spec.${o}`,`**/*.test.${o}`,`**/*.bench.${o}`,`**/*.benchmark.${o}`],v=[`**/e2e/**/*.spec.${o}`,`**/e2e/**/*.test.${o}`,`**/cypress/**/*.spec.${o}`,`**/cypress/**/*.test.${o}`],z="**/*.cjs",H="**/*.astro",M=["vi.mock"],W=["@testing-library/react"],Y=r(()=>{const e=[H];return[{files:e,name:"jimmy.codes/astro",plugins:{astro:R,"jsx-a11y":{rules:l.rules}},languageOptions:{globals:{...y.node,Astro:!1,Fragment:!1},parser:F,sourceType:"module",parserOptions:{parser:a.parser,extraFileExtensions:[".astro"]}},processor:"astro/client-side-ts",rules:{...l.configs.recommended.rules,"astro/missing-client-only-directive-value":"error","astro/no-conflict-set-directives":"error","astro/no-deprecated-astro-canonicalurl":"error","astro/no-deprecated-astro-fetchcontent":"error","astro/no-deprecated-astro-resolve":"error","astro/no-deprecated-getentrybyslug":"error","astro/no-unused-define-vars-in-style":"error","astro/valid-compile":"error","astro/no-exports-from-components":"off"}},{files:e,...a.configs.disableTypeChecked,name:"jimmy.codes/astro/disable-type-checked"},{settings:{"import-x/core-modules":["astro:content"]},name:"jimmy.codes/astro/imports"}]},"astroConfig"),D=r(()=>[{name:"jimmy.codes/commonjs",files:[z],languageOptions:{globals:y.commonjs}}],"commonjsConfig"),U={...p.configs.recommended.rules,"import-x/namespace":"off","import-x/newline-after-import":"error","import-x/first":"error","import-x/no-absolute-path":"error","import-x/no-useless-path-segments":"error","import-x/no-empty-named-blocks":"error","import-x/no-self-import":"error","simple-import-sort/imports":"error","simple-import-sort/exports":"error","node-import/prefer-node-protocol":"error"},K={name:"jimmy.codes/imports/typescript",settings:{...p.configs.typescript.settings,"import-x/resolver":{...p.configs.typescript.settings["import-x/resolver"],typescript:!0}},rules:p.configs.typescript.rules},Z=r(({typescript:e=!1}={})=>[{name:"jimmy.codes/imports",plugins:{"import-x":p,"simple-import-sort":G,"node-import":S},settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}},languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},rules:U},...e?[K]:[]],"importsConfig"),ee=r(()=>c.isPackageExists("typescript"),"hasTypescript"),re=r(()=>c.isPackageExists("react"),"hasReact"),k=r(()=>c.isPackageExists("vitest"),"hasVitest"),q=r(()=>c.isPackageExists("jest"),"hasJest"),te=r(()=>k()||q(),"hasTesting"),se=r(()=>W.some(e=>c.isPackageExists(e)),"hasTestingLibrary"),oe=r(()=>c.isPackageExists("@tanstack/react-query"),"hasReactQuery"),ne=r(()=>c.isPackageExists("astro"),"hasAstro"),ae={...l.configs.recommended.rules,"react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react/display-name":"error","react/jsx-key":"error","react/jsx-no-comment-textnodes":"error","react/jsx-no-duplicate-props":"error","react/jsx-no-target-blank":"error","react/jsx-no-undef":"error","react/jsx-uses-vars":"error","react/no-children-prop":"error","react/no-danger-with-children":"error","react/no-deprecated":"error","react/no-direct-mutation-state":"error","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-render-return-value":"error","react/no-string-refs":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/prop-types":"error","react/require-render-return":"error","react/react-in-jsx-scope":"off","react/jsx-uses-react":"off","react-refresh/only-export-components":["warn",{allowConstantExport:!0}],"react/self-closing-comp":"error","react/jsx-curly-brace-presence":"error","react/boolean-prop-naming":"off","react/button-has-type":"error","react/checked-requires-onchange-or-readonly":"error","react/default-props-match-prop-types":"error","react/destructuring-assignment":"off","react/forbid-component-props":"off","react/forbid-dom-props":"off","react/forbid-elements":"off","react/forbid-foreign-prop-types":"off","react/forbid-prop-types":"off","react/function-component-definition":"off","react/hook-use-state":"error","react/iframe-missing-sandbox":"error","react/jsx-boolean-value":["error","never"],"react/jsx-filename-extension":"off","react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":"off","react/jsx-max-depth":"off","react/jsx-no-bind":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-leaked-render":"error","react/jsx-no-literals":"off","react/jsx-no-script-url":"error","react/jsx-no-useless-fragment":"error","react/jsx-one-expression-per-line":"off","react/jsx-pascal-case":["error",{allowNamespace:!0}],"react/jsx-props-no-spreading":"off","react/jsx-sort-default-props":"off","react/jsx-sort-props":"off","react/no-access-state-in-setstate":"error","react/no-adjacent-inline-elements":"off","react/no-array-index-key":"off","react/no-arrow-function-lifecycle":"error","react/no-danger":"off","react/no-did-mount-set-state":"error","react/no-did-update-set-state":"error","react/no-invalid-html-attribute":"error","react/no-multi-comp":"off","react/no-namespace":"error","react/no-object-type-as-default-prop":"off","react/no-redundant-should-component-update":"error","react/no-set-state":"off","react/no-this-in-sfc":"error","react/no-typos":"error","react/no-unstable-nested-components":"error","react/no-unused-class-component-methods":"error","react/no-unused-prop-types":"error","react/no-unused-state":"error","react/no-will-update-set-state":"error","react/prefer-es6-class":"off","react/prefer-exact-props":"off","react/prefer-read-only-props":"off","react/prefer-stateless-function":"off","react/require-default-props":"off","react/require-optimization":"off","react/sort-comp":"off","react/sort-default-props":"off","react/sort-prop-types":"off","react/state-in-constructor":"off","react/static-property-placement":"off","react/style-prop-object":"error","react/void-dom-elements-no-children":"error"},ce=r(({utilities:e=[]}={},s=!1)=>{const t=e.includes("@tanstack/query")||s&&oe();return[{name:"jimmy.codes/react",files:[j,b],plugins:{react:P,"react-hooks":B,"jsx-a11y":{rules:l.rules},"react-refresh":V},languageOptions:{parserOptions:{jsxPragma:null,ecmaFeatures:{jsx:!0}},globals:{...y.browser}},settings:{react:{version:"detect"}},rules:ae},...t?[{name:"jimmy.codes/react/query",files:[j,b],plugins:{"@tanstack/query":J},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]:[]]},"reactConfig"),_={...f.configs["flat/recommended"].rules,...f.configs["flat/style"].rules,"jest/no-alias-methods":"error","jest/no-commented-out-tests":"error","jest/consistent-test-it":["error",{fn:"test",withinDescribe:"it"}],"jest/no-conditional-in-test":"error","jest/no-confusing-set-timeout":"error","jest/no-duplicate-hooks":"error","jest/no-hooks":"off","jest/no-large-snapshots":"off","jest/no-restricted-jest-methods":"off","jest/no-restricted-matchers":"off","jest/no-test-return-statement":"error","jest/no-untyped-mock-factory":"off","jest/prefer-called-with":"error","jest/prefer-comparison-matcher":"error","jest/prefer-each":"error","jest/prefer-equality-matcher":"error","jest/prefer-expect-assertions":"off","jest/prefer-expect-resolves":"error","jest/prefer-hooks-in-order":"error","jest/prefer-hooks-on-top":"error","jest/prefer-lowercase-title":"off","jest/prefer-mock-promise-shorthand":"error","jest/prefer-snapshot-hint":"error","jest/prefer-spy-on":"off","jest/prefer-strict-equal":"error","jest/prefer-todo":"warn","jest/require-hook":"error","jest/require-to-throw-message":"error","jest/require-top-level-describe":"off","jest/unbound-method":"off"},ie=r(()=>[{name:"jimmy.codes/testing/testing-library",files:u,plugins:{"testing-library":x,"jest-dom":h},rules:{...x.configs.react.rules,...h.configs["flat/recommended"].rules}},{name:"jimmy.codes/testing/testing-library/disabled",files:v,rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),pe=r(({framework:e="vitest",utilities:s}={},t=!1)=>{const i=t?k():e==="vitest",d=e==="jest"||t&&q(),n=!!s?.includes("testing-library")||t&&se();return[{name:"jimmy.codes/testing",files:u,...f.configs["flat/recommended"]},...i?[{name:"jimmy.codes/testing/vitest",files:u,...f.configs["flat/recommended"],rules:{..._,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:M}]}}]:[],...d?[{name:"jimmy.codes/testing/jest",files:u,...f.configs["flat/recommended"],rules:_}]:[],{name:"jimmy.codes/testing/disabled",files:v,rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...n?ie():[]]},"testingConfig"),fe=r(e=>a.config(...a.configs.strictTypeChecked,{name:"jimmy.codes/typescript",extends:[...a.configs.strictTypeChecked,...a.configs.stylisticTypeChecked],languageOptions:{parserOptions:{project:e.project,tsconfigRootDir:process.cwd()}},rules:{"@typescript-eslint/consistent-type-imports":["error",{fixStyle:"inline-type-imports"}],"@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!0}],"@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:{attributes:!1}}],"@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0}]}},{files:[X,j],...a.configs.disableTypeChecked}),"typescriptConfig"),le={...N.configs.recommended.rules,curly:["error","multi-or-nest","consistent"],"arrow-body-style":["error","always"],"object-shorthand":"error","no-useless-rename":"error","prefer-arrow-callback":"error","no-console":"warn"},me=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),ue=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),de=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),ye=r(({typescript:e=!1,react:s=!1,testing:t=!1,astro:i=!1,overrides:d=[],autoDetect:n=!1}={})=>{const g=e||n&&ee(),O=s||n&&re(),E=t||n&&te(),T=i||n&&ne();return[{name:"jimmy.codes/base",rules:le},...Z({typescript:g}),...g?fe(me(e)):[],...O?ce(de(s),n):[],...T?Y():[],...E?pe(ue(t),n):[],{name:"jimmy.codes/disabled",...C},...D(),{ignores:Q},...d]},"jimmyDotCodes");module.exports=ye;
|
|
1
|
+
"use strict";var T=Object.defineProperty;var r=(e,s)=>T(e,"name",{value:s,configurable:!0});var C=require("eslint-config-prettier"),L=require("astro-eslint-parser"),R=require("eslint-plugin-astro"),l=require("eslint-plugin-jsx-a11y"),d=require("globals"),a=require("typescript-eslint"),p=require("eslint-plugin-import-x"),S=require("eslint-plugin-node-import"),G=require("eslint-plugin-simple-import-sort"),P=require("@tanstack/eslint-plugin-query"),A=require("eslint-plugin-react"),B=require("eslint-plugin-react-hooks"),I=require("eslint-plugin-react-refresh"),c=require("local-pkg"),f=require("eslint-plugin-jest"),$=require("eslint-plugin-jest-dom"),x=require("eslint-plugin-testing-library"),N=require("@eslint/js");function y(e){var s=Object.create(null);return e&&Object.keys(e).forEach(function(t){if(t!=="default"){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,i.get?i:{enumerable:!0,get:r(function(){return e[t]},"get")})}}),s.default=e,Object.freeze(s)}r(y,"_interopNamespaceDefault");var F=y(L),J=y(I),h=y($);const o="?([cm])[jt]s?(x)",V=["**/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","**/storybook-static","**/.eslint-config-inspector","**/playwright-report","**/.astro","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts","**/vite.config.ts.*.mjs","!.storybook"],X="**/*.?([cm])js",g="**/*.?([cm])jsx",b="**/*.?([cm])tsx",m=[`**/__tests__/**/*.${o}`,`**/*.spec.${o}`,`**/*.test.${o}`,`**/*.bench.${o}`,`**/*.benchmark.${o}`],v=[`**/e2e/**/*.spec.${o}`,`**/e2e/**/*.test.${o}`,`**/cypress/**/*.spec.${o}`,`**/cypress/**/*.test.${o}`],z="**/*.cjs",H="**/*.astro",M=["vi.mock"],Q=["@testing-library/react"],W=r(()=>{const e=[H];return[{files:e,name:"jimmy.codes/astro",plugins:{astro:R,"jsx-a11y":l},languageOptions:{globals:{...d.node,Astro:!1,Fragment:!1},parser:F,sourceType:"module",parserOptions:{parser:a.parser,extraFileExtensions:[".astro"]}},processor:"astro/client-side-ts",rules:{...l.configs.recommended.rules,"astro/missing-client-only-directive-value":"error","astro/no-conflict-set-directives":"error","astro/no-deprecated-astro-canonicalurl":"error","astro/no-deprecated-astro-fetchcontent":"error","astro/no-deprecated-astro-resolve":"error","astro/no-deprecated-getentrybyslug":"error","astro/no-unused-define-vars-in-style":"error","astro/valid-compile":"error","astro/no-exports-from-components":"off"}},{files:e,...a.configs.disableTypeChecked,name:"jimmy.codes/astro/disable-type-checked"},{settings:{"import-x/core-modules":["astro:content"]},name:"jimmy.codes/astro/imports"}]},"astroConfig"),Y=r(()=>[{name:"jimmy.codes/commonjs",files:[z],languageOptions:{globals:d.commonjs}}],"commonjsConfig"),D={...p.configs.recommended.rules,"import-x/namespace":"off","import-x/newline-after-import":"error","import-x/first":"error","import-x/no-absolute-path":"error","import-x/no-useless-path-segments":"error","import-x/no-empty-named-blocks":"error","import-x/no-self-import":"error","simple-import-sort/imports":"error","simple-import-sort/exports":"error","node-import/prefer-node-protocol":"error"},U={name:"jimmy.codes/imports/typescript",settings:{...p.configs.typescript.settings,"import-x/resolver":{...p.configs.typescript.settings["import-x/resolver"],typescript:!0}},rules:p.configs.typescript.rules},K=r(({typescript:e=!1}={})=>[{name:"jimmy.codes/imports",plugins:{"import-x":p,"simple-import-sort":G,"node-import":S},settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}},languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},rules:D},...e?[U]:[]],"importsConfig"),Z=r(()=>c.isPackageExists("typescript"),"hasTypescript"),ee=r(()=>c.isPackageExists("react"),"hasReact"),k=r(()=>c.isPackageExists("vitest"),"hasVitest"),q=r(()=>c.isPackageExists("jest"),"hasJest"),re=r(()=>k()||q(),"hasTesting"),te=r(()=>Q.some(e=>c.isPackageExists(e)),"hasTestingLibrary"),se=r(()=>c.isPackageExists("@tanstack/react-query"),"hasReactQuery"),oe=r(()=>c.isPackageExists("astro"),"hasAstro"),ne={...l.configs.recommended.rules,"react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react/display-name":"error","react/jsx-key":"error","react/jsx-no-comment-textnodes":"error","react/jsx-no-duplicate-props":"error","react/jsx-no-target-blank":"error","react/jsx-no-undef":"error","react/jsx-uses-vars":"error","react/no-children-prop":"error","react/no-danger-with-children":"error","react/no-deprecated":"error","react/no-direct-mutation-state":"error","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-render-return-value":"error","react/no-string-refs":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/prop-types":"error","react/require-render-return":"error","react/react-in-jsx-scope":"off","react/jsx-uses-react":"off","react-refresh/only-export-components":["warn",{allowConstantExport:!0}],"react/self-closing-comp":"error","react/jsx-curly-brace-presence":"error","react/boolean-prop-naming":"off","react/button-has-type":"error","react/checked-requires-onchange-or-readonly":"error","react/default-props-match-prop-types":"error","react/destructuring-assignment":"off","react/forbid-component-props":"off","react/forbid-dom-props":"off","react/forbid-elements":"off","react/forbid-foreign-prop-types":"off","react/forbid-prop-types":"off","react/function-component-definition":"off","react/hook-use-state":"error","react/iframe-missing-sandbox":"error","react/jsx-boolean-value":["error","never"],"react/jsx-filename-extension":"off","react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":"off","react/jsx-max-depth":"off","react/jsx-no-bind":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-leaked-render":"error","react/jsx-no-literals":"off","react/jsx-no-script-url":"error","react/jsx-no-useless-fragment":"error","react/jsx-one-expression-per-line":"off","react/jsx-pascal-case":["error",{allowNamespace:!0}],"react/jsx-props-no-spreading":"off","react/jsx-sort-default-props":"off","react/jsx-sort-props":"off","react/no-access-state-in-setstate":"error","react/no-adjacent-inline-elements":"off","react/no-array-index-key":"off","react/no-arrow-function-lifecycle":"error","react/no-danger":"off","react/no-did-mount-set-state":"error","react/no-did-update-set-state":"error","react/no-invalid-html-attribute":"error","react/no-multi-comp":"off","react/no-namespace":"error","react/no-object-type-as-default-prop":"off","react/no-redundant-should-component-update":"error","react/no-set-state":"off","react/no-this-in-sfc":"error","react/no-typos":"error","react/no-unstable-nested-components":"error","react/no-unused-class-component-methods":"error","react/no-unused-prop-types":"error","react/no-unused-state":"error","react/no-will-update-set-state":"error","react/prefer-es6-class":"off","react/prefer-exact-props":"off","react/prefer-read-only-props":"off","react/prefer-stateless-function":"off","react/require-default-props":"off","react/require-optimization":"off","react/sort-comp":"off","react/sort-default-props":"off","react/sort-prop-types":"off","react/state-in-constructor":"off","react/static-property-placement":"off","react/style-prop-object":"error","react/void-dom-elements-no-children":"error"},ae=r(({utilities:e=[]}={},s=!1)=>{const t=e.includes("@tanstack/query")||s&&se();return[{name:"jimmy.codes/react",files:[g,b],plugins:{react:A,"react-hooks":B,"jsx-a11y":l,"react-refresh":J},languageOptions:{parserOptions:{jsxPragma:null,ecmaFeatures:{jsx:!0}},globals:{...d.browser}},settings:{react:{version:"detect"}},rules:ne},...t?[{name:"jimmy.codes/react/query",files:[g,b],plugins:{"@tanstack/query":P},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]:[]]},"reactConfig"),O={...f.configs["flat/recommended"].rules,...f.configs["flat/style"].rules,"jest/no-alias-methods":"error","jest/no-commented-out-tests":"error","jest/consistent-test-it":["error",{fn:"test",withinDescribe:"it"}],"jest/no-conditional-in-test":"error","jest/no-confusing-set-timeout":"error","jest/no-duplicate-hooks":"error","jest/no-hooks":"off","jest/no-large-snapshots":"off","jest/no-restricted-jest-methods":"off","jest/no-restricted-matchers":"off","jest/no-test-return-statement":"error","jest/no-untyped-mock-factory":"off","jest/prefer-called-with":"error","jest/prefer-comparison-matcher":"error","jest/prefer-each":"error","jest/prefer-equality-matcher":"error","jest/prefer-expect-assertions":"off","jest/prefer-expect-resolves":"error","jest/prefer-hooks-in-order":"error","jest/prefer-hooks-on-top":"error","jest/prefer-lowercase-title":"off","jest/prefer-mock-promise-shorthand":"error","jest/prefer-snapshot-hint":"error","jest/prefer-spy-on":"off","jest/prefer-strict-equal":"error","jest/prefer-todo":"warn","jest/require-hook":"error","jest/require-to-throw-message":"error","jest/require-top-level-describe":"off","jest/unbound-method":"off"},ce=r(()=>[{name:"jimmy.codes/testing/testing-library",files:m,plugins:{"testing-library":x,"jest-dom":h},rules:{...x.configs.react.rules,...h.configs["flat/recommended"].rules}},{name:"jimmy.codes/testing/testing-library/disabled",files:v,rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),ie=r(({framework:e="vitest",utilities:s}={},t=!1)=>{const i=t?k():e==="vitest",u=e==="jest"||t&&q(),n=!!s?.includes("testing-library")||t&&te();return[{name:"jimmy.codes/testing",files:m,...f.configs["flat/recommended"]},...i?[{name:"jimmy.codes/testing/vitest",files:m,...f.configs["flat/recommended"],rules:{...O,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:M}]}}]:[],...u?[{name:"jimmy.codes/testing/jest",files:m,...f.configs["flat/recommended"],rules:O}]:[],{name:"jimmy.codes/testing/disabled",files:v,rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...n?ce():[]]},"testingConfig"),pe=r(e=>a.config(...a.configs.strictTypeChecked,{name:"jimmy.codes/typescript",extends:[...a.configs.strictTypeChecked,...a.configs.stylisticTypeChecked],languageOptions:{parserOptions:{project:e.project,tsconfigRootDir:process.cwd()}},rules:{"@typescript-eslint/consistent-type-imports":["error",{fixStyle:"inline-type-imports"}],"@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!0}],"@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:{attributes:!1}}],"@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0}],"@typescript-eslint/no-deprecated":"warn"}},{files:[X,g],...a.configs.disableTypeChecked}),"typescriptConfig"),fe={...N.configs.recommended.rules,curly:["error","multi-or-nest","consistent"],"arrow-body-style":["error","always"],"object-shorthand":"error","no-useless-rename":"error","prefer-arrow-callback":"error","no-console":"warn"},le=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),me=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),ue=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),de=r(({typescript:e=!1,react:s=!1,testing:t=!1,astro:i=!1,overrides:u=[],autoDetect:n=!1}={})=>{const j=e||n&&Z(),_=s||n&&ee(),E=t||n&&re(),w=i||n&&oe();return[{name:"jimmy.codes/base",rules:fe},...K({typescript:j}),...j?pe(le(e)):[],..._?ae(ue(s),n):[],...w?W():[],...E?ie(me(t),n):[],{name:"jimmy.codes/disabled",...C},...Y(),{ignores:V},...u]},"jimmyDotCodes");module.exports=de;
|