eslint-plugin-require-path-exists
eslint-plugin-require-path-exists copied to clipboard
Doesn't work for `require.main.require()`
I hate crazy long and confusing relative paths like:
let customer = require(../../../../foo/bar/baz/customer);
So I use absolute paths instead:
let customer = require.main.require(./public/foo/bar/baz/customer);
But that doesn't work. Is this supported?
@grokky1 try to use NODE_PATH
then you'll be able to let customer = require('public/foo/bar/baz/customer')