arethetypeswrong / arethetypeswrong.github.io

Tool for analyzing TypeScript types of npm packages

Home Page:https://arethetypeswrong.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clarity on "Masquerading as CJS"

benasher44 opened this issue · comments

Discussing in sequelize/sequelize#16157 (comment). I think it means that the index.d.ts is the same one used for CJS, but it's more of a warning, since it'll work as long as there is no ESM-incompatible syntax?

Nearly perfect timing! I’m working on full explainers for each problem. They’re not done, but that one is already committed to the WIP branch: https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/docs/docs/problems/FalseCJS.md

Let me know if that clears things up.

I think that helps me! I'll post this in the other ticket.

@andrewbranch tangentially related: could the CLI output the rule shortname as part of the explanation, so it's easier to know what to pass to --ignore-rules?

That would be great. Make sure you read all the bad consequences of it before you go set other projects up to ignore it too though 😉

@benasher44 that link is in main now. You may want to update your link in the other thread in case I absentmindedly delete the docs branch (which I’d prefer to do since it’s a merged feature branch now).