Skip to content

Commit

Permalink
refactor: fix // @ts-ignore to // @ts-expect-error
Browse files Browse the repository at this point in the history
TypeScript allows you to suppress all errors on a line by placing a single-line comment starting with `@ts-ignore` immediately before the erroring line. While powerful, there is no way to know if a `@ts-ignore` is actually suppressing an error without manually investigating what happens when the `@ts-ignore` is removed.  This means its easy for `@ts-ignores` to be forgotten about, and remain in code even after the error they were suppressing is fixed. This is dangerous, as if a new error arises on that line it'll be suppressed by the forgotten about `@ts-ignore`, and so be missed.
  • Loading branch information
deepsource-autofix[bot] authored Dec 18, 2023
1 parent 6a87984 commit 774601b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import UnocssPlugin from "@unocss/vite";
import path from "path";

// https://vitejs.dev/config/
// @ts-ignore
// @ts-expect-error
export default defineConfig(async () => ({
plugins: [solidPlugin(), UnocssPlugin({})],
resolve: {
Expand Down

0 comments on commit 774601b

Please sign in to comment.