@jimmy.codes/eslint-config 3.2.2 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +472 -7
- package/dist/index.d.mts +472 -7
- package/dist/index.mjs +1 -1
- package/package.json +3 -4
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var L=Object.defineProperty;var r=(e,t)=>L(e,"name",{value:t,configurable:!0});import R from"eslint-config-prettier";import*as S from"astro-eslint-parser";import G from"eslint-plugin-astro";import f from"eslint-plugin-jsx-a11y";import u from"globals";import{parser as A,configs as m,config as B}from"typescript-eslint";import a from"eslint-plugin-import-x";import I from"eslint-plugin-node-import";import x from"eslint-plugin-perfectionist";import $ from"@tanstack/eslint-plugin-query";import N from"eslint-plugin-react";import F from"eslint-plugin-react-hooks";import*as J from"eslint-plugin-react-refresh";import{isPackageExists as n}from"local-pkg";import c from"eslint-plugin-jest";import*as h from"eslint-plugin-jest-dom";import b from"eslint-plugin-testing-library";import P 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",k="**/*.?([cm])tsx",l=[`**/__tests__/**/*.${o}`,`**/*.spec.${o}`,`**/*.test.${o}`,`**/*.bench.${o}`,`**/*.benchmark.${o}`],v=[`**/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:{...u.node,Astro:!1,Fragment:!1},parser:S,parserOptions:{extraFileExtensions:[".astro"],parser:A},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:G,"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"),z=r(()=>[{files:[H],languageOptions:{globals:u.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","node-import/prefer-node-protocol":"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,"node-import":I},rules:U,settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}}},...e?[K]:[]],"importsConfig"),D={...x.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"}]},ee=r(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:x},rules:D}],"perfectionistConfig"),re=r(()=>n("typescript"),"hasTypescript"),te=r(()=>n("react"),"hasReact"),w=r(()=>n("vitest"),"hasVitest"),O=r(()=>n("jest"),"hasJest"),oe=r(()=>w()||O(),"hasTesting"),se=r(()=>W.some(e=>n(e)),"hasTestingLibrary"),ne=r(()=>n("@tanstack/react-query"),"hasReactQuery"),ae=r(()=>n("astro"),"hasAstro"),ce={...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}]},ie=r(({utilities:e=[]}={},t=!0)=>{const s=e.includes("@tanstack/query")||t&&ne();return[{files:[y,k],languageOptions:{globals:{...u.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":f,react:N,"react-hooks":F,"react-refresh":J},rules:ce,settings:{react:{version:"detect"}}},...s?[{files:[y,k],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={...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"},pe=r(()=>[{files:l,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":h,"testing-library":b},rules:{...b.configs.react.rules,...h.configs["flat/recommended"].rules}},{files:v,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),fe=r(({framework:e="vitest",utilities:t}={},s=!0)=>{const d=s?w():e==="vitest",i=e==="jest"||s&&O(),p=!!t?.includes("testing-library")||s&&se();return[{files:l,name:"jimmy.codes/testing",...c.configs["flat/recommended"]},...d?[{files:l,name:"jimmy.codes/testing/vitest",...c.configs["flat/recommended"],rules:{...T,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:Q}]}}]:[],...i?[{files:l,name:"jimmy.codes/testing/jest",...c.configs["flat/recommended"],rules:T}]:[],{files:v,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...p?pe():[]]},"testingConfig"),me=r(e=>B(...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:[X,y],...m.disableTypeChecked}),"typescriptConfig"),le={...P.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"},de=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),ue=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),ye=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),je=r(({astro:e=!1,autoDetect:t=!0,configs:s=[],ignores:d=[],react:i=!1,testing:p=!1,typescript:j=!1}={},..._)=>{const g=j||t&&re(),q=i||t&&te(),C=p||t&&oe(),E=e||t&&ae();return[{name:"jimmy.codes/base",rules:le},...ee(),...Z({typescript:g}),...g?me(de(j)):[],...q?ie(ye(i),t):[],...E?Y():[],...C?fe(ue(p),t):[],{name:"jimmy.codes/disabled",...R},...z(),{ignores:[...V,...d],name:"jimmy.codes/ignores"},...s,..._]},"jimmyDotCodes");export{je as default};
|
|
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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"description": "another opinionated eslint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -31,10 +31,9 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@eslint/js": "^9.
|
|
34
|
+
"@eslint/js": "^9.14.0",
|
|
35
35
|
"@tanstack/eslint-plugin-query": "^5.59.7",
|
|
36
36
|
"@types/eslint": "9.6.1",
|
|
37
|
-
"@types/eslint__js": "8.42.3",
|
|
38
37
|
"@typescript-eslint/parser": "^8.12.2",
|
|
39
38
|
"@typescript-eslint/utils": "^8.12.2",
|
|
40
39
|
"astro-eslint-parser": "^1.0.3",
|
|
@@ -45,7 +44,7 @@
|
|
|
45
44
|
"eslint-plugin-jest": "^28.8.3",
|
|
46
45
|
"eslint-plugin-jest-dom": "^5.4.0",
|
|
47
46
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
48
|
-
"eslint-plugin-
|
|
47
|
+
"eslint-plugin-n": "^17.12.0",
|
|
49
48
|
"eslint-plugin-perfectionist": "^3.9.1",
|
|
50
49
|
"eslint-plugin-react": "^7.37.2",
|
|
51
50
|
"eslint-plugin-react-hooks": "^5.0.0",
|