Skip to content

сhore: eslint prettier config#52

Open
saijaku0 wants to merge 8 commits intoShantanugupta43:mainfrom
saijaku0:chore/eslint-prettier-config
Open

сhore: eslint prettier config#52
saijaku0 wants to merge 8 commits intoShantanugupta43:mainfrom
saijaku0:chore/eslint-prettier-config

Conversation

@saijaku0
Copy link
Copy Markdown
Contributor

@saijaku0 saijaku0 commented Apr 6, 2026

Summary

Adds ESLint and Prettier shared configuration to keep code style consistent across all contributors.

Changes

  • .eslintrc.json — ESLint config with webextensions: true to support chrome.* API
  • .prettierrc — Prettier config with single quotes, 2 space indentation, trailing commas
  • .prettierignore — excludes node_modules, dist, icons, and JSON files
  • .gitattributes — enforces LF line endings to avoid CRLF issues on Windows
  • .github/workflows/lint.yml — GitHub Actions workflow that runs lint automatically on every PR to main

Why

Without a shared config, each contributor's formatter produces different output which makes diffs hard to review (as seen in #41).

Note

Existing files are intentionally left unformatted to keep this PR focused. Formatting of existing code can be done in a separate PR.

How to test

  1. Run npm run lint — should pass with no errors
  2. Run npm run format — should format files consistently
  3. Open a PR and verify the lint workflow runs automatically

@Shantanugupta43
Copy link
Copy Markdown
Owner

Hey! Just checking if the PR ready for review? It looks like the lint step is failing in CI. Happy to help fix it if needed.

@saijaku0
Copy link
Copy Markdown
Contributor Author

saijaku0 commented Apr 8, 2026

Hey! Yes, the lint is failing because the existing files don't match the new Prettier config yet. I intentionally didn't format them in this PR to avoid a huge noisy diff (similar to what happened in #41). The idea was to add the config first, then format all files in a separate follow-up PR. Happy to do it either way — let me know your preference!

@Shantanugupta43
Copy link
Copy Markdown
Owner

Sure you can if u add the config first, then format all files in a separate follow-up PR cheers

@saijaku0
Copy link
Copy Markdown
Contributor Author

saijaku0 commented Apr 9, 2026

Hey! Fixed all ESLint errors:

  • Wrapped const declaration in case 'testConnection' with braces
  • Removed unnecessary escape characters in form-detector.js and groq-service.js
  • Removed unused currentSuggestions variable in popup.js

CI should pass now. Ready for review!

@saijaku0
Copy link
Copy Markdown
Contributor Author

@Shantanugupta43 bro check it

@Shantanugupta43
Copy link
Copy Markdown
Owner

Would do give me 2-5 days.

@saijaku0
Copy link
Copy Markdown
Contributor Author

Yeah sure take your time

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.

2 participants