eslint-config-gorgon 3.3.1 → 3.3.3
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.js +1 -1
- package/package.json +3 -3
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 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-extra-boolean-cast":"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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-gorgon",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@typescript-eslint/parser": "^8.43.0",
|
|
16
|
+
"eslint": "^9.32.0",
|
|
16
17
|
"eslint-config-prettier": "^10.1.8",
|
|
17
18
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
18
19
|
"eslint-plugin-import-x": "^4.16.1",
|
|
19
20
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
20
21
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
22
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
21
23
|
"eslint-plugin-react": "^7.37.5",
|
|
22
24
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
23
25
|
"eslint-plugin-sonarjs": "^3.0.5",
|
|
@@ -33,8 +35,6 @@
|
|
|
33
35
|
"@types/eslint-plugin-jsx-a11y": "^6.10.0",
|
|
34
36
|
"@types/node": "^24.2.0",
|
|
35
37
|
"@typescript-eslint/utils": "^8.39.0",
|
|
36
|
-
"eslint": "^9.32.0",
|
|
37
|
-
"eslint-plugin-prettier": "^5.5.4",
|
|
38
38
|
"husky": "^9.1.7",
|
|
39
39
|
"tsup": "^8.5.0",
|
|
40
40
|
"typescript": "^5.9.2",
|