@jimmy.codes/eslint-config 3.11.2 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +61 -57
- package/dist/index.d.mts +61 -57
- package/dist/index.mjs +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -83,6 +83,9 @@ export default jimmyDotCodes({ autoDetect: false });
|
|
|
83
83
|
|
|
84
84
|
You can also change the project location which can be helpful for monorepos:
|
|
85
85
|
|
|
86
|
+
> [!WARNING]
|
|
87
|
+
> This is [not recommended nor needed since the introduction of `projectService`](https://typescript-eslint.io/getting-started/typed-linting#can-i-customize-the-tsconfig-used-for-typed-linting) which this config uses by default.
|
|
88
|
+
|
|
86
89
|
```js
|
|
87
90
|
import jimmyDotCodes from "@jimmy.codes/eslint-config";
|
|
88
91
|
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var N=Object.create;var m=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var Q=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var t=(e,r)=>m(e,"name",{value:r,configurable:!0});var X=(e,r,s,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of J(r))!V.call(e,i)&&i!==s&&m(e,i,{get:()=>r[i],enumerable:!(n=F(r,i))||n.enumerable});return e};var o=(e,r,s)=>(s=e!=null?N(Q(e)):{},X(r||!e||!e.__esModule?m(s,"default",{value:e,enumerable:!0}):s,e));var d=require("globals"),p=require("typescript-eslint"),h=require("@eslint-community/eslint-plugin-eslint-comments/configs"),f=require("eslint-plugin-import-x"),v=require("eslint-plugin-n"),U=require("@eslint/js"),k=require("eslint-plugin-perfectionist"),z=require("eslint-config-prettier"),l=require("local-pkg"),w=require("eslint-plugin-jest"),E=require("eslint-plugin-unicorn");const a="?([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",y="**/*.?([cm])jsx",O="**/*.?([cm])tsx",u=[`**/__tests__/**/*.${a}`,`**/*.spec.${a}`,`**/*.test.${a}`,`**/*.bench.${a}`,`**/*.benchmark.${a}`],q=[`**/e2e/**/*.spec.${a}`,`**/e2e/**/*.test.${a}`,`**/cypress/**/*.spec.${a}`,`**/cypress/**/*.test.${a}`],W="**/*.cjs",Y="**/*.astro",D=["vi.mock","describe","expect","it"],K=["@testing-library/react"],Z=t(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),ee=t(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),re=t(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),te=t(e=>!!e.utilities?.includes("@tanstack/query"),"addTanstackQuery"),se=t(e=>!!e.utilities?.includes("testing-library"),"addTestingLibrary"),c=t(async e=>{const r=await e;return r.default??r},"interopDefault"),oe=t(async()=>{const e=[Y],[r,s,n]=await Promise.all([import("eslint-plugin-astro"),import("astro-eslint-parser"),c(import("eslint-plugin-jsx-a11y"))]);return[{files:e,languageOptions:{globals:{...d.node,Astro:!1,Fragment:!1},parser:s,parserOptions:{extraFileExtensions:[".astro"],parser:p.parser},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:r,"jsx-a11y":n},processor:"astro/client-side-ts",rules:{...n.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:p.configs.disableTypeChecked.languageOptions?.parserOptions},name:"jimmy.codes/astro/disable-type-checked",rules:p.configs.disableTypeChecked.rules},{name:"jimmy.codes/astro/imports",settings:{"import-x/core-modules":["astro:content"]}}]},"astroConfig"),ne=t(()=>[{files:[W],languageOptions:{globals:d.commonjs},name:"jimmy.codes/commonjs"}],"commonjsConfig"),ie={...h.recommended.rules,"@eslint-community/eslint-comments/no-unused-disable":"off","@eslint-community/eslint-comments/require-description":"error"},ae=t(()=>[{...h.recommended,name:"jimmy.codes/eslint-comments",rules:ie}],"eslintCommentsConfig"),ce=t(e=>[{ignores:[...H,...e],name:"jimmy.codes/ignores"}],"ignoresConfig"),le={...f.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"},pe={name:"jimmy.codes/imports/typescript",rules:f.configs.typescript.rules,settings:{...f.configs.typescript.settings,"import-x/resolver":{...f.configs.typescript.settings["import-x/resolver"],typescript:!0}}},fe=t(({typescript:e=!1}={})=>[{name:"jimmy.codes/imports",plugins:{"import-x":f,n:v},rules:le},...e?[pe]:[]],"importsConfig"),ue={...U.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"},me=t(()=>[{linterOptions:{reportUnusedDisableDirectives:!0},name:"jimmy.codes/javascript",rules:ue}],"javascriptConfig"),de={"n/no-process-exit":"off","n/prefer-node-protocol":"error"},ye=t(()=>[{name:"jimmy.codes/node",plugins:{n:v},rules:de}],"nodeConfig"),ge={...k.configs["recommended-natural"].rules,"perfectionist/sort-imports":["error",{customGroups:{type:{},value:{}},environment:"node",groups:["side-effect-style","builtin","type","external","internal-type","internal",["parent-type","sibling-type","index-type"],["parent","sibling","index"],"object","style","unknown"],internalPattern:["~/**","@/**"],order:"asc",type:"natural"}]},je=t(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:k},rules:ge}],"perfectionistConfig"),xe=t(()=>[{name:"jimmy.codes/prettier",...z}],"prettierConfig"),be=t(e=>e===2?"error":e===1?"warn":"off","toStringSeverity"),P=t((e={})=>Object.fromEntries(Object.entries(e).map(([r,s])=>[r,typeof s=="number"?be(s):s])),"normalizeRuleEntries"),he=t(async()=>{const[e,r]=await Promise.all([c(import("eslint-plugin-react")),c(import("eslint-plugin-jsx-a11y"))]);return{...r.configs.recommended.rules,...P(e.configs.flat?.recommended?.rules),...P(e.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}]}},"reactRules"),ve=t(async()=>{const[e,r,s,n]=await Promise.all([c(import("eslint-plugin-react")),c(import("eslint-plugin-jsx-a11y")),import("eslint-plugin-react-hooks"),import("eslint-plugin-react-refresh")]);return[{files:[y,O],languageOptions:{globals:{...d.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":r,react:e,"react-hooks":s,"react-refresh":n},rules:await he(),settings:{react:{version:"detect"}}}]},"reactConfig"),ke=t(async()=>{const e=await c(import("@tanstack/eslint-plugin-query"));return[{files:[y,O],name:"jimmy.codes/react/query",plugins:{"@tanstack/query":e},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]},"tanstackQuery"),we=t(()=>l.isPackageExists("typescript"),"hasTypescript"),Ee=t(()=>l.isPackageExists("react"),"hasReact"),C=t(()=>l.isPackageExists("vitest"),"hasVitest"),T=t(()=>l.isPackageExists("jest"),"hasJest"),Oe=t(()=>C()||T(),"hasTesting"),qe=t(()=>K.some(e=>l.isPackageExists(e)),"hasTestingLibrary"),Pe=t(()=>l.isPackageExists("@tanstack/react-query"),"hasReactQuery"),Ce=t(()=>l.isPackageExists("astro"),"hasAstro"),_={...w.configs["flat/recommended"].rules,...w.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"},Te=t(async({framework:e="vitest"}={},r=!0)=>{const s=await c(import("eslint-plugin-jest")),n=r?C():e==="vitest",i=e==="jest"||r&&T();return[{files:u,name:"jimmy.codes/testing",...s.configs["flat/recommended"]},...n?[{files:u,name:"jimmy.codes/testing/vitest",...s.configs["flat/recommended"],rules:{..._,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:D}]}}]:[],...i?[{files:u,name:"jimmy.codes/testing/jest",...s.configs["flat/recommended"],rules:_}]:[],{files:q,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}}]},"testingConfig"),_e=t(async()=>{const[e,r]=await Promise.all([import("eslint-plugin-jest-dom"),c(import("eslint-plugin-testing-library"))]);return[{files:u,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":e,"testing-library":r},rules:{...r.configs.react.rules,...e.configs["flat/recommended"].rules}},{files:q,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}]},"testingLibrary"),Re={"@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-unused-vars":["error",{args:"all",argsIgnorePattern:"^_",caughtErrors:"all",caughtErrorsIgnorePattern:"^_",destructuredArrayIgnorePattern:"^_",ignoreRestSiblings:!0,varsIgnorePattern:"^_"}],"@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"},Le=t(e=>[...p.configs.strictTypeChecked,...p.configs.stylisticTypeChecked.filter(r=>r.name==="typescript-eslint/stylistic-type-checked"),{languageOptions:{parserOptions:{project:e.project,tsconfigRootDir:process.cwd()}},name:"jimmy.codes/typescript",rules:Re},{files:[M,y],...p.configs.disableTypeChecked},{files:u,name:"jimmy.codes/typescript/testing",rules:{"@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-unsafe-assignment":"off"}}],"typescriptConfig"),Se={...E.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"},Ae=t(()=>[{...E.configs["flat/recommended"],name:"jimmy.codes/unicorn",rules:Se}],"unicornConfig"),Ge=t(async({astro:e=!1,autoDetect:r=!0,configs:s=[],ignores:n=[],react:i=!1,testing:g=!1,typescript:j=!1}={},...R)=>{const L=re(i),x=ee(g),S=Z(j),b=j||r&&we(),A=i||r&&Ee(),G=g||r&&Oe(),I=e||r&&Ce(),B=te(L)||r&&Pe(),$=se(x)||r&&qe();return[me(),je(),ye(),Ae(),ae(),fe({typescript:b}),b?Le(S):[],A?await ve():[],B?await ke():[],I?await oe():[],G?await Te(x,r):[],$?await _e():[],xe(),ne(),ce(n),s,R].flat()},"jimmyDotCodes");module.exports=Ge;
|
|
1
|
+
"use strict";var N=Object.create;var m=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var Q=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var t=(e,r)=>m(e,"name",{value:r,configurable:!0});var X=(e,r,s,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of J(r))!V.call(e,i)&&i!==s&&m(e,i,{get:()=>r[i],enumerable:!(n=F(r,i))||n.enumerable});return e};var o=(e,r,s)=>(s=e!=null?N(Q(e)):{},X(r||!e||!e.__esModule?m(s,"default",{value:e,enumerable:!0}):s,e));var d=require("globals"),p=require("typescript-eslint"),v=require("@eslint-community/eslint-plugin-eslint-comments/configs"),f=require("eslint-plugin-import-x"),k=require("eslint-plugin-n"),U=require("@eslint/js"),w=require("eslint-plugin-perfectionist"),z=require("eslint-config-prettier"),l=require("local-pkg"),E=require("eslint-plugin-jest"),O=require("eslint-plugin-unicorn");const a="?([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",y="**/*.?([cm])jsx",q="**/*.?([cm])tsx",u=[`**/__tests__/**/*.${a}`,`**/*.spec.${a}`,`**/*.test.${a}`,`**/*.bench.${a}`,`**/*.benchmark.${a}`],P=[`**/e2e/**/*.spec.${a}`,`**/e2e/**/*.test.${a}`,`**/cypress/**/*.spec.${a}`,`**/cypress/**/*.test.${a}`],W="**/*.cjs",Y="**/*.astro",D=["vi.mock","describe","expect","it"],K=["@testing-library/react"],Z=t(e=>typeof e=="object"?e:void 0,"getTypescriptOptions"),ee=t(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),re=t(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),te=t(e=>!!e.utilities?.includes("@tanstack/query"),"addTanstackQuery"),se=t(e=>!!e.utilities?.includes("testing-library"),"addTestingLibrary"),c=t(async e=>{const r=await e;return r.default??r},"interopDefault"),oe=t(async()=>{const e=[Y],[r,s,n]=await Promise.all([import("eslint-plugin-astro"),import("astro-eslint-parser"),c(import("eslint-plugin-jsx-a11y"))]);return[{files:e,languageOptions:{globals:{...d.node,Astro:!1,Fragment:!1},parser:s,parserOptions:{extraFileExtensions:[".astro"],parser:p.parser},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:r,"jsx-a11y":n},processor:"astro/client-side-ts",rules:{...n.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:p.configs.disableTypeChecked.languageOptions?.parserOptions},name:"jimmy.codes/astro/disable-type-checked",rules:p.configs.disableTypeChecked.rules},{name:"jimmy.codes/astro/imports",settings:{"import-x/core-modules":["astro:content"]}}]},"astroConfig"),ne=t(()=>[{files:[W],languageOptions:{globals:d.commonjs},name:"jimmy.codes/commonjs"}],"commonjsConfig"),ie={...v.recommended.rules,"@eslint-community/eslint-comments/no-unused-disable":"off","@eslint-community/eslint-comments/require-description":"error"},ae=t(()=>[{...v.recommended,name:"jimmy.codes/eslint-comments",rules:ie}],"eslintCommentsConfig"),ce=t(e=>[{ignores:[...H,...e],name:"jimmy.codes/ignores"}],"ignoresConfig"),le={...f.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"},pe={name:"jimmy.codes/imports/typescript",rules:f.configs.typescript.rules,settings:{...f.configs.typescript.settings,"import-x/resolver":{...f.configs.typescript.settings["import-x/resolver"],typescript:!0}}},fe=t(({typescript:e=!1}={})=>[{name:"jimmy.codes/imports",plugins:{"import-x":f,n:k},rules:le},...e?[pe]:[]],"importsConfig"),ue={...U.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"},me=t(()=>[{linterOptions:{reportUnusedDisableDirectives:!0},name:"jimmy.codes/javascript",rules:ue}],"javascriptConfig"),de={"n/no-process-exit":"off","n/prefer-node-protocol":"error"},ye=t(()=>[{name:"jimmy.codes/node",plugins:{n:k},rules:de}],"nodeConfig"),ge={...w.configs["recommended-natural"].rules,"perfectionist/sort-imports":["error",{customGroups:{type:{},value:{}},environment:"node",groups:["side-effect-style","builtin","type","external","internal-type","internal",["parent-type","sibling-type","index-type"],["parent","sibling","index"],"object","style","unknown"],internalPattern:["~/**","@/**"],order:"asc",type:"natural"}]},je=t(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:w},rules:ge}],"perfectionistConfig"),xe=t(()=>[{name:"jimmy.codes/prettier",...z}],"prettierConfig"),be=t(e=>e===2?"error":e===1?"warn":"off","toStringSeverity"),C=t((e={})=>Object.fromEntries(Object.entries(e).map(([r,s])=>[r,typeof s=="number"?be(s):s])),"normalizeRuleEntries"),he=t(async()=>{const[e,r]=await Promise.all([c(import("eslint-plugin-react")),c(import("eslint-plugin-jsx-a11y"))]);return{...r.configs.recommended.rules,...C(e.configs.flat?.recommended?.rules),...C(e.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}]}},"reactRules"),ve=t(async()=>{const[e,r,s,n]=await Promise.all([c(import("eslint-plugin-react")),c(import("eslint-plugin-jsx-a11y")),import("eslint-plugin-react-hooks"),import("eslint-plugin-react-refresh")]);return[{files:[y,q],languageOptions:{globals:{...d.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":r,react:e,"react-hooks":s,"react-refresh":n},rules:await he(),settings:{react:{version:"detect"}}}]},"reactConfig"),ke=t(async()=>{const e=await c(import("@tanstack/eslint-plugin-query"));return[{files:[y,q],name:"jimmy.codes/react/query",plugins:{"@tanstack/query":e},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]},"tanstackQuery"),we=t(()=>l.isPackageExists("typescript"),"hasTypescript"),Ee=t(()=>l.isPackageExists("react"),"hasReact"),T=t(()=>l.isPackageExists("vitest"),"hasVitest"),_=t(()=>l.isPackageExists("jest"),"hasJest"),Oe=t(()=>T()||_(),"hasTesting"),qe=t(()=>K.some(e=>l.isPackageExists(e)),"hasTestingLibrary"),Pe=t(()=>l.isPackageExists("@tanstack/react-query"),"hasReactQuery"),Ce=t(()=>l.isPackageExists("astro"),"hasAstro"),R={...E.configs["flat/recommended"].rules,...E.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"},Te=t(async({framework:e="vitest"}={},r=!0)=>{const s=await c(import("eslint-plugin-jest")),n=r?T():e==="vitest",i=e==="jest"||r&&_();return[{files:u,name:"jimmy.codes/testing",...s.configs["flat/recommended"]},...n?[{files:u,name:"jimmy.codes/testing/vitest",...s.configs["flat/recommended"],rules:{...R,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:D}]}}]:[],...i?[{files:u,name:"jimmy.codes/testing/jest",...s.configs["flat/recommended"],rules:R}]:[],{files:P,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}}]},"testingConfig"),_e=t(async()=>{const[e,r]=await Promise.all([import("eslint-plugin-jest-dom"),c(import("eslint-plugin-testing-library"))]);return[{files:u,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":e,"testing-library":r},rules:{...r.configs.react.rules,...e.configs["flat/recommended"].rules}},{files:P,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}]},"testingLibrary"),Re={"@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-unused-vars":["error",{args:"all",argsIgnorePattern:"^_",caughtErrors:"all",caughtErrorsIgnorePattern:"^_",destructuredArrayIgnorePattern:"^_",ignoreRestSiblings:!0,varsIgnorePattern:"^_"}],"@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"},Le=t(e=>[...p.configs.strictTypeChecked,...p.configs.stylisticTypeChecked.filter(r=>r.name==="typescript-eslint/stylistic-type-checked"),{languageOptions:{parserOptions:{...e?.project?{project:e.project}:{projectService:!0},tsconfigRootDir:process.cwd()}},name:"jimmy.codes/typescript",rules:Re},{files:[M,y],...p.configs.disableTypeChecked},{files:u,name:"jimmy.codes/typescript/testing",rules:{"@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-unsafe-assignment":"off"}}],"typescriptConfig"),Se={...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"},Ae=t(()=>[{...O.configs["flat/recommended"],name:"jimmy.codes/unicorn",rules:Se}],"unicornConfig"),Ge=t(async({astro:e=!1,autoDetect:r=!0,configs:s=[],ignores:n=[],react:i=!1,testing:g=!1,typescript:j=!1}={},...L)=>{const S=re(i),x=ee(g),b=Z(j),h=j||!!b||r&&we(),A=i||r&&Ee(),G=g||r&&Oe(),I=e||r&&Ce(),B=te(S)||r&&Pe(),$=se(x)||r&&qe();return[me(),je(),ye(),Ae(),ae(),fe({typescript:h}),h?Le(b):[],A?await ve():[],B?await ke():[],I?await oe():[],G?await Te(x,r):[],$?await _e():[],xe(),ne(),ce(n),s,L].flat()},"jimmyDotCodes");module.exports=Ge;
|
package/dist/index.d.cts
CHANGED
|
@@ -1259,233 +1259,233 @@ interface RuleOptions {
|
|
|
1259
1259
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
|
|
1260
1260
|
/**
|
|
1261
1261
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
1262
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1262
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/consistent-type-specifier-style.md
|
|
1263
1263
|
*/
|
|
1264
1264
|
'import-x/consistent-type-specifier-style'?: Linter.RuleEntry<ImportXConsistentTypeSpecifierStyle>
|
|
1265
1265
|
/**
|
|
1266
1266
|
* Ensure a default export is present, given a default import.
|
|
1267
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1267
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/default.md
|
|
1268
1268
|
*/
|
|
1269
1269
|
'import-x/default'?: Linter.RuleEntry<[]>
|
|
1270
1270
|
/**
|
|
1271
1271
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
1272
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1272
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/dynamic-import-chunkname.md
|
|
1273
1273
|
*/
|
|
1274
1274
|
'import-x/dynamic-import-chunkname'?: Linter.RuleEntry<ImportXDynamicImportChunkname>
|
|
1275
1275
|
/**
|
|
1276
1276
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
1277
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1277
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/export.md
|
|
1278
1278
|
*/
|
|
1279
1279
|
'import-x/export'?: Linter.RuleEntry<[]>
|
|
1280
1280
|
/**
|
|
1281
1281
|
* Ensure all exports appear after other statements.
|
|
1282
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1282
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/exports-last.md
|
|
1283
1283
|
*/
|
|
1284
1284
|
'import-x/exports-last'?: Linter.RuleEntry<[]>
|
|
1285
1285
|
/**
|
|
1286
1286
|
* Ensure consistent use of file extension within the import path.
|
|
1287
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1287
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/extensions.md
|
|
1288
1288
|
*/
|
|
1289
1289
|
'import-x/extensions'?: Linter.RuleEntry<ImportXExtensions>
|
|
1290
1290
|
/**
|
|
1291
1291
|
* Ensure all imports appear before other statements.
|
|
1292
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1292
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/first.md
|
|
1293
1293
|
*/
|
|
1294
1294
|
'import-x/first'?: Linter.RuleEntry<ImportXFirst>
|
|
1295
1295
|
/**
|
|
1296
1296
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
1297
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1297
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/group-exports.md
|
|
1298
1298
|
*/
|
|
1299
1299
|
'import-x/group-exports'?: Linter.RuleEntry<[]>
|
|
1300
1300
|
/**
|
|
1301
1301
|
* Replaced by `import-x/first`.
|
|
1302
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1302
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/imports-first.md
|
|
1303
1303
|
* @deprecated
|
|
1304
1304
|
*/
|
|
1305
1305
|
'import-x/imports-first'?: Linter.RuleEntry<ImportXImportsFirst>
|
|
1306
1306
|
/**
|
|
1307
1307
|
* Enforce the maximum number of dependencies a module can have.
|
|
1308
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1308
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/max-dependencies.md
|
|
1309
1309
|
*/
|
|
1310
1310
|
'import-x/max-dependencies'?: Linter.RuleEntry<ImportXMaxDependencies>
|
|
1311
1311
|
/**
|
|
1312
1312
|
* Ensure named imports correspond to a named export in the remote file.
|
|
1313
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1313
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/named.md
|
|
1314
1314
|
*/
|
|
1315
1315
|
'import-x/named'?: Linter.RuleEntry<ImportXNamed>
|
|
1316
1316
|
/**
|
|
1317
1317
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
1318
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1318
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/namespace.md
|
|
1319
1319
|
*/
|
|
1320
1320
|
'import-x/namespace'?: Linter.RuleEntry<ImportXNamespace>
|
|
1321
1321
|
/**
|
|
1322
1322
|
* Enforce a newline after import statements.
|
|
1323
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1323
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/newline-after-import.md
|
|
1324
1324
|
*/
|
|
1325
1325
|
'import-x/newline-after-import'?: Linter.RuleEntry<ImportXNewlineAfterImport>
|
|
1326
1326
|
/**
|
|
1327
1327
|
* Forbid import of modules using absolute paths.
|
|
1328
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1328
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-absolute-path.md
|
|
1329
1329
|
*/
|
|
1330
1330
|
'import-x/no-absolute-path'?: Linter.RuleEntry<ImportXNoAbsolutePath>
|
|
1331
1331
|
/**
|
|
1332
1332
|
* Forbid AMD `require` and `define` calls.
|
|
1333
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1333
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-amd.md
|
|
1334
1334
|
*/
|
|
1335
1335
|
'import-x/no-amd'?: Linter.RuleEntry<[]>
|
|
1336
1336
|
/**
|
|
1337
1337
|
* Forbid anonymous values as default exports.
|
|
1338
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1338
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-anonymous-default-export.md
|
|
1339
1339
|
*/
|
|
1340
1340
|
'import-x/no-anonymous-default-export'?: Linter.RuleEntry<ImportXNoAnonymousDefaultExport>
|
|
1341
1341
|
/**
|
|
1342
1342
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
1343
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1343
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-commonjs.md
|
|
1344
1344
|
*/
|
|
1345
1345
|
'import-x/no-commonjs'?: Linter.RuleEntry<ImportXNoCommonjs>
|
|
1346
1346
|
/**
|
|
1347
1347
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
1348
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1348
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-cycle.md
|
|
1349
1349
|
*/
|
|
1350
1350
|
'import-x/no-cycle'?: Linter.RuleEntry<ImportXNoCycle>
|
|
1351
1351
|
/**
|
|
1352
1352
|
* Forbid default exports.
|
|
1353
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1353
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-default-export.md
|
|
1354
1354
|
*/
|
|
1355
1355
|
'import-x/no-default-export'?: Linter.RuleEntry<[]>
|
|
1356
1356
|
/**
|
|
1357
1357
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
1358
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1358
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-deprecated.md
|
|
1359
1359
|
*/
|
|
1360
1360
|
'import-x/no-deprecated'?: Linter.RuleEntry<[]>
|
|
1361
1361
|
/**
|
|
1362
1362
|
* Forbid repeated import of the same module in multiple places.
|
|
1363
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1363
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-duplicates.md
|
|
1364
1364
|
*/
|
|
1365
1365
|
'import-x/no-duplicates'?: Linter.RuleEntry<ImportXNoDuplicates>
|
|
1366
1366
|
/**
|
|
1367
1367
|
* Forbid `require()` calls with expressions.
|
|
1368
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1368
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-dynamic-require.md
|
|
1369
1369
|
*/
|
|
1370
1370
|
'import-x/no-dynamic-require'?: Linter.RuleEntry<ImportXNoDynamicRequire>
|
|
1371
1371
|
/**
|
|
1372
1372
|
* Forbid empty named import blocks.
|
|
1373
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1373
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-empty-named-blocks.md
|
|
1374
1374
|
*/
|
|
1375
1375
|
'import-x/no-empty-named-blocks'?: Linter.RuleEntry<[]>
|
|
1376
1376
|
/**
|
|
1377
1377
|
* Forbid the use of extraneous packages.
|
|
1378
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1378
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-extraneous-dependencies.md
|
|
1379
1379
|
*/
|
|
1380
1380
|
'import-x/no-extraneous-dependencies'?: Linter.RuleEntry<ImportXNoExtraneousDependencies>
|
|
1381
1381
|
/**
|
|
1382
1382
|
* Forbid import statements with CommonJS module.exports.
|
|
1383
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1383
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-import-module-exports.md
|
|
1384
1384
|
*/
|
|
1385
1385
|
'import-x/no-import-module-exports'?: Linter.RuleEntry<ImportXNoImportModuleExports>
|
|
1386
1386
|
/**
|
|
1387
1387
|
* Forbid importing the submodules of other modules.
|
|
1388
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1388
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-internal-modules.md
|
|
1389
1389
|
*/
|
|
1390
1390
|
'import-x/no-internal-modules'?: Linter.RuleEntry<ImportXNoInternalModules>
|
|
1391
1391
|
/**
|
|
1392
1392
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
1393
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1393
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-mutable-exports.md
|
|
1394
1394
|
*/
|
|
1395
1395
|
'import-x/no-mutable-exports'?: Linter.RuleEntry<[]>
|
|
1396
1396
|
/**
|
|
1397
1397
|
* Forbid use of exported name as identifier of default export.
|
|
1398
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1398
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-named-as-default.md
|
|
1399
1399
|
*/
|
|
1400
1400
|
'import-x/no-named-as-default'?: Linter.RuleEntry<[]>
|
|
1401
1401
|
/**
|
|
1402
1402
|
* Forbid use of exported name as property of default export.
|
|
1403
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1403
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-named-as-default-member.md
|
|
1404
1404
|
*/
|
|
1405
1405
|
'import-x/no-named-as-default-member'?: Linter.RuleEntry<[]>
|
|
1406
1406
|
/**
|
|
1407
1407
|
* Forbid named default exports.
|
|
1408
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1408
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-named-default.md
|
|
1409
1409
|
*/
|
|
1410
1410
|
'import-x/no-named-default'?: Linter.RuleEntry<[]>
|
|
1411
1411
|
/**
|
|
1412
1412
|
* Forbid named exports.
|
|
1413
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1413
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-named-export.md
|
|
1414
1414
|
*/
|
|
1415
1415
|
'import-x/no-named-export'?: Linter.RuleEntry<[]>
|
|
1416
1416
|
/**
|
|
1417
1417
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
1418
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1418
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-namespace.md
|
|
1419
1419
|
*/
|
|
1420
1420
|
'import-x/no-namespace'?: Linter.RuleEntry<ImportXNoNamespace>
|
|
1421
1421
|
/**
|
|
1422
1422
|
* Forbid Node.js builtin modules.
|
|
1423
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1423
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-nodejs-modules.md
|
|
1424
1424
|
*/
|
|
1425
1425
|
'import-x/no-nodejs-modules'?: Linter.RuleEntry<ImportXNoNodejsModules>
|
|
1426
1426
|
/**
|
|
1427
1427
|
* Forbid importing packages through relative paths.
|
|
1428
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1428
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-relative-packages.md
|
|
1429
1429
|
*/
|
|
1430
1430
|
'import-x/no-relative-packages'?: Linter.RuleEntry<ImportXNoRelativePackages>
|
|
1431
1431
|
/**
|
|
1432
1432
|
* Forbid importing modules from parent directories.
|
|
1433
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1433
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-relative-parent-imports.md
|
|
1434
1434
|
*/
|
|
1435
1435
|
'import-x/no-relative-parent-imports'?: Linter.RuleEntry<ImportXNoRelativeParentImports>
|
|
1436
1436
|
/**
|
|
1437
1437
|
* Forbid importing a default export by a different name.
|
|
1438
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1438
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-rename-default.md
|
|
1439
1439
|
*/
|
|
1440
1440
|
'import-x/no-rename-default'?: Linter.RuleEntry<ImportXNoRenameDefault>
|
|
1441
1441
|
/**
|
|
1442
1442
|
* Enforce which files can be imported in a given folder.
|
|
1443
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1443
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-restricted-paths.md
|
|
1444
1444
|
*/
|
|
1445
1445
|
'import-x/no-restricted-paths'?: Linter.RuleEntry<ImportXNoRestrictedPaths>
|
|
1446
1446
|
/**
|
|
1447
1447
|
* Forbid a module from importing itself.
|
|
1448
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1448
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-self-import.md
|
|
1449
1449
|
*/
|
|
1450
1450
|
'import-x/no-self-import'?: Linter.RuleEntry<[]>
|
|
1451
1451
|
/**
|
|
1452
1452
|
* Forbid unassigned imports.
|
|
1453
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1453
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-unassigned-import.md
|
|
1454
1454
|
*/
|
|
1455
1455
|
'import-x/no-unassigned-import'?: Linter.RuleEntry<ImportXNoUnassignedImport>
|
|
1456
1456
|
/**
|
|
1457
1457
|
* Ensure imports point to a file/module that can be resolved.
|
|
1458
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1458
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-unresolved.md
|
|
1459
1459
|
*/
|
|
1460
1460
|
'import-x/no-unresolved'?: Linter.RuleEntry<ImportXNoUnresolved>
|
|
1461
1461
|
/**
|
|
1462
1462
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
1463
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1463
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-unused-modules.md
|
|
1464
1464
|
*/
|
|
1465
1465
|
'import-x/no-unused-modules'?: Linter.RuleEntry<ImportXNoUnusedModules>
|
|
1466
1466
|
/**
|
|
1467
1467
|
* Forbid unnecessary path segments in import and require statements.
|
|
1468
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1468
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-useless-path-segments.md
|
|
1469
1469
|
*/
|
|
1470
1470
|
'import-x/no-useless-path-segments'?: Linter.RuleEntry<ImportXNoUselessPathSegments>
|
|
1471
1471
|
/**
|
|
1472
1472
|
* Forbid webpack loader syntax in imports.
|
|
1473
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1473
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-webpack-loader-syntax.md
|
|
1474
1474
|
*/
|
|
1475
1475
|
'import-x/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
|
|
1476
1476
|
/**
|
|
1477
1477
|
* Enforce a convention in module import order.
|
|
1478
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1478
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/order.md
|
|
1479
1479
|
*/
|
|
1480
1480
|
'import-x/order'?: Linter.RuleEntry<ImportXOrder>
|
|
1481
1481
|
/**
|
|
1482
1482
|
* Prefer a default export if module exports a single name or multiple names.
|
|
1483
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1483
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/prefer-default-export.md
|
|
1484
1484
|
*/
|
|
1485
1485
|
'import-x/prefer-default-export'?: Linter.RuleEntry<ImportXPreferDefaultExport>
|
|
1486
1486
|
/**
|
|
1487
1487
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
1488
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1488
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/unambiguous.md
|
|
1489
1489
|
*/
|
|
1490
1490
|
'import-x/unambiguous'?: Linter.RuleEntry<[]>
|
|
1491
1491
|
/**
|
|
@@ -5516,6 +5516,8 @@ type TypescriptEslintNoConfusingVoidExpression = []|[{
|
|
|
5516
5516
|
ignoreArrowShorthand?: boolean
|
|
5517
5517
|
|
|
5518
5518
|
ignoreVoidOperator?: boolean
|
|
5519
|
+
|
|
5520
|
+
ignoreVoidReturningFunctions?: boolean
|
|
5519
5521
|
}]
|
|
5520
5522
|
// ----- @typescript-eslint/no-duplicate-type-constituents -----
|
|
5521
5523
|
type TypescriptEslintNoDuplicateTypeConstituents = []|[{
|
|
@@ -6580,10 +6582,10 @@ type ImportXExtensions = ([]|[("always" | "ignorePackages" | "never")] | []|[("a
|
|
|
6580
6582
|
ignorePackages?: boolean
|
|
6581
6583
|
checkTypeImports?: boolean
|
|
6582
6584
|
[k: string]: unknown | undefined
|
|
6583
|
-
}] | []|[{
|
|
6584
|
-
[k: string]: ("always" | "ignorePackages" | "never")
|
|
6585
6585
|
}] | []|[("always" | "ignorePackages" | "never")]|[("always" | "ignorePackages" | "never"), {
|
|
6586
6586
|
[k: string]: ("always" | "ignorePackages" | "never")
|
|
6587
|
+
}] | []|[{
|
|
6588
|
+
[k: string]: ("always" | "ignorePackages" | "never")
|
|
6587
6589
|
}])
|
|
6588
6590
|
// ----- import-x/first -----
|
|
6589
6591
|
type ImportXFirst = []|[("absolute-first" | "disable-absolute-first")]
|
|
@@ -9785,7 +9787,7 @@ type Rules = RuleOptions;
|
|
|
9785
9787
|
interface TypescriptOptions {
|
|
9786
9788
|
/**
|
|
9787
9789
|
* Location of `tsconfig.json` used for [type aware linting](https://typescript-eslint.io/getting-started/typed-linting)
|
|
9788
|
-
* @
|
|
9790
|
+
* @deprecated since this config uses `projectService` this is no longer needed and will be removed.
|
|
9789
9791
|
*/
|
|
9790
9792
|
project: string | string[];
|
|
9791
9793
|
}
|
|
@@ -10213,12 +10215,11 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
10213
10215
|
category?: string;
|
|
10214
10216
|
recommended?: true;
|
|
10215
10217
|
}, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
10216
|
-
extensions: _typescript_eslint_utils_ts_eslint.RuleModule<"missing" | "unexpected",
|
|
10217
|
-
defaultConfig?: string;
|
|
10218
|
-
pattern?: Record<eslint_plugin_import_x_types_js.FileExtension, string>;
|
|
10218
|
+
extensions: _typescript_eslint_utils_ts_eslint.RuleModule<"missing" | "unexpected", [] | ["always" | "ignorePackages" | "never"] | ["always" | "ignorePackages" | "never", {
|
|
10219
10219
|
ignorePackages?: boolean;
|
|
10220
10220
|
checkTypeImports?: boolean;
|
|
10221
|
-
|
|
10221
|
+
pattern: Partial<Record<string, "always" | "ignorePackages" | "never">>;
|
|
10222
|
+
}] | ["always" | "ignorePackages" | "never", Partial<Record<string, "always" | "ignorePackages" | "never">>] | [Partial<Record<string, "always" | "ignorePackages" | "never">>], {
|
|
10222
10223
|
category?: string;
|
|
10223
10224
|
recommended?: true;
|
|
10224
10225
|
}, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
@@ -10342,10 +10343,10 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
10342
10343
|
}, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
10343
10344
|
"no-extraneous-dependencies": _typescript_eslint_utils_ts_eslint.RuleModule<"missing" | "pkgNotFound" | "pkgUnparsable" | "devDep" | "optDep", [({
|
|
10344
10345
|
packageDir?: string | string[];
|
|
10345
|
-
devDependencies?: boolean;
|
|
10346
|
-
optionalDependencies?: boolean;
|
|
10347
|
-
peerDependencies?: boolean;
|
|
10348
|
-
bundledDependencies?: boolean;
|
|
10346
|
+
devDependencies?: boolean | string[];
|
|
10347
|
+
optionalDependencies?: boolean | string[];
|
|
10348
|
+
peerDependencies?: boolean | string[];
|
|
10349
|
+
bundledDependencies?: boolean | string[];
|
|
10349
10350
|
includeInternal?: boolean;
|
|
10350
10351
|
includeTypes?: boolean;
|
|
10351
10352
|
whitelist?: string[];
|
|
@@ -12264,8 +12265,11 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
12264
12265
|
} | {
|
|
12265
12266
|
languageOptions: {
|
|
12266
12267
|
parserOptions: {
|
|
12268
|
+
tsconfigRootDir: string;
|
|
12267
12269
|
project: string | string[];
|
|
12270
|
+
} | {
|
|
12268
12271
|
tsconfigRootDir: string;
|
|
12272
|
+
projectService: boolean;
|
|
12269
12273
|
};
|
|
12270
12274
|
};
|
|
12271
12275
|
name: string;
|
package/dist/index.d.mts
CHANGED
|
@@ -1259,233 +1259,233 @@ interface RuleOptions {
|
|
|
1259
1259
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
|
|
1260
1260
|
/**
|
|
1261
1261
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
1262
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1262
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/consistent-type-specifier-style.md
|
|
1263
1263
|
*/
|
|
1264
1264
|
'import-x/consistent-type-specifier-style'?: Linter.RuleEntry<ImportXConsistentTypeSpecifierStyle>
|
|
1265
1265
|
/**
|
|
1266
1266
|
* Ensure a default export is present, given a default import.
|
|
1267
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1267
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/default.md
|
|
1268
1268
|
*/
|
|
1269
1269
|
'import-x/default'?: Linter.RuleEntry<[]>
|
|
1270
1270
|
/**
|
|
1271
1271
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
1272
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1272
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/dynamic-import-chunkname.md
|
|
1273
1273
|
*/
|
|
1274
1274
|
'import-x/dynamic-import-chunkname'?: Linter.RuleEntry<ImportXDynamicImportChunkname>
|
|
1275
1275
|
/**
|
|
1276
1276
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
1277
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1277
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/export.md
|
|
1278
1278
|
*/
|
|
1279
1279
|
'import-x/export'?: Linter.RuleEntry<[]>
|
|
1280
1280
|
/**
|
|
1281
1281
|
* Ensure all exports appear after other statements.
|
|
1282
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1282
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/exports-last.md
|
|
1283
1283
|
*/
|
|
1284
1284
|
'import-x/exports-last'?: Linter.RuleEntry<[]>
|
|
1285
1285
|
/**
|
|
1286
1286
|
* Ensure consistent use of file extension within the import path.
|
|
1287
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1287
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/extensions.md
|
|
1288
1288
|
*/
|
|
1289
1289
|
'import-x/extensions'?: Linter.RuleEntry<ImportXExtensions>
|
|
1290
1290
|
/**
|
|
1291
1291
|
* Ensure all imports appear before other statements.
|
|
1292
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1292
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/first.md
|
|
1293
1293
|
*/
|
|
1294
1294
|
'import-x/first'?: Linter.RuleEntry<ImportXFirst>
|
|
1295
1295
|
/**
|
|
1296
1296
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
1297
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1297
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/group-exports.md
|
|
1298
1298
|
*/
|
|
1299
1299
|
'import-x/group-exports'?: Linter.RuleEntry<[]>
|
|
1300
1300
|
/**
|
|
1301
1301
|
* Replaced by `import-x/first`.
|
|
1302
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1302
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/imports-first.md
|
|
1303
1303
|
* @deprecated
|
|
1304
1304
|
*/
|
|
1305
1305
|
'import-x/imports-first'?: Linter.RuleEntry<ImportXImportsFirst>
|
|
1306
1306
|
/**
|
|
1307
1307
|
* Enforce the maximum number of dependencies a module can have.
|
|
1308
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1308
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/max-dependencies.md
|
|
1309
1309
|
*/
|
|
1310
1310
|
'import-x/max-dependencies'?: Linter.RuleEntry<ImportXMaxDependencies>
|
|
1311
1311
|
/**
|
|
1312
1312
|
* Ensure named imports correspond to a named export in the remote file.
|
|
1313
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1313
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/named.md
|
|
1314
1314
|
*/
|
|
1315
1315
|
'import-x/named'?: Linter.RuleEntry<ImportXNamed>
|
|
1316
1316
|
/**
|
|
1317
1317
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
1318
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1318
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/namespace.md
|
|
1319
1319
|
*/
|
|
1320
1320
|
'import-x/namespace'?: Linter.RuleEntry<ImportXNamespace>
|
|
1321
1321
|
/**
|
|
1322
1322
|
* Enforce a newline after import statements.
|
|
1323
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1323
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/newline-after-import.md
|
|
1324
1324
|
*/
|
|
1325
1325
|
'import-x/newline-after-import'?: Linter.RuleEntry<ImportXNewlineAfterImport>
|
|
1326
1326
|
/**
|
|
1327
1327
|
* Forbid import of modules using absolute paths.
|
|
1328
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1328
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-absolute-path.md
|
|
1329
1329
|
*/
|
|
1330
1330
|
'import-x/no-absolute-path'?: Linter.RuleEntry<ImportXNoAbsolutePath>
|
|
1331
1331
|
/**
|
|
1332
1332
|
* Forbid AMD `require` and `define` calls.
|
|
1333
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1333
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-amd.md
|
|
1334
1334
|
*/
|
|
1335
1335
|
'import-x/no-amd'?: Linter.RuleEntry<[]>
|
|
1336
1336
|
/**
|
|
1337
1337
|
* Forbid anonymous values as default exports.
|
|
1338
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1338
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-anonymous-default-export.md
|
|
1339
1339
|
*/
|
|
1340
1340
|
'import-x/no-anonymous-default-export'?: Linter.RuleEntry<ImportXNoAnonymousDefaultExport>
|
|
1341
1341
|
/**
|
|
1342
1342
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
1343
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1343
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-commonjs.md
|
|
1344
1344
|
*/
|
|
1345
1345
|
'import-x/no-commonjs'?: Linter.RuleEntry<ImportXNoCommonjs>
|
|
1346
1346
|
/**
|
|
1347
1347
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
1348
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1348
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-cycle.md
|
|
1349
1349
|
*/
|
|
1350
1350
|
'import-x/no-cycle'?: Linter.RuleEntry<ImportXNoCycle>
|
|
1351
1351
|
/**
|
|
1352
1352
|
* Forbid default exports.
|
|
1353
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1353
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-default-export.md
|
|
1354
1354
|
*/
|
|
1355
1355
|
'import-x/no-default-export'?: Linter.RuleEntry<[]>
|
|
1356
1356
|
/**
|
|
1357
1357
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
1358
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1358
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-deprecated.md
|
|
1359
1359
|
*/
|
|
1360
1360
|
'import-x/no-deprecated'?: Linter.RuleEntry<[]>
|
|
1361
1361
|
/**
|
|
1362
1362
|
* Forbid repeated import of the same module in multiple places.
|
|
1363
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1363
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-duplicates.md
|
|
1364
1364
|
*/
|
|
1365
1365
|
'import-x/no-duplicates'?: Linter.RuleEntry<ImportXNoDuplicates>
|
|
1366
1366
|
/**
|
|
1367
1367
|
* Forbid `require()` calls with expressions.
|
|
1368
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1368
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-dynamic-require.md
|
|
1369
1369
|
*/
|
|
1370
1370
|
'import-x/no-dynamic-require'?: Linter.RuleEntry<ImportXNoDynamicRequire>
|
|
1371
1371
|
/**
|
|
1372
1372
|
* Forbid empty named import blocks.
|
|
1373
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1373
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-empty-named-blocks.md
|
|
1374
1374
|
*/
|
|
1375
1375
|
'import-x/no-empty-named-blocks'?: Linter.RuleEntry<[]>
|
|
1376
1376
|
/**
|
|
1377
1377
|
* Forbid the use of extraneous packages.
|
|
1378
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1378
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-extraneous-dependencies.md
|
|
1379
1379
|
*/
|
|
1380
1380
|
'import-x/no-extraneous-dependencies'?: Linter.RuleEntry<ImportXNoExtraneousDependencies>
|
|
1381
1381
|
/**
|
|
1382
1382
|
* Forbid import statements with CommonJS module.exports.
|
|
1383
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1383
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-import-module-exports.md
|
|
1384
1384
|
*/
|
|
1385
1385
|
'import-x/no-import-module-exports'?: Linter.RuleEntry<ImportXNoImportModuleExports>
|
|
1386
1386
|
/**
|
|
1387
1387
|
* Forbid importing the submodules of other modules.
|
|
1388
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1388
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-internal-modules.md
|
|
1389
1389
|
*/
|
|
1390
1390
|
'import-x/no-internal-modules'?: Linter.RuleEntry<ImportXNoInternalModules>
|
|
1391
1391
|
/**
|
|
1392
1392
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
1393
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1393
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-mutable-exports.md
|
|
1394
1394
|
*/
|
|
1395
1395
|
'import-x/no-mutable-exports'?: Linter.RuleEntry<[]>
|
|
1396
1396
|
/**
|
|
1397
1397
|
* Forbid use of exported name as identifier of default export.
|
|
1398
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1398
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-named-as-default.md
|
|
1399
1399
|
*/
|
|
1400
1400
|
'import-x/no-named-as-default'?: Linter.RuleEntry<[]>
|
|
1401
1401
|
/**
|
|
1402
1402
|
* Forbid use of exported name as property of default export.
|
|
1403
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1403
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-named-as-default-member.md
|
|
1404
1404
|
*/
|
|
1405
1405
|
'import-x/no-named-as-default-member'?: Linter.RuleEntry<[]>
|
|
1406
1406
|
/**
|
|
1407
1407
|
* Forbid named default exports.
|
|
1408
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1408
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-named-default.md
|
|
1409
1409
|
*/
|
|
1410
1410
|
'import-x/no-named-default'?: Linter.RuleEntry<[]>
|
|
1411
1411
|
/**
|
|
1412
1412
|
* Forbid named exports.
|
|
1413
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1413
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-named-export.md
|
|
1414
1414
|
*/
|
|
1415
1415
|
'import-x/no-named-export'?: Linter.RuleEntry<[]>
|
|
1416
1416
|
/**
|
|
1417
1417
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
1418
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1418
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-namespace.md
|
|
1419
1419
|
*/
|
|
1420
1420
|
'import-x/no-namespace'?: Linter.RuleEntry<ImportXNoNamespace>
|
|
1421
1421
|
/**
|
|
1422
1422
|
* Forbid Node.js builtin modules.
|
|
1423
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1423
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-nodejs-modules.md
|
|
1424
1424
|
*/
|
|
1425
1425
|
'import-x/no-nodejs-modules'?: Linter.RuleEntry<ImportXNoNodejsModules>
|
|
1426
1426
|
/**
|
|
1427
1427
|
* Forbid importing packages through relative paths.
|
|
1428
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1428
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-relative-packages.md
|
|
1429
1429
|
*/
|
|
1430
1430
|
'import-x/no-relative-packages'?: Linter.RuleEntry<ImportXNoRelativePackages>
|
|
1431
1431
|
/**
|
|
1432
1432
|
* Forbid importing modules from parent directories.
|
|
1433
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1433
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-relative-parent-imports.md
|
|
1434
1434
|
*/
|
|
1435
1435
|
'import-x/no-relative-parent-imports'?: Linter.RuleEntry<ImportXNoRelativeParentImports>
|
|
1436
1436
|
/**
|
|
1437
1437
|
* Forbid importing a default export by a different name.
|
|
1438
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1438
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-rename-default.md
|
|
1439
1439
|
*/
|
|
1440
1440
|
'import-x/no-rename-default'?: Linter.RuleEntry<ImportXNoRenameDefault>
|
|
1441
1441
|
/**
|
|
1442
1442
|
* Enforce which files can be imported in a given folder.
|
|
1443
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1443
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-restricted-paths.md
|
|
1444
1444
|
*/
|
|
1445
1445
|
'import-x/no-restricted-paths'?: Linter.RuleEntry<ImportXNoRestrictedPaths>
|
|
1446
1446
|
/**
|
|
1447
1447
|
* Forbid a module from importing itself.
|
|
1448
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1448
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-self-import.md
|
|
1449
1449
|
*/
|
|
1450
1450
|
'import-x/no-self-import'?: Linter.RuleEntry<[]>
|
|
1451
1451
|
/**
|
|
1452
1452
|
* Forbid unassigned imports.
|
|
1453
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1453
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-unassigned-import.md
|
|
1454
1454
|
*/
|
|
1455
1455
|
'import-x/no-unassigned-import'?: Linter.RuleEntry<ImportXNoUnassignedImport>
|
|
1456
1456
|
/**
|
|
1457
1457
|
* Ensure imports point to a file/module that can be resolved.
|
|
1458
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1458
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-unresolved.md
|
|
1459
1459
|
*/
|
|
1460
1460
|
'import-x/no-unresolved'?: Linter.RuleEntry<ImportXNoUnresolved>
|
|
1461
1461
|
/**
|
|
1462
1462
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
1463
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1463
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-unused-modules.md
|
|
1464
1464
|
*/
|
|
1465
1465
|
'import-x/no-unused-modules'?: Linter.RuleEntry<ImportXNoUnusedModules>
|
|
1466
1466
|
/**
|
|
1467
1467
|
* Forbid unnecessary path segments in import and require statements.
|
|
1468
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1468
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-useless-path-segments.md
|
|
1469
1469
|
*/
|
|
1470
1470
|
'import-x/no-useless-path-segments'?: Linter.RuleEntry<ImportXNoUselessPathSegments>
|
|
1471
1471
|
/**
|
|
1472
1472
|
* Forbid webpack loader syntax in imports.
|
|
1473
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1473
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/no-webpack-loader-syntax.md
|
|
1474
1474
|
*/
|
|
1475
1475
|
'import-x/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
|
|
1476
1476
|
/**
|
|
1477
1477
|
* Enforce a convention in module import order.
|
|
1478
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1478
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/order.md
|
|
1479
1479
|
*/
|
|
1480
1480
|
'import-x/order'?: Linter.RuleEntry<ImportXOrder>
|
|
1481
1481
|
/**
|
|
1482
1482
|
* Prefer a default export if module exports a single name or multiple names.
|
|
1483
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1483
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/prefer-default-export.md
|
|
1484
1484
|
*/
|
|
1485
1485
|
'import-x/prefer-default-export'?: Linter.RuleEntry<ImportXPreferDefaultExport>
|
|
1486
1486
|
/**
|
|
1487
1487
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
1488
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.
|
|
1488
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.4.2/docs/rules/unambiguous.md
|
|
1489
1489
|
*/
|
|
1490
1490
|
'import-x/unambiguous'?: Linter.RuleEntry<[]>
|
|
1491
1491
|
/**
|
|
@@ -5516,6 +5516,8 @@ type TypescriptEslintNoConfusingVoidExpression = []|[{
|
|
|
5516
5516
|
ignoreArrowShorthand?: boolean
|
|
5517
5517
|
|
|
5518
5518
|
ignoreVoidOperator?: boolean
|
|
5519
|
+
|
|
5520
|
+
ignoreVoidReturningFunctions?: boolean
|
|
5519
5521
|
}]
|
|
5520
5522
|
// ----- @typescript-eslint/no-duplicate-type-constituents -----
|
|
5521
5523
|
type TypescriptEslintNoDuplicateTypeConstituents = []|[{
|
|
@@ -6580,10 +6582,10 @@ type ImportXExtensions = ([]|[("always" | "ignorePackages" | "never")] | []|[("a
|
|
|
6580
6582
|
ignorePackages?: boolean
|
|
6581
6583
|
checkTypeImports?: boolean
|
|
6582
6584
|
[k: string]: unknown | undefined
|
|
6583
|
-
}] | []|[{
|
|
6584
|
-
[k: string]: ("always" | "ignorePackages" | "never")
|
|
6585
6585
|
}] | []|[("always" | "ignorePackages" | "never")]|[("always" | "ignorePackages" | "never"), {
|
|
6586
6586
|
[k: string]: ("always" | "ignorePackages" | "never")
|
|
6587
|
+
}] | []|[{
|
|
6588
|
+
[k: string]: ("always" | "ignorePackages" | "never")
|
|
6587
6589
|
}])
|
|
6588
6590
|
// ----- import-x/first -----
|
|
6589
6591
|
type ImportXFirst = []|[("absolute-first" | "disable-absolute-first")]
|
|
@@ -9785,7 +9787,7 @@ type Rules = RuleOptions;
|
|
|
9785
9787
|
interface TypescriptOptions {
|
|
9786
9788
|
/**
|
|
9787
9789
|
* Location of `tsconfig.json` used for [type aware linting](https://typescript-eslint.io/getting-started/typed-linting)
|
|
9788
|
-
* @
|
|
9790
|
+
* @deprecated since this config uses `projectService` this is no longer needed and will be removed.
|
|
9789
9791
|
*/
|
|
9790
9792
|
project: string | string[];
|
|
9791
9793
|
}
|
|
@@ -10213,12 +10215,11 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
10213
10215
|
category?: string;
|
|
10214
10216
|
recommended?: true;
|
|
10215
10217
|
}, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
10216
|
-
extensions: _typescript_eslint_utils_ts_eslint.RuleModule<"missing" | "unexpected",
|
|
10217
|
-
defaultConfig?: string;
|
|
10218
|
-
pattern?: Record<eslint_plugin_import_x_types_js.FileExtension, string>;
|
|
10218
|
+
extensions: _typescript_eslint_utils_ts_eslint.RuleModule<"missing" | "unexpected", [] | ["always" | "ignorePackages" | "never"] | ["always" | "ignorePackages" | "never", {
|
|
10219
10219
|
ignorePackages?: boolean;
|
|
10220
10220
|
checkTypeImports?: boolean;
|
|
10221
|
-
|
|
10221
|
+
pattern: Partial<Record<string, "always" | "ignorePackages" | "never">>;
|
|
10222
|
+
}] | ["always" | "ignorePackages" | "never", Partial<Record<string, "always" | "ignorePackages" | "never">>] | [Partial<Record<string, "always" | "ignorePackages" | "never">>], {
|
|
10222
10223
|
category?: string;
|
|
10223
10224
|
recommended?: true;
|
|
10224
10225
|
}, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
@@ -10342,10 +10343,10 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
10342
10343
|
}, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
10343
10344
|
"no-extraneous-dependencies": _typescript_eslint_utils_ts_eslint.RuleModule<"missing" | "pkgNotFound" | "pkgUnparsable" | "devDep" | "optDep", [({
|
|
10344
10345
|
packageDir?: string | string[];
|
|
10345
|
-
devDependencies?: boolean;
|
|
10346
|
-
optionalDependencies?: boolean;
|
|
10347
|
-
peerDependencies?: boolean;
|
|
10348
|
-
bundledDependencies?: boolean;
|
|
10346
|
+
devDependencies?: boolean | string[];
|
|
10347
|
+
optionalDependencies?: boolean | string[];
|
|
10348
|
+
peerDependencies?: boolean | string[];
|
|
10349
|
+
bundledDependencies?: boolean | string[];
|
|
10349
10350
|
includeInternal?: boolean;
|
|
10350
10351
|
includeTypes?: boolean;
|
|
10351
10352
|
whitelist?: string[];
|
|
@@ -12264,8 +12265,11 @@ declare const jimmyDotCodes: ({ astro, autoDetect, configs, ignores, react, test
|
|
|
12264
12265
|
} | {
|
|
12265
12266
|
languageOptions: {
|
|
12266
12267
|
parserOptions: {
|
|
12268
|
+
tsconfigRootDir: string;
|
|
12267
12269
|
project: string | string[];
|
|
12270
|
+
} | {
|
|
12268
12271
|
tsconfigRootDir: string;
|
|
12272
|
+
projectService: boolean;
|
|
12269
12273
|
};
|
|
12270
12274
|
};
|
|
12271
12275
|
name: string;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var B=Object.defineProperty;var r=(e,t)=>B(e,"name",{value:t,configurable:!0});import m from"globals";import{parser as $,configs as c}from"typescript-eslint";import b from"@eslint-community/eslint-plugin-eslint-comments/configs";import p from"eslint-plugin-import-x";import x from"eslint-plugin-n";import N from"@eslint/js";import h from"eslint-plugin-perfectionist";import F from"eslint-config-prettier";import{isPackageExists as a}from"local-pkg";import k from"eslint-plugin-jest";import v from"eslint-plugin-unicorn";const s="?([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","**/.vinxi","**/app.config.timestamp_*.js","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts","**/vite.config.ts.*.mjs","**/*.gen.*","!.storybook"],Q="**/*.?([cm])js",u="**/*.?([cm])jsx",w="**/*.?([cm])tsx",l=[`**/__tests__/**/*.${s}`,`**/*.spec.${s}`,`**/*.test.${s}`,`**/*.bench.${s}`,`**/*.benchmark.${s}`],O=[`**/e2e/**/*.spec.${s}`,`**/e2e/**/*.test.${s}`,`**/cypress/**/*.spec.${s}`,`**/cypress/**/*.test.${s}`],V="**/*.cjs",X="**/*.astro",U=["vi.mock","describe","expect","it"],z=["@testing-library/react"],H=r(e=>typeof e=="object"?e:{project:"./tsconfig.json"},"getTypescriptOptions"),M=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),W=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),Y=r(e=>!!e.utilities?.includes("@tanstack/query"),"addTanstackQuery"),D=r(e=>!!e.utilities?.includes("testing-library"),"addTestingLibrary"),i=r(async e=>{const t=await e;return t.default??t},"interopDefault"),K=r(async()=>{const e=[X],[t,o,n]=await Promise.all([import("eslint-plugin-astro"),import("astro-eslint-parser"),i(import("eslint-plugin-jsx-a11y"))]);return[{files:e,languageOptions:{globals:{...m.node,Astro:!1,Fragment:!1},parser:o,parserOptions:{extraFileExtensions:[".astro"],parser:$},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:t,"jsx-a11y":n},processor:"astro/client-side-ts",rules:{...n.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:c.disableTypeChecked.languageOptions?.parserOptions},name:"jimmy.codes/astro/disable-type-checked",rules:c.disableTypeChecked.rules},{name:"jimmy.codes/astro/imports",settings:{"import-x/core-modules":["astro:content"]}}]},"astroConfig"),Z=r(()=>[{files:[V],languageOptions:{globals:m.commonjs},name:"jimmy.codes/commonjs"}],"commonjsConfig"),ee={...b.recommended.rules,"@eslint-community/eslint-comments/no-unused-disable":"off","@eslint-community/eslint-comments/require-description":"error"},re=r(()=>[{...b.recommended,name:"jimmy.codes/eslint-comments",rules:ee}],"eslintCommentsConfig"),te=r(e=>[{ignores:[...J,...e],name:"jimmy.codes/ignores"}],"ignoresConfig"),oe={...p.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"},se={name:"jimmy.codes/imports/typescript",rules:p.configs.typescript.rules,settings:{...p.configs.typescript.settings,"import-x/resolver":{...p.configs.typescript.settings["import-x/resolver"],typescript:!0}}},ne=r(({typescript:e=!1}={})=>[{name:"jimmy.codes/imports",plugins:{"import-x":p,n:x},rules:oe},...e?[se]:[]],"importsConfig"),ie={...N.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"},ae=r(()=>[{linterOptions:{reportUnusedDisableDirectives:!0},name:"jimmy.codes/javascript",rules:ie}],"javascriptConfig"),ce={"n/no-process-exit":"off","n/prefer-node-protocol":"error"},pe=r(()=>[{name:"jimmy.codes/node",plugins:{n:x},rules:ce}],"nodeConfig"),le={...h.configs["recommended-natural"].rules,"perfectionist/sort-imports":["error",{customGroups:{type:{},value:{}},environment:"node",groups:["side-effect-style","builtin","type","external","internal-type","internal",["parent-type","sibling-type","index-type"],["parent","sibling","index"],"object","style","unknown"],internalPattern:["~/**","@/**"],order:"asc",type:"natural"}]},fe=r(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:h},rules:le}],"perfectionistConfig"),me=r(()=>[{name:"jimmy.codes/prettier",...F}],"prettierConfig"),ue=r(e=>e===2?"error":e===1?"warn":"off","toStringSeverity"),C=r((e={})=>Object.fromEntries(Object.entries(e).map(([t,o])=>[t,typeof o=="number"?ue(o):o])),"normalizeRuleEntries"),de=r(async()=>{const[e,t]=await Promise.all([i(import("eslint-plugin-react")),i(import("eslint-plugin-jsx-a11y"))]);return{...t.configs.recommended.rules,...C(e.configs.flat?.recommended?.rules),...C(e.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}]}},"reactRules"),ye=r(async()=>{const[e,t,o,n]=await Promise.all([i(import("eslint-plugin-react")),i(import("eslint-plugin-jsx-a11y")),import("eslint-plugin-react-hooks"),import("eslint-plugin-react-refresh")]);return[{files:[u,w],languageOptions:{globals:{...m.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":t,react:e,"react-hooks":o,"react-refresh":n},rules:await de(),settings:{react:{version:"detect"}}}]},"reactConfig"),ge=r(async()=>{const e=await i(import("@tanstack/eslint-plugin-query"));return[{files:[u,w],name:"jimmy.codes/react/query",plugins:{"@tanstack/query":e},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]},"tanstackQuery"),je=r(()=>a("typescript"),"hasTypescript"),be=r(()=>a("react"),"hasReact"),T=r(()=>a("vitest"),"hasVitest"),_=r(()=>a("jest"),"hasJest"),xe=r(()=>T()||_(),"hasTesting"),he=r(()=>z.some(e=>a(e)),"hasTestingLibrary"),ke=r(()=>a("@tanstack/react-query"),"hasReactQuery"),ve=r(()=>a("astro"),"hasAstro"),E={...k.configs["flat/recommended"].rules,...k.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"},we=r(async({framework:e="vitest"}={},t=!0)=>{const o=await i(import("eslint-plugin-jest")),n=t?T():e==="vitest",f=e==="jest"||t&&_();return[{files:l,name:"jimmy.codes/testing",...o.configs["flat/recommended"]},...n?[{files:l,name:"jimmy.codes/testing/vitest",...o.configs["flat/recommended"],rules:{...E,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:U}]}}]:[],...f?[{files:l,name:"jimmy.codes/testing/jest",...o.configs["flat/recommended"],rules:E}]:[],{files:O,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}}]},"testingConfig"),Oe=r(async()=>{const[e,t]=await Promise.all([import("eslint-plugin-jest-dom"),i(import("eslint-plugin-testing-library"))]);return[{files:l,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":e,"testing-library":t},rules:{...t.configs.react.rules,...e.configs["flat/recommended"].rules}},{files:O,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}]},"testingLibrary"),Ce={"@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-unused-vars":["error",{args:"all",argsIgnorePattern:"^_",caughtErrors:"all",caughtErrorsIgnorePattern:"^_",destructuredArrayIgnorePattern:"^_",ignoreRestSiblings:!0,varsIgnorePattern:"^_"}],"@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"},Te=r(e=>[...c.strictTypeChecked,...c.stylisticTypeChecked.filter(t=>t.name==="typescript-eslint/stylistic-type-checked"),{languageOptions:{parserOptions:{project:e.project,tsconfigRootDir:process.cwd()}},name:"jimmy.codes/typescript",rules:Ce},{files:[Q,u],...c.disableTypeChecked},{files:l,name:"jimmy.codes/typescript/testing",rules:{"@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-unsafe-assignment":"off"}}],"typescriptConfig"),_e={...v.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"},Ee=r(()=>[{...v.configs["flat/recommended"],name:"jimmy.codes/unicorn",rules:_e}],"unicornConfig"),Pe=r(async({astro:e=!1,autoDetect:t=!0,configs:o=[],ignores:n=[],react:f=!1,testing:d=!1,typescript:y=!1}={},...P)=>{const R=W(f),g=M(d),q=H(y),j=y||t&&je(),L=f||t&&be(),S=d||t&&xe(),A=e||t&&ve(),G=Y(R)||t&&ke(),I=D(g)||t&&he();return[ae(),fe(),pe(),Ee(),re(),ne({typescript:j}),j?Te(q):[],L?await ye():[],G?await ge():[],A?await K():[],S?await we(g,t):[],I?await Oe():[],me(),Z(),te(n),o,P].flat()},"jimmyDotCodes");export{Pe as default};
|
|
1
|
+
var B=Object.defineProperty;var r=(e,t)=>B(e,"name",{value:t,configurable:!0});import m from"globals";import{parser as $,configs as c}from"typescript-eslint";import x from"@eslint-community/eslint-plugin-eslint-comments/configs";import p from"eslint-plugin-import-x";import h from"eslint-plugin-n";import N from"@eslint/js";import k from"eslint-plugin-perfectionist";import F from"eslint-config-prettier";import{isPackageExists as a}from"local-pkg";import v from"eslint-plugin-jest";import w from"eslint-plugin-unicorn";const s="?([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","**/.vinxi","**/app.config.timestamp_*.js","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts","**/vite.config.ts.*.mjs","**/*.gen.*","!.storybook"],Q="**/*.?([cm])js",u="**/*.?([cm])jsx",O="**/*.?([cm])tsx",l=[`**/__tests__/**/*.${s}`,`**/*.spec.${s}`,`**/*.test.${s}`,`**/*.bench.${s}`,`**/*.benchmark.${s}`],C=[`**/e2e/**/*.spec.${s}`,`**/e2e/**/*.test.${s}`,`**/cypress/**/*.spec.${s}`,`**/cypress/**/*.test.${s}`],V="**/*.cjs",X="**/*.astro",U=["vi.mock","describe","expect","it"],z=["@testing-library/react"],H=r(e=>typeof e=="object"?e:void 0,"getTypescriptOptions"),M=r(e=>typeof e=="object"?e:{framework:"vitest"},"getTestingOptions"),W=r(e=>typeof e=="object"?e:{utilities:[]},"getReactOptions"),Y=r(e=>!!e.utilities?.includes("@tanstack/query"),"addTanstackQuery"),D=r(e=>!!e.utilities?.includes("testing-library"),"addTestingLibrary"),i=r(async e=>{const t=await e;return t.default??t},"interopDefault"),K=r(async()=>{const e=[X],[t,o,n]=await Promise.all([import("eslint-plugin-astro"),import("astro-eslint-parser"),i(import("eslint-plugin-jsx-a11y"))]);return[{files:e,languageOptions:{globals:{...m.node,Astro:!1,Fragment:!1},parser:o,parserOptions:{extraFileExtensions:[".astro"],parser:$},sourceType:"module"},name:"jimmy.codes/astro",plugins:{astro:t,"jsx-a11y":n},processor:"astro/client-side-ts",rules:{...n.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:c.disableTypeChecked.languageOptions?.parserOptions},name:"jimmy.codes/astro/disable-type-checked",rules:c.disableTypeChecked.rules},{name:"jimmy.codes/astro/imports",settings:{"import-x/core-modules":["astro:content"]}}]},"astroConfig"),Z=r(()=>[{files:[V],languageOptions:{globals:m.commonjs},name:"jimmy.codes/commonjs"}],"commonjsConfig"),ee={...x.recommended.rules,"@eslint-community/eslint-comments/no-unused-disable":"off","@eslint-community/eslint-comments/require-description":"error"},re=r(()=>[{...x.recommended,name:"jimmy.codes/eslint-comments",rules:ee}],"eslintCommentsConfig"),te=r(e=>[{ignores:[...J,...e],name:"jimmy.codes/ignores"}],"ignoresConfig"),oe={...p.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"},se={name:"jimmy.codes/imports/typescript",rules:p.configs.typescript.rules,settings:{...p.configs.typescript.settings,"import-x/resolver":{...p.configs.typescript.settings["import-x/resolver"],typescript:!0}}},ne=r(({typescript:e=!1}={})=>[{name:"jimmy.codes/imports",plugins:{"import-x":p,n:h},rules:oe},...e?[se]:[]],"importsConfig"),ie={...N.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"},ae=r(()=>[{linterOptions:{reportUnusedDisableDirectives:!0},name:"jimmy.codes/javascript",rules:ie}],"javascriptConfig"),ce={"n/no-process-exit":"off","n/prefer-node-protocol":"error"},pe=r(()=>[{name:"jimmy.codes/node",plugins:{n:h},rules:ce}],"nodeConfig"),le={...k.configs["recommended-natural"].rules,"perfectionist/sort-imports":["error",{customGroups:{type:{},value:{}},environment:"node",groups:["side-effect-style","builtin","type","external","internal-type","internal",["parent-type","sibling-type","index-type"],["parent","sibling","index"],"object","style","unknown"],internalPattern:["~/**","@/**"],order:"asc",type:"natural"}]},fe=r(()=>[{name:"jimmy.codes/perfectionist",plugins:{perfectionist:k},rules:le}],"perfectionistConfig"),me=r(()=>[{name:"jimmy.codes/prettier",...F}],"prettierConfig"),ue=r(e=>e===2?"error":e===1?"warn":"off","toStringSeverity"),T=r((e={})=>Object.fromEntries(Object.entries(e).map(([t,o])=>[t,typeof o=="number"?ue(o):o])),"normalizeRuleEntries"),de=r(async()=>{const[e,t]=await Promise.all([i(import("eslint-plugin-react")),i(import("eslint-plugin-jsx-a11y"))]);return{...t.configs.recommended.rules,...T(e.configs.flat?.recommended?.rules),...T(e.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}]}},"reactRules"),ye=r(async()=>{const[e,t,o,n]=await Promise.all([i(import("eslint-plugin-react")),i(import("eslint-plugin-jsx-a11y")),import("eslint-plugin-react-hooks"),import("eslint-plugin-react-refresh")]);return[{files:[u,O],languageOptions:{globals:{...m.browser},parserOptions:{ecmaFeatures:{jsx:!0},jsxPragma:null}},name:"jimmy.codes/react",plugins:{"jsx-a11y":t,react:e,"react-hooks":o,"react-refresh":n},rules:await de(),settings:{react:{version:"detect"}}}]},"reactConfig"),ge=r(async()=>{const e=await i(import("@tanstack/eslint-plugin-query"));return[{files:[u,O],name:"jimmy.codes/react/query",plugins:{"@tanstack/query":e},rules:{"@tanstack/query/exhaustive-deps":"error","@tanstack/query/no-rest-destructuring":"warn","@tanstack/query/stable-query-client":"error"}}]},"tanstackQuery"),je=r(()=>a("typescript"),"hasTypescript"),be=r(()=>a("react"),"hasReact"),_=r(()=>a("vitest"),"hasVitest"),E=r(()=>a("jest"),"hasJest"),xe=r(()=>_()||E(),"hasTesting"),he=r(()=>z.some(e=>a(e)),"hasTestingLibrary"),ke=r(()=>a("@tanstack/react-query"),"hasReactQuery"),ve=r(()=>a("astro"),"hasAstro"),P={...v.configs["flat/recommended"].rules,...v.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"},we=r(async({framework:e="vitest"}={},t=!0)=>{const o=await i(import("eslint-plugin-jest")),n=t?_():e==="vitest",f=e==="jest"||t&&E();return[{files:l,name:"jimmy.codes/testing",...o.configs["flat/recommended"]},...n?[{files:l,name:"jimmy.codes/testing/vitest",...o.configs["flat/recommended"],rules:{...P,"jest/no-deprecated-functions":"off","jest/require-hook":["error",{allowedFunctionCalls:U}]}}]:[],...f?[{files:l,name:"jimmy.codes/testing/jest",...o.configs["flat/recommended"],rules:P}]:[],{files:C,name:"jimmy.codes/testing/disabled",rules:{"jest/expect-expect":"off","jest/no-deprecated-functions":"off","jest/require-hook":"off"}}]},"testingConfig"),Oe=r(async()=>{const[e,t]=await Promise.all([import("eslint-plugin-jest-dom"),i(import("eslint-plugin-testing-library"))]);return[{files:l,name:"jimmy.codes/testing/testing-library",plugins:{"jest-dom":e,"testing-library":t},rules:{...t.configs.react.rules,...e.configs["flat/recommended"].rules}},{files:C,name:"jimmy.codes/testing/testing-library/disabled",rules:{"testing-library/prefer-screen-queries":"off"}}]},"testingLibrary"),Ce={"@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-unused-vars":["error",{args:"all",argsIgnorePattern:"^_",caughtErrors:"all",caughtErrorsIgnorePattern:"^_",destructuredArrayIgnorePattern:"^_",ignoreRestSiblings:!0,varsIgnorePattern:"^_"}],"@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"},Te=r(e=>[...c.strictTypeChecked,...c.stylisticTypeChecked.filter(t=>t.name==="typescript-eslint/stylistic-type-checked"),{languageOptions:{parserOptions:{...e?.project?{project:e.project}:{projectService:!0},tsconfigRootDir:process.cwd()}},name:"jimmy.codes/typescript",rules:Ce},{files:[Q,u],...c.disableTypeChecked},{files:l,name:"jimmy.codes/typescript/testing",rules:{"@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-unsafe-assignment":"off"}}],"typescriptConfig"),_e={...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"},Ee=r(()=>[{...w.configs["flat/recommended"],name:"jimmy.codes/unicorn",rules:_e}],"unicornConfig"),Pe=r(async({astro:e=!1,autoDetect:t=!0,configs:o=[],ignores:n=[],react:f=!1,testing:d=!1,typescript:y=!1}={},...R)=>{const q=W(f),g=M(d),j=H(y),b=y||!!j||t&&je(),L=f||t&&be(),S=d||t&&xe(),A=e||t&&ve(),G=Y(q)||t&&ke(),I=D(g)||t&&he();return[ae(),fe(),pe(),Ee(),re(),ne({typescript:b}),b?Te(j):[],L?await ye():[],G?await ge():[],A?await K():[],S?await we(g,t):[],I?await Oe():[],me(),Z(),te(n),o,R].flat()},"jimmyDotCodes");export{Pe 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.13.0",
|
|
4
4
|
"description": "another opinionated eslint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
35
35
|
"@eslint/js": "^9.14.0",
|
|
36
|
-
"@tanstack/eslint-plugin-query": "^5.
|
|
36
|
+
"@tanstack/eslint-plugin-query": "^5.60.1",
|
|
37
37
|
"@types/eslint": "9.6.1",
|
|
38
|
-
"@typescript-eslint/parser": "^8.
|
|
39
|
-
"@typescript-eslint/utils": "^8.
|
|
40
|
-
"astro-eslint-parser": "^1.0
|
|
38
|
+
"@typescript-eslint/parser": "^8.14.0",
|
|
39
|
+
"@typescript-eslint/utils": "^8.14.0",
|
|
40
|
+
"astro-eslint-parser": "^1.1.0",
|
|
41
41
|
"eslint-config-prettier": "^9.1.0",
|
|
42
42
|
"eslint-import-resolver-typescript": "^3.6.3",
|
|
43
43
|
"eslint-plugin-astro": "^1.3.1",
|
|
44
|
-
"eslint-plugin-import-x": "^4.4.
|
|
44
|
+
"eslint-plugin-import-x": "^4.4.2",
|
|
45
45
|
"eslint-plugin-jest": "^28.9.0",
|
|
46
46
|
"eslint-plugin-jest-dom": "^5.4.0",
|
|
47
47
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"eslint-plugin-unicorn": "^56.0.0",
|
|
55
55
|
"globals": "^15.12.0",
|
|
56
56
|
"local-pkg": "0.5.0",
|
|
57
|
-
"typescript-eslint": "^8.
|
|
57
|
+
"typescript-eslint": "^8.14.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"eslint": "^9.10.0"
|