Skip to content

Commit 194deef

Browse files
authored
Merge pull request #89144 from Expensify/rory-eslint-report
[No QA] Add eslint-report seatbelt dashboard script
2 parents 2f1b9c7 + a003c0c commit 194deef

6 files changed

Lines changed: 771 additions & 0 deletions

File tree

.github/actions/javascript/getPullRequestIncrementalChanges/index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12647,6 +12647,19 @@ class Git {
1264712647
throw new Error(`Failed to get file content from git: ${error instanceof Error ? error.message : String(error)}`);
1264812648
}
1264912649
}
12650+
/**
12651+
* Abbreviated hash for HEAD in the current working directory.
12652+
*
12653+
* @returns Short commit hash, or `unknown` when not a git repo or git fails.
12654+
*/
12655+
static getHeadShort() {
12656+
try {
12657+
return execSync('git rev-parse --short HEAD').trim();
12658+
}
12659+
catch {
12660+
return 'unknown';
12661+
}
12662+
}
1265012663
/**
1265112664
* Ensure a git reference is available locally, fetching it if necessary.
1265212665
*

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ yarn-error.log
5858
# Bundled code
5959
dist/
6060

61+
# Generated eslint-report HTML (npm run eslint-report)
62+
reports/
63+
6164
# BUCK
6265
buck-out/
6366
\.buckd/

cspell.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@
422422
"McAfee",
423423
"mchmod",
424424
"MCTEST",
425+
"Menlo",
425426
"mechler",
426427
"mediumitalic",
427428
"memberof",
@@ -505,6 +506,7 @@
505506
"NTSB",
506507
"Nuevo",
507508
"nullptr",
509+
"nums",
508510
"numberformat",
509511
"objc",
510512
"objdump",
@@ -921,6 +923,7 @@
921923
"Kolkata"
922924
],
923925
"ignorePaths": [
926+
".gitignore",
924927
"src/languages/de.ts",
925928
"src/languages/es.ts",
926929
"src/languages/fr.ts",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"lint": "./scripts/lint.sh",
4949
"lint-changed": "./scripts/lintChanged.sh",
5050
"lint-watch": "onchange '**/*.{js,jsx,ts,tsx,mjs,cjs}' -- ./scripts/lint.sh {{changed}}",
51+
"eslint-report": "ts-node scripts/eslint-report.ts",
5152
"shellcheck": "./scripts/shellCheck.sh",
5253
"spell": "cspell --color **/*",
5354
"spell-changed": "cspell --color --no-must-find-files",

0 commit comments

Comments
 (0)