@jimmy.codes/eslint-config 3.7.2 → 3.8.1
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 +248 -17
- package/dist/index.d.mts +248 -17
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var B=Object.defineProperty;var r=(e,t)=>B(e,"name",{value:t,configurable:!0});var I=require("eslint-config-prettier"),$=require("astro-eslint-parser"),N=require("eslint-plugin-astro"),m=require("eslint-plugin-jsx-a11y"),d=require("globals"),a=require("typescript-eslint"),h=require("@eslint-community/eslint-plugin-eslint-comments/configs"),c=require("eslint-plugin-import-x"),v=require("eslint-plugin-n"),k=require("eslint-plugin-perfectionist"),F=require("@tanstack/eslint-plugin-query"),y=require("eslint-plugin-react"),J=require("eslint-plugin-react-hooks"),V=require("eslint-plugin-react-refresh"),n=require("local-pkg"),p=require("eslint-plugin-jest"),X=require("eslint-plugin-jest-dom"),q=require("eslint-plugin-testing-library"),O=require("eslint-plugin-unicorn"),z=require("@eslint/js");function g(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(s){if(s!=="default"){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:r(function(){return e[s]},"get")})}}),t.default=e,Object.freeze(t)}r(g,"_interopNamespaceDefault");var D=g($),U=g(V),_=g(X);const o="?([cm])[jt]s?(x)",H=["**/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","**/.vinxi","**/app.config.timestamp_*.js","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts","**/vite.config.ts.*.mjs","**/*.gen.*","!.storybook"],M="**/*.?([cm])js",j="**/*.?([cm])jsx",w="**/*.?([cm])tsx",f=[`**/__tests__/**/*.${o}`,`**/*.spec.${o}`,`**/*.test.${o}`,`**/*.bench.${o}`,`**/*.benchmark.${o}`],E=[`**/e2e/**/*.spec.${o}`,`**/e2e/**/*.test.${o}`,`**/cypress/**/*.spec.${o}`,`**/cypress/**/*.test.${o}`],Q="**/*.cjs",W="**/*.astro",Y=["vi.mock","describe","expect","it"],K=["@testing-library/react"],Z=r(()=>{const e=[W];return[{files:e,languageOptions:{globals:{...d.node,Astro:!1,Fragment:!1},parser:D,parserOptions:{extraFileExtensions:[".astro"],parser:a.parser},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:N,"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.configs.disableTypeChecked,name:"jimmy.codes/astro/disable-type-checked"},{name:"jimmy.codes/astro/imports",settings:{"import-x/core-modules":["astro:content"]}}]},"astroConfig"),ee=r(()=>[{files:[Q],languageOptions:{globals:d.commonjs},name:"jimmy.codes/commonjs"}],"commonjsConfig"),re={...h.recommended.rules,"@eslint-community/eslint-comments/no-unused-disable":"off","@eslint-community/eslint-comments/require-description":"error"},te=r(()=>[{...h.recommended,name:"jimmy.codes/eslint-comments",rules:re}],"eslintCommentsConfig"),se={...c.configs.recommended.rules,"import-x/consistent-type-specifier-style":["error","prefer-top-level"],"import-x/extensions":["error","never",{checkTypedImports:!0,svg:"always"}],"import-x/first":"error","import-x/namespace":"off","import-x/newline-after-import":"error","import-x/no-absolute-path":"error","import-x/no-duplicates":"error","import-x/no-empty-named-blocks":"error","import-x/no-named-as-default":"error","import-x/no-named-as-default-member":"error","import-x/no-self-import":"error","import-x/no-unresolved":["error",{ignore:[String.raw`\.svg$`]}],"import-x/no-useless-path-segments":"error"},oe={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}}},ne=r(({typescript:e=!1}={})=>[{languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},name:"jimmy.codes/imports",plugins:{"import-x":c,n:v},rules:se,settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}}},...e?[oe]:[]],"importsConfig"),ie={"n/no-process-exit":"off","n/prefer-node-protocol":"error"},ae=r(()=>[{name:"jimmy.codes/node",plugins:{n:v},rules:ie}],"nodeConfig"),ce={...k.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"}]},pe=r(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:k},rules:ce}],"perfectionistConfig"),fe=r(()=>n.isPackageExists("typescript"),"hasTypescript"),le=r(()=>n.isPackageExists("react"),"hasReact"),C=r(()=>n.isPackageExists("vitest"),"hasVitest"),T=r(()=>n.isPackageExists("jest"),"hasJest"),ue=r(()=>C()||T(),"hasTesting"),me=r(()=>K.some(e=>n.isPackageExists(e)),"hasTestingLibrary"),de=r(()=>n.isPackageExists("@tanstack/react-query"),"hasReactQuery"),ye=r(()=>n.isPackageExists("astro"),"hasAstro"),ge=r(e=>e===2?"error":e===1?"warn":"off","toStringSeverity"),R=r((e={})=>Object.fromEntries(Object.entries(e).map(([t,s])=>[t,typeof s=="number"?ge(s):s])),"normalizeRuleEntries"),je={...m.configs.recommended.rules,...R(y.configs.flat?.recommended?.rules),...R(y.configs.flat?.["jsx-runtime"]?.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/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/forward-ref-uses-ref":"error","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-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-spread-multi":"off","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":"error","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/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}]},xe=r(({utilities:e=[]}={},t=!0)=>{const s=e.includes("@tanstack/query")||t&&de();return[{files:[j,w],languageOptions:{globals:{...d.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":m,react:y,"react-hooks":J,"react-refresh":U},rules:je,settings:{react:{version:"detect"}}},...s?[{files:[j,w],name:"jimmy.codes/react/query",plugins:{"@tanstack/query":F},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]:[]]},"reactConfig"),L={...p.configs["flat/recommended"].rules,...p.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"},be=r(()=>[{files:f,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":_,"testing-library":q},rules:{...q.configs.react.rules,..._.configs["flat/recommended"].rules}},{files:E,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),he=r(({framework:e="vitest",utilities:t}={},s=!0)=>{const i=s?C():e==="vitest",l=e==="jest"||s&&T(),u=!!t?.includes("testing-library")||s&&me();return[{files:f,name:"jimmy.codes/testing",...p.configs["flat/recommended"]},...i?[{files:f,name:"jimmy.codes/testing/vitest",...p.configs["flat/recommended"],rules:{...L,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:Y}]}}]:[],...l?[{files:f,name:"jimmy.codes/testing/jest",...p.configs["flat/recommended"],rules:L}]:[],{files:E,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...u?be():[]]},"testingConfig"),ve=r(e=>a.config(...a.configs.strictTypeChecked,...a.configs.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:[M,j],...a.configs.disableTypeChecked},{files:f,name:"jimmy.codes/typescript/testing",rules:{"@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-unsafe-assignment":"off"}}),"typescriptConfig"),ke={...O.configs["flat/recommended"].rules,"unicorn/filename-case":"off","unicorn/import-style":"off","unicorn/no-abusive-eslint-disable":"off","unicorn/no-anonymous-default-export":"off","unicorn/no-array-callback-reference":"off","unicorn/no-array-reduce":"off","unicorn/no-null":"off","unicorn/no-process-exit":"off","unicorn/no-useless-undefined":["error",{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-node-protocol":"off","unicorn/prevent-abbreviations":"off"},qe=r(()=>[{...O.configs["flat/recommended"],name:"jimmy.codes/unicorn",rules:ke}],"unicornConfig"),Oe={...z.configs.recommended.rules,"array-callback-return":["error",{allowImplicit:!0}],"arrow-body-style":["error","always"],curly:["error","all"],"no-console":"warn","no-useless-rename":"error","object-shorthand":"error","prefer-arrow-callback":"error"},_e=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),we=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),Ee=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),Ce=r(({astro:e=!1,autoDetect:t=!0,configs:s=[],ignores:i=[],react:l=!1,testing:u=!1,typescript:x=!1}={},...S)=>{const b=x||t&&fe(),P=l||t&&le(),A=u||t&&ue(),G=e||t&&ye();return[{linterOptions:{reportUnusedDisableDirectives:!0},name:"jimmy.codes/base",rules:Oe},...pe(),...ae(),...qe(),...te(),...ne({typescript:b}),...b?ve(_e(x)):[],...P?xe(Ee(l),t):[],...G?Z():[],...A?he(we(u),t):[],{name:"jimmy.codes/prettier",...I},...ee(),{ignores:[...H,...i],name:"jimmy.codes/ignores"},...s,...S]},"jimmyDotCodes");module.exports=Ce;
|
|
1
|
+
"use strict";var B=Object.defineProperty;var r=(e,t)=>B(e,"name",{value:t,configurable:!0});var I=require("astro-eslint-parser"),N=require("eslint-plugin-astro"),m=require("eslint-plugin-jsx-a11y"),d=require("globals"),a=require("typescript-eslint"),h=require("@eslint-community/eslint-plugin-eslint-comments/configs"),c=require("eslint-plugin-import-x"),v=require("eslint-plugin-n"),$=require("@eslint/js"),k=require("eslint-plugin-perfectionist"),F=require("eslint-config-prettier"),J=require("@tanstack/eslint-plugin-query"),y=require("eslint-plugin-react"),V=require("eslint-plugin-react-hooks"),X=require("eslint-plugin-react-refresh"),n=require("local-pkg"),p=require("eslint-plugin-jest"),z=require("eslint-plugin-jest-dom"),q=require("eslint-plugin-testing-library"),O=require("eslint-plugin-unicorn");function g(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(s){if(s!=="default"){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:r(function(){return e[s]},"get")})}}),t.default=e,Object.freeze(t)}r(g,"_interopNamespaceDefault");var D=g(I),U=g(X),w=g(z);const o="?([cm])[jt]s?(x)",H=["**/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","**/.vinxi","**/app.config.timestamp_*.js","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts","**/vite.config.ts.*.mjs","**/*.gen.*","!.storybook"],M="**/*.?([cm])js",j="**/*.?([cm])jsx",E="**/*.?([cm])tsx",l=[`**/__tests__/**/*.${o}`,`**/*.spec.${o}`,`**/*.test.${o}`,`**/*.bench.${o}`,`**/*.benchmark.${o}`],_=[`**/e2e/**/*.spec.${o}`,`**/e2e/**/*.test.${o}`,`**/cypress/**/*.spec.${o}`,`**/cypress/**/*.test.${o}`],Q="**/*.cjs",W="**/*.astro",Y=["vi.mock","describe","expect","it"],K=["@testing-library/react"],Z=r(()=>{const e=[W];return[{files:e,languageOptions:{globals:{...d.node,Astro:!1,Fragment:!1},parser:D,parserOptions:{extraFileExtensions:[".astro"],parser:a.parser},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:N,"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,languageOptions:{parserOptions:a.configs.disableTypeChecked.languageOptions?.parserOptions},name:"jimmy.codes/astro/disable-type-checked",rules:a.configs.disableTypeChecked.rules},{name:"jimmy.codes/astro/imports",settings:{"import-x/core-modules":["astro:content"]}}]},"astroConfig"),ee=r(()=>[{files:[Q],languageOptions:{globals:d.commonjs},name:"jimmy.codes/commonjs"}],"commonjsConfig"),re={...h.recommended.rules,"@eslint-community/eslint-comments/no-unused-disable":"off","@eslint-community/eslint-comments/require-description":"error"},te=r(()=>[{...h.recommended,name:"jimmy.codes/eslint-comments",rules:re}],"eslintCommentsConfig"),se=r(e=>[{ignores:[...H,...e],name:"jimmy.codes/ignores"}],"ignoresConfig"),oe={...c.configs.recommended.rules,"import-x/consistent-type-specifier-style":["error","prefer-top-level"],"import-x/extensions":["error","never",{checkTypedImports:!0,svg:"always"}],"import-x/first":"error","import-x/namespace":"off","import-x/newline-after-import":"error","import-x/no-absolute-path":"error","import-x/no-duplicates":"error","import-x/no-empty-named-blocks":"error","import-x/no-named-as-default":"error","import-x/no-named-as-default-member":"error","import-x/no-self-import":"error","import-x/no-unresolved":["error",{ignore:[String.raw`\.svg$`]}],"import-x/no-useless-path-segments":"error"},ne={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}}},ie=r(({typescript:e=!1}={})=>[{languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},name:"jimmy.codes/imports",plugins:{"import-x":c,n:v},rules:oe,settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}}},...e?[ne]:[]],"importsConfig"),ae={...$.configs.recommended.rules,"array-callback-return":["error",{allowImplicit:!0}],"arrow-body-style":["error","always"],curly:["error","all"],"no-console":"warn","no-self-compare":"error","no-template-curly-in-string":"error","no-unmodified-loop-condition":"error","no-unreachable-loop":"error","no-use-before-define":["error",{allowNamedExports:!1,classes:!1,functions:!1,variables:!0}],"no-useless-rename":"error","object-shorthand":"error","prefer-arrow-callback":"error"},ce=r(()=>[{linterOptions:{reportUnusedDisableDirectives:!0},name:"jimmy.codes/javascript",rules:ae}],"javascriptConfig"),pe={"n/no-process-exit":"off","n/prefer-node-protocol":"error"},le=r(()=>[{name:"jimmy.codes/node",plugins:{n:v},rules:pe}],"nodeConfig"),fe={...k.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"}]},ue=r(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:k},rules:fe}],"perfectionistConfig"),me=r(()=>[{name:"jimmy.codes/prettier",...F}],"prettierConfig"),de=r(()=>n.isPackageExists("typescript"),"hasTypescript"),ye=r(()=>n.isPackageExists("react"),"hasReact"),C=r(()=>n.isPackageExists("vitest"),"hasVitest"),T=r(()=>n.isPackageExists("jest"),"hasJest"),ge=r(()=>C()||T(),"hasTesting"),je=r(()=>K.some(e=>n.isPackageExists(e)),"hasTestingLibrary"),xe=r(()=>n.isPackageExists("@tanstack/react-query"),"hasReactQuery"),be=r(()=>n.isPackageExists("astro"),"hasAstro"),he=r(e=>e===2?"error":e===1?"warn":"off","toStringSeverity"),R=r((e={})=>Object.fromEntries(Object.entries(e).map(([t,s])=>[t,typeof s=="number"?he(s):s])),"normalizeRuleEntries"),ve={...m.configs.recommended.rules,...R(y.configs.flat?.recommended?.rules),...R(y.configs.flat?.["jsx-runtime"]?.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/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/forward-ref-uses-ref":"error","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-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-spread-multi":"off","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":"error","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/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}]},ke=r(({utilities:e=[]}={},t=!0)=>{const s=e.includes("@tanstack/query")||t&&xe();return[{files:[j,E],languageOptions:{globals:{...d.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":m,react:y,"react-hooks":V,"react-refresh":U},rules:ve,settings:{react:{version:"detect"}}},...s?[{files:[j,E],name:"jimmy.codes/react/query",plugins:{"@tanstack/query":J},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]:[]]},"reactConfig"),L={...p.configs["flat/recommended"].rules,...p.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"},qe=r(()=>[{files:l,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":w,"testing-library":q},rules:{...q.configs.react.rules,...w.configs["flat/recommended"].rules}},{files:_,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),Oe=r(({framework:e="vitest",utilities:t}={},s=!0)=>{const i=s?C():e==="vitest",f=e==="jest"||s&&T(),u=!!t?.includes("testing-library")||s&&je();return[{files:l,name:"jimmy.codes/testing",...p.configs["flat/recommended"]},...i?[{files:l,name:"jimmy.codes/testing/vitest",...p.configs["flat/recommended"],rules:{...L,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:Y}]}}]:[],...f?[{files:l,name:"jimmy.codes/testing/jest",...p.configs["flat/recommended"],rules:L}]:[],{files:_,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...u?qe():[]]},"testingConfig"),we=r(e=>[...a.configs.strictTypeChecked,...a.configs.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/no-use-before-define":["error",{allowNamedExports:!1,classes:!1,functions:!1,variables:!0}],"@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0}],"no-use-before-define":"off"}},{files:[M,j],...a.configs.disableTypeChecked},{files:l,name:"jimmy.codes/typescript/testing",rules:{"@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-unsafe-assignment":"off"}}],"typescriptConfig"),Ee={...O.configs["flat/recommended"].rules,"unicorn/filename-case":"off","unicorn/import-style":"off","unicorn/no-abusive-eslint-disable":"off","unicorn/no-anonymous-default-export":"off","unicorn/no-array-callback-reference":"off","unicorn/no-array-reduce":"off","unicorn/no-null":"off","unicorn/no-process-exit":"off","unicorn/no-useless-undefined":["error",{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-node-protocol":"off","unicorn/prevent-abbreviations":"off"},_e=r(()=>[{...O.configs["flat/recommended"],name:"jimmy.codes/unicorn",rules:Ee}],"unicornConfig"),Ce=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"typescriptOptions"),Te=r(e=>typeof e=="object"?e:{framework:"vitest"},"testingOptions"),Re=r(e=>typeof e=="object"?e:{utilities:[]},"reactOptions"),Le=r(({astro:e=!1,autoDetect:t=!0,configs:s=[],ignores:i=[],react:f=!1,testing:u=!1,typescript:x=!1}={},...S)=>{const b=x||t&&de(),P=f||t&&ye(),A=u||t&&ge(),G=e||t&&be();return[ce(),ue(),le(),_e(),te(),ie({typescript:b}),b?we(Ce(x)):[],P?ke(Re(f),t):[],G?Z():[],A?Oe(Te(u),t):[],me(),ee(),se(i),s,S].flat()},"jimmyDotCodes");module.exports=Le;
|
package/dist/index.d.cts
CHANGED
|
@@ -3,10 +3,11 @@ import * as eslint_plugin_jest_dom from 'eslint-plugin-jest-dom';
|
|
|
3
3
|
import * as eslint_plugin_react_refresh from 'eslint-plugin-react-refresh';
|
|
4
4
|
import * as eslint_plugin_react_hooks from 'eslint-plugin-react-hooks';
|
|
5
5
|
import * as eslint_plugin_react from 'eslint-plugin-react';
|
|
6
|
-
import * as eslint_plugin_jsx_a11y from 'eslint-plugin-jsx-a11y';
|
|
7
6
|
import * as eslint_plugin_n from 'eslint-plugin-n';
|
|
7
|
+
import * as eslint_plugin_jsx_a11y from 'eslint-plugin-jsx-a11y';
|
|
8
8
|
import * as eslint from 'eslint';
|
|
9
9
|
import { Linter } from 'eslint';
|
|
10
|
+
import * as astro_eslint_parser from 'astro-eslint-parser';
|
|
10
11
|
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
11
12
|
|
|
12
13
|
/* eslint-disable */
|
|
@@ -9862,6 +9863,159 @@ interface Options {
|
|
|
9862
9863
|
}
|
|
9863
9864
|
|
|
9864
9865
|
declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, testing, typescript, }?: Options, ...moreConfigs: Linter.Config[] | TypedConfigItem[]) => (TypedConfigItem | Linter.Config<Linter.RulesRecord> | _typescript_eslint_utils_ts_eslint.FlatConfig.Config | {
|
|
9866
|
+
files: string[];
|
|
9867
|
+
languageOptions: {
|
|
9868
|
+
globals: {
|
|
9869
|
+
Astro: false;
|
|
9870
|
+
Fragment: false;
|
|
9871
|
+
__dirname: false;
|
|
9872
|
+
__filename: false;
|
|
9873
|
+
AbortController: false;
|
|
9874
|
+
AbortSignal: false;
|
|
9875
|
+
atob: false;
|
|
9876
|
+
Blob: false;
|
|
9877
|
+
BroadcastChannel: false;
|
|
9878
|
+
btoa: false;
|
|
9879
|
+
Buffer: false;
|
|
9880
|
+
ByteLengthQueuingStrategy: false;
|
|
9881
|
+
clearImmediate: false;
|
|
9882
|
+
clearInterval: false;
|
|
9883
|
+
clearTimeout: false;
|
|
9884
|
+
CloseEvent: false;
|
|
9885
|
+
CompressionStream: false;
|
|
9886
|
+
console: false;
|
|
9887
|
+
CountQueuingStrategy: false;
|
|
9888
|
+
crypto: false;
|
|
9889
|
+
Crypto: false;
|
|
9890
|
+
CryptoKey: false;
|
|
9891
|
+
CustomEvent: false;
|
|
9892
|
+
DecompressionStream: false;
|
|
9893
|
+
DOMException: false;
|
|
9894
|
+
Event: false;
|
|
9895
|
+
EventTarget: false;
|
|
9896
|
+
exports: true;
|
|
9897
|
+
fetch: false;
|
|
9898
|
+
File: false;
|
|
9899
|
+
FormData: false;
|
|
9900
|
+
global: false;
|
|
9901
|
+
Headers: false;
|
|
9902
|
+
MessageChannel: false;
|
|
9903
|
+
MessageEvent: false;
|
|
9904
|
+
MessagePort: false;
|
|
9905
|
+
module: false;
|
|
9906
|
+
navigator: false;
|
|
9907
|
+
Navigator: false;
|
|
9908
|
+
performance: false;
|
|
9909
|
+
Performance: false;
|
|
9910
|
+
PerformanceEntry: false;
|
|
9911
|
+
PerformanceMark: false;
|
|
9912
|
+
PerformanceMeasure: false;
|
|
9913
|
+
PerformanceObserver: false;
|
|
9914
|
+
PerformanceObserverEntryList: false;
|
|
9915
|
+
PerformanceResourceTiming: false;
|
|
9916
|
+
process: false;
|
|
9917
|
+
queueMicrotask: false;
|
|
9918
|
+
ReadableByteStreamController: false;
|
|
9919
|
+
ReadableStream: false;
|
|
9920
|
+
ReadableStreamBYOBReader: false;
|
|
9921
|
+
ReadableStreamBYOBRequest: false;
|
|
9922
|
+
ReadableStreamDefaultController: false;
|
|
9923
|
+
ReadableStreamDefaultReader: false;
|
|
9924
|
+
Request: false;
|
|
9925
|
+
require: false;
|
|
9926
|
+
Response: false;
|
|
9927
|
+
setImmediate: false;
|
|
9928
|
+
setInterval: false;
|
|
9929
|
+
setTimeout: false;
|
|
9930
|
+
structuredClone: false;
|
|
9931
|
+
SubtleCrypto: false;
|
|
9932
|
+
TextDecoder: false;
|
|
9933
|
+
TextDecoderStream: false;
|
|
9934
|
+
TextEncoder: false;
|
|
9935
|
+
TextEncoderStream: false;
|
|
9936
|
+
TransformStream: false;
|
|
9937
|
+
TransformStreamDefaultController: false;
|
|
9938
|
+
URL: false;
|
|
9939
|
+
URLSearchParams: false;
|
|
9940
|
+
WebAssembly: false;
|
|
9941
|
+
WebSocket: false;
|
|
9942
|
+
WritableStream: false;
|
|
9943
|
+
WritableStreamDefaultController: false;
|
|
9944
|
+
WritableStreamDefaultWriter: false;
|
|
9945
|
+
};
|
|
9946
|
+
parser: typeof astro_eslint_parser;
|
|
9947
|
+
parserOptions: {
|
|
9948
|
+
extraFileExtensions: string[];
|
|
9949
|
+
parser: _typescript_eslint_utils_ts_eslint.Parser.LooseParserModule;
|
|
9950
|
+
};
|
|
9951
|
+
sourceType: "module";
|
|
9952
|
+
};
|
|
9953
|
+
name: string;
|
|
9954
|
+
plugins: {
|
|
9955
|
+
astro: {
|
|
9956
|
+
meta: {
|
|
9957
|
+
name: string;
|
|
9958
|
+
version: string;
|
|
9959
|
+
};
|
|
9960
|
+
environments: {
|
|
9961
|
+
astro: {
|
|
9962
|
+
globals: {
|
|
9963
|
+
Astro: boolean;
|
|
9964
|
+
Fragment: boolean;
|
|
9965
|
+
};
|
|
9966
|
+
};
|
|
9967
|
+
};
|
|
9968
|
+
rules: {
|
|
9969
|
+
[key: string]: eslint.Rule.RuleModule;
|
|
9970
|
+
};
|
|
9971
|
+
processors: {
|
|
9972
|
+
".astro": Linter.Processor<string | Linter.ProcessorFile>;
|
|
9973
|
+
astro: Linter.Processor<string | Linter.ProcessorFile>;
|
|
9974
|
+
"client-side-ts": Linter.Processor<string | Linter.ProcessorFile>;
|
|
9975
|
+
};
|
|
9976
|
+
} & {
|
|
9977
|
+
configs: {
|
|
9978
|
+
base: Linter.Config[];
|
|
9979
|
+
recommended: Linter.Config[];
|
|
9980
|
+
all: Linter.Config[];
|
|
9981
|
+
"jsx-a11y-strict": Linter.Config[];
|
|
9982
|
+
"jsx-a11y-recommended": Linter.Config[];
|
|
9983
|
+
"flat/base": Linter.Config[];
|
|
9984
|
+
"flat/recommended": Linter.Config[];
|
|
9985
|
+
"flat/all": Linter.Config[];
|
|
9986
|
+
"flat/jsx-a11y-strict": Linter.Config[];
|
|
9987
|
+
"flat/jsx-a11y-recommended": Linter.Config[];
|
|
9988
|
+
};
|
|
9989
|
+
};
|
|
9990
|
+
"jsx-a11y": typeof eslint_plugin_jsx_a11y;
|
|
9991
|
+
};
|
|
9992
|
+
processor: string;
|
|
9993
|
+
rules: {
|
|
9994
|
+
"astro/missing-client-only-directive-value": "error";
|
|
9995
|
+
"astro/no-conflict-set-directives": "error";
|
|
9996
|
+
"astro/no-deprecated-astro-canonicalurl": "error";
|
|
9997
|
+
"astro/no-deprecated-astro-fetchcontent": "error";
|
|
9998
|
+
"astro/no-deprecated-astro-resolve": "error";
|
|
9999
|
+
"astro/no-deprecated-getentrybyslug": "error";
|
|
10000
|
+
"astro/no-exports-from-components": "off";
|
|
10001
|
+
"astro/no-unused-define-vars-in-style": "error";
|
|
10002
|
+
"astro/valid-compile": "error";
|
|
10003
|
+
};
|
|
10004
|
+
settings?: undefined;
|
|
10005
|
+
} | {
|
|
10006
|
+
files: string[];
|
|
10007
|
+
languageOptions: {
|
|
10008
|
+
parserOptions: _typescript_eslint_utils_ts_eslint.ParserOptions | undefined;
|
|
10009
|
+
globals?: undefined;
|
|
10010
|
+
parser?: undefined;
|
|
10011
|
+
sourceType?: undefined;
|
|
10012
|
+
};
|
|
10013
|
+
name: string;
|
|
10014
|
+
rules: Partial<Record<string, _typescript_eslint_utils_ts_eslint.SharedConfig.RuleEntry>> | undefined;
|
|
10015
|
+
plugins?: undefined;
|
|
10016
|
+
processor?: undefined;
|
|
10017
|
+
settings?: undefined;
|
|
10018
|
+
} | {
|
|
9865
10019
|
name: string;
|
|
9866
10020
|
settings: {
|
|
9867
10021
|
"import-x/core-modules": string[];
|
|
@@ -9896,6 +10050,9 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
9896
10050
|
processor?: string | Linter.Processor;
|
|
9897
10051
|
plugins?: Record<string, eslint.ESLint.Plugin>;
|
|
9898
10052
|
settings?: Record<string, unknown>;
|
|
10053
|
+
} | {
|
|
10054
|
+
ignores: string[];
|
|
10055
|
+
name: string;
|
|
9899
10056
|
} | {
|
|
9900
10057
|
name: string;
|
|
9901
10058
|
rules: {
|
|
@@ -9953,6 +10110,32 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
9953
10110
|
espree: string[];
|
|
9954
10111
|
};
|
|
9955
10112
|
};
|
|
10113
|
+
} | {
|
|
10114
|
+
linterOptions: {
|
|
10115
|
+
reportUnusedDisableDirectives: true;
|
|
10116
|
+
};
|
|
10117
|
+
name: string;
|
|
10118
|
+
rules: {
|
|
10119
|
+
"array-callback-return": ["error", {
|
|
10120
|
+
allowImplicit: true;
|
|
10121
|
+
}];
|
|
10122
|
+
"arrow-body-style": ["error", "always"];
|
|
10123
|
+
curly: ["error", "all"];
|
|
10124
|
+
"no-console": "warn";
|
|
10125
|
+
"no-self-compare": "error";
|
|
10126
|
+
"no-template-curly-in-string": "error";
|
|
10127
|
+
"no-unmodified-loop-condition": "error";
|
|
10128
|
+
"no-unreachable-loop": "error";
|
|
10129
|
+
"no-use-before-define": ["error", {
|
|
10130
|
+
allowNamedExports: false;
|
|
10131
|
+
classes: false;
|
|
10132
|
+
functions: false;
|
|
10133
|
+
variables: true;
|
|
10134
|
+
}];
|
|
10135
|
+
"no-useless-rename": "error";
|
|
10136
|
+
"object-shorthand": "error";
|
|
10137
|
+
"prefer-arrow-callback": "error";
|
|
10138
|
+
};
|
|
9956
10139
|
} | {
|
|
9957
10140
|
name: string;
|
|
9958
10141
|
plugins: {
|
|
@@ -9982,6 +10165,9 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
9982
10165
|
type: "natural";
|
|
9983
10166
|
}];
|
|
9984
10167
|
};
|
|
10168
|
+
} | {
|
|
10169
|
+
rules: Linter.RulesRecord;
|
|
10170
|
+
name: string;
|
|
9985
10171
|
} | {
|
|
9986
10172
|
files: string[];
|
|
9987
10173
|
languageOptions: {
|
|
@@ -11612,6 +11798,17 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
11612
11798
|
"testing-library/prefer-screen-queries": "off";
|
|
11613
11799
|
};
|
|
11614
11800
|
plugins?: undefined;
|
|
11801
|
+
} | {
|
|
11802
|
+
name: string;
|
|
11803
|
+
files: Array<string | string[]>;
|
|
11804
|
+
ignores?: string[];
|
|
11805
|
+
language?: string;
|
|
11806
|
+
languageOptions?: Linter.LanguageOptions;
|
|
11807
|
+
linterOptions?: Linter.LinterOptions;
|
|
11808
|
+
processor?: string | Linter.Processor;
|
|
11809
|
+
plugins?: Record<string, eslint.ESLint.Plugin>;
|
|
11810
|
+
rules?: Partial<Linter.RulesRecord> | undefined;
|
|
11811
|
+
settings?: Record<string, unknown>;
|
|
11615
11812
|
} | {
|
|
11616
11813
|
rules: {
|
|
11617
11814
|
"jest/consistent-test-it": ["error", {
|
|
@@ -11657,6 +11854,56 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
11657
11854
|
processor?: string | Linter.Processor;
|
|
11658
11855
|
plugins?: Record<string, eslint.ESLint.Plugin>;
|
|
11659
11856
|
settings?: Record<string, unknown>;
|
|
11857
|
+
} | {
|
|
11858
|
+
languageOptions: {
|
|
11859
|
+
parserOptions: {
|
|
11860
|
+
project: string | string[];
|
|
11861
|
+
tsconfigRootDir: string;
|
|
11862
|
+
};
|
|
11863
|
+
};
|
|
11864
|
+
name: string;
|
|
11865
|
+
rules: {
|
|
11866
|
+
"@typescript-eslint/consistent-type-exports": (string | {
|
|
11867
|
+
fixMixedExportsWithInlineTypeSpecifier: boolean;
|
|
11868
|
+
})[];
|
|
11869
|
+
"@typescript-eslint/consistent-type-imports": (string | {
|
|
11870
|
+
fixStyle: string;
|
|
11871
|
+
})[];
|
|
11872
|
+
"@typescript-eslint/no-deprecated": string;
|
|
11873
|
+
"@typescript-eslint/no-misused-promises": (string | {
|
|
11874
|
+
checksVoidReturn: {
|
|
11875
|
+
attributes: boolean;
|
|
11876
|
+
};
|
|
11877
|
+
})[];
|
|
11878
|
+
"@typescript-eslint/no-use-before-define": (string | {
|
|
11879
|
+
allowNamedExports: boolean;
|
|
11880
|
+
classes: boolean;
|
|
11881
|
+
functions: boolean;
|
|
11882
|
+
variables: boolean;
|
|
11883
|
+
})[];
|
|
11884
|
+
"@typescript-eslint/restrict-template-expressions": (string | {
|
|
11885
|
+
allowNumber: boolean;
|
|
11886
|
+
})[];
|
|
11887
|
+
"no-use-before-define": string;
|
|
11888
|
+
"@typescript-eslint/no-unsafe-argument"?: undefined;
|
|
11889
|
+
"@typescript-eslint/no-unsafe-assignment"?: undefined;
|
|
11890
|
+
};
|
|
11891
|
+
files?: undefined;
|
|
11892
|
+
} | {
|
|
11893
|
+
files: string[];
|
|
11894
|
+
name: string;
|
|
11895
|
+
rules: {
|
|
11896
|
+
"@typescript-eslint/no-unsafe-argument": string;
|
|
11897
|
+
"@typescript-eslint/no-unsafe-assignment": string;
|
|
11898
|
+
"@typescript-eslint/consistent-type-exports"?: undefined;
|
|
11899
|
+
"@typescript-eslint/consistent-type-imports"?: undefined;
|
|
11900
|
+
"@typescript-eslint/no-deprecated"?: undefined;
|
|
11901
|
+
"@typescript-eslint/no-misused-promises"?: undefined;
|
|
11902
|
+
"@typescript-eslint/no-use-before-define"?: undefined;
|
|
11903
|
+
"@typescript-eslint/restrict-template-expressions"?: undefined;
|
|
11904
|
+
"no-use-before-define"?: undefined;
|
|
11905
|
+
};
|
|
11906
|
+
languageOptions?: undefined;
|
|
11660
11907
|
} | {
|
|
11661
11908
|
name: string;
|
|
11662
11909
|
rules: {
|
|
@@ -11683,22 +11930,6 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
11683
11930
|
processor?: string | Linter.Processor;
|
|
11684
11931
|
plugins?: Record<string, eslint.ESLint.Plugin>;
|
|
11685
11932
|
settings?: Record<string, unknown>;
|
|
11686
|
-
} | {
|
|
11687
|
-
linterOptions: {
|
|
11688
|
-
reportUnusedDisableDirectives: boolean;
|
|
11689
|
-
};
|
|
11690
|
-
name: string;
|
|
11691
|
-
rules: {
|
|
11692
|
-
"array-callback-return": ["error", {
|
|
11693
|
-
allowImplicit: true;
|
|
11694
|
-
}];
|
|
11695
|
-
"arrow-body-style": ["error", "always"];
|
|
11696
|
-
curly: ["error", "all"];
|
|
11697
|
-
"no-console": "warn";
|
|
11698
|
-
"no-useless-rename": "error";
|
|
11699
|
-
"object-shorthand": "error";
|
|
11700
|
-
"prefer-arrow-callback": "error";
|
|
11701
|
-
};
|
|
11702
11933
|
})[];
|
|
11703
11934
|
|
|
11704
11935
|
export { type Options, type ReactOptions, type Rules, type TestingOptions, type TypedConfigItem, type TypescriptOptions, jimmyDotCodes as default };
|
package/dist/index.d.mts
CHANGED
|
@@ -3,10 +3,11 @@ import * as eslint_plugin_jest_dom from 'eslint-plugin-jest-dom';
|
|
|
3
3
|
import * as eslint_plugin_react_refresh from 'eslint-plugin-react-refresh';
|
|
4
4
|
import * as eslint_plugin_react_hooks from 'eslint-plugin-react-hooks';
|
|
5
5
|
import * as eslint_plugin_react from 'eslint-plugin-react';
|
|
6
|
-
import * as eslint_plugin_jsx_a11y from 'eslint-plugin-jsx-a11y';
|
|
7
6
|
import * as eslint_plugin_n from 'eslint-plugin-n';
|
|
7
|
+
import * as eslint_plugin_jsx_a11y from 'eslint-plugin-jsx-a11y';
|
|
8
8
|
import * as eslint from 'eslint';
|
|
9
9
|
import { Linter } from 'eslint';
|
|
10
|
+
import * as astro_eslint_parser from 'astro-eslint-parser';
|
|
10
11
|
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
11
12
|
|
|
12
13
|
/* eslint-disable */
|
|
@@ -9862,6 +9863,159 @@ interface Options {
|
|
|
9862
9863
|
}
|
|
9863
9864
|
|
|
9864
9865
|
declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, testing, typescript, }?: Options, ...moreConfigs: Linter.Config[] | TypedConfigItem[]) => (TypedConfigItem | Linter.Config<Linter.RulesRecord> | _typescript_eslint_utils_ts_eslint.FlatConfig.Config | {
|
|
9866
|
+
files: string[];
|
|
9867
|
+
languageOptions: {
|
|
9868
|
+
globals: {
|
|
9869
|
+
Astro: false;
|
|
9870
|
+
Fragment: false;
|
|
9871
|
+
__dirname: false;
|
|
9872
|
+
__filename: false;
|
|
9873
|
+
AbortController: false;
|
|
9874
|
+
AbortSignal: false;
|
|
9875
|
+
atob: false;
|
|
9876
|
+
Blob: false;
|
|
9877
|
+
BroadcastChannel: false;
|
|
9878
|
+
btoa: false;
|
|
9879
|
+
Buffer: false;
|
|
9880
|
+
ByteLengthQueuingStrategy: false;
|
|
9881
|
+
clearImmediate: false;
|
|
9882
|
+
clearInterval: false;
|
|
9883
|
+
clearTimeout: false;
|
|
9884
|
+
CloseEvent: false;
|
|
9885
|
+
CompressionStream: false;
|
|
9886
|
+
console: false;
|
|
9887
|
+
CountQueuingStrategy: false;
|
|
9888
|
+
crypto: false;
|
|
9889
|
+
Crypto: false;
|
|
9890
|
+
CryptoKey: false;
|
|
9891
|
+
CustomEvent: false;
|
|
9892
|
+
DecompressionStream: false;
|
|
9893
|
+
DOMException: false;
|
|
9894
|
+
Event: false;
|
|
9895
|
+
EventTarget: false;
|
|
9896
|
+
exports: true;
|
|
9897
|
+
fetch: false;
|
|
9898
|
+
File: false;
|
|
9899
|
+
FormData: false;
|
|
9900
|
+
global: false;
|
|
9901
|
+
Headers: false;
|
|
9902
|
+
MessageChannel: false;
|
|
9903
|
+
MessageEvent: false;
|
|
9904
|
+
MessagePort: false;
|
|
9905
|
+
module: false;
|
|
9906
|
+
navigator: false;
|
|
9907
|
+
Navigator: false;
|
|
9908
|
+
performance: false;
|
|
9909
|
+
Performance: false;
|
|
9910
|
+
PerformanceEntry: false;
|
|
9911
|
+
PerformanceMark: false;
|
|
9912
|
+
PerformanceMeasure: false;
|
|
9913
|
+
PerformanceObserver: false;
|
|
9914
|
+
PerformanceObserverEntryList: false;
|
|
9915
|
+
PerformanceResourceTiming: false;
|
|
9916
|
+
process: false;
|
|
9917
|
+
queueMicrotask: false;
|
|
9918
|
+
ReadableByteStreamController: false;
|
|
9919
|
+
ReadableStream: false;
|
|
9920
|
+
ReadableStreamBYOBReader: false;
|
|
9921
|
+
ReadableStreamBYOBRequest: false;
|
|
9922
|
+
ReadableStreamDefaultController: false;
|
|
9923
|
+
ReadableStreamDefaultReader: false;
|
|
9924
|
+
Request: false;
|
|
9925
|
+
require: false;
|
|
9926
|
+
Response: false;
|
|
9927
|
+
setImmediate: false;
|
|
9928
|
+
setInterval: false;
|
|
9929
|
+
setTimeout: false;
|
|
9930
|
+
structuredClone: false;
|
|
9931
|
+
SubtleCrypto: false;
|
|
9932
|
+
TextDecoder: false;
|
|
9933
|
+
TextDecoderStream: false;
|
|
9934
|
+
TextEncoder: false;
|
|
9935
|
+
TextEncoderStream: false;
|
|
9936
|
+
TransformStream: false;
|
|
9937
|
+
TransformStreamDefaultController: false;
|
|
9938
|
+
URL: false;
|
|
9939
|
+
URLSearchParams: false;
|
|
9940
|
+
WebAssembly: false;
|
|
9941
|
+
WebSocket: false;
|
|
9942
|
+
WritableStream: false;
|
|
9943
|
+
WritableStreamDefaultController: false;
|
|
9944
|
+
WritableStreamDefaultWriter: false;
|
|
9945
|
+
};
|
|
9946
|
+
parser: typeof astro_eslint_parser;
|
|
9947
|
+
parserOptions: {
|
|
9948
|
+
extraFileExtensions: string[];
|
|
9949
|
+
parser: _typescript_eslint_utils_ts_eslint.Parser.LooseParserModule;
|
|
9950
|
+
};
|
|
9951
|
+
sourceType: "module";
|
|
9952
|
+
};
|
|
9953
|
+
name: string;
|
|
9954
|
+
plugins: {
|
|
9955
|
+
astro: {
|
|
9956
|
+
meta: {
|
|
9957
|
+
name: string;
|
|
9958
|
+
version: string;
|
|
9959
|
+
};
|
|
9960
|
+
environments: {
|
|
9961
|
+
astro: {
|
|
9962
|
+
globals: {
|
|
9963
|
+
Astro: boolean;
|
|
9964
|
+
Fragment: boolean;
|
|
9965
|
+
};
|
|
9966
|
+
};
|
|
9967
|
+
};
|
|
9968
|
+
rules: {
|
|
9969
|
+
[key: string]: eslint.Rule.RuleModule;
|
|
9970
|
+
};
|
|
9971
|
+
processors: {
|
|
9972
|
+
".astro": Linter.Processor<string | Linter.ProcessorFile>;
|
|
9973
|
+
astro: Linter.Processor<string | Linter.ProcessorFile>;
|
|
9974
|
+
"client-side-ts": Linter.Processor<string | Linter.ProcessorFile>;
|
|
9975
|
+
};
|
|
9976
|
+
} & {
|
|
9977
|
+
configs: {
|
|
9978
|
+
base: Linter.Config[];
|
|
9979
|
+
recommended: Linter.Config[];
|
|
9980
|
+
all: Linter.Config[];
|
|
9981
|
+
"jsx-a11y-strict": Linter.Config[];
|
|
9982
|
+
"jsx-a11y-recommended": Linter.Config[];
|
|
9983
|
+
"flat/base": Linter.Config[];
|
|
9984
|
+
"flat/recommended": Linter.Config[];
|
|
9985
|
+
"flat/all": Linter.Config[];
|
|
9986
|
+
"flat/jsx-a11y-strict": Linter.Config[];
|
|
9987
|
+
"flat/jsx-a11y-recommended": Linter.Config[];
|
|
9988
|
+
};
|
|
9989
|
+
};
|
|
9990
|
+
"jsx-a11y": typeof eslint_plugin_jsx_a11y;
|
|
9991
|
+
};
|
|
9992
|
+
processor: string;
|
|
9993
|
+
rules: {
|
|
9994
|
+
"astro/missing-client-only-directive-value": "error";
|
|
9995
|
+
"astro/no-conflict-set-directives": "error";
|
|
9996
|
+
"astro/no-deprecated-astro-canonicalurl": "error";
|
|
9997
|
+
"astro/no-deprecated-astro-fetchcontent": "error";
|
|
9998
|
+
"astro/no-deprecated-astro-resolve": "error";
|
|
9999
|
+
"astro/no-deprecated-getentrybyslug": "error";
|
|
10000
|
+
"astro/no-exports-from-components": "off";
|
|
10001
|
+
"astro/no-unused-define-vars-in-style": "error";
|
|
10002
|
+
"astro/valid-compile": "error";
|
|
10003
|
+
};
|
|
10004
|
+
settings?: undefined;
|
|
10005
|
+
} | {
|
|
10006
|
+
files: string[];
|
|
10007
|
+
languageOptions: {
|
|
10008
|
+
parserOptions: _typescript_eslint_utils_ts_eslint.ParserOptions | undefined;
|
|
10009
|
+
globals?: undefined;
|
|
10010
|
+
parser?: undefined;
|
|
10011
|
+
sourceType?: undefined;
|
|
10012
|
+
};
|
|
10013
|
+
name: string;
|
|
10014
|
+
rules: Partial<Record<string, _typescript_eslint_utils_ts_eslint.SharedConfig.RuleEntry>> | undefined;
|
|
10015
|
+
plugins?: undefined;
|
|
10016
|
+
processor?: undefined;
|
|
10017
|
+
settings?: undefined;
|
|
10018
|
+
} | {
|
|
9865
10019
|
name: string;
|
|
9866
10020
|
settings: {
|
|
9867
10021
|
"import-x/core-modules": string[];
|
|
@@ -9896,6 +10050,9 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
9896
10050
|
processor?: string | Linter.Processor;
|
|
9897
10051
|
plugins?: Record<string, eslint.ESLint.Plugin>;
|
|
9898
10052
|
settings?: Record<string, unknown>;
|
|
10053
|
+
} | {
|
|
10054
|
+
ignores: string[];
|
|
10055
|
+
name: string;
|
|
9899
10056
|
} | {
|
|
9900
10057
|
name: string;
|
|
9901
10058
|
rules: {
|
|
@@ -9953,6 +10110,32 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
9953
10110
|
espree: string[];
|
|
9954
10111
|
};
|
|
9955
10112
|
};
|
|
10113
|
+
} | {
|
|
10114
|
+
linterOptions: {
|
|
10115
|
+
reportUnusedDisableDirectives: true;
|
|
10116
|
+
};
|
|
10117
|
+
name: string;
|
|
10118
|
+
rules: {
|
|
10119
|
+
"array-callback-return": ["error", {
|
|
10120
|
+
allowImplicit: true;
|
|
10121
|
+
}];
|
|
10122
|
+
"arrow-body-style": ["error", "always"];
|
|
10123
|
+
curly: ["error", "all"];
|
|
10124
|
+
"no-console": "warn";
|
|
10125
|
+
"no-self-compare": "error";
|
|
10126
|
+
"no-template-curly-in-string": "error";
|
|
10127
|
+
"no-unmodified-loop-condition": "error";
|
|
10128
|
+
"no-unreachable-loop": "error";
|
|
10129
|
+
"no-use-before-define": ["error", {
|
|
10130
|
+
allowNamedExports: false;
|
|
10131
|
+
classes: false;
|
|
10132
|
+
functions: false;
|
|
10133
|
+
variables: true;
|
|
10134
|
+
}];
|
|
10135
|
+
"no-useless-rename": "error";
|
|
10136
|
+
"object-shorthand": "error";
|
|
10137
|
+
"prefer-arrow-callback": "error";
|
|
10138
|
+
};
|
|
9956
10139
|
} | {
|
|
9957
10140
|
name: string;
|
|
9958
10141
|
plugins: {
|
|
@@ -9982,6 +10165,9 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
9982
10165
|
type: "natural";
|
|
9983
10166
|
}];
|
|
9984
10167
|
};
|
|
10168
|
+
} | {
|
|
10169
|
+
rules: Linter.RulesRecord;
|
|
10170
|
+
name: string;
|
|
9985
10171
|
} | {
|
|
9986
10172
|
files: string[];
|
|
9987
10173
|
languageOptions: {
|
|
@@ -11612,6 +11798,17 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
11612
11798
|
"testing-library/prefer-screen-queries": "off";
|
|
11613
11799
|
};
|
|
11614
11800
|
plugins?: undefined;
|
|
11801
|
+
} | {
|
|
11802
|
+
name: string;
|
|
11803
|
+
files: Array<string | string[]>;
|
|
11804
|
+
ignores?: string[];
|
|
11805
|
+
language?: string;
|
|
11806
|
+
languageOptions?: Linter.LanguageOptions;
|
|
11807
|
+
linterOptions?: Linter.LinterOptions;
|
|
11808
|
+
processor?: string | Linter.Processor;
|
|
11809
|
+
plugins?: Record<string, eslint.ESLint.Plugin>;
|
|
11810
|
+
rules?: Partial<Linter.RulesRecord> | undefined;
|
|
11811
|
+
settings?: Record<string, unknown>;
|
|
11615
11812
|
} | {
|
|
11616
11813
|
rules: {
|
|
11617
11814
|
"jest/consistent-test-it": ["error", {
|
|
@@ -11657,6 +11854,56 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
11657
11854
|
processor?: string | Linter.Processor;
|
|
11658
11855
|
plugins?: Record<string, eslint.ESLint.Plugin>;
|
|
11659
11856
|
settings?: Record<string, unknown>;
|
|
11857
|
+
} | {
|
|
11858
|
+
languageOptions: {
|
|
11859
|
+
parserOptions: {
|
|
11860
|
+
project: string | string[];
|
|
11861
|
+
tsconfigRootDir: string;
|
|
11862
|
+
};
|
|
11863
|
+
};
|
|
11864
|
+
name: string;
|
|
11865
|
+
rules: {
|
|
11866
|
+
"@typescript-eslint/consistent-type-exports": (string | {
|
|
11867
|
+
fixMixedExportsWithInlineTypeSpecifier: boolean;
|
|
11868
|
+
})[];
|
|
11869
|
+
"@typescript-eslint/consistent-type-imports": (string | {
|
|
11870
|
+
fixStyle: string;
|
|
11871
|
+
})[];
|
|
11872
|
+
"@typescript-eslint/no-deprecated": string;
|
|
11873
|
+
"@typescript-eslint/no-misused-promises": (string | {
|
|
11874
|
+
checksVoidReturn: {
|
|
11875
|
+
attributes: boolean;
|
|
11876
|
+
};
|
|
11877
|
+
})[];
|
|
11878
|
+
"@typescript-eslint/no-use-before-define": (string | {
|
|
11879
|
+
allowNamedExports: boolean;
|
|
11880
|
+
classes: boolean;
|
|
11881
|
+
functions: boolean;
|
|
11882
|
+
variables: boolean;
|
|
11883
|
+
})[];
|
|
11884
|
+
"@typescript-eslint/restrict-template-expressions": (string | {
|
|
11885
|
+
allowNumber: boolean;
|
|
11886
|
+
})[];
|
|
11887
|
+
"no-use-before-define": string;
|
|
11888
|
+
"@typescript-eslint/no-unsafe-argument"?: undefined;
|
|
11889
|
+
"@typescript-eslint/no-unsafe-assignment"?: undefined;
|
|
11890
|
+
};
|
|
11891
|
+
files?: undefined;
|
|
11892
|
+
} | {
|
|
11893
|
+
files: string[];
|
|
11894
|
+
name: string;
|
|
11895
|
+
rules: {
|
|
11896
|
+
"@typescript-eslint/no-unsafe-argument": string;
|
|
11897
|
+
"@typescript-eslint/no-unsafe-assignment": string;
|
|
11898
|
+
"@typescript-eslint/consistent-type-exports"?: undefined;
|
|
11899
|
+
"@typescript-eslint/consistent-type-imports"?: undefined;
|
|
11900
|
+
"@typescript-eslint/no-deprecated"?: undefined;
|
|
11901
|
+
"@typescript-eslint/no-misused-promises"?: undefined;
|
|
11902
|
+
"@typescript-eslint/no-use-before-define"?: undefined;
|
|
11903
|
+
"@typescript-eslint/restrict-template-expressions"?: undefined;
|
|
11904
|
+
"no-use-before-define"?: undefined;
|
|
11905
|
+
};
|
|
11906
|
+
languageOptions?: undefined;
|
|
11660
11907
|
} | {
|
|
11661
11908
|
name: string;
|
|
11662
11909
|
rules: {
|
|
@@ -11683,22 +11930,6 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
11683
11930
|
processor?: string | Linter.Processor;
|
|
11684
11931
|
plugins?: Record<string, eslint.ESLint.Plugin>;
|
|
11685
11932
|
settings?: Record<string, unknown>;
|
|
11686
|
-
} | {
|
|
11687
|
-
linterOptions: {
|
|
11688
|
-
reportUnusedDisableDirectives: boolean;
|
|
11689
|
-
};
|
|
11690
|
-
name: string;
|
|
11691
|
-
rules: {
|
|
11692
|
-
"array-callback-return": ["error", {
|
|
11693
|
-
allowImplicit: true;
|
|
11694
|
-
}];
|
|
11695
|
-
"arrow-body-style": ["error", "always"];
|
|
11696
|
-
curly: ["error", "all"];
|
|
11697
|
-
"no-console": "warn";
|
|
11698
|
-
"no-useless-rename": "error";
|
|
11699
|
-
"object-shorthand": "error";
|
|
11700
|
-
"prefer-arrow-callback": "error";
|
|
11701
|
-
};
|
|
11702
11933
|
})[];
|
|
11703
11934
|
|
|
11704
11935
|
export { type Options, type ReactOptions, type Rules, type TestingOptions, type TypedConfigItem, type TypescriptOptions, jimmyDotCodes as default };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var B=Object.defineProperty;var r=(e,t)=>B(e,"name",{value:t,configurable:!0});import I from"eslint-config-prettier";import*as $ from"astro-eslint-parser";import P from"eslint-plugin-astro";import m from"eslint-plugin-jsx-a11y";import d from"globals";import{parser as F,configs as l,config as N}from"typescript-eslint";import b from"@eslint-community/eslint-plugin-eslint-comments/configs";import i from"eslint-plugin-import-x";import h from"eslint-plugin-n";import k from"eslint-plugin-perfectionist";import J from"@tanstack/eslint-plugin-query";import y from"eslint-plugin-react";import V from"eslint-plugin-react-hooks";import*as X from"eslint-plugin-react-refresh";import{isPackageExists as n}from"local-pkg";import c from"eslint-plugin-jest";import*as v from"eslint-plugin-jest-dom";import w from"eslint-plugin-testing-library";import O from"eslint-plugin-unicorn";import U from"@eslint/js";const s="?([cm])[jt]s?(x)",z=["**/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","**/.vinxi","**/app.config.timestamp_*.js","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts","**/vite.config.ts.*.mjs","**/*.gen.*","!.storybook"],H="**/*.?([cm])js",g="**/*.?([cm])jsx",C="**/*.?([cm])tsx",a=[`**/__tests__/**/*.${s}`,`**/*.spec.${s}`,`**/*.test.${s}`,`**/*.bench.${s}`,`**/*.benchmark.${s}`],T=[`**/e2e/**/*.spec.${s}`,`**/e2e/**/*.test.${s}`,`**/cypress/**/*.spec.${s}`,`**/cypress/**/*.test.${s}`],M="**/*.cjs",Q="**/*.astro",W=["vi.mock","describe","expect","it"],Y=["@testing-library/react"],D=r(()=>{const e=[Q];return[{files:e,languageOptions:{globals:{...d.node,Astro:!1,Fragment:!1},parser:$,parserOptions:{extraFileExtensions:[".astro"],parser:F},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:P,"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,...l.disableTypeChecked,name:"jimmy.codes/astro/disable-type-checked"},{name:"jimmy.codes/astro/imports",settings:{"import-x/core-modules":["astro:content"]}}]},"astroConfig"),K=r(()=>[{files:[M],languageOptions:{globals:d.commonjs},name:"jimmy.codes/commonjs"}],"commonjsConfig"),Z={...b.recommended.rules,"@eslint-community/eslint-comments/no-unused-disable":"off","@eslint-community/eslint-comments/require-description":"error"},ee=r(()=>[{...b.recommended,name:"jimmy.codes/eslint-comments",rules:Z}],"eslintCommentsConfig"),re={...i.configs.recommended.rules,"import-x/consistent-type-specifier-style":["error","prefer-top-level"],"import-x/extensions":["error","never",{checkTypedImports:!0,svg:"always"}],"import-x/first":"error","import-x/namespace":"off","import-x/newline-after-import":"error","import-x/no-absolute-path":"error","import-x/no-duplicates":"error","import-x/no-empty-named-blocks":"error","import-x/no-named-as-default":"error","import-x/no-named-as-default-member":"error","import-x/no-self-import":"error","import-x/no-unresolved":["error",{ignore:[String.raw`\.svg$`]}],"import-x/no-useless-path-segments":"error"},te={name:"jimmy.codes/imports/typescript",rules:i.configs.typescript.rules,settings:{...i.configs.typescript.settings,"import-x/resolver":{...i.configs.typescript.settings["import-x/resolver"],typescript:!0}}},oe=r(({typescript:e=!1}={})=>[{languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},name:"jimmy.codes/imports",plugins:{"import-x":i,n:h},rules:re,settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}}},...e?[te]:[]],"importsConfig"),se={"n/no-process-exit":"off","n/prefer-node-protocol":"error"},ne=r(()=>[{name:"jimmy.codes/node",plugins:{n:h},rules:se}],"nodeConfig"),ie={...k.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"}]},ce=r(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:k},rules:ie}],"perfectionistConfig"),ae=r(()=>n("typescript"),"hasTypescript"),pe=r(()=>n("react"),"hasReact"),_=r(()=>n("vitest"),"hasVitest"),R=r(()=>n("jest"),"hasJest"),fe=r(()=>_()||R(),"hasTesting"),me=r(()=>Y.some(e=>n(e)),"hasTestingLibrary"),le=r(()=>n("@tanstack/react-query"),"hasReactQuery"),ue=r(()=>n("astro"),"hasAstro"),de=r(e=>e===2?"error":e===1?"warn":"off","toStringSeverity"),q=r((e={})=>Object.fromEntries(Object.entries(e).map(([t,o])=>[t,typeof o=="number"?de(o):o])),"normalizeRuleEntries"),ye={...m.configs.recommended.rules,...q(y.configs.flat?.recommended?.rules),...q(y.configs.flat?.["jsx-runtime"]?.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/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/forward-ref-uses-ref":"error","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-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-spread-multi":"off","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":"error","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/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}]},ge=r(({utilities:e=[]}={},t=!0)=>{const o=e.includes("@tanstack/query")||t&&le();return[{files:[g,C],languageOptions:{globals:{...d.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":m,react:y,"react-hooks":V,"react-refresh":X},rules:ye,settings:{react:{version:"detect"}}},...o?[{files:[g,C],name:"jimmy.codes/react/query",plugins:{"@tanstack/query":J},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]:[]]},"reactConfig"),E={...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"},je=r(()=>[{files:a,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":v,"testing-library":w},rules:{...w.configs.react.rules,...v.configs["flat/recommended"].rules}},{files:T,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),xe=r(({framework:e="vitest",utilities:t}={},o=!0)=>{const u=o?_():e==="vitest",p=e==="jest"||o&&R(),f=!!t?.includes("testing-library")||o&&me();return[{files:a,name:"jimmy.codes/testing",...c.configs["flat/recommended"]},...u?[{files:a,name:"jimmy.codes/testing/vitest",...c.configs["flat/recommended"],rules:{...E,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:W}]}}]:[],...p?[{files:a,name:"jimmy.codes/testing/jest",...c.configs["flat/recommended"],rules:E}]:[],{files:T,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...f?je():[]]},"testingConfig"),be=r(e=>N(...l.strictTypeChecked,...l.stylisticTypeChecked.filter(t=>t.name==="typescript-eslint/stylistic-type-checked"),{languageOptions:{parserOptions:{project:e.project,tsconfigRootDir:process.cwd()}},name:"jimmy.codes/typescript",rules:{"@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!1}],"@typescript-eslint/consistent-type-imports":["error",{fixStyle:"separate-type-imports"}],"@typescript-eslint/no-deprecated":"warn","@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:{attributes:!1}}],"@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0}]}},{files:[H,g],...l.disableTypeChecked},{files:a,name:"jimmy.codes/typescript/testing",rules:{"@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-unsafe-assignment":"off"}}),"typescriptConfig"),he={...O.configs["flat/recommended"].rules,"unicorn/filename-case":"off","unicorn/import-style":"off","unicorn/no-abusive-eslint-disable":"off","unicorn/no-anonymous-default-export":"off","unicorn/no-array-callback-reference":"off","unicorn/no-array-reduce":"off","unicorn/no-null":"off","unicorn/no-process-exit":"off","unicorn/no-useless-undefined":["error",{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-node-protocol":"off","unicorn/prevent-abbreviations":"off"},ke=r(()=>[{...O.configs["flat/recommended"],name:"jimmy.codes/unicorn",rules:he}],"unicornConfig"),ve={...U.configs.recommended.rules,"array-callback-return":["error",{allowImplicit:!0}],"arrow-body-style":["error","always"],curly:["error","all"],"no-console":"warn","no-useless-rename":"error","object-shorthand":"error","prefer-arrow-callback":"error"},we=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),Oe=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),Ce=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),Te=r(({astro:e=!1,autoDetect:t=!0,configs:o=[],ignores:u=[],react:p=!1,testing:f=!1,typescript:j=!1}={},...L)=>{const x=j||t&&ae(),S=p||t&&pe(),G=f||t&&fe(),A=e||t&&ue();return[{linterOptions:{reportUnusedDisableDirectives:!0},name:"jimmy.codes/base",rules:ve},...ce(),...ne(),...ke(),...ee(),...oe({typescript:x}),...x?be(we(j)):[],...S?ge(Ce(p),t):[],...A?D():[],...G?xe(Oe(f),t):[],{name:"jimmy.codes/prettier",...I},...K(),{ignores:[...z,...u],name:"jimmy.codes/ignores"},...o,...L]},"jimmyDotCodes");export{Te as default};
|
|
1
|
+
var B=Object.defineProperty;var r=(e,t)=>B(e,"name",{value:t,configurable:!0});import*as I from"astro-eslint-parser";import $ from"eslint-plugin-astro";import m from"eslint-plugin-jsx-a11y";import d from"globals";import{parser as N,configs as i}from"typescript-eslint";import b from"@eslint-community/eslint-plugin-eslint-comments/configs";import c from"eslint-plugin-import-x";import h from"eslint-plugin-n";import P from"@eslint/js";import k from"eslint-plugin-perfectionist";import F from"eslint-config-prettier";import J from"@tanstack/eslint-plugin-query";import y from"eslint-plugin-react";import V from"eslint-plugin-react-hooks";import*as X from"eslint-plugin-react-refresh";import{isPackageExists as n}from"local-pkg";import a from"eslint-plugin-jest";import*as v from"eslint-plugin-jest-dom";import O from"eslint-plugin-testing-library";import w from"eslint-plugin-unicorn";const s="?([cm])[jt]s?(x)",U=["**/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","**/.vinxi","**/app.config.timestamp_*.js","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts","**/vite.config.ts.*.mjs","**/*.gen.*","!.storybook"],z="**/*.?([cm])js",g="**/*.?([cm])jsx",C="**/*.?([cm])tsx",p=[`**/__tests__/**/*.${s}`,`**/*.spec.${s}`,`**/*.test.${s}`,`**/*.bench.${s}`,`**/*.benchmark.${s}`],T=[`**/e2e/**/*.spec.${s}`,`**/e2e/**/*.test.${s}`,`**/cypress/**/*.spec.${s}`,`**/cypress/**/*.test.${s}`],H="**/*.cjs",M="**/*.astro",Q=["vi.mock","describe","expect","it"],W=["@testing-library/react"],Y=r(()=>{const e=[M];return[{files:e,languageOptions:{globals:{...d.node,Astro:!1,Fragment:!1},parser:I,parserOptions:{extraFileExtensions:[".astro"],parser:N},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:$,"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,languageOptions:{parserOptions:i.disableTypeChecked.languageOptions?.parserOptions},name:"jimmy.codes/astro/disable-type-checked",rules:i.disableTypeChecked.rules},{name:"jimmy.codes/astro/imports",settings:{"import-x/core-modules":["astro:content"]}}]},"astroConfig"),D=r(()=>[{files:[H],languageOptions:{globals:d.commonjs},name:"jimmy.codes/commonjs"}],"commonjsConfig"),K={...b.recommended.rules,"@eslint-community/eslint-comments/no-unused-disable":"off","@eslint-community/eslint-comments/require-description":"error"},Z=r(()=>[{...b.recommended,name:"jimmy.codes/eslint-comments",rules:K}],"eslintCommentsConfig"),ee=r(e=>[{ignores:[...U,...e],name:"jimmy.codes/ignores"}],"ignoresConfig"),re={...c.configs.recommended.rules,"import-x/consistent-type-specifier-style":["error","prefer-top-level"],"import-x/extensions":["error","never",{checkTypedImports:!0,svg:"always"}],"import-x/first":"error","import-x/namespace":"off","import-x/newline-after-import":"error","import-x/no-absolute-path":"error","import-x/no-duplicates":"error","import-x/no-empty-named-blocks":"error","import-x/no-named-as-default":"error","import-x/no-named-as-default-member":"error","import-x/no-self-import":"error","import-x/no-unresolved":["error",{ignore:[String.raw`\.svg$`]}],"import-x/no-useless-path-segments":"error"},te={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}}},oe=r(({typescript:e=!1}={})=>[{languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module"}},name:"jimmy.codes/imports",plugins:{"import-x":c,n:h},rules:re,settings:{"import-x/parsers":{espree:[".js",".cjs",".mjs",".jsx"]}}},...e?[te]:[]],"importsConfig"),se={...P.configs.recommended.rules,"array-callback-return":["error",{allowImplicit:!0}],"arrow-body-style":["error","always"],curly:["error","all"],"no-console":"warn","no-self-compare":"error","no-template-curly-in-string":"error","no-unmodified-loop-condition":"error","no-unreachable-loop":"error","no-use-before-define":["error",{allowNamedExports:!1,classes:!1,functions:!1,variables:!0}],"no-useless-rename":"error","object-shorthand":"error","prefer-arrow-callback":"error"},ne=r(()=>[{linterOptions:{reportUnusedDisableDirectives:!0},name:"jimmy.codes/javascript",rules:se}],"javascriptConfig"),ie={"n/no-process-exit":"off","n/prefer-node-protocol":"error"},ce=r(()=>[{name:"jimmy.codes/node",plugins:{n:h},rules:ie}],"nodeConfig"),ae={...k.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"}]},pe=r(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:k},rules:ae}],"perfectionistConfig"),fe=r(()=>[{name:"jimmy.codes/prettier",...F}],"prettierConfig"),le=r(()=>n("typescript"),"hasTypescript"),me=r(()=>n("react"),"hasReact"),_=r(()=>n("vitest"),"hasVitest"),E=r(()=>n("jest"),"hasJest"),ue=r(()=>_()||E(),"hasTesting"),de=r(()=>W.some(e=>n(e)),"hasTestingLibrary"),ye=r(()=>n("@tanstack/react-query"),"hasReactQuery"),ge=r(()=>n("astro"),"hasAstro"),je=r(e=>e===2?"error":e===1?"warn":"off","toStringSeverity"),q=r((e={})=>Object.fromEntries(Object.entries(e).map(([t,o])=>[t,typeof o=="number"?je(o):o])),"normalizeRuleEntries"),xe={...m.configs.recommended.rules,...q(y.configs.flat?.recommended?.rules),...q(y.configs.flat?.["jsx-runtime"]?.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/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/forward-ref-uses-ref":"error","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-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-spread-multi":"off","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":"error","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/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}]},be=r(({utilities:e=[]}={},t=!0)=>{const o=e.includes("@tanstack/query")||t&&ye();return[{files:[g,C],languageOptions:{globals:{...d.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":m,react:y,"react-hooks":V,"react-refresh":X},rules:xe,settings:{react:{version:"detect"}}},...o?[{files:[g,C],name:"jimmy.codes/react/query",plugins:{"@tanstack/query":J},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]:[]]},"reactConfig"),R={...a.configs["flat/recommended"].rules,...a.configs["flat/style"].rules,"jest/consistent-test-it":["error",{fn:"test",withinDescribe:"it"}],"jest/no-alias-methods":"error","jest/no-commented-out-tests":"error","jest/no-conditional-in-test":"error","jest/no-confusing-set-timeout":"error","jest/no-duplicate-hooks":"error","jest/no-hooks":"off","jest/no-large-snapshots":"off","jest/no-restricted-jest-methods":"off","jest/no-restricted-matchers":"off","jest/no-test-return-statement":"error","jest/no-untyped-mock-factory":"off","jest/prefer-called-with":"error","jest/prefer-comparison-matcher":"error","jest/prefer-each":"error","jest/prefer-equality-matcher":"error","jest/prefer-expect-assertions":"off","jest/prefer-expect-resolves":"error","jest/prefer-hooks-in-order":"error","jest/prefer-hooks-on-top":"error","jest/prefer-lowercase-title":"off","jest/prefer-mock-promise-shorthand":"error","jest/prefer-snapshot-hint":"error","jest/prefer-spy-on":"off","jest/prefer-strict-equal":"error","jest/prefer-todo":"warn","jest/require-hook":"error","jest/require-to-throw-message":"error","jest/require-top-level-describe":"off","jest/unbound-method":"off"},he=r(()=>[{files:p,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":v,"testing-library":O},rules:{...O.configs.react.rules,...v.configs["flat/recommended"].rules}},{files:T,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}],"testingLibraryConfig"),ke=r(({framework:e="vitest",utilities:t}={},o=!0)=>{const u=o?_():e==="vitest",f=e==="jest"||o&&E(),l=!!t?.includes("testing-library")||o&&de();return[{files:p,name:"jimmy.codes/testing",...a.configs["flat/recommended"]},...u?[{files:p,name:"jimmy.codes/testing/vitest",...a.configs["flat/recommended"],rules:{...R,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:Q}]}}]:[],...f?[{files:p,name:"jimmy.codes/testing/jest",...a.configs["flat/recommended"],rules:R}]:[],{files:T,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}},...l?he():[]]},"testingConfig"),ve=r(e=>[...i.strictTypeChecked,...i.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/no-use-before-define":["error",{allowNamedExports:!1,classes:!1,functions:!1,variables:!0}],"@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0}],"no-use-before-define":"off"}},{files:[z,g],...i.disableTypeChecked},{files:p,name:"jimmy.codes/typescript/testing",rules:{"@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-unsafe-assignment":"off"}}],"typescriptConfig"),Oe={...w.configs["flat/recommended"].rules,"unicorn/filename-case":"off","unicorn/import-style":"off","unicorn/no-abusive-eslint-disable":"off","unicorn/no-anonymous-default-export":"off","unicorn/no-array-callback-reference":"off","unicorn/no-array-reduce":"off","unicorn/no-null":"off","unicorn/no-process-exit":"off","unicorn/no-useless-undefined":["error",{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-node-protocol":"off","unicorn/prevent-abbreviations":"off"},we=r(()=>[{...w.configs["flat/recommended"],name:"jimmy.codes/unicorn",rules:Oe}],"unicornConfig"),Ce=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"typescriptOptions"),Te=r(e=>typeof e=="object"?e:{framework:"vitest"},"testingOptions"),_e=r(e=>typeof e=="object"?e:{utilities:[]},"reactOptions"),Ee=r(({astro:e=!1,autoDetect:t=!0,configs:o=[],ignores:u=[],react:f=!1,testing:l=!1,typescript:j=!1}={},...L)=>{const x=j||t&&le(),S=f||t&&me(),G=l||t&&ue(),A=e||t&&ge();return[ne(),pe(),ce(),we(),Z(),oe({typescript:x}),x?ve(Ce(j)):[],S?be(_e(f),t):[],A?Y():[],G?ke(Te(l),t):[],fe(),D(),ee(u),o,L].flat()},"jimmyDotCodes");export{Ee as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jimmy.codes/eslint-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.1",
|
|
4
4
|
"description": "another opinionated eslint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"eslint-plugin-react": "^7.37.2",
|
|
51
51
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
52
52
|
"eslint-plugin-react-refresh": "0.4.14",
|
|
53
|
-
"eslint-plugin-testing-library": "7.0.0-beta.
|
|
53
|
+
"eslint-plugin-testing-library": "7.0.0-beta.5",
|
|
54
54
|
"eslint-plugin-unicorn": "^56.0.0",
|
|
55
55
|
"globals": "^15.12.0",
|
|
56
56
|
"local-pkg": "0.5.0",
|