Skip to content

Commit

Permalink
Point to function name instead of whole function
Browse files Browse the repository at this point in the history
  • Loading branch information
kaykdm authored and camc314 committed Jan 13, 2024
1 parent e860e1d commit f079969
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions crates/oxc_linter/src/rules/nextjs/no_typos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl Rule for NoTypos {
ctx.diagnostic(NoTyposDiagnostic(
id.name.to_string(),
potential_typo.to_string(),
en_decl.span,
id.span,
));
}
}
Expand All @@ -80,7 +80,7 @@ impl Rule for NoTypos {
ctx.diagnostic(NoTyposDiagnostic(
id.name.to_string(),
potential_typo.to_string(),
en_decl.span,
id.span,
));
}
_ => {}
Expand Down
10 changes: 5 additions & 5 deletions crates/oxc_linter/src/snapshots/no_typos.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ expression: no_typos
╭─[no_typos.tsx:4:1]
4 │ }
5export const getStaticpaths = async () => {};
· ─────────────────────────────────────────────
· ──────────────
6export const getStaticProps = async () => {};
╰────
help: Prevent common typos in Next.js's data fetching functions
Expand All @@ -15,7 +15,7 @@ expression: no_typos
╭─[no_typos.tsx:4:1]
4 │ }
5export async function getStaticPathss(){};
· ─────────────────────────────────────────
· ───────────────
6export async function getStaticPropss(){};
╰────
help: Prevent common typos in Next.js's data fetching functions
Expand All @@ -24,7 +24,7 @@ expression: no_typos
╭─[no_typos.tsx:5:1]
5export async function getStaticPathss(){};
6export async function getStaticPropss(){};
· ─────────────────────────────────────────
· ───────────────
7
╰────
help: Prevent common typos in Next.js's data fetching functions
Expand All @@ -33,7 +33,7 @@ expression: no_typos
╭─[no_typos.tsx:4:1]
4 │ }
5export async function getServurSideProps(){};
· ────────────────────────────────────────────
· ──────────────────
6
╰────
help: Prevent common typos in Next.js's data fetching functions
Expand All @@ -42,7 +42,7 @@ expression: no_typos
╭─[no_typos.tsx:4:1]
4 │ }
5export const getServurSideProps = () => {};
· ───────────────────────────────────────────
· ──────────────────
6
╰────
help: Prevent common typos in Next.js's data fetching functions
Expand Down

0 comments on commit f079969

Please sign in to comment.