eslint-config-gorgon 3.3.3 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-ZWRDP37E.js +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/lib-HMMT2CNG.js +1 -0
- package/package.json +16 -15
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var l=(a,b,c,e)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&f(a,d,{get:()=>b[d],enumerable:!(e=h(b,d))||e.enumerable});return a};var o=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { TSESLint } from '@typescript-eslint/utils';
|
|
|
3
3
|
interface InitConfigProps {
|
|
4
4
|
a11y?: boolean;
|
|
5
5
|
ignores?: string[];
|
|
6
|
+
node?: boolean;
|
|
6
7
|
prettier?: boolean;
|
|
7
8
|
react?: boolean;
|
|
8
9
|
tailwind?: boolean;
|
|
@@ -25,7 +26,7 @@ type InitConfigReturnType = TSESLint.FlatConfig.Config;
|
|
|
25
26
|
* });
|
|
26
27
|
* ```
|
|
27
28
|
*/
|
|
28
|
-
declare const init: (configs?: InitConfigProps) => InitConfigReturnType[]
|
|
29
|
-
declare const _default: TSESLint.FlatConfig.Config[]
|
|
29
|
+
declare const init: (configs?: InitConfigProps) => Promise<InitConfigReturnType[]>;
|
|
30
|
+
declare const _default: Promise<TSESLint.FlatConfig.Config[]>;
|
|
30
31
|
|
|
31
32
|
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-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};
|
|
1
|
+
import{b as a,c as O}from"./chunk-ZWRDP37E.js";var x=a((xr,_)=>{_.exports={name:"@eslint/js",version:"9.39.2",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=a((hr,h)=>{"use strict";h.exports=Object.freeze({rules:Object.freeze({"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","preserve-caught-error":"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=a((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=a((wr,j)=>{"use strict";var{name:A,version:M}=x();j.exports={meta:{name:A,version:M},configs:{all:b(),recommended:S()}}});import z from"eslint-plugin-perfectionist";var D=[z.configs["recommended-natural"],{rules:{curly:["error","multi-line"],"no-console":"warn","no-extra-boolean-cast":"warn","no-unused-vars":"warn","perfectionist/sort-enums":"warn"}}],p=D;var v=O(C(),1);import Q from"@typescript-eslint/parser";import{importX as l}from"eslint-plugin-import-x";var U=[v.default.configs.recommended,l.flatConfigs.recommended,l.flatConfigs.typescript,{files:["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],languageOptions:{ecmaVersion:"latest",parser:Q,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"}}],u=U;import X from"eslint-plugin-jsx-a11y";var B=[X.flatConfigs.recommended],f=B;import k from"eslint-plugin-n";var G=[{files:["**/*.js","**/*.cjs","**/*.mjs"," **/*.ts","**/*.cts","**/*.mts"],plugins:{n:k},rules:{...k.configs["flat/recommended"].rules,"n/no-exports-assign":"error","n/no-missing-import":"off","n/no-missing-require":"error","n/no-process-exit":"warn","n/no-unpublished-import":"off","n/no-unpublished-require":"off","n/no-unsupported-features/es-syntax":"off","n/shebang":"error"},settings:{node:{version:">=18.0.0"}}}],d=G;import K from"eslint-config-prettier";import V from"eslint-plugin-prettier";var W=[K,{plugins:{prettier:V},rules:{"prettier/prettier":"warn"}}],m=W;import Y from"eslint-plugin-sonarjs";var Z=[Y.configs.recommended,{rules:{"sonarjs/no-commented-code":"off","sonarjs/no-unused-vars":"off"}}],g=Z;import $ from"typescript-eslint";var rr=[...$.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"}}],c=rr;import{existsSync as er,readFileSync as or}from"fs";import{join as nr}from"path";function T(o){let n=nr(o,"package.json");if(!er(n))return!1;let r=JSON.parse(or(n,"utf8"));if(r.type==="commonjs"||r.main||r.bin)return!0;let e={...r.dependencies,...r.devDependencies,...r.peerDependencies},s=["node:","@types/node","nodemon","ts-node","tsx"];return Object.keys(e).some(i=>s.includes(i))}import sr from"fast-glob";import E from"fs";import tr from"path";var ir=()=>{let o=tr.join(process.cwd(),"package.json");if(E.existsSync(o)){let n=JSON.parse(E.readFileSync(o,"utf-8")),r=n.dependencies||{},e=n.devDependencies||{};if("react"in r||"react"in e)return!0}try{return sr.sync(["src/**/*.jsx","src/**/*.tsx"],{cwd:process.cwd(),dot:!1,ignore:["**/node_modules/**","dist/**","output/**"]}).length>0}catch{return!1}},L=ir;import y from"fs";import P from"path";var ar=()=>["tailwind.config.js","tailwind.config.cjs","tailwind.config.mjs","tailwind.config.ts","tailwind.config.mts"].some(e=>y.existsSync(P.join(process.cwd(),e)))?!0:["postcss.config.js","postcss.config.cjs","postcss.config.mjs","postcss.config.ts","postcss.config.mts"].some(e=>{let s=P.join(process.cwd(),e);return y.existsSync(s)&&/tailwindcss/.test(y.readFileSync(s,"utf-8"))}),F=ar;import cr from"fast-glob";import pr from"fs";import lr from"path";var ur=lr.join(process.cwd(),"tsconfig.json"),fr=()=>{if(pr.existsSync(ur))return!0;try{return cr.sync(["src/**/*.ts","src/**/*.tsx"],{cwd:process.cwd(),dot:!1,ignore:["**/node_modules/**","dist/**","output/**"]}).length>0}catch{return!1}},q=fr;var I=L(),R=F(),J=q(),H=T(process.cwd());var dr=[...p,...u,...g],t=(o,n)=>o===void 0?n:o,mr=async o=>{let r=[{ignores:[...["**/node_modules/**","dist/**","output/**"],...o?.ignores??[]]},...dr];if(t(o?.react,I)){let e=await import("eslint-plugin-react"),s=await import("eslint-plugin-react-hooks"),i=e.default||e,N=s.default||s;r.push(i.configs.flat.recommended,N.configs["recommended-latest"],{...i.configs.flat["jsx-runtime"],files:["**/*.ts","**/*.tsx","**/*.jsx","**/*.js"],settings:{react:{version:"detect"}}})}if(t(o?.a11y,!0)&&r.push(...f),t(o?.node,H)&&r.push(...d),t(o?.tailwind,R)){let e=await import("./lib-HMMT2CNG.js");r.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(o?.prettier,!0)&&r.push(...m),t(o?.typescript,J)&&(r=r.map(e=>({...e,files:["**/*.ts","**/*.tsx",...e?.files?.flat(1/0)??[]]})),r.some(e=>c.includes(e))||r.push(...c.map(e=>({...e,files:["**/*.ts","**/*.tsx",...e?.files?.flat(1/0)??[]]}))),r.push({rules:{"no-unused-vars":"off"}})),r},le=mr();export{le as default,mr as init};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r,b as s}from"./chunk-ZWRDP37E.js";var a=s((w,n)=>{"use strict";n.exports={"tailwindcss/classnames-order":"warn","tailwindcss/enforces-negative-arbitrary-values":"warn","tailwindcss/enforces-shorthand":"warn","tailwindcss/migration-from-tailwind-2":"off","tailwindcss/no-arbitrary-value":"off","tailwindcss/no-custom-classname":"warn","tailwindcss/no-contradicting-classname":"off","tailwindcss/no-unnecessary-arbitrary-value":"warn"}});var t=s((f,i)=>{"use strict";var d=a();i.exports={plugins:["tailwindcss"],parserOptions:{ecmaFeatures:{jsx:!0}},rules:d}});var c=s((g,o)=>{"use strict";var m=a();o.exports=[{name:"tailwindcss:base",plugins:{get tailwindcss(){return u()}},languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}}},{name:"tailwindcss:rules",rules:m}]});var u=s((q,l)=>{var e=__dirname+"/rules/";l.exports={rules:{"classnames-order":r(e+"classnames-order"),"enforces-negative-arbitrary-values":r(e+"enforces-negative-arbitrary-values"),"enforces-shorthand":r(e+"enforces-shorthand"),"migration-from-tailwind-2":r(e+"migration-from-tailwind-2"),"no-arbitrary-value":r(e+"no-arbitrary-value"),"no-contradicting-classname":r(e+"no-contradicting-classname"),"no-custom-classname":r(e+"no-custom-classname"),"no-unnecessary-arbitrary-value":r(e+"no-unnecessary-arbitrary-value")},configs:{recommended:t(),"flat/recommended":c()}}});export default u();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-gorgon",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,33 +12,34 @@
|
|
|
12
12
|
"dist/*"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@typescript-eslint/parser": "^8.
|
|
16
|
-
"eslint": "^9.
|
|
15
|
+
"@typescript-eslint/parser": "^8.50.0",
|
|
16
|
+
"eslint": "^9.39.2",
|
|
17
17
|
"eslint-config-prettier": "^10.1.8",
|
|
18
18
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
19
19
|
"eslint-plugin-import-x": "^4.16.1",
|
|
20
20
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
21
|
-
"eslint-plugin-
|
|
21
|
+
"eslint-plugin-n": "^17.23.1",
|
|
22
|
+
"eslint-plugin-perfectionist": "^4.15.1",
|
|
22
23
|
"eslint-plugin-prettier": "^5.5.4",
|
|
23
24
|
"eslint-plugin-react": "^7.37.5",
|
|
24
|
-
"eslint-plugin-react-hooks": "^
|
|
25
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
25
26
|
"eslint-plugin-sonarjs": "^3.0.5",
|
|
26
|
-
"eslint-plugin-tailwindcss": "^3.14.2",
|
|
27
27
|
"fast-glob": "^3.3.3",
|
|
28
28
|
"ignore": "^7.0.5",
|
|
29
|
-
"prettier": "^3.
|
|
30
|
-
"typescript-eslint": "^8.
|
|
29
|
+
"prettier": "^3.7.4",
|
|
30
|
+
"typescript-eslint": "^8.50.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@eslint/js": "^9.
|
|
33
|
+
"@eslint/js": "^9.39.2",
|
|
34
34
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
35
|
-
"@types/eslint-plugin-jsx-a11y": "^6.10.
|
|
36
|
-
"@types/node": "^
|
|
37
|
-
"@typescript-eslint/utils": "^8.
|
|
35
|
+
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
36
|
+
"@types/node": "^25.0.2",
|
|
37
|
+
"@typescript-eslint/utils": "^8.50.0",
|
|
38
|
+
"eslint-plugin-tailwindcss": "4.0.0-beta.0",
|
|
38
39
|
"husky": "^9.1.7",
|
|
39
|
-
"tsup": "^8.5.
|
|
40
|
-
"typescript": "^5.9.
|
|
41
|
-
"vitest": "^
|
|
40
|
+
"tsup": "^8.5.1",
|
|
41
|
+
"typescript": "^5.9.3",
|
|
42
|
+
"vitest": "^4.0.16"
|
|
42
43
|
},
|
|
43
44
|
"lint-staged": {
|
|
44
45
|
"packages/lint/**/*": "prettier --write --ignore-unknown --cache",
|