msfragala / eslint-plugin-path-alias

Keep your codebase tidy and your imports consistent by enforcing path aliases via ESLint — hands-free thanks to auto-fix magic ✨
4 stars 1 forks source link

Don't minify output #1

Open SomeAspy opened 3 months ago

SomeAspy commented 3 months ago

I'd like to request you disable minification on the TS build, as this makes patching the package difficult. I don't think there is much to be gained by minifying the package, considering this will never be used by a browser, and is mainly intended as a development package. In older versions, we were able to patch the Regex with a few lines of easily readable patch file, but now that is more difficult, creating massive unreadable patch files. (example: https://github.com/Vendicated/Vencord/pull/2627)

You don't have to do this, but I think it would make it easier to patch. Thank you for your contributions!

Vendicated commented 3 months ago

it also makes it way harder to audit the npm package if the code is minified

maks-rafalko commented 3 months ago

offtop: @SomeAspy what is your patch about? does it make sense to send a PR to this lib to make it working out of the box?

Vendicated commented 3 months ago

our patch changes this line to remove the ?, because we still want to allow import "./file" (and import "./folder/file"). I don't think it should be default behaviour, but adding an option for it might be a good idea

https://github.com/msfragala/eslint-plugin-path-alias/blob/9177ba4c97726289d0201baca8a953c77949b871/src/rules/no-relative.ts#L83-L85

in any case, even without patching in mind, it just makes no sense to publish minified code, especially for a dev-only dependency like this