@jimmy.codes/eslint-config 1.12.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -23
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1003 -1051
- package/dist/index.d.mts +1003 -1051
- package/dist/index.mjs +1 -1
- package/package.json +10 -8
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var C=Object.defineProperty;var r=(e,o)=>C(e,"name",{value:o,configurable:!0});import q 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*as 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}`],X="**/*.cjs",P="**/*.astro",Q=["vi.mock"],H=["@testing-library/react"],M=r(()=>{const e=[P];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:[X],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(()=>H.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:Q}]}}]:[],...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}]}},{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):[],..._?M():[],...w?ae(fe(s),n):[],{name:"jimmy.codes/disabled",...q},...W(),{ignores:J},...d]},"jimmyDotCodes");export{le as default};
|
|
1
|
+
var E=Object.defineProperty;var r=(e,o)=>E(e,"name",{value:o,configurable:!0});import L from"eslint-config-prettier";import*as R from"astro-eslint-parser";import S from"eslint-plugin-astro";import f from"eslint-plugin-jsx-a11y";import u from"globals";import{parser as G,configs as c,config as A}from"typescript-eslint";import i from"eslint-plugin-import-x";import B from"eslint-plugin-node-import";import I from"eslint-plugin-simple-import-sort";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 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 V from"@eslint/js";const t="?([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",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}`],H="**/*.cjs",M="**/*.astro",Q=["vi.mock"],W=["@testing-library/react"],Y=r(()=>{const e=[M];return[{files:e,name:"jimmy.codes/astro",plugins:{astro:S,"jsx-a11y":f},languageOptions:{globals:{...u.node,Astro:!1,Fragment:!1},parser:R,sourceType:"module",parserOptions:{parser:G,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"),z=r(()=>[{name:"jimmy.codes/commonjs",files:[H],languageOptions:{globals:u.commonjs}}],"commonjsConfig"),U={...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"},K={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},Z=r(({typescript:e=!1}={})=>[{name:"jimmy.codes/imports",plugins:{"import-x":i,"simple-import-sort":I,"node-import":B},settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}},languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},rules:U},...e?[K]:[]],"importsConfig"),D=r(()=>a("typescript"),"hasTypescript"),ee=r(()=>a("react"),"hasReact"),k=r(()=>a("vitest"),"hasVitest"),v=r(()=>a("jest"),"hasJest"),re=r(()=>k()||v(),"hasTesting"),te=r(()=>W.some(e=>a(e)),"hasTestingLibrary"),oe=r(()=>a("@tanstack/react-query"),"hasReactQuery"),se=r(()=>a("astro"),"hasAstro"),ne={...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"},ae=r(({utilities:e=[]}={},o=!0)=>{const s=e.includes("@tanstack/query")||o&&oe();return[{name:"jimmy.codes/react",files:[y,h],plugins:{react:N,"react-hooks":F,"jsx-a11y":f,"react-refresh":J},languageOptions:{parserOptions:{jsxPragma:null,ecmaFeatures:{jsx:!0}},globals:{...u.browser}},settings:{react:{version:"detect"}},rules:ne},...s?[{name:"jimmy.codes/react/query",files:[y,h],plugins:{"@tanstack/query":$},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"},ce=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"),ie=r(({framework:e="vitest",utilities:o}={},s=!0)=>{const l=s?k():e==="vitest",n=e==="jest"||s&&v(),d=!!o?.includes("testing-library")||s&&te();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:Q}]}}]:[],...n?[{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"}},...d?ce():[]]},"testingConfig"),pe=r(e=>A(...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:[X,y],...c.disableTypeChecked}),"typescriptConfig"),fe={...V.configs.recommended.rules,curly:["error","multi-or-nest","consistent"],"arrow-body-style":["error","always"],"object-shorthand":"error","no-useless-rename":"error","prefer-arrow-callback":"error","no-console":"warn"},me=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),le=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),de=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),ue=r(({typescript:e=!1,react:o=!1,testing:s=!1,astro:l=!1,autoDetect:n=!0,configs:d=[],ignores:T=[]}={},...w)=>{const j=e||n&&D(),_=o||n&&ee(),q=s||n&&re(),C=l||n&&se();return[{name:"jimmy.codes/base",rules:fe},...Z({typescript:j}),...j?pe(me(e)):[],..._?ae(de(o),n):[],...C?Y():[],...q?ie(le(s),n):[],{name:"jimmy.codes/disabled",...L},...z(),{name:"jimmy.codes/ignores",ignores:[...P,...T]},...d,...w]},"jimmyDotCodes");export{ue as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "another opinionated eslint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
],
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "https://github.com/jimmy-guzman/eslint-config.git"
|
|
12
|
+
"url": "git+https://github.com/jimmy-guzman/eslint-config.git"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"sideEffects": false,
|
|
@@ -31,10 +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
|
-
"@
|
|
37
|
-
"@
|
|
36
|
+
"@types/eslint": "9.6.1",
|
|
37
|
+
"@types/eslint__js": "8.42.3",
|
|
38
|
+
"@typescript-eslint/parser": "^8.12.2",
|
|
39
|
+
"@typescript-eslint/utils": "^8.12.2",
|
|
38
40
|
"astro-eslint-parser": "^1.0.3",
|
|
39
41
|
"eslint-config-prettier": "^9.1.0",
|
|
40
42
|
"eslint-import-resolver-typescript": "^3.6.3",
|
|
@@ -48,13 +50,13 @@
|
|
|
48
50
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
49
51
|
"eslint-plugin-react-refresh": "0.4.14",
|
|
50
52
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
51
|
-
"eslint-plugin-testing-library": "
|
|
53
|
+
"eslint-plugin-testing-library": "7.0.0-beta.4",
|
|
52
54
|
"globals": "^15.11.0",
|
|
53
55
|
"local-pkg": "0.5.0",
|
|
54
|
-
"typescript-eslint": "^
|
|
56
|
+
"typescript-eslint": "^8.12.2"
|
|
55
57
|
},
|
|
56
58
|
"peerDependencies": {
|
|
57
|
-
"eslint": "^
|
|
59
|
+
"eslint": "^9.10.0"
|
|
58
60
|
},
|
|
59
61
|
"engines": {
|
|
60
62
|
"node": ">= 20"
|