Skip to content

Commit

Permalink
fix: slight typos (#51)
Browse files Browse the repository at this point in the history
* fix typo of vue-script-setup-converter

* fix typos identifiler -> identifier

* fix typo usefetch -> useFetch
  • Loading branch information
inouetakuya authored May 6, 2024
1 parent e65a483 commit 87607e6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/insert-emits-option/src/lib/getNodeByKind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export const getOptionsNode = (
.filter((x) => x.getKind() === SyntaxKind.PropertyAssignment);

const propsNode = properties.find((x) => {
const identifiler = (x as PropertyAssignment).getName();
return identifiler === type;
const identifier = (x as PropertyAssignment).getName();
return identifier === type;
});

if (!propsNode) {
Expand Down
4 changes: 2 additions & 2 deletions packages/insert-emits-option/src/lib/insertEmitsOption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ export const getPropertyNode = (
.filter((x) => x.getKind() === SyntaxKind.PropertyAssignment);

const propsNode = properties.find((x) => {
const identifiler = (x as PropertyAssignment).getName();
return identifiler === type;
const identifier = (x as PropertyAssignment).getName();
return identifier === type;
});

if (!propsNode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { applyTransform } from "jscodeshift/src/testUtils";
import transform from "./capi-legacy";

test("capi migration", () => {
const source = `import { defineComponent, useRoute, usefetch } from '@nuxtjs/composition-api';
const source = `import { defineComponent, useRoute, useFetch } from '@nuxtjs/composition-api';
export default defineComponent({
setup() {
const { $fetch, $fetchState } = useFetch(async () => {
Expand All @@ -15,7 +15,7 @@ export default defineComponent({
});
`;

const expected = `import { defineComponent, useRoute, usefetch } from '@nuxtjs/composition-api';
const expected = `import { defineComponent, useRoute, useFetch } from '@nuxtjs/composition-api';
export default defineComponent({
setup() {
const {
Expand Down
4 changes: 2 additions & 2 deletions packages/vue-script-setup-converter/src/lib/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export const getOptionsNode = (
.filter((x) => x.getKind() === SyntaxKind.PropertyAssignment);

const propsNode = properties.find((x) => {
const identifiler = (x as PropertyAssignment).getName();
return identifiler === type;
const identifier = (x as PropertyAssignment).getName();
return identifier === type;
});

if (!propsNode) {
Expand Down

0 comments on commit 87607e6

Please sign in to comment.