@jimmy.codes/eslint-config 3.2.4 → 3.3.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.mjs CHANGED
@@ -1 +1 @@
1
- var R=Object.defineProperty;var r=(e,t)=>R(e,"name",{value:t,configurable:!0});import S from"eslint-config-prettier";import*as G from"astro-eslint-parser";import A from"eslint-plugin-astro";import f from"eslint-plugin-jsx-a11y";import d from"globals";import{parser as B,configs as l,config as $}from"typescript-eslint";import a from"eslint-plugin-import-x";import x from"eslint-plugin-n";import h from"eslint-plugin-perfectionist";import I from"@tanstack/eslint-plugin-query";import N from"eslint-plugin-react";import F from"eslint-plugin-react-hooks";import*as P from"eslint-plugin-react-refresh";import{isPackageExists as n}from"local-pkg";import c from"eslint-plugin-jest";import*as b from"eslint-plugin-jest-dom";import k from"eslint-plugin-testing-library";import J from"@eslint/js";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",y="**/*.?([cm])jsx",v="**/*.?([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}`],H="**/*.cjs",M="**/*.astro",Q=["vi.mock"],W=["@testing-library/react"],Y=r(()=>{const e=[M];return[{files:e,languageOptions:{globals:{...d.node,Astro:!1,Fragment:!1},parser:G,parserOptions:{extraFileExtensions:[".astro"],parser:B},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:A,"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,...l.disableTypeChecked,name:"jimmy.codes/astro/disable-type-checked"},{name:"jimmy.codes/astro/imports",settings:{"import-x/core-modules":["astro:content"]}}]},"astroConfig"),z=r(()=>[{files:[H],languageOptions:{globals:d.commonjs},name:"jimmy.codes/commonjs"}],"commonjsConfig"),U={...a.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"},K={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}}},Z=r(({typescript:e=!1}={})=>[{languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},name:"jimmy.codes/imports",plugins:{"import-x":a,n:x},rules:U,settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}}},...e?[K]:[]],"importsConfig"),D={"n/prefer-node-protocol":"error"},ee=r(()=>[{name:"jimmy.codes/node",plugins:{n:x},rules:D}],"nodeConfig"),re={...h.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"}]},te=r(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:h},rules:re}],"perfectionistConfig"),oe=r(()=>n("typescript"),"hasTypescript"),se=r(()=>n("react"),"hasReact"),O=r(()=>n("vitest"),"hasVitest"),T=r(()=>n("jest"),"hasJest"),ne=r(()=>O()||T(),"hasTesting"),ae=r(()=>W.some(e=>n(e)),"hasTestingLibrary"),ce=r(()=>n("@tanstack/react-query"),"hasReactQuery"),ie=r(()=>n("astro"),"hasAstro"),pe={...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}]},fe=r(({utilities:e=[]}={},t=!0)=>{const s=e.includes("@tanstack/query")||t&&ce();return[{files:[y,v],languageOptions:{globals:{...d.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":f,react:N,"react-hooks":F,"react-refresh":P},rules:pe,settings:{react:{version:"detect"}}},...s?[{files:[y,v],name:"jimmy.codes/react/query",plugins:{"@tanstack/query":I},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]:[]]},"reactConfig"),_={...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"},le=r(()=>[{files:m,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":b,"testing-library":k},rules:{...k.configs.react.rules,...b.configs["flat/recommended"].rules}},{files:w,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),me=r(({framework:e="vitest",utilities:t}={},s=!0)=>{const u=s?O():e==="vitest",i=e==="jest"||s&&T(),p=!!t?.includes("testing-library")||s&&ae();return[{files:m,name:"jimmy.codes/testing",...c.configs["flat/recommended"]},...u?[{files:m,name:"jimmy.codes/testing/vitest",...c.configs["flat/recommended"],rules:{..._,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:Q}]}}]:[],...i?[{files:m,name:"jimmy.codes/testing/jest",...c.configs["flat/recommended"],rules:_}]:[],{files:w,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...p?le():[]]},"testingConfig"),ue=r(e=>$(...l.strictTypeChecked,...l.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:[X,y],...l.disableTypeChecked}),"typescriptConfig"),de={...J.configs.recommended.rules,"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"},ye=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),je=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),ge=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),xe=r(({astro:e=!1,autoDetect:t=!0,configs:s=[],ignores:u=[],react:i=!1,testing:p=!1,typescript:j=!1}={},...C)=>{const g=j||t&&oe(),q=i||t&&se(),E=p||t&&ne(),L=e||t&&ie();return[{name:"jimmy.codes/base",rules:de},...te(),...ee(),...Z({typescript:g}),...g?ue(ye(j)):[],...q?fe(ge(i),t):[],...L?Y():[],...E?me(je(p),t):[],{name:"jimmy.codes/disabled",...S},...z(),{ignores:[...V,...u],name:"jimmy.codes/ignores"},...s,...C]},"jimmyDotCodes");export{xe as default};
1
+ var S=Object.defineProperty;var r=(e,t)=>S(e,"name",{value:t,configurable:!0});import G from"eslint-config-prettier";import*as A from"astro-eslint-parser";import B from"eslint-plugin-astro";import f from"eslint-plugin-jsx-a11y";import d from"globals";import{parser as I,configs as l,config as $}from"typescript-eslint";import c from"eslint-plugin-import-x";import x from"eslint-plugin-n";import h from"eslint-plugin-perfectionist";import F from"@tanstack/eslint-plugin-query";import N from"eslint-plugin-react";import P from"eslint-plugin-react-hooks";import*as J from"eslint-plugin-react-refresh";import{isPackageExists as n}from"local-pkg";import a from"eslint-plugin-jest";import*as b from"eslint-plugin-jest-dom";import k from"eslint-plugin-testing-library";import v from"eslint-plugin-unicorn";import V from"@eslint/js";const o="?([cm])[jt]s?(x)",X=["**/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"],H="**/*.?([cm])js",y="**/*.?([cm])jsx",w="**/*.?([cm])tsx",m=[`**/__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",U=["vi.mock"],W=["@testing-library/react"],Y=r(()=>{const e=[Q];return[{files:e,languageOptions:{globals:{...d.node,Astro:!1,Fragment:!1},parser:A,parserOptions:{extraFileExtensions:[".astro"],parser:I},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:B,"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,...l.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"),K={...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"},Z={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}}},D=r(({typescript:e=!1}={})=>[{languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},name:"jimmy.codes/imports",plugins:{"import-x":c,n:x},rules:K,settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}}},...e?[Z]:[]],"importsConfig"),ee={"n/no-process-exit":"off","n/prefer-node-protocol":"error"},re=r(()=>[{name:"jimmy.codes/node",plugins:{n:x},rules:ee}],"nodeConfig"),te={...h.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"}]},oe=r(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:h},rules:te}],"perfectionistConfig"),se=r(()=>n("typescript"),"hasTypescript"),ne=r(()=>n("react"),"hasReact"),T=r(()=>n("vitest"),"hasVitest"),C=r(()=>n("jest"),"hasJest"),ce=r(()=>T()||C(),"hasTesting"),ae=r(()=>W.some(e=>n(e)),"hasTestingLibrary"),ie=r(()=>n("@tanstack/react-query"),"hasReactQuery"),pe=r(()=>n("astro"),"hasAstro"),fe={...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}]},le=r(({utilities:e=[]}={},t=!0)=>{const s=e.includes("@tanstack/query")||t&&ie();return[{files:[y,w],languageOptions:{globals:{...d.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":f,react:N,"react-hooks":P,"react-refresh":J},rules:fe,settings:{react:{version:"detect"}}},...s?[{files:[y,w],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"),_={...a.configs["flat/recommended"].rules,...a.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"},me=r(()=>[{files:m,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":b,"testing-library":k},rules:{...k.configs.react.rules,...b.configs["flat/recommended"].rules}},{files:O,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),ue=r(({framework:e="vitest",utilities:t}={},s=!0)=>{const u=s?T():e==="vitest",i=e==="jest"||s&&C(),p=!!t?.includes("testing-library")||s&&ae();return[{files:m,name:"jimmy.codes/testing",...a.configs["flat/recommended"]},...u?[{files:m,name:"jimmy.codes/testing/vitest",...a.configs["flat/recommended"],rules:{..._,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:U}]}}]:[],...i?[{files:m,name:"jimmy.codes/testing/jest",...a.configs["flat/recommended"],rules:_}]:[],{files:O,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...p?me():[]]},"testingConfig"),de=r(e=>$(...l.strictTypeChecked,...l.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],...l.disableTypeChecked}),"typescriptConfig"),ye={...v.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"},ge=r(()=>[{...v.configs["flat/recommended"],name:"jimmy.codes/unicorn",rules:ye}],"unicornConfig"),je={...V.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"},xe=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),he=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),be=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),ke=r(({astro:e=!1,autoDetect:t=!0,configs:s=[],ignores:u=[],react:i=!1,testing:p=!1,typescript:g=!1}={},...q)=>{const j=g||t&&se(),R=i||t&&ne(),E=p||t&&ce(),L=e||t&&pe();return[{name:"jimmy.codes/base",rules:je},...oe(),...re(),...ge(),...D({typescript:j}),...j?de(xe(g)):[],...R?le(be(i),t):[],...L?Y():[],...E?ue(he(p),t):[],{name:"jimmy.codes/disabled",...G},...z(),{ignores:[...X,...u],name:"jimmy.codes/ignores"},...s,...q]},"jimmyDotCodes");export{ke as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "3.2.4",
3
+ "version": "3.3.0",
4
4
  "description": "another opinionated eslint config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -50,6 +50,7 @@
50
50
  "eslint-plugin-react-hooks": "^5.0.0",
51
51
  "eslint-plugin-react-refresh": "0.4.14",
52
52
  "eslint-plugin-testing-library": "7.0.0-beta.4",
53
+ "eslint-plugin-unicorn": "^56.0.0",
53
54
  "globals": "^15.11.0",
54
55
  "local-pkg": "0.5.0",
55
56
  "typescript-eslint": "^8.12.2"