you can disable this check in eslintrc.js file
module.exports = {
...
rules: {
...
'@typescript-eslint/no-var-requires': 0,
}
}
Examples of correct code for this rule:
import foo = require('foo');
require('foo');
import foo from 'foo';