Skip to content

Commit

Permalink
tools: refactor lint-sh.js to esm module
Browse files Browse the repository at this point in the history
PR-URL: #42942
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
  • Loading branch information
F3n67u authored and RafaelGSS committed May 10, 2022
1 parent 265ecdf commit 7987238
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
persist-credentials: false
- run: shellcheck -V
- name: Lint Shell scripts
run: tools/lint-sh.js .
run: tools/lint-sh.mjs .
lint-codeowners:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions tools/lint-sh.js → tools/lint-sh.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env node
'use strict';

const { execSync, spawn } = require('child_process');
const { promises: fs, readdirSync, statSync } = require('fs');
const { extname, join, relative, resolve } = require('path');
import { execSync, spawn } from 'node:child_process';
import { promises as fs, readdirSync, statSync } from 'node:fs';
import { extname, join, relative, resolve } from 'node:path';
import process from 'node:process';

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

0 comments on commit 7987238

Please sign in to comment.