Skip to content

Commit 7987238

Browse files
F3n67uRafaelGSS
authored andcommitted
tools: refactor lint-sh.js to esm module
PR-URL: #42942 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
1 parent 265ecdf commit 7987238

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎.github/workflows/linters.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
persist-credentials: false
157157
- run: shellcheck -V
158158
- name: Lint Shell scripts
159-
run: tools/lint-sh.js .
159+
run: tools/lint-sh.mjs .
160160
lint-codeowners:
161161
if: github.event.pull_request.draft == false
162162
runs-on: ubuntu-latest

tools/lint-sh.js renamed to tools/lint-sh.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env node
2-
'use strict';
32

4-
const{ execSync, spawn }=require('child_process');
5-
const{promises: fs, readdirSync, statSync }=require('fs');
6-
const{ extname, join, relative, resolve }=require('path');
3+
import{execSync,spawn}from'node:child_process';
4+
import{promisesasfs,readdirSync,statSync}from'node:fs';
5+
import{extname,join,relative,resolve}from'node:path';
6+
importprocessfrom'node:process';
77

88
constFIX_MODE_ENABLED=process.argv.includes('--fix');
99
constUSE_NPX=process.argv.includes('--from-npx');

0 commit comments

Comments
(0)