Check out example codes for "Require statement not part of import [email protected]/no-var-requires". It will help you in understanding the concepts better.

Code Example 1

module.exports = {
  ...
  rules: {
    ...
    '@typescript-eslint/no-var-requires': 0,
  }
}

Learn ReactJs, React Native from akashmittal.com