From 743dce09ae9e6c71db6976b664312dc9b84a1295 Mon Sep 17 00:00:00 2001 From: Alex <8125011+alex-kinokon@users.noreply.github.com> Date: Thu, 24 Aug 2023 07:23:35 -0400 Subject: [PATCH] Fix various issues --- dist/package.json | 3 ++- esbuild.ts | 2 +- pull.sh | 15 ++++++++++----- src/build-local-rules.ts | 2 +- src/local/index.ts | 2 +- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/dist/package.json b/dist/package.json index 038cdf3..91d2eca 100644 --- a/dist/package.json +++ b/dist/package.json @@ -1,8 +1,9 @@ { "name": "@aet/eslint-rules", - "version": "0.0.1-beta.28", + "version": "0.0.1-beta.30", "license": "UNLICENSED", "peerDependencies": { + "esbin": "^0.0.2", "typescript": "^5.1.6" }, "dependencies": { diff --git a/esbuild.ts b/esbuild.ts index c48cf52..c8a6355 100755 --- a/esbuild.ts +++ b/esbuild.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env -S node -r esbin +#!/usr/bin/env tsx import assert from 'node:assert'; import { readFileSync } from 'node:fs'; import { resolve, extname, relative } from 'node:path'; diff --git a/pull.sh b/pull.sh index bd0d60c..b910806 100755 --- a/pull.sh +++ b/pull.sh @@ -1,6 +1,11 @@ #!/bin/bash -(cd eslint-plugin-import && git pull) -(cd eslint-plugin-jsx-a11y && git pull) -(cd jsx-ast-utils && git pull) -(cd eslint-plugin-react && git pull) -(cd eslint-plugin-n && git pull) +pull() { + echo "🚛 Pulling $1" + (cd "$1" && git pull) +} + +pull eslint-plugin-import +pull eslint-plugin-jsx-a11y +pull jsx-ast-utils +pull eslint-plugin-react +pull eslint-plugin-n diff --git a/src/build-local-rules.ts b/src/build-local-rules.ts index a8a5c2c..dcd8944 100755 --- a/src/build-local-rules.ts +++ b/src/build-local-rules.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env -S node -r esbin +#!/usr/bin/env tsx import { readdirSync, writeFileSync } from 'node:fs'; import { camelCase } from 'lodash'; diff --git a/src/local/index.ts b/src/local/index.ts index 2d0ceb7..401671d 100644 --- a/src/local/index.ts +++ b/src/local/index.ts @@ -11,7 +11,7 @@ function tryRequire(candidates: string[]) { } } -tryRequire(['esbin', 'esbuild-register', 'ts-node/register/transpile-only']); +tryRequire(['esbin/register', 'esbuild-register', 'ts-node/register/transpile-only']); const folders = resolve(process.cwd(), 'eslint-local-rules'); const files = fs.readdirSync(folders);