Skip to content

Commit

Permalink
chore(bezier-codemod): typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yangwooseong committed Dec 22, 2023
1 parent 4a70aab commit 356134e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/bezier-codemod/src/shared/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Member = string
type Value = string
export type EnumTransformMap = Record<Name, Record<Member, Value>>

export const transformEnumTostringLiteralInBezier = (sourceFile: SourceFile, enumTransforms: EnumTransformMap) => {
export const transformEnumToStringLiteralInBezier = (sourceFile: SourceFile, enumTransforms: EnumTransformMap) => {
const transformedEnumNames: string[] = []

Object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type SourceFile } from 'ts-morph'

import {
type EnumTransformMap,
transformEnumTostringLiteralInBezier,
transformEnumToStringLiteralInBezier,
} from '../../shared/enum.js'

const ENUM_TRANSFORM_MAP: EnumTransformMap = {
Expand All @@ -18,7 +18,7 @@ const ENUM_TRANSFORM_MAP: EnumTransformMap = {
}

function enumMemberToStringLiteral(sourceFile: SourceFile): true | void {
return transformEnumTostringLiteralInBezier(sourceFile, ENUM_TRANSFORM_MAP)
return transformEnumToStringLiteralInBezier(sourceFile, ENUM_TRANSFORM_MAP)
}

export default enumMemberToStringLiteral
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-template-curly-in-string */
import { type SourceFile } from 'ts-morph'

import { transformEnumTostringLiteralInBezier } from '../../shared/enum.js'
import { transformEnumToStringLiteralInBezier } from '../../shared/enum.js'
import { interpolationTransform } from '../../shared/interpolation.js'
import { removeUnusedNamedImport } from '../../utils/import.js'

Expand Down Expand Up @@ -34,7 +34,7 @@ const replaceZIndexInterpolation = (sourceFile: SourceFile) => {
const oldSourceFileText = sourceFile.getText()

interpolationTransform(sourceFile, CSS_VARIABLE_TRANSFORM_MAP)
transformEnumTostringLiteralInBezier(sourceFile, ENUM_TRANSFORM_MAP)
transformEnumToStringLiteralInBezier(sourceFile, ENUM_TRANSFORM_MAP)

const isChanged = sourceFile.getText() !== oldSourceFileText
if (isChanged) {
Expand Down

0 comments on commit 356134e

Please sign in to comment.