This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
New rule: ban require #4248
jpike88
started this conversation in
Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Eslint doesn't really have a 'rule' for this one. It will activate an error however if the environment is not commonjs, and you attempt to include require statements when the preferred method is import.
Is this especially important as some bundlers will actually break or behave in a bad way is
import
andrequire
are used interchangeably in the same file or project.A simple
ban-require
rule would be handy.Beta Was this translation helpful? Give feedback.
All reactions