Rules
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
const fullPath1 = __dirname + "/foo.js";
const fullPath2 = __filename + "/foo.js";
const fullPath3 = `${__dirname}/foo.js`;
const fullPath4 = `${__filename}/foo.js`;
const fullPath5 = import.meta.dirname + "/foo.js";
const fullPath6 = import.meta.filename + "/foo.js";
const fullUrl = import.meta.url + "/foo.js";const fullPath1 = path.join(__dirname, "foo.js");
const fullPath2 = path.join(__filename, "foo.js");
const fullPath3 = __dirname + ".js";
const fullPath4 = __filename + ".map";
const fullPath5 = `${__dirname}_foo.js`;
const fullPath6 = `${__filename}.test.js`;
const fullPath7 = path.join(import.meta.dirname, "foo.js");
const fullPath8 = path.join(import.meta.filename, "foo.js");
const fullUrl = new URL("./foo.js", import.meta.url);Popular · 1 of 3
Disallow string concatenation with __dirname, __filename, and import.meta paths
const fullPath1 = __dirname + "/foo.js";
const fullPath2 = __filename + "/foo.js";
const fullPath3 = `${__dirname}/foo.js`;
const fullPath4 = `${__filename}/foo.js`;
const fullPath5 = import.meta.dirname + "/foo.js";
const fullPath6 = import.meta.filename + "/foo.js";
const fullUrl = import.meta.url + "/foo.js";const fullPath1 = path.join(__dirname, "foo.js");
const fullPath2 = path.join(__filename, "foo.js");
const fullPath3 = __dirname + ".js";
const fullPath4 = __filename + ".map";
const fullPath5 = `${__dirname}_foo.js`;
const fullPath6 = `${__filename}.test.js`;
const fullPath7 = path.join(import.meta.dirname, "foo.js");
const fullPath8 = path.join(import.meta.filename, "foo.js");
const fullUrl = new URL("./foo.js", import.meta.url);