Skip to content

feat: Add eslint#63

Closed
StoynovAngel wants to merge 2 commits into
mainfrom
feat/add-es-lint
Closed

feat: Add eslint#63
StoynovAngel wants to merge 2 commits into
mainfrom
feat/add-es-lint

Conversation

@StoynovAngel
Copy link
Copy Markdown
Owner

@StoynovAngel StoynovAngel commented Apr 30, 2026

Summary by CodeRabbit

  • Chores
    • Added ESLint configuration and linting tools for improved code quality and consistency.
    • Refactored imports for better TypeScript type safety and runtime optimization.
    • Standardized promise handling patterns and code organization across the application.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 97ddc1a8-2d35-42ea-bfd2-3a4f6e281299

📥 Commits

Reviewing files that changed from the base of the PR and between 13fc02a and 1b88b76.

⛔ Files ignored due to path filters (1)
  • frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (29)
  • frontend/App.tsx
  • frontend/app.config.ts
  • frontend/eslint.config.js
  • frontend/package.json
  • frontend/src/components/AccessibilityMenu/AccessibilityMenu.styles.ts
  • frontend/src/components/AccessibilityMenu/AccessibilityMenu.tsx
  • frontend/src/components/BackButton/BackButton.styles.ts
  • frontend/src/components/BackgroundShapes/BackgroundShapes.tsx
  • frontend/src/components/CompanyCard/CompanyCard.styles.ts
  • frontend/src/components/GlassCard/GlassCard.styles.ts
  • frontend/src/components/GlassCard/GlassCard.tsx
  • frontend/src/components/LogoutButton/LogoutButton.styles.ts
  • frontend/src/components/ScreenContainer/ScreenContainer.styles.ts
  • frontend/src/components/ScreenContainer/ScreenContainer.tsx
  • frontend/src/components/SearchInput/SearchInput.styles.ts
  • frontend/src/hooks/useAuthState.ts
  • frontend/src/hooks/useTranslation.ts
  • frontend/src/navigation/MainTabs.tsx
  • frontend/src/navigation/RootNavigator.styles.ts
  • frontend/src/navigation/navigation.styles.ts
  • frontend/src/screens/BrowseCompanies/BrowseCompaniesScreen.styles.ts
  • frontend/src/screens/Login/LoginScreen.styles.ts
  • frontend/src/screens/Register/RegisterScreen.styles.ts
  • frontend/src/screens/SelectService/SelectServiceScreen.styles.ts
  • frontend/src/screens/ServiceOptions/ServiceOptionsScreen.styles.ts
  • frontend/src/stores/authStore.ts
  • frontend/src/stores/localeStore.ts
  • frontend/src/stores/themeStore.ts
  • frontend/src/stores/token.ts

📝 Walkthrough

Walkthrough

This PR systematically introduces ESLint configuration for the frontend project, converts type-related imports to type-only imports across numerous files, adds explicit void expressions to intentionally discard promise values, refactors navigation styles, and makes minor logic adjustments for consistency.

Changes

Cohort / File(s) Summary
ESLint Configuration
frontend/eslint.config.js, frontend/package.json
Adds comprehensive ESLint flat configuration with TypeScript, React, React Hooks, and React Native support; includes npm scripts for lint and lint:fix; specifies plugins, rules, and dev dependencies.
Type-Only Import Conversions
frontend/app.config.ts, frontend/src/components/AccessibilityMenu/*, frontend/src/components/BackButton/BackButton.styles.ts, frontend/src/components/CompanyCard/CompanyCard.styles.ts, frontend/src/components/GlassCard/*, frontend/src/components/LogoutButton/LogoutButton.styles.ts, frontend/src/components/ScreenContainer/*, frontend/src/components/SearchInput/SearchInput.styles.ts, frontend/src/navigation/RootNavigator.styles.ts, frontend/src/screens/.../*.styles.ts, frontend/src/stores/themeStore.ts
Systematically converts ThemeColors, ReactNode, StyleProp, ViewStyle, TextStyle, and related type imports to TypeScript type-only imports across components, screens, and stores to ensure types are not emitted in runtime JavaScript.
Promise Handling (void expressions)
frontend/App.tsx, frontend/src/hooks/useAuthState.ts, frontend/src/stores/authStore.ts, frontend/src/stores/localeStore.ts, frontend/src/stores/themeStore.ts
Explicitly discards returned promise values by wrapping async calls in void expressions (e.g., void hydrateLocale(), void (async () => { ... })()) instead of leaving them unhandled.
Navigation Refactoring
frontend/src/navigation/navigation.styles.ts, frontend/src/navigation/MainTabs.tsx
Adds new mainContentStyles StyleSheet with container layout; adds logo style (36×36) to island header styles; updates MainTabs to use memoized computed header styles and applies styled container wrapper.
Minor Logic & Hook Updates
frontend/src/hooks/useAuthState.ts, frontend/src/hooks/useTranslation.ts, frontend/src/stores/token.ts
Changes boolean coercion from !!token to Boolean(token), replaces nullish check from == null to explicit === null || === undefined, and removes async keyword from getToken (returns promise directly).
ESLint Directive
frontend/src/components/BackgroundShapes/BackgroundShapes.tsx
Adds targeted ESLint disable directive to allow inline style objects without triggering react-native/no-inline-styles rule.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

  • feat: Add logo, update navigation #53: Modifies the same navigation files (MainTabs.tsx and navigation.styles.ts) to adjust island/header and logo styles, indicating related or overlapping layout work.
  • feat: Improve Home Screen #38: Updates theme store and related UI components (BackgroundShapes, toggleBlobs), with this PR adding ESLint ignore and promise handling in similar areas.
  • feat: Add initial frontend #33: Makes follow-up code-style improvements and promise-handling edits across many of the same frontend files originally added by that PR.

Poem

🐰 Types now whisper, promises void,
ESLint's rules for joy deployed,
Navigation styles arranged just right,
The code hops forward, clean and bright! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-es-lint
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch feat/add-es-lint

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Successfully merging this pull request may close these issues.

1 participant