mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
tools: refactor lint-sh.js to esm module
PR-URL: https://github.com/nodejs/node/pull/42942 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
2
.github/workflows/linters.yml
vendored
2
.github/workflows/linters.yml
vendored
@@ -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
|
||||
|
||||
@@ -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');
|
||||
Reference in New Issue
Block a user