According to this question: What is the difference between __dirname and ./ in node.js? these 2 lines should be the same:
require(__dirname + '/folder/file.js');
require('./folder/file.js');
and I always used to use the second option. But now a project, I took over, the previous developer used require(__dirname + ...)
every time.
Personally I thinks it's harder to read and I'd like to change it, but maybe there is some advantage of this syntax I'm missing? Or is it the preferred version and I was doing it wrong all the time?
Just in case it matters, the libraries run sometimes on node.js with es6 enabled and sometimes on io.js (without additional flags).