Skip to content

Commit f342370

Browse files
wikirbyclaude
andcommitted
Address PR review nits: drop dead printGlobResults, enforce lint
Two small fixes from the code review: 1. printGlobResults gulpfile helper called globby.sync(...), but globby dropped the .sync property in 14.x (we ship 16.2). The function had no callers — debug-only and silently broken. Deleted. With it gone, the only direct use of globby is removed, so the direct dep is pruned too (del still pulls its own nested globby@14, untouched). 2. The lint task previously called done() unconditionally, swallowing eslint's non-zero exit code "to match legacy gulp-tslint behavior." That was a sensible default while the rule set was inherited and undisciplined; now that the rule set is curated in this PR and the codebase is lint-clean, propagate the exit code so a future lint regression actually fails the build (and CI). Same pattern the tsc task uses. Verified: npm run build still clean (0 lint errors, 8.5s end-to-end), npm audit still 0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent eef980a commit f342370

3 files changed

Lines changed: 2 additions & 60 deletions

File tree

‎gulpfile.js‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ var argv = require("yargs/yargs")(process.argv.slice(2)).argv;
66
var concat = require("gulp-concat");
77
var del = require("del").deleteAsync;
88
var esbuild = require("esbuild");
9-
var globby = require("globby");
109
var gulp = require("gulp");
1110
var less = require("gulp-less");
1211
var mergeJSON = require("gulp-merge-json");
@@ -42,13 +41,6 @@ var PATHS = {
4241

4342
var ARIA_LIB_VERSION = "2.8.2";
4443

45-
// Used for debugging glob declarations
46-
function printGlobResults(glob) {
47-
globby.sync(glob).map(function(filePath) {
48-
console.log(filePath);
49-
});
50-
}
51-
5244
function fileExists(path) {
5345
try { return fs.statSync(path).isFile(); } catch (e) { return false; }
5446
}
@@ -155,9 +147,8 @@ gulp.task("lint", function (done) {
155147
var eslintPkgDir = path.dirname(require.resolve("eslint/package.json"));
156148
var eslintBin = path.join(eslintPkgDir, "bin", "eslint.js");
157149
var eslint = spawn(process.execPath, [eslintBin, "--no-error-on-unmatched-pattern", "src/**/*.ts", "src/**/*.tsx"], { stdio: "inherit" });
158-
eslint.on("close", function () {
159-
// Match legacy gulp-tslint behavior: report findings but don't fail the build.
160-
done();
150+
eslint.on("close", function (code) {
151+
done(code === 0 ? null : new Error("eslint exited with code " + code));
161152
});
162153
});
163154

‎package-lock.json‎

Lines changed: 0 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"esbuild": "0.28.0",
2929
"eslint": "10.4.0",
3030
"file-exists": "5.0.1",
31-
"globby": "16.2.0",
3231
"gulp": "5.0.1",
3332
"gulp-concat": "2.6.1",
3433
"gulp-less": "5.0.0",

0 commit comments

Comments
 (0)