sawyerh / eslint-plugin-todo-plz

Enforce consistent and maintainable TODO comments
https://npmjs.com/package/eslint-plugin-todo-plz
27 stars 9 forks source link

Use Regex literals #13

Open lishaduck opened 2 months ago

lishaduck commented 2 months ago

Hello! TS 5.5 now checks for syntax errors in regex literals, so it would be nice if they could be supported in addition to strings. If that's something you'd be willing to accept a PR for, I'd be willing to do it.

lishaduck commented 2 months ago

So that I don't forget:

pattern instanceof RegExp ? pattern : new RegExp(pattern, 'u') https://github.com/sindresorhus/eslint-plugin-unicorn/blob/1deb9bb5edf27fdb2f656add11c924dfa59fdac9/rules/prevent-abbreviations.js#L54

I'd expected that to be harder.

sawyerh commented 2 months ago

@lishaduck I'm open to contributions 👍🏻