From 1541a106d654fa1b83843437077e18262d76abb7 Mon Sep 17 00:00:00 2001 From: Brandon Kraft Date: Thu, 9 Jan 2025 16:47:40 -0600 Subject: [PATCH] Update GH actions linter to chalk v5 standards --- tools/js-tools/lint-gh-actions.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/js-tools/lint-gh-actions.js b/tools/js-tools/lint-gh-actions.js index 2e89b66b32d27..813b52d64e68c 100755 --- a/tools/js-tools/lint-gh-actions.js +++ b/tools/js-tools/lint-gh-actions.js @@ -2,10 +2,10 @@ /* eslint-env node */ -const fs = require( 'fs' ); -const chalk = require( 'chalk' ); -const { glob } = require( 'glob' ); -const YAML = require( 'yaml' ); +import fs from 'fs'; +import chalk from 'chalk'; +import { glob } from 'glob'; +import YAML from 'yaml'; const isCI = !! process.env.CI; @@ -31,7 +31,7 @@ process.argv.slice( 2 ).forEach( arg => { const debug = msg => { if ( verbose ) { // Grey doesn't work well in GitHub's output - console.log( chalk[ isCI ? 'blue' : 'gray' ]( msg ) ); + console.log( isCI ? chalk.blue( msg ) : chalk.gray( msg ) ); } }; const error = ( file, line, msg, hint ) => {