Skip to content

Commit 1523571

Browse files
committed
MLE-24763 First batch of lint fixes
No functional changes. Rules enforced (changes made by Copilot): - Use single quotes for strings. - Use `const` wherever possible instead of `let` or `var`.
1 parent f4d3670 commit 1523571

33 files changed

+1603
-1599
lines changed

eslint.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ module.exports = [
3535
"no-unused-vars": "error",
3636
"no-undef": "error",
3737

38+
// ES6+ modernization
39+
"prefer-const": "error", // Use const for variables never reassigned
40+
"no-var": "error", // Disallow var, use let/const instead
41+
3842
// Spacing rules (disabled for initial setup - TODO: Fix in separate PR)
3943
"arrow-spacing": "off",
4044
"space-before-blocks": "off",

lib/basic-loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function loadFile(callback, options) {
3333

3434
const documentDescriptor = options.documentDescriptor;
3535
if (documentDescriptor === void 0 || documentDescriptor == null) {
36-
throw new Error(`loadFile requires fileDescriptor option`);
36+
throw new Error('loadFile requires fileDescriptor option');
3737
}
3838

3939
fs.readFile(filePath, 'utf8', (err, data) => {
@@ -52,7 +52,7 @@ function loadFileStream(options) {
5252

5353
const documentMetadata = options.documentMetadata;
5454
if (documentMetadata === void 0 || documentMetadata == null) {
55-
throw new Error(`loadFileStream requires documentMetadata option`);
55+
throw new Error('loadFileStream requires documentMetadata option');
5656
}
5757

5858
let uriPrefix = options.uriPrefix;

0 commit comments

Comments
 (0)