loqatevars
Version:
Locate JavaScript files with 'const' or 'process.env' usage in LLM-generated codebases
19 lines (16 loc) • 390 B
JavaScript
// Test file for top-level scope detection
const localVars = require('../config/localVars');
function myFunction() {
const insideFunction = "should NOT be flagged";
if (true) {
const insideBlock = "should NOT be flagged";
}
}
class MyClass {
constructor() {
const insideClass = "should NOT be flagged";
}
}
if (true) {
const insideIfBlock = "should NOT be flagged";
}