You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to use this library in a project, but as I didn't receive any reports (even though I knew there were violations there), I decided to look at the source code and I saw that some rules like no-missing-placeholders and report-message-format (those are the rules I was most interested in, but I believe there are much more) basically depend on utils.getContextIdentifiers, which looks for module.exports or exports.create (please, correct if I'm wrong — I have no familiarity with this repository code and this assumption comes from the little I could see by looking at the code + tests), but with TS (more specifically @typescript-eslint), the rules are usually created using the following structure:
So I wonder if the implementation could be changed to not depend specifically on module.exports or exports.create and to support these cases above as well. I really wanted to avoid redundancy and use some of the rules that already exist here instead of rewriting from scratch, but I understand if it's not within the scope of your project.
The text was updated successfully, but these errors were encountered:
I would be in favor of supporting TypeScript rules. I guess we could just check that the first argument to the export default function call (e.g. util.createRule) has an object with create/meta.
Relatedly, we also want to support ESM rules (#157) which are similar except without the TypeScript helper.
Hello ✋
I was trying to use this library in a project, but as I didn't receive any reports (even though I knew there were violations there), I decided to look at the source code and I saw that some rules like
no-missing-placeholders
andreport-message-format
(those are the rules I was most interested in, but I believe there are much more) basically depend onutils.getContextIdentifiers
, which looks formodule.exports
orexports.create
(please, correct if I'm wrong — I have no familiarity with this repository code and this assumption comes from the little I could see by looking at the code + tests), but with TS (more specifically@typescript-eslint
), the rules are usually created using the following structure:So I wonder if the implementation could be changed to not depend specifically on
module.exports
orexports.create
and to support these cases above as well. I really wanted to avoid redundancy and use some of the rules that already exist here instead of rewriting from scratch, but I understand if it's not within the scope of your project.The text was updated successfully, but these errors were encountered: