From c1600058b239fba6e0dc37cf11c235974c0833c5 Mon Sep 17 00:00:00 2001 From: Misha Kaletsky Date: Sun, 28 Jan 2024 22:59:37 -0500 Subject: [PATCH 1/3] settings.json --- .vscode/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 046357b..b8e798d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "always" }, "eslint.validate": [ "javascript", From d0f6bbe4b92d4f16c14aa0656accbfe5ce12e93b Mon Sep 17 00:00:00 2001 From: Misha Kaletsky Date: Sun, 28 Jan 2024 23:01:37 -0500 Subject: [PATCH 2/3] add child_process to dependencies --- src/index.ts | 12 +++++++++++- src/presets/index.ts | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 73ebfaf..0fa28b3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ /* eslint-disable mmkal/@typescript-eslint/restrict-template-expressions */ +import * as child_process from 'child_process' import * as dedent from 'dedent' import type * as eslint from 'eslint' @@ -15,7 +16,16 @@ import * as readPkgUp from 'read-pkg-up' import * as presetsModule from './presets' import {createProcessor} from './processor' -export const dependencies: presetsModule.PresetDependencies = {dedent, fs, glob, jsYaml, lodash, path, readPkgUp} +export const dependencies: presetsModule.PresetDependencies = { + dedent, + fs, + glob, + jsYaml, + lodash, + path, + readPkgUp, + child_process, +} // idea: codegen/fs rule. type fs.anything and it generates an import for fs. same for path and os. diff --git a/src/presets/index.ts b/src/presets/index.ts index 0a8f0cc..e572680 100644 --- a/src/presets/index.ts +++ b/src/presets/index.ts @@ -13,6 +13,7 @@ export type PresetMeta = { export interface PresetDependencies { fs: typeof import('fs') path: typeof import('path') + child_process: typeof import('child_process') lodash: typeof import('lodash') jsYaml: typeof import('js-yaml') dedent: typeof import('dedent') From 6050ccac4ac7010d20e314059b30fa07b625aaee Mon Sep 17 00:00:00 2001 From: Misha Kaletsky Date: Sun, 28 Jan 2024 23:02:19 -0500 Subject: [PATCH 3/3] 0.23.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b4efd5..e09f802 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-codegen", - "version": "0.22.1", + "version": "0.23.0", "engines": { "node": ">=12.0.0" },