@jimmy.codes/eslint-config 2.0.0 → 3.1.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/README.md +35 -23
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1693 -728
- package/dist/index.d.mts +1693 -728
- package/dist/index.mjs +1 -1
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var q=Object.defineProperty;var r=(e,o)=>q(e,"name",{value:o,configurable:!0});import C from"eslint-config-prettier";import*as E from"astro-eslint-parser";import L from"eslint-plugin-astro";import f from"eslint-plugin-jsx-a11y";import u from"globals";import{parser as R,configs as c,config as S}from"typescript-eslint";import i from"eslint-plugin-import-x";import G from"eslint-plugin-node-import";import A from"eslint-plugin-simple-import-sort";import B from"@tanstack/eslint-plugin-query";import I from"eslint-plugin-react";import $ from"eslint-plugin-react-hooks";import*as N from"eslint-plugin-react-refresh";import{isPackageExists as a}from"local-pkg";import p from"eslint-plugin-jest";import*as g from"eslint-plugin-jest-dom";import x from"eslint-plugin-testing-library";import F from"@eslint/js";const t="?([cm])[jt]s?(x)",J=["**/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"],V="**/*.?([cm])js",y="**/*.?([cm])jsx",h="**/*.?([cm])tsx",m=[`**/__tests__/**/*.${t}`,`**/*.spec.${t}`,`**/*.test.${t}`,`**/*.bench.${t}`,`**/*.benchmark.${t}`],b=[`**/e2e/**/*.spec.${t}`,`**/e2e/**/*.test.${t}`,`**/cypress/**/*.spec.${t}`,`**/cypress/**/*.test.${t}`],P="**/*.cjs",X="**/*.astro",H=["vi.mock"],M=["@testing-library/react"],Q=r(()=>{const e=[X];return[{files:e,name:"jimmy.codes/astro",plugins:{astro:L,"jsx-a11y":f},languageOptions:{globals:{...u.node,Astro:!1,Fragment:!1},parser:E,sourceType:"module",parserOptions:{parser:R,extraFileExtensions:[".astro"]}},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-unused-define-vars-in-style":"error","astro/valid-compile":"error","astro/no-exports-from-components":"off"}},{files:e,...c.disableTypeChecked,name:"jimmy.codes/astro/disable-type-checked"},{settings:{"import-x/core-modules":["astro:content"]},name:"jimmy.codes/astro/imports"}]},"astroConfig"),W=r(()=>[{name:"jimmy.codes/commonjs",files:[P],languageOptions:{globals:u.commonjs}}],"commonjsConfig"),Y={...i.configs.recommended.rules,"import-x/namespace":"off","import-x/newline-after-import":"error","import-x/first":"error","import-x/no-absolute-path":"error","import-x/no-useless-path-segments":"error","import-x/no-empty-named-blocks":"error","import-x/no-self-import":"error","simple-import-sort/imports":"error","simple-import-sort/exports":"error","node-import/prefer-node-protocol":"error"},z={name:"jimmy.codes/imports/typescript",settings:{...i.configs.typescript.settings,"import-x/resolver":{...i.configs.typescript.settings["import-x/resolver"],typescript:!0}},rules:i.configs.typescript.rules},U=r(({typescript:e=!1}={})=>[{name:"jimmy.codes/imports",plugins:{"import-x":i,"simple-import-sort":A,"node-import":G},settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}},languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},rules:Y},...e?[z]:[]],"importsConfig"),K=r(()=>a("typescript"),"hasTypescript"),Z=r(()=>a("react"),"hasReact"),k=r(()=>a("vitest"),"hasVitest"),v=r(()=>a("jest"),"hasJest"),D=r(()=>k()||v(),"hasTesting"),ee=r(()=>M.some(e=>a(e)),"hasTestingLibrary"),re=r(()=>a("@tanstack/react-query"),"hasReactQuery"),te=r(()=>a("astro"),"hasAstro"),oe={...f.configs.recommended.rules,"react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error","react/display-name":"error","react/jsx-key":"error","react/jsx-no-comment-textnodes":"error","react/jsx-no-duplicate-props":"error","react/jsx-no-target-blank":"error","react/jsx-no-undef":"error","react/jsx-uses-vars":"error","react/no-children-prop":"error","react/no-danger-with-children":"error","react/no-deprecated":"error","react/no-direct-mutation-state":"error","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-render-return-value":"error","react/no-string-refs":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/prop-types":"error","react/require-render-return":"error","react/react-in-jsx-scope":"off","react/jsx-uses-react":"off","react-refresh/only-export-components":["warn",{allowConstantExport:!0}],"react/self-closing-comp":"error","react/jsx-curly-brace-presence":"error","react/boolean-prop-naming":"off","react/button-has-type":"error","react/checked-requires-onchange-or-readonly":"error","react/default-props-match-prop-types":"error","react/destructuring-assignment":"off","react/forbid-component-props":"off","react/forbid-dom-props":"off","react/forbid-elements":"off","react/forbid-foreign-prop-types":"off","react/forbid-prop-types":"off","react/function-component-definition":"off","react/hook-use-state":"error","react/iframe-missing-sandbox":"error","react/jsx-boolean-value":["error","never"],"react/jsx-filename-extension":"off","react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":"off","react/jsx-max-depth":"off","react/jsx-no-bind":"off","react/jsx-no-constructed-context-values":"error","react/jsx-no-leaked-render":"error","react/jsx-no-literals":"off","react/jsx-no-script-url":"error","react/jsx-no-useless-fragment":"error","react/jsx-one-expression-per-line":"off","react/jsx-pascal-case":["error",{allowNamespace:!0}],"react/jsx-props-no-spreading":"off","react/jsx-sort-default-props":"off","react/jsx-sort-props":"off","react/no-access-state-in-setstate":"error","react/no-adjacent-inline-elements":"off","react/no-array-index-key":"off","react/no-arrow-function-lifecycle":"error","react/no-danger":"off","react/no-did-mount-set-state":"error","react/no-did-update-set-state":"error","react/no-invalid-html-attribute":"error","react/no-multi-comp":"off","react/no-namespace":"error","react/no-object-type-as-default-prop":"off","react/no-redundant-should-component-update":"error","react/no-set-state":"off","react/no-this-in-sfc":"error","react/no-typos":"error","react/no-unstable-nested-components":"error","react/no-unused-class-component-methods":"error","react/no-unused-prop-types":"error","react/no-unused-state":"error","react/no-will-update-set-state":"error","react/prefer-es6-class":"off","react/prefer-exact-props":"off","react/prefer-read-only-props":"off","react/prefer-stateless-function":"off","react/require-default-props":"off","react/require-optimization":"off","react/sort-comp":"off","react/sort-default-props":"off","react/sort-prop-types":"off","react/state-in-constructor":"off","react/static-property-placement":"off","react/style-prop-object":"error","react/void-dom-elements-no-children":"error"},se=r(({utilities:e=[]}={},o=!1)=>{const s=e.includes("@tanstack/query")||o&&re();return[{name:"jimmy.codes/react",files:[y,h],plugins:{react:I,"react-hooks":$,"jsx-a11y":f,"react-refresh":N},languageOptions:{parserOptions:{jsxPragma:null,ecmaFeatures:{jsx:!0}},globals:{...u.browser}},settings:{react:{version:"detect"}},rules:oe},...s?[{name:"jimmy.codes/react/query",files:[y,h],plugins:{"@tanstack/query":B},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]:[]]},"reactConfig"),O={...p.configs["flat/recommended"].rules,...p.configs["flat/style"].rules,"jest/no-alias-methods":"error","jest/no-commented-out-tests":"error","jest/consistent-test-it":["error",{fn:"test",withinDescribe:"it"}],"jest/no-conditional-in-test":"error","jest/no-confusing-set-timeout":"error","jest/no-duplicate-hooks":"error","jest/no-hooks":"off","jest/no-large-snapshots":"off","jest/no-restricted-jest-methods":"off","jest/no-restricted-matchers":"off","jest/no-test-return-statement":"error","jest/no-untyped-mock-factory":"off","jest/prefer-called-with":"error","jest/prefer-comparison-matcher":"error","jest/prefer-each":"error","jest/prefer-equality-matcher":"error","jest/prefer-expect-assertions":"off","jest/prefer-expect-resolves":"error","jest/prefer-hooks-in-order":"error","jest/prefer-hooks-on-top":"error","jest/prefer-lowercase-title":"off","jest/prefer-mock-promise-shorthand":"error","jest/prefer-snapshot-hint":"error","jest/prefer-spy-on":"off","jest/prefer-strict-equal":"error","jest/prefer-todo":"warn","jest/require-hook":"error","jest/require-to-throw-message":"error","jest/require-top-level-describe":"off","jest/unbound-method":"off"},ne=r(()=>[{name:"jimmy.codes/testing/testing-library",files:m,plugins:{"testing-library":x,"jest-dom":g},rules:{...x.configs.react.rules,...g.configs["flat/recommended"].rules}},{name:"jimmy.codes/testing/testing-library/disabled",files:b,rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),ae=r(({framework:e="vitest",utilities:o}={},s=!1)=>{const l=s?k():e==="vitest",d=e==="jest"||s&&v(),n=!!o?.includes("testing-library")||s&&ee();return[{name:"jimmy.codes/testing",files:m,...p.configs["flat/recommended"]},...l?[{name:"jimmy.codes/testing/vitest",files:m,...p.configs["flat/recommended"],rules:{...O,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:H}]}}]:[],...d?[{name:"jimmy.codes/testing/jest",files:m,...p.configs["flat/recommended"],rules:O}]:[],{name:"jimmy.codes/testing/disabled",files:b,rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...n?ne():[]]},"testingConfig"),ce=r(e=>S(...c.strictTypeChecked,{name:"jimmy.codes/typescript",extends:[...c.strictTypeChecked,...c.stylisticTypeChecked],languageOptions:{parserOptions:{project:e.project,tsconfigRootDir:process.cwd()}},rules:{"@typescript-eslint/consistent-type-imports":["error",{fixStyle:"inline-type-imports"}],"@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!0}],"@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:{attributes:!1}}],"@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0}],"@typescript-eslint/no-deprecated":"warn"}},{files:[V,y],...c.disableTypeChecked}),"typescriptConfig"),ie={...F.configs.recommended.rules,curly:["error","multi-or-nest","consistent"],"arrow-body-style":["error","always"],"object-shorthand":"error","no-useless-rename":"error","prefer-arrow-callback":"error","no-console":"warn"},pe=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),fe=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),me=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),le=r(({typescript:e=!1,react:o=!1,testing:s=!1,astro:l=!1,overrides:d=[],autoDetect:n=!1}={})=>{const j=e||n&&K(),T=o||n&&Z(),w=s||n&&D(),_=l||n&&te();return[{name:"jimmy.codes/base",rules:ie},...U({typescript:j}),...j?ce(pe(e)):[],...T?se(me(o),n):[],..._?Q():[],...w?ae(fe(s),n):[],{name:"jimmy.codes/disabled",...C},...W(),{ignores:J},...d]},"jimmyDotCodes");export{le as default};
|
|
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 m from"eslint-plugin-jsx-a11y";import u from"globals";import{parser as A,configs as a,config as B}from"typescript-eslint";import c 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 i from"eslint-plugin-jest";import*as h from"eslint-plugin-jest-dom";import b from"eslint-plugin-testing-library";import V from"@eslint/js";const o="?([cm])[jt]s?(x)",P=["**/node_modules","**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/bun.lockb","**/output","**/coverage","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/.vitepress/cache","**/.nuxt","**/.next","**/.vercel","**/.changeset","**/.idea","**/.cache","**/.output","**/.vite-inspect","**/.yarn","**/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":m},processor:"astro/client-side-ts",rules:{...m.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.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={...c.configs.recommended.rules,"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:c.configs.typescript.rules,settings:{...c.configs.typescript.settings,"import-x/resolver":{...c.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":c,"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"],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={...m.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":m,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={...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"},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",p=e==="jest"||s&&O(),f=!!t?.includes("testing-library")||s&&se();return[{files:l,name:"jimmy.codes/testing",...i.configs["flat/recommended"]},...d?[{files:l,name:"jimmy.codes/testing/vitest",...i.configs["flat/recommended"],rules:{...T,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:Q}]}}]:[],...p?[{files:l,name:"jimmy.codes/testing/jest",...i.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"}},...f?pe():[]]},"testingConfig"),me=r(e=>B(...a.strictTypeChecked,{extends:[...a.strictTypeChecked,...a.stylisticTypeChecked],languageOptions:{parserOptions:{project:e.project,tsconfigRootDir:process.cwd()}},name:"jimmy.codes/typescript",rules:{"@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!0}],"@typescript-eslint/consistent-type-imports":["error",{fixStyle:"inline-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],...a.disableTypeChecked}),"typescriptConfig"),le={...V.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:p=!1,testing:f=!1,typescript:j=!1}={},..._)=>{const g=j||t&&re(),C=p||t&&te(),q=f||t&&oe(),E=e||t&&ae();return[{name:"jimmy.codes/base",rules:le},...ee(),...Z({typescript:g}),...g?me(de(j)):[],...C?ie(ye(p),t):[],...E?Y():[],...q?fe(ue(f),t):[],{name:"jimmy.codes/disabled",...R},...z(),{ignores:[...P,...d],name:"jimmy.codes/ignores"},...s,..._]},"jimmyDotCodes");export{je as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "another opinionated eslint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@eslint/js": "^
|
|
34
|
+
"@eslint/js": "^9.13.0",
|
|
35
35
|
"@tanstack/eslint-plugin-query": "^5.59.7",
|
|
36
|
-
"@types/eslint": "
|
|
36
|
+
"@types/eslint": "9.6.1",
|
|
37
37
|
"@types/eslint__js": "8.42.3",
|
|
38
|
-
"@typescript-eslint/utils": "^8.12.2",
|
|
39
38
|
"@typescript-eslint/parser": "^8.12.2",
|
|
39
|
+
"@typescript-eslint/utils": "^8.12.2",
|
|
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",
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"eslint-plugin-jest-dom": "^5.4.0",
|
|
47
47
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
48
48
|
"eslint-plugin-node-import": "^1.0.4",
|
|
49
|
+
"eslint-plugin-perfectionist": "^3.9.1",
|
|
49
50
|
"eslint-plugin-react": "^7.37.2",
|
|
50
51
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
51
52
|
"eslint-plugin-react-refresh": "0.4.14",
|
|
52
|
-
"eslint-plugin-
|
|
53
|
-
"eslint-plugin-testing-library": "^6.4.0",
|
|
53
|
+
"eslint-plugin-testing-library": "7.0.0-beta.4",
|
|
54
54
|
"globals": "^15.11.0",
|
|
55
55
|
"local-pkg": "0.5.0",
|
|
56
56
|
"typescript-eslint": "^8.12.2"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"eslint": "^
|
|
59
|
+
"eslint": "^9.10.0"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">= 20"
|