Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mmkal/eslint-plugin-codegen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.22.1
Choose a base ref
...
head repository: mmkal/eslint-plugin-codegen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.23.0
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Jan 29, 2024

  1. settings.json

    mmkal committed Jan 29, 2024
    Copy the full SHA
    c160005 View commit details
  2. Copy the full SHA
    d0f6bbe View commit details
  3. 0.23.0

    mmkal committed Jan 29, 2024
    Copy the full SHA
    6050cca View commit details
Showing with 14 additions and 3 deletions.
  1. +1 −1 .vscode/settings.json
  2. +1 −1 package.json
  3. +11 −1 src/index.ts
  4. +1 −0 src/presets/index.ts
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "always"
},
"eslint.validate": [
"javascript",
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-codegen",
"version": "0.22.1",
"version": "0.23.0",
"engines": {
"node": ">=12.0.0"
},
12 changes: 11 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -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.

1 change: 1 addition & 0 deletions src/presets/index.ts
Original file line number Diff line number Diff line change
@@ -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')