Amaxa-Impact / amaxa

we help you effect change in the world
MIT License
2 stars 3 forks source link

Eslint Errors #58

Closed not-ani closed 6 days ago

not-ani commented 6 days ago

Discussed in https://github.com/Amaxa-Impact/amaxa/discussions/57

Originally posted by **not-ani** October 13, 2024 ### Errors Checklist - [x] **File**: `/home/blue/amaxa/apps/website/src/app/(marketing)/_components/number-ticker.tsx` - **Line**: 30 - **Error**: Expected an assignment or function call and instead saw an expression. - **Rule**: `@typescript-eslint/no-unused-expressions` - [x] **File**: `/home/blue/amaxa/apps/website/src/app/(marketing)/about-us/_components/our-partners.tsx` - **Line**: 46, 61 - **Error**: Using `` could result in slower LCP and higher bandwidth. Consider using `` from `next/image`. - **Rule**: `@next/next/no-img-element` - [x] **File**: `/home/blue/amaxa/apps/website/src/app/(marketing)/project/[id]/page.tsx` - **Line**: 8 - **Error**: Prefer `.find(...)` instead of `.filter(...)[0]`. - **Rule**: `@typescript-eslint/prefer-find` - [x] **File**: `/home/blue/amaxa/apps/website/src/components/blog/author.tsx` - **Line**: 10 - **Error**: 'any' overrides all other types in this union type. - **Rule**: `@typescript-eslint/no-redundant-type-constituents` - [x] **File**: `/home/blue/amaxa/apps/website/src/components/blog/copy-box.tsx` - **Line**: 22 - **Error**: Promises must be awaited or marked as ignored with `void` operator. - **Rule**: `@typescript-eslint/no-floating-promises` - [x] **File**: `/home/blue/amaxa/apps/website/src/components/platform-hero.tsx` - **Line**: 44, 49 - **Error**: Using `` could result in slower LCP and higher bandwidth. Consider using `` from `next/image`. - **Rule**: `@next/next/no-img-element` - [x] **File**: `/home/blue/amaxa/apps/website/src/lib/utils.ts` - **Line**: 13 - **Error 1**: `NEXT_PUBLIC_APP_URL` is not listed as a dependency in turbo.json. - **Error 2**: 'process.env' is restricted from being used. Use `import { env } from '~/env'`. - **Rule 1**: `turbo/no-undeclared-env-vars` - **Rule 2**: `no-restricted-properties` - [x] **File**: `/home/blue/amaxa/apps/nextjs/src/app/(dashboard)/project/[id]/(root)/_components/OverallChart.tsx` - **Line**: 13, 14, 21, 23, 38, 47 - **Errors**: Unsafe assignment, member access on an `error` typed value, unused variables, unexpected types, etc. - **Rules**: Various `@typescript-eslint` rules like `no-unused-vars`, `no-unsafe-assignment`, `no-unsafe-call`, etc. - [ ] **File**: `/home/blue/amaxa/apps/nextjs/src/app/(dashboard)/project/[id]/(root)/_components/search.tsx` - **Line**: 4 - **Error**: 'useRouter' is defined but never used. - **Rule**: `@typescript-eslint/no-unused-vars` - [x] **File**: `/home/blue/amaxa/apps/nextjs/src/app/(dashboard)/project/[id]/(root)/calendar/_components/project-calendar.tsx` - **Line**: 18, 19, 24, 26, 30, 39 - **Errors**: Unused variables, unsafe assignment of `any` type. - **Rules**: Various `@typescript-eslint` rules like `no-unused-vars`, `no-explicit-any`, etc. - [x] **File**: `/home/blue/amaxa/apps/nextjs/src/app/(dashboard)/project/[id]/(root)/calendar/_components/tracker-events.tsx` - **Line**: 16, 22, 24, 27 - **Errors**: Unsafe assignments, member access, unnecessary conditionals. - **Rules**: Various `@typescript-eslint` rules like `no-unsafe-assignment`, `no-unnecessary-condition`, etc. - [x] **File**: `/home/blue/amaxa/apps/nextjs/src/app/(dashboard)/project/[id]/(root)/calendar/_components/tracker-month-select.tsx` - **Line**: 22, 33 - **Error**: Promises must be awaited or marked as ignored with `void` operator. - **Rule**: `@typescript-eslint/no-floating-promises` - [x] **File**: `/home/blue/amaxa/apps/nextjs/src/app/(dashboard)/project/[id]/(root)/layout.tsx` - **Line**: 58, 59, 60 - **Error**: Forbidden non-null assertion. - **Rule**: `@typescript-eslint/no-non-null-assertion` - [x] **File**: `/home/blue/amaxa/apps/nextjs/src/components/navbar/nav-main.tsx` - **Line**: 52 - **Error**: 'SidebarSearch' is defined but only used as a type. - **Rule**: `@typescript-eslint/no-unused-vars` - [x] **File**: `/home/blue/amaxa/apps/nextjs/src/lib/utils.ts` - **Line**: 10 - **Error**: Unnecessary escape characters. - **Rule**: `no-useless-escape` --- **Total errors**: 111