@jimmy.codes/eslint-config 1.10.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +551 -90
- package/dist/index.d.mts +551 -90
- package/dist/index.mjs +1 -1
- package/package.json +11 -11
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":{rules:f.rules}},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":{rules:f.rules},"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 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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "another opinionated eslint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -32,23 +32,23 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@eslint/js": "^8.57.0",
|
|
35
|
-
"@tanstack/eslint-plugin-query": "^5.
|
|
35
|
+
"@tanstack/eslint-plugin-query": "^5.59.7",
|
|
36
36
|
"@typescript-eslint/utils": "^7.6.0",
|
|
37
37
|
"@typescript-eslint/parser": "^7.6.0",
|
|
38
|
-
"astro-eslint-parser": "^1.0.
|
|
38
|
+
"astro-eslint-parser": "^1.0.3",
|
|
39
39
|
"eslint-config-prettier": "^9.1.0",
|
|
40
|
-
"eslint-import-resolver-typescript": "^3.6.
|
|
41
|
-
"eslint-plugin-astro": "^1.
|
|
40
|
+
"eslint-import-resolver-typescript": "^3.6.3",
|
|
41
|
+
"eslint-plugin-astro": "^1.3.0",
|
|
42
42
|
"eslint-plugin-import-x": "^4.4.0",
|
|
43
|
-
"eslint-plugin-jest": "^28.
|
|
43
|
+
"eslint-plugin-jest": "^28.8.3",
|
|
44
44
|
"eslint-plugin-jest-dom": "^5.4.0",
|
|
45
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
45
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
46
46
|
"eslint-plugin-node-import": "^1.0.4",
|
|
47
|
-
"eslint-plugin-react": "^7.
|
|
48
|
-
"eslint-plugin-react-hooks": "^
|
|
47
|
+
"eslint-plugin-react": "^7.37.2",
|
|
48
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
49
49
|
"eslint-plugin-react-refresh": "0.4.14",
|
|
50
|
-
"eslint-plugin-simple-import-sort": "^12.1.
|
|
51
|
-
"eslint-plugin-testing-library": "^6.
|
|
50
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
51
|
+
"eslint-plugin-testing-library": "^6.4.0",
|
|
52
52
|
"globals": "^15.11.0",
|
|
53
53
|
"local-pkg": "0.5.0",
|
|
54
54
|
"typescript-eslint": "^7.6.0"
|