eslint-config-gorgon 3.3.2 → 3.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@ type InitConfigReturnType = TSESLint.FlatConfig.Config;
25
25
  * });
26
26
  * ```
27
27
  */
28
- declare const init: (configs?: InitConfigProps) => InitConfigReturnType[];
29
- declare const _default: TSESLint.FlatConfig.Config[];
28
+ declare const init: (configs?: InitConfigProps) => Promise<InitConfigReturnType[]>;
29
+ declare const _default: Promise<TSESLint.FlatConfig.Config[]>;
30
30
 
31
31
  export { _default as default, init };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var z=Object.create;var x=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var J=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var i=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var A=(r,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of O(e))!D.call(r,t)&&t!==o&&x(r,t,{get:()=>e[t],enumerable:!(n=_(e,t))||n.enumerable});return r};var M=(r,e,o)=>(o=r!=null?z(J(r)):{},A(e||!r||!r.__esModule?x(o,"default",{value:r,enumerable:!0}):o,r));var h=i((jr,U)=>{U.exports={name:"@eslint/js",version:"9.32.0",description:"ESLint JavaScript language implementation",funding:"https://eslint.org/donate",main:"./src/index.js",types:"./types/index.d.ts",scripts:{"test:types":"tsc -p tests/types/tsconfig.json"},files:["LICENSE","README.md","src","types"],publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/eslint/eslint.git",directory:"packages/js"},homepage:"https://eslint.org",bugs:"https://github.com/eslint/eslint/issues/",keywords:["javascript","eslint-plugin","eslint"],license:"MIT",engines:{node:"^18.18.0 || ^20.9.0 || >=21.1.0"}}});var w=i((Cr,b)=>{"use strict";b.exports=Object.freeze({rules:{"accessor-pairs":"error","array-callback-return":"error","arrow-body-style":"error","block-scoped-var":"error",camelcase:"error","capitalized-comments":"error","class-methods-use-this":"error",complexity:"error","consistent-return":"error","consistent-this":"error","constructor-super":"error",curly:"error","default-case":"error","default-case-last":"error","default-param-last":"error","dot-notation":"error",eqeqeq:"error","for-direction":"error","func-name-matching":"error","func-names":"error","func-style":"error","getter-return":"error","grouped-accessor-pairs":"error","guard-for-in":"error","id-denylist":"error","id-length":"error","id-match":"error","init-declarations":"error","logical-assignment-operators":"error","max-classes-per-file":"error","max-depth":"error","max-lines":"error","max-lines-per-function":"error","max-nested-callbacks":"error","max-params":"error","max-statements":"error","new-cap":"error","no-alert":"error","no-array-constructor":"error","no-async-promise-executor":"error","no-await-in-loop":"error","no-bitwise":"error","no-caller":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-console":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-constructor-return":"error","no-continue":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-div-regex":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-duplicate-imports":"error","no-else-return":"error","no-empty":"error","no-empty-character-class":"error","no-empty-function":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-eq-null":"error","no-eval":"error","no-ex-assign":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-extra-label":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-implicit-coercion":"error","no-implicit-globals":"error","no-implied-eval":"error","no-import-assign":"error","no-inline-comments":"error","no-inner-declarations":"error","no-invalid-regexp":"error","no-invalid-this":"error","no-irregular-whitespace":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"error","no-loop-func":"error","no-loss-of-precision":"error","no-magic-numbers":"error","no-misleading-character-class":"error","no-multi-assign":"error","no-multi-str":"error","no-negated-condition":"error","no-nested-ternary":"error","no-new":"error","no-new-func":"error","no-new-native-nonconstructor":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-object-constructor":"error","no-octal":"error","no-octal-escape":"error","no-param-reassign":"error","no-plusplus":"error","no-promise-executor-return":"error","no-proto":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-restricted-exports":"error","no-restricted-globals":"error","no-restricted-imports":"error","no-restricted-properties":"error","no-restricted-syntax":"error","no-return-assign":"error","no-script-url":"error","no-self-assign":"error","no-self-compare":"error","no-sequences":"error","no-setter-return":"error","no-shadow":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-ternary":"error","no-this-before-super":"error","no-throw-literal":"error","no-unassigned-vars":"error","no-undef":"error","no-undef-init":"error","no-undefined":"error","no-underscore-dangle":"error","no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unneeded-ternary":"error","no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-expressions":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":"error","no-use-before-define":"error","no-useless-assignment":"error","no-useless-backreference":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-constructor":"error","no-useless-escape":"error","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-void":"error","no-warning-comments":"error","no-with":"error","object-shorthand":"error","one-var":"error","operator-assignment":"error","prefer-arrow-callback":"error","prefer-const":"error","prefer-destructuring":"error","prefer-exponentiation-operator":"error","prefer-named-capture-group":"error","prefer-numeric-literals":"error","prefer-object-has-own":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":"error","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error",radix:"error","require-atomic-updates":"error","require-await":"error","require-unicode-regexp":"error","require-yield":"error","sort-imports":"error","sort-keys":"error","sort-vars":"error",strict:"error","symbol-description":"error","unicode-bom":"error","use-isnan":"error","valid-typeof":"error","vars-on-top":"error",yoda:"error"}})});var j=i((vr,S)=>{"use strict";S.exports=Object.freeze({rules:Object.freeze({"constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-octal":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-undef":"error","no-unexpected-multiline":"error","no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":"error","no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error"})})});var v=i((Tr,C)=>{"use strict";var{name:X,version:B}=h();C.exports={meta:{name:X,version:B},configs:{all:w(),recommended:j()}}});import N from"eslint-plugin-perfectionist";var Q=[N.configs["recommended-natural"],{rules:{curly:["error","multi-line"],"no-console":"warn","no-unused-vars":"warn","perfectionist/sort-enums":"warn"}}],c=Q;var T=M(v(),1);import G from"@typescript-eslint/parser";import{importX as l}from"eslint-plugin-import-x";var K=[T.default.configs.recommended,l.flatConfigs.recommended,l.flatConfigs.typescript,{files:["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],languageOptions:{ecmaVersion:"latest",parser:G,sourceType:"module"},plugins:{"import-x":l},rules:{"import-x/default":"off","import-x/first":"error","import-x/newline-after-import":"error","import-x/no-duplicates":["error",{considerQueryString:!0}],"no-duplicate-imports":"off"}}],p=K;import V from"eslint-plugin-jsx-a11y";var W=[V.flatConfigs.recommended],f=W;import Y from"eslint-config-prettier";import Z from"eslint-plugin-prettier";var $=[Y,{plugins:{prettier:Z},rules:{"prettier/prettier":"warn"}}],u=$;import E from"eslint-plugin-react";import{default as rr}from"eslint-plugin-react-hooks";var er=[E.configs.flat.recommended,rr.configs["recommended-latest"],{...E.configs.flat["jsx-runtime"],files:["**/*.ts","**/*.tsx","**/*.jsx","**/*.js"],settings:{react:{version:"detect"}}}],m=er;import or from"eslint-plugin-sonarjs";var nr=[or.configs.recommended,{rules:{"sonarjs/no-commented-code":"off","sonarjs/no-unused-vars":"off"}}],d=nr;import tr from"eslint-plugin-tailwindcss";var sr=[{files:["**/*.{js,jsx,ts,tsx,vue,html}"],name:"tailwindcss/recommended",plugins:{tailwindcss:tr},rules:{"tailwindcss/classnames-order":"warn","tailwindcss/no-custom-classname":"off"}}],g=sr;import ir from"typescript-eslint";var ar=[...ir.configs.recommended,{rules:{"@typescript-eslint/array-type":["error",{default:"array-simple"}],"@typescript-eslint/ban-ts-comment":["error",{"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":!1,"ts-nocheck":!1}],"@typescript-eslint/consistent-type-definitions":["error","interface"],"@typescript-eslint/consistent-type-imports":["warn",{fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-explicit-any":"warn","@typescript-eslint/no-non-null-assertion":"warn","@typescript-eslint/no-unused-vars":["error",{argsIgnorePattern:"^_",caughtErrorsIgnorePattern:"^_",varsIgnorePattern:"^_"}],"@typescript-eslint/prefer-as-const":"error"}}],a=ar;import cr from"fast-glob";import k from"fs";import lr from"path";var pr=()=>{let r=lr.join(process.cwd(),"package.json");if(k.existsSync(r)){let e=JSON.parse(k.readFileSync(r,"utf-8")),o=e.dependencies||{},n=e.devDependencies||{};if("react"in o||"react"in n)return!0}try{return cr.sync(["src/**/*.jsx","src/**/*.tsx"],{cwd:process.cwd(),dot:!1,ignore:["**/node_modules/**","dist/**","output/**"]}).length>0}catch{return!1}},L=pr;import y from"fs";import F from"path";var fr=()=>["tailwind.config.js","tailwind.config.cjs","tailwind.config.mjs","tailwind.config.ts","tailwind.config.mts"].some(n=>y.existsSync(F.join(process.cwd(),n)))?!0:["postcss.config.js","postcss.config.cjs","postcss.config.mjs","postcss.config.ts","postcss.config.mts"].some(n=>{let t=F.join(process.cwd(),n);return y.existsSync(t)&&/tailwindcss/.test(y.readFileSync(t,"utf-8"))}),I=fr;import ur from"fast-glob";import mr from"fs";import dr from"path";var gr=dr.join(process.cwd(),"tsconfig.json"),yr=()=>{if(mr.existsSync(gr))return!0;try{return ur.sync(["src/**/*.ts","src/**/*.tsx"],{cwd:process.cwd(),dot:!1,ignore:["**/node_modules/**","dist/**","output/**"]}).length>0}catch{return!1}},q=yr;var P=L(),R=I(),H=q();var xr=[...c,...p,...d],s=(r,e)=>r===void 0?e:r,hr=r=>{let o=[{ignores:[...["**/node_modules/**","dist/**","output/**"],...r?.ignores??[]]},...xr];return s(r?.react,P)&&o.push(...m),s(r?.a11y,!0)&&o.push(...f),s(r?.tailwind,R)&&o.push(...g),s(r?.prettier,!0)&&o.push(...u),s(r?.typescript,H)&&(o=o.map(n=>({...n,files:["**/*.ts","**/*.tsx",...n?.files?.flat(1/0)??[]]})),o.some(n=>a.includes(n))||o.push(...a.map(n=>({...n,files:["**/*.ts","**/*.tsx",...n?.files?.flat(1/0)??[]]}))),o.push({rules:{"no-unused-vars":"off"}})),o},ge=hr();export{ge as default,hr as init};
1
+ var H=Object.create;var y=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var i=(r,o)=>()=>(o||r((o={exports:{}}).exports,o),o.exports);var D=(r,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of _(o))!J.call(r,s)&&s!==n&&y(r,s,{get:()=>o[s],enumerable:!(e=z(o,s))||e.enumerable});return r};var A=(r,o,n)=>(n=r!=null?H(O(r)):{},D(o||!r||!r.__esModule?y(n,"default",{value:r,enumerable:!0}):n,r));var x=i((xr,Q)=>{Q.exports={name:"@eslint/js",version:"9.32.0",description:"ESLint JavaScript language implementation",funding:"https://eslint.org/donate",main:"./src/index.js",types:"./types/index.d.ts",scripts:{"test:types":"tsc -p tests/types/tsconfig.json"},files:["LICENSE","README.md","src","types"],publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/eslint/eslint.git",directory:"packages/js"},homepage:"https://eslint.org",bugs:"https://github.com/eslint/eslint/issues/",keywords:["javascript","eslint-plugin","eslint"],license:"MIT",engines:{node:"^18.18.0 || ^20.9.0 || >=21.1.0"}}});var b=i((hr,h)=>{"use strict";h.exports=Object.freeze({rules:{"accessor-pairs":"error","array-callback-return":"error","arrow-body-style":"error","block-scoped-var":"error",camelcase:"error","capitalized-comments":"error","class-methods-use-this":"error",complexity:"error","consistent-return":"error","consistent-this":"error","constructor-super":"error",curly:"error","default-case":"error","default-case-last":"error","default-param-last":"error","dot-notation":"error",eqeqeq:"error","for-direction":"error","func-name-matching":"error","func-names":"error","func-style":"error","getter-return":"error","grouped-accessor-pairs":"error","guard-for-in":"error","id-denylist":"error","id-length":"error","id-match":"error","init-declarations":"error","logical-assignment-operators":"error","max-classes-per-file":"error","max-depth":"error","max-lines":"error","max-lines-per-function":"error","max-nested-callbacks":"error","max-params":"error","max-statements":"error","new-cap":"error","no-alert":"error","no-array-constructor":"error","no-async-promise-executor":"error","no-await-in-loop":"error","no-bitwise":"error","no-caller":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-console":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-constructor-return":"error","no-continue":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-div-regex":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-duplicate-imports":"error","no-else-return":"error","no-empty":"error","no-empty-character-class":"error","no-empty-function":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-eq-null":"error","no-eval":"error","no-ex-assign":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-extra-label":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-implicit-coercion":"error","no-implicit-globals":"error","no-implied-eval":"error","no-import-assign":"error","no-inline-comments":"error","no-inner-declarations":"error","no-invalid-regexp":"error","no-invalid-this":"error","no-irregular-whitespace":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"error","no-loop-func":"error","no-loss-of-precision":"error","no-magic-numbers":"error","no-misleading-character-class":"error","no-multi-assign":"error","no-multi-str":"error","no-negated-condition":"error","no-nested-ternary":"error","no-new":"error","no-new-func":"error","no-new-native-nonconstructor":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-object-constructor":"error","no-octal":"error","no-octal-escape":"error","no-param-reassign":"error","no-plusplus":"error","no-promise-executor-return":"error","no-proto":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-restricted-exports":"error","no-restricted-globals":"error","no-restricted-imports":"error","no-restricted-properties":"error","no-restricted-syntax":"error","no-return-assign":"error","no-script-url":"error","no-self-assign":"error","no-self-compare":"error","no-sequences":"error","no-setter-return":"error","no-shadow":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-ternary":"error","no-this-before-super":"error","no-throw-literal":"error","no-unassigned-vars":"error","no-undef":"error","no-undef-init":"error","no-undefined":"error","no-underscore-dangle":"error","no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unneeded-ternary":"error","no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-expressions":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":"error","no-use-before-define":"error","no-useless-assignment":"error","no-useless-backreference":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-constructor":"error","no-useless-escape":"error","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-void":"error","no-warning-comments":"error","no-with":"error","object-shorthand":"error","one-var":"error","operator-assignment":"error","prefer-arrow-callback":"error","prefer-const":"error","prefer-destructuring":"error","prefer-exponentiation-operator":"error","prefer-named-capture-group":"error","prefer-numeric-literals":"error","prefer-object-has-own":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":"error","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error",radix:"error","require-atomic-updates":"error","require-await":"error","require-unicode-regexp":"error","require-yield":"error","sort-imports":"error","sort-keys":"error","sort-vars":"error",strict:"error","symbol-description":"error","unicode-bom":"error","use-isnan":"error","valid-typeof":"error","vars-on-top":"error",yoda:"error"}})});var S=i((br,w)=>{"use strict";w.exports=Object.freeze({rules:Object.freeze({"constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-octal":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-undef":"error","no-unexpected-multiline":"error","no-unreachable":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":"error","no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error"})})});var C=i((wr,j)=>{"use strict";var{name:U,version:X}=x();j.exports={meta:{name:U,version:X},configs:{all:b(),recommended:S()}}});import M from"eslint-plugin-perfectionist";var N=[M.configs["recommended-natural"],{rules:{curly:["error","multi-line"],"no-console":"warn","no-extra-boolean-cast":"warn","no-unused-vars":"warn","perfectionist/sort-enums":"warn"}}],c=N;var v=A(C(),1);import B from"@typescript-eslint/parser";import{importX as l}from"eslint-plugin-import-x";var G=[v.default.configs.recommended,l.flatConfigs.recommended,l.flatConfigs.typescript,{files:["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],languageOptions:{ecmaVersion:"latest",parser:B,sourceType:"module"},plugins:{"import-x":l},rules:{"import-x/default":"off","import-x/first":"error","import-x/newline-after-import":"error","import-x/no-duplicates":["error",{considerQueryString:!0}],"no-duplicate-imports":"off"}}],p=G;import K from"eslint-plugin-jsx-a11y";var V=[K.flatConfigs.recommended],u=V;import W from"eslint-config-prettier";import Y from"eslint-plugin-prettier";var Z=[W,{plugins:{prettier:Y},rules:{"prettier/prettier":"warn"}}],f=Z;import $ from"eslint-plugin-sonarjs";var rr=[$.configs.recommended,{rules:{"sonarjs/no-commented-code":"off","sonarjs/no-unused-vars":"off"}}],d=rr;import er from"typescript-eslint";var or=[...er.configs.recommended,{rules:{"@typescript-eslint/array-type":["error",{default:"array-simple"}],"@typescript-eslint/ban-ts-comment":["error",{"ts-check":!1,"ts-expect-error":"allow-with-description","ts-ignore":!1,"ts-nocheck":!1}],"@typescript-eslint/consistent-type-definitions":["error","interface"],"@typescript-eslint/consistent-type-imports":["warn",{fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-explicit-any":"warn","@typescript-eslint/no-non-null-assertion":"warn","@typescript-eslint/no-unused-vars":["error",{argsIgnorePattern:"^_",caughtErrorsIgnorePattern:"^_",varsIgnorePattern:"^_"}],"@typescript-eslint/prefer-as-const":"error"}}],a=or;import nr from"fast-glob";import T from"fs";import sr from"path";var tr=()=>{let r=sr.join(process.cwd(),"package.json");if(T.existsSync(r)){let o=JSON.parse(T.readFileSync(r,"utf-8")),n=o.dependencies||{},e=o.devDependencies||{};if("react"in n||"react"in e)return!0}try{return nr.sync(["src/**/*.jsx","src/**/*.tsx"],{cwd:process.cwd(),dot:!1,ignore:["**/node_modules/**","dist/**","output/**"]}).length>0}catch{return!1}},k=tr;import m from"fs";import E from"path";var ir=()=>["tailwind.config.js","tailwind.config.cjs","tailwind.config.mjs","tailwind.config.ts","tailwind.config.mts"].some(e=>m.existsSync(E.join(process.cwd(),e)))?!0:["postcss.config.js","postcss.config.cjs","postcss.config.mjs","postcss.config.ts","postcss.config.mts"].some(e=>{let s=E.join(process.cwd(),e);return m.existsSync(s)&&/tailwindcss/.test(m.readFileSync(s,"utf-8"))}),L=ir;import ar from"fast-glob";import cr from"fs";import lr from"path";var pr=lr.join(process.cwd(),"tsconfig.json"),ur=()=>{if(cr.existsSync(pr))return!0;try{return ar.sync(["src/**/*.ts","src/**/*.tsx"],{cwd:process.cwd(),dot:!1,ignore:["**/node_modules/**","dist/**","output/**"]}).length>0}catch{return!1}},F=ur;var P=k(),I=L(),q=F();var fr=[...c,...p,...d],t=(r,o)=>r===void 0?o:r,dr=async r=>{let n=[{ignores:[...["**/node_modules/**","dist/**","output/**"],...r?.ignores??[]]},...fr];if(t(r?.react,P)){let e=await import("eslint-plugin-react"),s=await import("eslint-plugin-react-hooks"),g=e.default||e,R=s.default||s;n.push(g.configs.flat.recommended,R.configs["recommended-latest"],{...g.configs.flat["jsx-runtime"],files:["**/*.ts","**/*.tsx","**/*.jsx","**/*.js"],settings:{react:{version:"detect"}}})}if(t(r?.a11y,!0)&&n.push(...u),t(r?.tailwind,I)){let e=await import("eslint-plugin-tailwindcss");n.push({files:["**/*.{js,jsx,ts,tsx,vue,html}"],name:"tailwindcss/recommended",plugins:{tailwindcss:e.default||e},rules:{"tailwindcss/classnames-order":"warn","tailwindcss/no-custom-classname":"off"}})}return t(r?.prettier,!0)&&n.push(...f),t(r?.typescript,q)&&(n=n.map(e=>({...e,files:["**/*.ts","**/*.tsx",...e?.files?.flat(1/0)??[]]})),n.some(e=>a.includes(e))||n.push(...a.map(e=>({...e,files:["**/*.ts","**/*.tsx",...e?.files?.flat(1/0)??[]]}))),n.push({rules:{"no-unused-vars":"off"}})),n},ne=dr();export{ne as default,dr as init};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-gorgon",
3
- "version": "3.3.2",
3
+ "version": "3.3.4",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",