no-path-concat
eslint
No autofix
eslint.config.js
export default [
{
rules: {
"no-path-concat": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
var fullPath = __dirname + "/foo.js";
var fullPath = __filename + "/foo.js";var fullPath = dirname + "/foo.js";Examples from the ESLint documentation.
no-path-concat
eslint
export default [
{
rules: {
"no-path-concat": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow string concatenation with __dirname, __filename, and import.meta paths
Disallow dangling underscores in identifiers
Require return statements to either always or never specify values