Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 14 and ESLint Error defined but never used #893

Open
mdmahendri opened this issue Oct 27, 2024 · 0 comments
Open

Chapter 14 and ESLint Error defined but never used #893

mdmahendri opened this issue Oct 27, 2024 · 0 comments

Comments

@mdmahendri
Copy link

mdmahendri commented Oct 27, 2024

  • Running pnpm lint does not output ✔ No ESLint warnings or errors but it pointed out four files containing the error
  • This error will hinder the deployment to vercel and make the build fail, which is affecting the next chapter
> next lint


./app/lib/actions.ts
58:14  Error: 'error' is defined but never used.  @typescript-eslint/no-unused-vars
93:14  Error: 'error' is defined but never used.  @typescript-eslint/no-unused-vars
107:14  Error: 'error' is defined but never used.  @typescript-eslint/no-unused-vars

./app/ui/customers/table.tsx
5:3  Error: 'CustomersTableType' is defined but never used.  @typescript-eslint/no-unused-vars

./app/ui/dashboard/latest-invoices.tsx
5:10  Error: 'LatestInvoice' is defined but never used.  @typescript-eslint/no-unused-vars

./app/ui/dashboard/revenue-chart.tsx
4:10  Error: 'Revenue' is defined but never used.  @typescript-eslint/no-unused-vars

./app/ui/login-form.tsx
5:3  Error: 'ExclamationCircleIcon' is defined but never used.  @typescript-eslint/no-unused-vars

for action.ts error
we need to modify and use error param, for example output it to console like this

...
   } catch (error) {
        console.error('Error ocurred:', error);
        return {
            message: 'Database Error: Fail create',
        }
    }
...

for the other errors
we need to delete the the definition in each file, because until the end of course, they're never used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant