Rule Definition
In Node.js, the __dirname and __filename global variables contain the directory path and the file path of the currently executing script file, respectively. Using these variables directly you can create an invalid path using string concatenation and assuming Unix-style separators.
Remediation
You can use path.join.
Violation Code Sample
var fullPath = __dirname + "/foo.js";
var fullPath = __filename + "/foo.js";
Fixed Code Sample
var fullPath = path.join(__dirname,"/foo.js");
var fullPath = path.resolve( __filename,"/foo.js");
Reference
http://eslint.org/docs/rules/no-path-concat
Related Technologies
Technical Criterion
Efficiency - Memory, Network and Disk Space Management
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.