@jimmy.codes/eslint-config 3.4.2 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var A=Object.defineProperty;var r=(e,t)=>A(e,"name",{value:t,configurable:!0});var G=require("eslint-config-prettier"),B=require("astro-eslint-parser"),I=require("eslint-plugin-astro"),u=require("eslint-plugin-jsx-a11y"),d=require("globals"),a=require("typescript-eslint"),b=require("@eslint-community/eslint-plugin-eslint-comments/configs"),i=require("eslint-plugin-import-x"),h=require("eslint-plugin-n"),v=require("eslint-plugin-perfectionist"),$=require("@tanstack/eslint-plugin-query"),N=require("eslint-plugin-react"),F=require("eslint-plugin-react-hooks"),J=require("eslint-plugin-react-refresh"),n=require("local-pkg"),p=require("eslint-plugin-jest"),V=require("eslint-plugin-jest-dom"),k=require("eslint-plugin-testing-library"),q=require("eslint-plugin-unicorn"),X=require("@eslint/js");function y(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(s){if(s!=="default"){var c=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,c.get?c:{enumerable:!0,get:r(function(){return e[s]},"get")})}}),t.default=e,Object.freeze(t)}r(y,"_interopNamespaceDefault");var D=y(B),U=y(J),O=y(V);const o="?([cm])[jt]s?(x)",z=["**/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","**/*.gen.*","!.storybook"],H="**/*.?([cm])js",g="**/*.?([cm])jsx",_="**/*.?([cm])tsx",m=[`**/__tests__/**/*.${o}`,`**/*.spec.${o}`,`**/*.test.${o}`,`**/*.bench.${o}`,`**/*.benchmark.${o}`],w=[`**/e2e/**/*.spec.${o}`,`**/e2e/**/*.test.${o}`,`**/cypress/**/*.spec.${o}`,`**/cypress/**/*.test.${o}`],M="**/*.cjs",Q="**/*.astro",W=["vi.mock"],Y=["@testing-library/react"],K=r(()=>{const e=[Q];return[{files:e,languageOptions:{globals:{...d.node,Astro:!1,Fragment:!1},parser:D,parserOptions:{extraFileExtensions:[".astro"],parser:a.parser},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:I,"jsx-a11y":u},processor:"astro/client-side-ts",rules:{...u.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-exports-from-components":"off","astro/no-unused-define-vars-in-style":"error","astro/valid-compile":"error"}},{files:e,...a.configs.disableTypeChecked,name:"jimmy.codes/astro/disable-type-checked"},{name:"jimmy.codes/astro/imports",settings:{"import-x/core-modules":["astro:content"]}}]},"astroConfig"),Z=r(()=>[{files:[M],languageOptions:{globals:d.commonjs},name:"jimmy.codes/commonjs"}],"commonjsConfig"),ee={...b.recommended.rules,"@eslint-community/eslint-comments/no-unused-disable":"off","@eslint-community/eslint-comments/require-description":"error"},re=r(()=>[{...b.recommended,name:"jimmy.codes/eslint-comments",rules:ee}],"eslintCommentsConfig"),te={...i.configs.recommended.rules,"import-x/consistent-type-specifier-style":["error","prefer-top-level"],"import-x/first":"error","import-x/namespace":"off","import-x/newline-after-import":"error","import-x/no-absolute-path":"error","import-x/no-empty-named-blocks":"error","import-x/no-self-import":"error","import-x/no-useless-path-segments":"error"},se={name:"jimmy.codes/imports/typescript",rules:i.configs.typescript.rules,settings:{...i.configs.typescript.settings,"import-x/resolver":{...i.configs.typescript.settings["import-x/resolver"],typescript:!0}}},oe=r(({typescript:e=!1}={})=>[{languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},name:"jimmy.codes/imports",plugins:{"import-x":i,n:h},rules:te,settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}}},...e?[se]:[]],"importsConfig"),ne={"n/no-process-exit":"off","n/prefer-node-protocol":"error"},ce=r(()=>[{name:"jimmy.codes/node",plugins:{n:h},rules:ne}],"nodeConfig"),ae={...v.configs["recommended-natural"].rules,"perfectionist/sort-imports":["error",{customGroups:{type:{},value:{}},environment:"node",groups:["builtin","type","external","internal-type","internal",["parent-type","sibling-type","index-type"],["parent","sibling","index"],"object","unknown"],internalPattern:["~/**","@/**"],order:"asc",type:"natural"}]},ie=r(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:v},rules:ae}],"perfectionistConfig"),pe=r(()=>n.isPackageExists("typescript"),"hasTypescript"),fe=r(()=>n.isPackageExists("react"),"hasReact"),E=r(()=>n.isPackageExists("vitest"),"hasVitest"),C=r(()=>n.isPackageExists("jest"),"hasJest"),le=r(()=>E()||C(),"hasTesting"),ue=r(()=>Y.some(e=>n.isPackageExists(e)),"hasTestingLibrary"),me=r(()=>n.isPackageExists("@tanstack/react-query"),"hasReactQuery"),de=r(()=>n.isPackageExists("astro"),"hasAstro"),ye={...u.configs.recommended.rules,"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/display-name":"error","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-curly-brace-presence":"error","react/jsx-filename-extension":"off","react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":"off","react/jsx-key":"error","react/jsx-max-depth":"off","react/jsx-no-bind":"off","react/jsx-no-comment-textnodes":"error","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"error","react/jsx-no-leaked-render":"error","react/jsx-no-literals":"off","react/jsx-no-script-url":"error","react/jsx-no-target-blank":"error","react/jsx-no-undef":"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/jsx-uses-react":"off","react/jsx-uses-vars":"error","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-children-prop":"error","react/no-danger":"off","react/no-danger-with-children":"error","react/no-deprecated":"error","react/no-did-mount-set-state":"error","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"error","react/no-find-dom-node":"error","react/no-invalid-html-attribute":"error","react/no-is-mounted":"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-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"error","react/no-this-in-sfc":"error","react/no-typos":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","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/prop-types":"error","react/react-in-jsx-scope":"off","react/require-default-props":"off","react/require-optimization":"off","react/require-render-return":"error","react/self-closing-comp":"error","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","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-refresh/only-export-components":["warn",{allowConstantExport:!0}]},ge=r(({utilities:e=[]}={},t=!0)=>{const s=e.includes("@tanstack/query")||t&&me();return[{files:[g,_],languageOptions:{globals:{...d.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":u,react:N,"react-hooks":F,"react-refresh":U},rules:ye,settings:{react:{version:"detect"}}},...s?[{files:[g,_],name:"jimmy.codes/react/query",plugins:{"@tanstack/query":$},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]:[]]},"reactConfig"),T={...p.configs["flat/recommended"].rules,...p.configs["flat/style"].rules,"jest/consistent-test-it":["error",{fn:"test",withinDescribe:"it"}],"jest/no-alias-methods":"error","jest/no-commented-out-tests":"error","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"},je=r(()=>[{files:m,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":O,"testing-library":k},rules:{...k.configs.react.rules,...O.configs["flat/recommended"].rules}},{files:w,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),xe=r(({framework:e="vitest",utilities:t}={},s=!0)=>{const c=s?E():e==="vitest",f=e==="jest"||s&&C(),l=!!t?.includes("testing-library")||s&&ue();return[{files:m,name:"jimmy.codes/testing",...p.configs["flat/recommended"]},...c?[{files:m,name:"jimmy.codes/testing/vitest",...p.configs["flat/recommended"],rules:{...T,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:W}]}}]:[],...f?[{files:m,name:"jimmy.codes/testing/jest",...p.configs["flat/recommended"],rules:T}]:[],{files:w,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...l?je():[]]},"testingConfig"),be=r(e=>a.config(...a.configs.strictTypeChecked,...a.configs.stylisticTypeChecked.filter(t=>t.name==="typescript-eslint/stylistic-type-checked"),{languageOptions:{parserOptions:{project:e.project,tsconfigRootDir:process.cwd()}},name:"jimmy.codes/typescript",rules:{"@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!1}],"@typescript-eslint/consistent-type-imports":["error",{fixStyle:"separate-type-imports"}],"@typescript-eslint/no-deprecated":"warn","@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:{attributes:!1}}],"@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0}]}},{files:[H,g],...a.configs.disableTypeChecked}),"typescriptConfig"),he={...q.configs["flat/recommended"].rules,"unicorn/filename-case":"off","unicorn/import-style":"off","unicorn/no-abusive-eslint-disable":"off","unicorn/no-anonymous-default-export":"off","unicorn/no-array-callback-reference":"off","unicorn/no-array-reduce":"off","unicorn/no-null":"off","unicorn/no-process-exit":"off","unicorn/no-useless-undefined":["error",{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-node-protocol":"off","unicorn/prevent-abbreviations":"off"},ve=r(()=>[{...q.configs["flat/recommended"],name:"jimmy.codes/unicorn",rules:he}],"unicornConfig"),ke={...X.configs.recommended.rules,"array-callback-return":["error",{allowImplicit:!0}],"arrow-body-style":["error","always"],curly:["error","multi-or-nest","consistent"],"no-console":"warn","no-useless-rename":"error","object-shorthand":"error","prefer-arrow-callback":"error"},qe=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),Oe=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),_e=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),we=r(({astro:e=!1,autoDetect:t=!0,configs:s=[],ignores:c=[],react:f=!1,testing:l=!1,typescript:j=!1}={},...R)=>{const x=j||t&&pe(),L=f||t&&fe(),P=l||t&&le(),S=e||t&&de();return[{linterOptions:{reportUnusedDisableDirectives:!0},name:"jimmy.codes/base",rules:ke},...ie(),...ce(),...ve(),...re(),...oe({typescript:x}),...x?be(qe(j)):[],...L?ge(_e(f),t):[],...S?K():[],...P?xe(Oe(l),t):[],{name:"jimmy.codes/prettier",...G},...Z(),{ignores:[...z,...c],name:"jimmy.codes/ignores"},...s,...R]},"jimmyDotCodes");module.exports=we;
1
+ "use strict";var B=Object.defineProperty;var r=(e,t)=>B(e,"name",{value:t,configurable:!0});var I=require("eslint-config-prettier"),$=require("astro-eslint-parser"),N=require("eslint-plugin-astro"),u=require("eslint-plugin-jsx-a11y"),d=require("globals"),c=require("typescript-eslint"),h=require("@eslint-community/eslint-plugin-eslint-comments/configs"),a=require("eslint-plugin-import-x"),v=require("eslint-plugin-n"),k=require("eslint-plugin-perfectionist"),F=require("@tanstack/eslint-plugin-query"),y=require("eslint-plugin-react"),J=require("eslint-plugin-react-hooks"),V=require("eslint-plugin-react-refresh"),n=require("local-pkg"),p=require("eslint-plugin-jest"),X=require("eslint-plugin-jest-dom"),q=require("eslint-plugin-testing-library"),O=require("eslint-plugin-unicorn"),z=require("@eslint/js");function g(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(s){if(s!=="default"){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:r(function(){return e[s]},"get")})}}),t.default=e,Object.freeze(t)}r(g,"_interopNamespaceDefault");var D=g($),U=g(V),_=g(X);const o="?([cm])[jt]s?(x)",H=["**/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","**/.vinxi","**/app.config.timestamp_*.js","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts","**/vite.config.ts.*.mjs","**/*.gen.*","!.storybook"],M="**/*.?([cm])js",j="**/*.?([cm])jsx",E="**/*.?([cm])tsx",m=[`**/__tests__/**/*.${o}`,`**/*.spec.${o}`,`**/*.test.${o}`,`**/*.bench.${o}`,`**/*.benchmark.${o}`],w=[`**/e2e/**/*.spec.${o}`,`**/e2e/**/*.test.${o}`,`**/cypress/**/*.spec.${o}`,`**/cypress/**/*.test.${o}`],Q="**/*.cjs",W="**/*.astro",Y=["vi.mock","describe","expect","it"],K=["@testing-library/react"],Z=r(()=>{const e=[W];return[{files:e,languageOptions:{globals:{...d.node,Astro:!1,Fragment:!1},parser:D,parserOptions:{extraFileExtensions:[".astro"],parser:c.parser},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:N,"jsx-a11y":u},processor:"astro/client-side-ts",rules:{...u.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-exports-from-components":"off","astro/no-unused-define-vars-in-style":"error","astro/valid-compile":"error"}},{files:e,...c.configs.disableTypeChecked,name:"jimmy.codes/astro/disable-type-checked"},{name:"jimmy.codes/astro/imports",settings:{"import-x/core-modules":["astro:content"]}}]},"astroConfig"),ee=r(()=>[{files:[Q],languageOptions:{globals:d.commonjs},name:"jimmy.codes/commonjs"}],"commonjsConfig"),re={...h.recommended.rules,"@eslint-community/eslint-comments/no-unused-disable":"off","@eslint-community/eslint-comments/require-description":"error"},te=r(()=>[{...h.recommended,name:"jimmy.codes/eslint-comments",rules:re}],"eslintCommentsConfig"),se={...a.configs.recommended.rules,"import-x/consistent-type-specifier-style":["error","prefer-top-level"],"import-x/extensions":["error","never",{checkTypedImports:!0}],"import-x/first":"error","import-x/namespace":"off","import-x/newline-after-import":"error","import-x/no-absolute-path":"error","import-x/no-duplicates":"error","import-x/no-empty-named-blocks":"error","import-x/no-named-as-default":"error","import-x/no-named-as-default-member":"error","import-x/no-self-import":"error","import-x/no-useless-path-segments":"error"},oe={name:"jimmy.codes/imports/typescript",rules:a.configs.typescript.rules,settings:{...a.configs.typescript.settings,"import-x/resolver":{...a.configs.typescript.settings["import-x/resolver"],typescript:!0}}},ne=r(({typescript:e=!1}={})=>[{languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},name:"jimmy.codes/imports",plugins:{"import-x":a,n:v},rules:se,settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}}},...e?[oe]:[]],"importsConfig"),ie={"n/no-process-exit":"off","n/prefer-node-protocol":"error"},ce=r(()=>[{name:"jimmy.codes/node",plugins:{n:v},rules:ie}],"nodeConfig"),ae={...k.configs["recommended-natural"].rules,"perfectionist/sort-imports":["error",{customGroups:{type:{},value:{}},environment:"node",groups:["builtin","type","external","internal-type","internal",["parent-type","sibling-type","index-type"],["parent","sibling","index"],"object","unknown"],internalPattern:["~/**","@/**"],order:"asc",type:"natural"}]},pe=r(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:k},rules:ae}],"perfectionistConfig"),le=r(()=>n.isPackageExists("typescript"),"hasTypescript"),fe=r(()=>n.isPackageExists("react"),"hasReact"),C=r(()=>n.isPackageExists("vitest"),"hasVitest"),T=r(()=>n.isPackageExists("jest"),"hasJest"),ue=r(()=>C()||T(),"hasTesting"),me=r(()=>K.some(e=>n.isPackageExists(e)),"hasTestingLibrary"),de=r(()=>n.isPackageExists("@tanstack/react-query"),"hasReactQuery"),ye=r(()=>n.isPackageExists("astro"),"hasAstro"),ge=r(e=>e===2?"error":e===1?"warn":"off","toStringSeverity"),R=r((e={})=>Object.fromEntries(Object.entries(e).map(([t,s])=>[t,typeof s=="number"?ge(s):s])),"normalizeRuleEntries"),je={...u.configs.recommended.rules,...R(y.configs.flat?.recommended?.rules),...R(y.configs.flat?.["jsx-runtime"]?.rules),"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/forward-ref-uses-ref":"error","react/function-component-definition":"off","react/hook-use-state":"error","react/iframe-missing-sandbox":"error","react/jsx-boolean-value":["error","never"],"react/jsx-curly-brace-presence":"error","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-spread-multi":"off","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":"error","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/self-closing-comp":"error","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","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-refresh/only-export-components":["warn",{allowConstantExport:!0}]},xe=r(({utilities:e=[]}={},t=!0)=>{const s=e.includes("@tanstack/query")||t&&de();return[{files:[j,E],languageOptions:{globals:{...d.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":u,react:y,"react-hooks":J,"react-refresh":U},rules:je,settings:{react:{version:"detect"}}},...s?[{files:[j,E],name:"jimmy.codes/react/query",plugins:{"@tanstack/query":F},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]:[]]},"reactConfig"),L={...p.configs["flat/recommended"].rules,...p.configs["flat/style"].rules,"jest/consistent-test-it":["error",{fn:"test",withinDescribe:"it"}],"jest/no-alias-methods":"error","jest/no-commented-out-tests":"error","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"},be=r(()=>[{files:m,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":_,"testing-library":q},rules:{...q.configs.react.rules,..._.configs["flat/recommended"].rules}},{files:w,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),he=r(({framework:e="vitest",utilities:t}={},s=!0)=>{const i=s?C():e==="vitest",l=e==="jest"||s&&T(),f=!!t?.includes("testing-library")||s&&me();return[{files:m,name:"jimmy.codes/testing",...p.configs["flat/recommended"]},...i?[{files:m,name:"jimmy.codes/testing/vitest",...p.configs["flat/recommended"],rules:{...L,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:Y}]}}]:[],...l?[{files:m,name:"jimmy.codes/testing/jest",...p.configs["flat/recommended"],rules:L}]:[],{files:w,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...f?be():[]]},"testingConfig"),ve=r(e=>c.config(...c.configs.strictTypeChecked,...c.configs.stylisticTypeChecked.filter(t=>t.name==="typescript-eslint/stylistic-type-checked"),{languageOptions:{parserOptions:{project:e.project,tsconfigRootDir:process.cwd()}},name:"jimmy.codes/typescript",rules:{"@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!1}],"@typescript-eslint/consistent-type-imports":["error",{fixStyle:"separate-type-imports"}],"@typescript-eslint/no-deprecated":"warn","@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:{attributes:!1}}],"@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0}]}},{files:[M,j],...c.configs.disableTypeChecked}),"typescriptConfig"),ke={...O.configs["flat/recommended"].rules,"unicorn/filename-case":"off","unicorn/import-style":"off","unicorn/no-abusive-eslint-disable":"off","unicorn/no-anonymous-default-export":"off","unicorn/no-array-callback-reference":"off","unicorn/no-array-reduce":"off","unicorn/no-null":"off","unicorn/no-process-exit":"off","unicorn/no-useless-undefined":["error",{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-node-protocol":"off","unicorn/prevent-abbreviations":"off"},qe=r(()=>[{...O.configs["flat/recommended"],name:"jimmy.codes/unicorn",rules:ke}],"unicornConfig"),Oe={...z.configs.recommended.rules,"array-callback-return":["error",{allowImplicit:!0}],"arrow-body-style":["error","always"],curly:["error","all"],"no-console":"warn","no-useless-rename":"error","object-shorthand":"error","prefer-arrow-callback":"error"},_e=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),Ee=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),we=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),Ce=r(({astro:e=!1,autoDetect:t=!0,configs:s=[],ignores:i=[],react:l=!1,testing:f=!1,typescript:x=!1}={},...P)=>{const b=x||t&&le(),S=l||t&&fe(),A=f||t&&ue(),G=e||t&&ye();return[{linterOptions:{reportUnusedDisableDirectives:!0},name:"jimmy.codes/base",rules:Oe},...pe(),...ce(),...qe(),...te(),...ne({typescript:b}),...b?ve(_e(x)):[],...S?xe(we(l),t):[],...G?Z():[],...A?he(Ee(f),t):[],{name:"jimmy.codes/prettier",...I},...ee(),{ignores:[...H,...i],name:"jimmy.codes/ignores"},...s,...P]},"jimmyDotCodes");module.exports=Ce;
package/dist/index.d.cts CHANGED
@@ -5844,6 +5844,19 @@ type TypescriptEslintNoVarRequires = []|[{
5844
5844
  // ----- @typescript-eslint/only-throw-error -----
5845
5845
  type TypescriptEslintOnlyThrowError = []|[{
5846
5846
 
5847
+ allow?: (string | {
5848
+ from: "file"
5849
+ name: (string | [string, ...(string)[]])
5850
+ path?: string
5851
+ } | {
5852
+ from: "lib"
5853
+ name: (string | [string, ...(string)[]])
5854
+ } | {
5855
+ from: "package"
5856
+ name: (string | [string, ...(string)[]])
5857
+ package: string
5858
+ })[]
5859
+
5847
5860
  allowThrowingAny?: boolean
5848
5861
 
5849
5862
  allowThrowingUnknown?: boolean
@@ -5897,6 +5910,8 @@ type TypescriptEslintPreferNullishCoalescing = []|[{
5897
5910
 
5898
5911
  allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean
5899
5912
 
5913
+ ignoreBooleanCoercion?: boolean
5914
+
5900
5915
  ignoreConditionalTests?: boolean
5901
5916
 
5902
5917
  ignoreMixedLogicalExpressions?: boolean
@@ -9913,20 +9928,23 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
9913
9928
  };
9914
9929
  rules: {
9915
9930
  "import-x/consistent-type-specifier-style": ["error", "prefer-top-level"];
9931
+ "import-x/extensions": ["error", "never", {
9932
+ checkTypedImports: boolean;
9933
+ }];
9916
9934
  "import-x/first": "error";
9917
9935
  "import-x/namespace": "off";
9918
9936
  "import-x/newline-after-import": "error";
9919
9937
  "import-x/no-absolute-path": "error";
9938
+ "import-x/no-duplicates": "error";
9920
9939
  "import-x/no-empty-named-blocks": "error";
9940
+ "import-x/no-named-as-default": "error";
9941
+ "import-x/no-named-as-default-member": "error";
9921
9942
  "import-x/no-self-import": "error";
9922
9943
  "import-x/no-useless-path-segments": "error";
9923
9944
  'import-x/no-unresolved': "error";
9924
9945
  'import-x/named': "error";
9925
9946
  'import-x/default': "error";
9926
9947
  'import-x/export': "error";
9927
- 'import-x/no-named-as-default': "warn";
9928
- 'import-x/no-named-as-default-member': "warn";
9929
- 'import-x/no-duplicates': "warn";
9930
9948
  };
9931
9949
  settings: {
9932
9950
  "import-x/parsers": {
@@ -10108,6 +10126,7 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
10108
10126
  CSSMatrixComponent: false;
10109
10127
  CSSMediaRule: false;
10110
10128
  CSSNamespaceRule: false;
10129
+ CSSNestedDeclarations: false;
10111
10130
  CSSNumericArray: false;
10112
10131
  CSSNumericValue: false;
10113
10132
  CSSPageDescriptors: false;
@@ -10408,7 +10427,6 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
10408
10427
  IntersectionObserver: false;
10409
10428
  IntersectionObserverEntry: false;
10410
10429
  isSecureContext: false;
10411
- Iterator: false;
10412
10430
  Keyboard: false;
10413
10431
  KeyboardEvent: false;
10414
10432
  KeyboardLayoutMap: false;
@@ -11483,12 +11501,12 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
11483
11501
  "react/checked-requires-onchange-or-readonly": "error";
11484
11502
  "react/default-props-match-prop-types": "error";
11485
11503
  "react/destructuring-assignment": "off";
11486
- "react/display-name": "error";
11487
11504
  "react/forbid-component-props": "off";
11488
11505
  "react/forbid-dom-props": "off";
11489
11506
  "react/forbid-elements": "off";
11490
11507
  "react/forbid-foreign-prop-types": "off";
11491
11508
  "react/forbid-prop-types": "off";
11509
+ "react/forward-ref-uses-ref": "error";
11492
11510
  "react/function-component-definition": "off";
11493
11511
  "react/hook-use-state": "error";
11494
11512
  "react/iframe-missing-sandbox": "error";
@@ -11497,53 +11515,36 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
11497
11515
  "react/jsx-filename-extension": "off";
11498
11516
  "react/jsx-fragments": ["error", "syntax"];
11499
11517
  "react/jsx-handler-names": "off";
11500
- "react/jsx-key": "error";
11501
11518
  "react/jsx-max-depth": "off";
11502
11519
  "react/jsx-no-bind": "off";
11503
- "react/jsx-no-comment-textnodes": "error";
11504
11520
  "react/jsx-no-constructed-context-values": "error";
11505
- "react/jsx-no-duplicate-props": "error";
11506
11521
  "react/jsx-no-leaked-render": "error";
11507
11522
  "react/jsx-no-literals": "off";
11508
11523
  "react/jsx-no-script-url": "error";
11509
- "react/jsx-no-target-blank": "error";
11510
- "react/jsx-no-undef": "error";
11511
11524
  "react/jsx-no-useless-fragment": "error";
11512
11525
  "react/jsx-one-expression-per-line": "off";
11513
11526
  "react/jsx-pascal-case": ["error", {
11514
11527
  allowNamespace: true;
11515
11528
  }];
11529
+ "react/jsx-props-no-spread-multi": "off";
11516
11530
  "react/jsx-props-no-spreading": "off";
11517
11531
  "react/jsx-sort-default-props": "off";
11518
11532
  "react/jsx-sort-props": "off";
11519
- "react/jsx-uses-react": "off";
11520
- "react/jsx-uses-vars": "error";
11521
11533
  "react/no-access-state-in-setstate": "error";
11522
11534
  "react/no-adjacent-inline-elements": "off";
11523
11535
  "react/no-array-index-key": "off";
11524
11536
  "react/no-arrow-function-lifecycle": "error";
11525
- "react/no-children-prop": "error";
11526
11537
  "react/no-danger": "off";
11527
- "react/no-danger-with-children": "error";
11528
- "react/no-deprecated": "error";
11529
11538
  "react/no-did-mount-set-state": "error";
11530
11539
  "react/no-did-update-set-state": "error";
11531
- "react/no-direct-mutation-state": "error";
11532
- "react/no-find-dom-node": "error";
11533
11540
  "react/no-invalid-html-attribute": "error";
11534
- "react/no-is-mounted": "error";
11535
11541
  "react/no-multi-comp": "off";
11536
11542
  "react/no-namespace": "error";
11537
- "react/no-object-type-as-default-prop": "off";
11543
+ "react/no-object-type-as-default-prop": "error";
11538
11544
  "react/no-redundant-should-component-update": "error";
11539
- "react/no-render-return-value": "error";
11540
11545
  "react/no-set-state": "off";
11541
- "react/no-string-refs": "error";
11542
11546
  "react/no-this-in-sfc": "error";
11543
11547
  "react/no-typos": "error";
11544
- "react/no-unescaped-entities": "error";
11545
- "react/no-unknown-property": "error";
11546
- "react/no-unsafe": "off";
11547
11548
  "react/no-unstable-nested-components": "error";
11548
11549
  "react/no-unused-class-component-methods": "error";
11549
11550
  "react/no-unused-prop-types": "error";
@@ -11553,11 +11554,8 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
11553
11554
  "react/prefer-exact-props": "off";
11554
11555
  "react/prefer-read-only-props": "off";
11555
11556
  "react/prefer-stateless-function": "off";
11556
- "react/prop-types": "error";
11557
- "react/react-in-jsx-scope": "off";
11558
11557
  "react/require-default-props": "off";
11559
11558
  "react/require-optimization": "off";
11560
- "react/require-render-return": "error";
11561
11559
  "react/self-closing-comp": "error";
11562
11560
  "react/sort-comp": "off";
11563
11561
  "react/sort-default-props": "off";
@@ -11702,7 +11700,7 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
11702
11700
  allowImplicit: true;
11703
11701
  }];
11704
11702
  "arrow-body-style": ["error", "always"];
11705
- curly: ["error", "multi-or-nest", "consistent"];
11703
+ curly: ["error", "all"];
11706
11704
  "no-console": "warn";
11707
11705
  "no-useless-rename": "error";
11708
11706
  "object-shorthand": "error";
package/dist/index.d.mts CHANGED
@@ -5844,6 +5844,19 @@ type TypescriptEslintNoVarRequires = []|[{
5844
5844
  // ----- @typescript-eslint/only-throw-error -----
5845
5845
  type TypescriptEslintOnlyThrowError = []|[{
5846
5846
 
5847
+ allow?: (string | {
5848
+ from: "file"
5849
+ name: (string | [string, ...(string)[]])
5850
+ path?: string
5851
+ } | {
5852
+ from: "lib"
5853
+ name: (string | [string, ...(string)[]])
5854
+ } | {
5855
+ from: "package"
5856
+ name: (string | [string, ...(string)[]])
5857
+ package: string
5858
+ })[]
5859
+
5847
5860
  allowThrowingAny?: boolean
5848
5861
 
5849
5862
  allowThrowingUnknown?: boolean
@@ -5897,6 +5910,8 @@ type TypescriptEslintPreferNullishCoalescing = []|[{
5897
5910
 
5898
5911
  allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean
5899
5912
 
5913
+ ignoreBooleanCoercion?: boolean
5914
+
5900
5915
  ignoreConditionalTests?: boolean
5901
5916
 
5902
5917
  ignoreMixedLogicalExpressions?: boolean
@@ -9913,20 +9928,23 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
9913
9928
  };
9914
9929
  rules: {
9915
9930
  "import-x/consistent-type-specifier-style": ["error", "prefer-top-level"];
9931
+ "import-x/extensions": ["error", "never", {
9932
+ checkTypedImports: boolean;
9933
+ }];
9916
9934
  "import-x/first": "error";
9917
9935
  "import-x/namespace": "off";
9918
9936
  "import-x/newline-after-import": "error";
9919
9937
  "import-x/no-absolute-path": "error";
9938
+ "import-x/no-duplicates": "error";
9920
9939
  "import-x/no-empty-named-blocks": "error";
9940
+ "import-x/no-named-as-default": "error";
9941
+ "import-x/no-named-as-default-member": "error";
9921
9942
  "import-x/no-self-import": "error";
9922
9943
  "import-x/no-useless-path-segments": "error";
9923
9944
  'import-x/no-unresolved': "error";
9924
9945
  'import-x/named': "error";
9925
9946
  'import-x/default': "error";
9926
9947
  'import-x/export': "error";
9927
- 'import-x/no-named-as-default': "warn";
9928
- 'import-x/no-named-as-default-member': "warn";
9929
- 'import-x/no-duplicates': "warn";
9930
9948
  };
9931
9949
  settings: {
9932
9950
  "import-x/parsers": {
@@ -10108,6 +10126,7 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
10108
10126
  CSSMatrixComponent: false;
10109
10127
  CSSMediaRule: false;
10110
10128
  CSSNamespaceRule: false;
10129
+ CSSNestedDeclarations: false;
10111
10130
  CSSNumericArray: false;
10112
10131
  CSSNumericValue: false;
10113
10132
  CSSPageDescriptors: false;
@@ -10408,7 +10427,6 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
10408
10427
  IntersectionObserver: false;
10409
10428
  IntersectionObserverEntry: false;
10410
10429
  isSecureContext: false;
10411
- Iterator: false;
10412
10430
  Keyboard: false;
10413
10431
  KeyboardEvent: false;
10414
10432
  KeyboardLayoutMap: false;
@@ -11483,12 +11501,12 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
11483
11501
  "react/checked-requires-onchange-or-readonly": "error";
11484
11502
  "react/default-props-match-prop-types": "error";
11485
11503
  "react/destructuring-assignment": "off";
11486
- "react/display-name": "error";
11487
11504
  "react/forbid-component-props": "off";
11488
11505
  "react/forbid-dom-props": "off";
11489
11506
  "react/forbid-elements": "off";
11490
11507
  "react/forbid-foreign-prop-types": "off";
11491
11508
  "react/forbid-prop-types": "off";
11509
+ "react/forward-ref-uses-ref": "error";
11492
11510
  "react/function-component-definition": "off";
11493
11511
  "react/hook-use-state": "error";
11494
11512
  "react/iframe-missing-sandbox": "error";
@@ -11497,53 +11515,36 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
11497
11515
  "react/jsx-filename-extension": "off";
11498
11516
  "react/jsx-fragments": ["error", "syntax"];
11499
11517
  "react/jsx-handler-names": "off";
11500
- "react/jsx-key": "error";
11501
11518
  "react/jsx-max-depth": "off";
11502
11519
  "react/jsx-no-bind": "off";
11503
- "react/jsx-no-comment-textnodes": "error";
11504
11520
  "react/jsx-no-constructed-context-values": "error";
11505
- "react/jsx-no-duplicate-props": "error";
11506
11521
  "react/jsx-no-leaked-render": "error";
11507
11522
  "react/jsx-no-literals": "off";
11508
11523
  "react/jsx-no-script-url": "error";
11509
- "react/jsx-no-target-blank": "error";
11510
- "react/jsx-no-undef": "error";
11511
11524
  "react/jsx-no-useless-fragment": "error";
11512
11525
  "react/jsx-one-expression-per-line": "off";
11513
11526
  "react/jsx-pascal-case": ["error", {
11514
11527
  allowNamespace: true;
11515
11528
  }];
11529
+ "react/jsx-props-no-spread-multi": "off";
11516
11530
  "react/jsx-props-no-spreading": "off";
11517
11531
  "react/jsx-sort-default-props": "off";
11518
11532
  "react/jsx-sort-props": "off";
11519
- "react/jsx-uses-react": "off";
11520
- "react/jsx-uses-vars": "error";
11521
11533
  "react/no-access-state-in-setstate": "error";
11522
11534
  "react/no-adjacent-inline-elements": "off";
11523
11535
  "react/no-array-index-key": "off";
11524
11536
  "react/no-arrow-function-lifecycle": "error";
11525
- "react/no-children-prop": "error";
11526
11537
  "react/no-danger": "off";
11527
- "react/no-danger-with-children": "error";
11528
- "react/no-deprecated": "error";
11529
11538
  "react/no-did-mount-set-state": "error";
11530
11539
  "react/no-did-update-set-state": "error";
11531
- "react/no-direct-mutation-state": "error";
11532
- "react/no-find-dom-node": "error";
11533
11540
  "react/no-invalid-html-attribute": "error";
11534
- "react/no-is-mounted": "error";
11535
11541
  "react/no-multi-comp": "off";
11536
11542
  "react/no-namespace": "error";
11537
- "react/no-object-type-as-default-prop": "off";
11543
+ "react/no-object-type-as-default-prop": "error";
11538
11544
  "react/no-redundant-should-component-update": "error";
11539
- "react/no-render-return-value": "error";
11540
11545
  "react/no-set-state": "off";
11541
- "react/no-string-refs": "error";
11542
11546
  "react/no-this-in-sfc": "error";
11543
11547
  "react/no-typos": "error";
11544
- "react/no-unescaped-entities": "error";
11545
- "react/no-unknown-property": "error";
11546
- "react/no-unsafe": "off";
11547
11548
  "react/no-unstable-nested-components": "error";
11548
11549
  "react/no-unused-class-component-methods": "error";
11549
11550
  "react/no-unused-prop-types": "error";
@@ -11553,11 +11554,8 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
11553
11554
  "react/prefer-exact-props": "off";
11554
11555
  "react/prefer-read-only-props": "off";
11555
11556
  "react/prefer-stateless-function": "off";
11556
- "react/prop-types": "error";
11557
- "react/react-in-jsx-scope": "off";
11558
11557
  "react/require-default-props": "off";
11559
11558
  "react/require-optimization": "off";
11560
- "react/require-render-return": "error";
11561
11559
  "react/self-closing-comp": "error";
11562
11560
  "react/sort-comp": "off";
11563
11561
  "react/sort-default-props": "off";
@@ -11702,7 +11700,7 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
11702
11700
  allowImplicit: true;
11703
11701
  }];
11704
11702
  "arrow-body-style": ["error", "always"];
11705
- curly: ["error", "multi-or-nest", "consistent"];
11703
+ curly: ["error", "all"];
11706
11704
  "no-console": "warn";
11707
11705
  "no-useless-rename": "error";
11708
11706
  "object-shorthand": "error";
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- var G=Object.defineProperty;var r=(e,t)=>G(e,"name",{value:t,configurable:!0});import A from"eslint-config-prettier";import*as B from"astro-eslint-parser";import I from"eslint-plugin-astro";import f from"eslint-plugin-jsx-a11y";import d from"globals";import{parser as $,configs as m,config as F}from"typescript-eslint";import x from"@eslint-community/eslint-plugin-eslint-comments/configs";import c from"eslint-plugin-import-x";import h from"eslint-plugin-n";import b from"eslint-plugin-perfectionist";import N from"@tanstack/eslint-plugin-query";import P from"eslint-plugin-react";import J from"eslint-plugin-react-hooks";import*as V from"eslint-plugin-react-refresh";import{isPackageExists as n}from"local-pkg";import i from"eslint-plugin-jest";import*as k from"eslint-plugin-jest-dom";import v from"eslint-plugin-testing-library";import w from"eslint-plugin-unicorn";import X from"@eslint/js";const o="?([cm])[jt]s?(x)",U=["**/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","**/*.gen.*","!.storybook"],H="**/*.?([cm])js",y="**/*.?([cm])jsx",C="**/*.?([cm])tsx",l=[`**/__tests__/**/*.${o}`,`**/*.spec.${o}`,`**/*.test.${o}`,`**/*.bench.${o}`,`**/*.benchmark.${o}`],O=[`**/e2e/**/*.spec.${o}`,`**/e2e/**/*.test.${o}`,`**/cypress/**/*.spec.${o}`,`**/cypress/**/*.test.${o}`],M="**/*.cjs",Q="**/*.astro",W=["vi.mock"],Y=["@testing-library/react"],z=r(()=>{const e=[Q];return[{files:e,languageOptions:{globals:{...d.node,Astro:!1,Fragment:!1},parser:B,parserOptions:{extraFileExtensions:[".astro"],parser:$},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:I,"jsx-a11y":f},processor:"astro/client-side-ts",rules:{...f.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-exports-from-components":"off","astro/no-unused-define-vars-in-style":"error","astro/valid-compile":"error"}},{files:e,...m.disableTypeChecked,name:"jimmy.codes/astro/disable-type-checked"},{name:"jimmy.codes/astro/imports",settings:{"import-x/core-modules":["astro:content"]}}]},"astroConfig"),D=r(()=>[{files:[M],languageOptions:{globals:d.commonjs},name:"jimmy.codes/commonjs"}],"commonjsConfig"),K={...x.recommended.rules,"@eslint-community/eslint-comments/no-unused-disable":"off","@eslint-community/eslint-comments/require-description":"error"},Z=r(()=>[{...x.recommended,name:"jimmy.codes/eslint-comments",rules:K}],"eslintCommentsConfig"),ee={...c.configs.recommended.rules,"import-x/consistent-type-specifier-style":["error","prefer-top-level"],"import-x/first":"error","import-x/namespace":"off","import-x/newline-after-import":"error","import-x/no-absolute-path":"error","import-x/no-empty-named-blocks":"error","import-x/no-self-import":"error","import-x/no-useless-path-segments":"error"},re={name:"jimmy.codes/imports/typescript",rules:c.configs.typescript.rules,settings:{...c.configs.typescript.settings,"import-x/resolver":{...c.configs.typescript.settings["import-x/resolver"],typescript:!0}}},te=r(({typescript:e=!1}={})=>[{languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},name:"jimmy.codes/imports",plugins:{"import-x":c,n:h},rules:ee,settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}}},...e?[re]:[]],"importsConfig"),oe={"n/no-process-exit":"off","n/prefer-node-protocol":"error"},se=r(()=>[{name:"jimmy.codes/node",plugins:{n:h},rules:oe}],"nodeConfig"),ne={...b.configs["recommended-natural"].rules,"perfectionist/sort-imports":["error",{customGroups:{type:{},value:{}},environment:"node",groups:["builtin","type","external","internal-type","internal",["parent-type","sibling-type","index-type"],["parent","sibling","index"],"object","unknown"],internalPattern:["~/**","@/**"],order:"asc",type:"natural"}]},ce=r(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:b},rules:ne}],"perfectionistConfig"),ie=r(()=>n("typescript"),"hasTypescript"),ae=r(()=>n("react"),"hasReact"),T=r(()=>n("vitest"),"hasVitest"),_=r(()=>n("jest"),"hasJest"),pe=r(()=>T()||_(),"hasTesting"),fe=r(()=>Y.some(e=>n(e)),"hasTestingLibrary"),me=r(()=>n("@tanstack/react-query"),"hasReactQuery"),le=r(()=>n("astro"),"hasAstro"),ue={...f.configs.recommended.rules,"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/display-name":"error","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-curly-brace-presence":"error","react/jsx-filename-extension":"off","react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":"off","react/jsx-key":"error","react/jsx-max-depth":"off","react/jsx-no-bind":"off","react/jsx-no-comment-textnodes":"error","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":"error","react/jsx-no-leaked-render":"error","react/jsx-no-literals":"off","react/jsx-no-script-url":"error","react/jsx-no-target-blank":"error","react/jsx-no-undef":"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/jsx-uses-react":"off","react/jsx-uses-vars":"error","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-children-prop":"error","react/no-danger":"off","react/no-danger-with-children":"error","react/no-deprecated":"error","react/no-did-mount-set-state":"error","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"error","react/no-find-dom-node":"error","react/no-invalid-html-attribute":"error","react/no-is-mounted":"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-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"error","react/no-this-in-sfc":"error","react/no-typos":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","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/prop-types":"error","react/react-in-jsx-scope":"off","react/require-default-props":"off","react/require-optimization":"off","react/require-render-return":"error","react/self-closing-comp":"error","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","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-refresh/only-export-components":["warn",{allowConstantExport:!0}]},de=r(({utilities:e=[]}={},t=!0)=>{const s=e.includes("@tanstack/query")||t&&me();return[{files:[y,C],languageOptions:{globals:{...d.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":f,react:P,"react-hooks":J,"react-refresh":V},rules:ue,settings:{react:{version:"detect"}}},...s?[{files:[y,C],name:"jimmy.codes/react/query",plugins:{"@tanstack/query":N},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]:[]]},"reactConfig"),q={...i.configs["flat/recommended"].rules,...i.configs["flat/style"].rules,"jest/consistent-test-it":["error",{fn:"test",withinDescribe:"it"}],"jest/no-alias-methods":"error","jest/no-commented-out-tests":"error","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"},ye=r(()=>[{files:l,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":k,"testing-library":v},rules:{...v.configs.react.rules,...k.configs["flat/recommended"].rules}},{files:O,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),ge=r(({framework:e="vitest",utilities:t}={},s=!0)=>{const u=s?T():e==="vitest",a=e==="jest"||s&&_(),p=!!t?.includes("testing-library")||s&&fe();return[{files:l,name:"jimmy.codes/testing",...i.configs["flat/recommended"]},...u?[{files:l,name:"jimmy.codes/testing/vitest",...i.configs["flat/recommended"],rules:{...q,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:W}]}}]:[],...a?[{files:l,name:"jimmy.codes/testing/jest",...i.configs["flat/recommended"],rules:q}]:[],{files:O,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...p?ye():[]]},"testingConfig"),je=r(e=>F(...m.strictTypeChecked,...m.stylisticTypeChecked.filter(t=>t.name==="typescript-eslint/stylistic-type-checked"),{languageOptions:{parserOptions:{project:e.project,tsconfigRootDir:process.cwd()}},name:"jimmy.codes/typescript",rules:{"@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!1}],"@typescript-eslint/consistent-type-imports":["error",{fixStyle:"separate-type-imports"}],"@typescript-eslint/no-deprecated":"warn","@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:{attributes:!1}}],"@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0}]}},{files:[H,y],...m.disableTypeChecked}),"typescriptConfig"),xe={...w.configs["flat/recommended"].rules,"unicorn/filename-case":"off","unicorn/import-style":"off","unicorn/no-abusive-eslint-disable":"off","unicorn/no-anonymous-default-export":"off","unicorn/no-array-callback-reference":"off","unicorn/no-array-reduce":"off","unicorn/no-null":"off","unicorn/no-process-exit":"off","unicorn/no-useless-undefined":["error",{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-node-protocol":"off","unicorn/prevent-abbreviations":"off"},he=r(()=>[{...w.configs["flat/recommended"],name:"jimmy.codes/unicorn",rules:xe}],"unicornConfig"),be={...X.configs.recommended.rules,"array-callback-return":["error",{allowImplicit:!0}],"arrow-body-style":["error","always"],curly:["error","multi-or-nest","consistent"],"no-console":"warn","no-useless-rename":"error","object-shorthand":"error","prefer-arrow-callback":"error"},ke=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),ve=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),we=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),Ce=r(({astro:e=!1,autoDetect:t=!0,configs:s=[],ignores:u=[],react:a=!1,testing:p=!1,typescript:g=!1}={},...R)=>{const j=g||t&&ie(),E=a||t&&ae(),L=p||t&&pe(),S=e||t&&le();return[{linterOptions:{reportUnusedDisableDirectives:!0},name:"jimmy.codes/base",rules:be},...ce(),...se(),...he(),...Z(),...te({typescript:j}),...j?je(ke(g)):[],...E?de(we(a),t):[],...S?z():[],...L?ge(ve(p),t):[],{name:"jimmy.codes/prettier",...A},...D(),{ignores:[...U,...u],name:"jimmy.codes/ignores"},...s,...R]},"jimmyDotCodes");export{Ce as default};
1
+ var B=Object.defineProperty;var r=(e,t)=>B(e,"name",{value:t,configurable:!0});import I from"eslint-config-prettier";import*as $ from"astro-eslint-parser";import P from"eslint-plugin-astro";import f from"eslint-plugin-jsx-a11y";import d from"globals";import{parser as F,configs as m,config as N}from"typescript-eslint";import b from"@eslint-community/eslint-plugin-eslint-comments/configs";import i from"eslint-plugin-import-x";import h from"eslint-plugin-n";import k from"eslint-plugin-perfectionist";import J from"@tanstack/eslint-plugin-query";import y from"eslint-plugin-react";import V from"eslint-plugin-react-hooks";import*as X from"eslint-plugin-react-refresh";import{isPackageExists as n}from"local-pkg";import c from"eslint-plugin-jest";import*as v from"eslint-plugin-jest-dom";import O from"eslint-plugin-testing-library";import w from"eslint-plugin-unicorn";import U from"@eslint/js";const s="?([cm])[jt]s?(x)",z=["**/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","**/.vinxi","**/app.config.timestamp_*.js","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts","**/vite.config.ts.*.mjs","**/*.gen.*","!.storybook"],H="**/*.?([cm])js",g="**/*.?([cm])jsx",C="**/*.?([cm])tsx",l=[`**/__tests__/**/*.${s}`,`**/*.spec.${s}`,`**/*.test.${s}`,`**/*.bench.${s}`,`**/*.benchmark.${s}`],T=[`**/e2e/**/*.spec.${s}`,`**/e2e/**/*.test.${s}`,`**/cypress/**/*.spec.${s}`,`**/cypress/**/*.test.${s}`],M="**/*.cjs",Q="**/*.astro",W=["vi.mock","describe","expect","it"],Y=["@testing-library/react"],D=r(()=>{const e=[Q];return[{files:e,languageOptions:{globals:{...d.node,Astro:!1,Fragment:!1},parser:$,parserOptions:{extraFileExtensions:[".astro"],parser:F},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:P,"jsx-a11y":f},processor:"astro/client-side-ts",rules:{...f.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-exports-from-components":"off","astro/no-unused-define-vars-in-style":"error","astro/valid-compile":"error"}},{files:e,...m.disableTypeChecked,name:"jimmy.codes/astro/disable-type-checked"},{name:"jimmy.codes/astro/imports",settings:{"import-x/core-modules":["astro:content"]}}]},"astroConfig"),K=r(()=>[{files:[M],languageOptions:{globals:d.commonjs},name:"jimmy.codes/commonjs"}],"commonjsConfig"),Z={...b.recommended.rules,"@eslint-community/eslint-comments/no-unused-disable":"off","@eslint-community/eslint-comments/require-description":"error"},ee=r(()=>[{...b.recommended,name:"jimmy.codes/eslint-comments",rules:Z}],"eslintCommentsConfig"),re={...i.configs.recommended.rules,"import-x/consistent-type-specifier-style":["error","prefer-top-level"],"import-x/extensions":["error","never",{checkTypedImports:!0}],"import-x/first":"error","import-x/namespace":"off","import-x/newline-after-import":"error","import-x/no-absolute-path":"error","import-x/no-duplicates":"error","import-x/no-empty-named-blocks":"error","import-x/no-named-as-default":"error","import-x/no-named-as-default-member":"error","import-x/no-self-import":"error","import-x/no-useless-path-segments":"error"},te={name:"jimmy.codes/imports/typescript",rules:i.configs.typescript.rules,settings:{...i.configs.typescript.settings,"import-x/resolver":{...i.configs.typescript.settings["import-x/resolver"],typescript:!0}}},oe=r(({typescript:e=!1}={})=>[{languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},name:"jimmy.codes/imports",plugins:{"import-x":i,n:h},rules:re,settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}}},...e?[te]:[]],"importsConfig"),se={"n/no-process-exit":"off","n/prefer-node-protocol":"error"},ne=r(()=>[{name:"jimmy.codes/node",plugins:{n:h},rules:se}],"nodeConfig"),ie={...k.configs["recommended-natural"].rules,"perfectionist/sort-imports":["error",{customGroups:{type:{},value:{}},environment:"node",groups:["builtin","type","external","internal-type","internal",["parent-type","sibling-type","index-type"],["parent","sibling","index"],"object","unknown"],internalPattern:["~/**","@/**"],order:"asc",type:"natural"}]},ce=r(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:k},rules:ie}],"perfectionistConfig"),ae=r(()=>n("typescript"),"hasTypescript"),pe=r(()=>n("react"),"hasReact"),_=r(()=>n("vitest"),"hasVitest"),R=r(()=>n("jest"),"hasJest"),fe=r(()=>_()||R(),"hasTesting"),me=r(()=>Y.some(e=>n(e)),"hasTestingLibrary"),le=r(()=>n("@tanstack/react-query"),"hasReactQuery"),ue=r(()=>n("astro"),"hasAstro"),de=r(e=>e===2?"error":e===1?"warn":"off","toStringSeverity"),q=r((e={})=>Object.fromEntries(Object.entries(e).map(([t,o])=>[t,typeof o=="number"?de(o):o])),"normalizeRuleEntries"),ye={...f.configs.recommended.rules,...q(y.configs.flat?.recommended?.rules),...q(y.configs.flat?.["jsx-runtime"]?.rules),"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/forward-ref-uses-ref":"error","react/function-component-definition":"off","react/hook-use-state":"error","react/iframe-missing-sandbox":"error","react/jsx-boolean-value":["error","never"],"react/jsx-curly-brace-presence":"error","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-spread-multi":"off","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":"error","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/self-closing-comp":"error","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","react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react-refresh/only-export-components":["warn",{allowConstantExport:!0}]},ge=r(({utilities:e=[]}={},t=!0)=>{const o=e.includes("@tanstack/query")||t&&le();return[{files:[g,C],languageOptions:{globals:{...d.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":f,react:y,"react-hooks":V,"react-refresh":X},rules:ye,settings:{react:{version:"detect"}}},...o?[{files:[g,C],name:"jimmy.codes/react/query",plugins:{"@tanstack/query":J},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]:[]]},"reactConfig"),E={...c.configs["flat/recommended"].rules,...c.configs["flat/style"].rules,"jest/consistent-test-it":["error",{fn:"test",withinDescribe:"it"}],"jest/no-alias-methods":"error","jest/no-commented-out-tests":"error","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"},je=r(()=>[{files:l,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":v,"testing-library":O},rules:{...O.configs.react.rules,...v.configs["flat/recommended"].rules}},{files:T,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),xe=r(({framework:e="vitest",utilities:t}={},o=!0)=>{const u=o?_():e==="vitest",a=e==="jest"||o&&R(),p=!!t?.includes("testing-library")||o&&me();return[{files:l,name:"jimmy.codes/testing",...c.configs["flat/recommended"]},...u?[{files:l,name:"jimmy.codes/testing/vitest",...c.configs["flat/recommended"],rules:{...E,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:W}]}}]:[],...a?[{files:l,name:"jimmy.codes/testing/jest",...c.configs["flat/recommended"],rules:E}]:[],{files:T,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...p?je():[]]},"testingConfig"),be=r(e=>N(...m.strictTypeChecked,...m.stylisticTypeChecked.filter(t=>t.name==="typescript-eslint/stylistic-type-checked"),{languageOptions:{parserOptions:{project:e.project,tsconfigRootDir:process.cwd()}},name:"jimmy.codes/typescript",rules:{"@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!1}],"@typescript-eslint/consistent-type-imports":["error",{fixStyle:"separate-type-imports"}],"@typescript-eslint/no-deprecated":"warn","@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:{attributes:!1}}],"@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0}]}},{files:[H,g],...m.disableTypeChecked}),"typescriptConfig"),he={...w.configs["flat/recommended"].rules,"unicorn/filename-case":"off","unicorn/import-style":"off","unicorn/no-abusive-eslint-disable":"off","unicorn/no-anonymous-default-export":"off","unicorn/no-array-callback-reference":"off","unicorn/no-array-reduce":"off","unicorn/no-null":"off","unicorn/no-process-exit":"off","unicorn/no-useless-undefined":["error",{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-node-protocol":"off","unicorn/prevent-abbreviations":"off"},ke=r(()=>[{...w.configs["flat/recommended"],name:"jimmy.codes/unicorn",rules:he}],"unicornConfig"),ve={...U.configs.recommended.rules,"array-callback-return":["error",{allowImplicit:!0}],"arrow-body-style":["error","always"],curly:["error","all"],"no-console":"warn","no-useless-rename":"error","object-shorthand":"error","prefer-arrow-callback":"error"},Oe=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),we=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),Ce=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),Te=r(({astro:e=!1,autoDetect:t=!0,configs:o=[],ignores:u=[],react:a=!1,testing:p=!1,typescript:j=!1}={},...L)=>{const x=j||t&&ae(),S=a||t&&pe(),G=p||t&&fe(),A=e||t&&ue();return[{linterOptions:{reportUnusedDisableDirectives:!0},name:"jimmy.codes/base",rules:ve},...ce(),...ne(),...ke(),...ee(),...oe({typescript:x}),...x?be(Oe(j)):[],...S?ge(Ce(a),t):[],...A?D():[],...G?xe(we(p),t):[],{name:"jimmy.codes/prettier",...I},...K(),{ignores:[...z,...u],name:"jimmy.codes/ignores"},...o,...L]},"jimmyDotCodes");export{Te as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "3.4.2",
3
+ "version": "3.6.0",
4
4
  "description": "another opinionated eslint config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -35,8 +35,8 @@
35
35
  "@eslint/js": "^9.14.0",
36
36
  "@tanstack/eslint-plugin-query": "^5.59.7",
37
37
  "@types/eslint": "9.6.1",
38
- "@typescript-eslint/parser": "^8.12.2",
39
- "@typescript-eslint/utils": "^8.12.2",
38
+ "@typescript-eslint/parser": "^8.13.0",
39
+ "@typescript-eslint/utils": "^8.13.0",
40
40
  "astro-eslint-parser": "^1.0.3",
41
41
  "eslint-config-prettier": "^9.1.0",
42
42
  "eslint-import-resolver-typescript": "^3.6.3",
@@ -52,9 +52,9 @@
52
52
  "eslint-plugin-react-refresh": "0.4.14",
53
53
  "eslint-plugin-testing-library": "7.0.0-beta.4",
54
54
  "eslint-plugin-unicorn": "^56.0.0",
55
- "globals": "^15.11.0",
55
+ "globals": "^15.12.0",
56
56
  "local-pkg": "0.5.0",
57
- "typescript-eslint": "^8.12.2"
57
+ "typescript-eslint": "^8.13.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "eslint": "^9.10.0"