Skip to content

VBC-048: meaningless-variable-names

warning

Category: clean-code
Analysis: Regex (line by line)
File types: .js, .ts, .tsx, .py, .astro
Scope: source code only, ignoring anything inside strings and comments
Tags: clean-code

What it reports

Meaningless variable name '{match}' detected at line {line}. Use descriptive names that convey intent.

Flagged

js
const temp = load();
js
let thing = compute();

Not flagged

js
const invoiceTotal = load();
js
const data = await response.json();

Pattern

regex
\b(?:let|const|var)\s+(?:temp|tmp|obj|variable|thing|stuff|foo|bar|baz|qux|myVar|test1|data2)\b

Released under the MIT License.