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 <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
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

+1-1
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 tools/lint-sh.mjs

+4-4
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 { promises as fs, readdirSync, statSync } from 'node:fs';
5+
import { extname, join, relative, resolve } from 'node:path';
6+
import process from 'node:process';
77

88
const FIX_MODE_ENABLED = process.argv.includes('--fix');
99
const USE_NPX = process.argv.includes('--from-npx');

0 commit comments

Comments
 (0)