-
Notifications
You must be signed in to change notification settings - Fork 6
added Eslint, Prettier and Ruff to repo #24
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
base: dev
Are you sure you want to change the base?
added Eslint, Prettier and Ruff to repo #24
Conversation
shrey150
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pre-approving, would address nits before merging!
| 5) Add required API keys/IDs to .env | ||
| 6) python main.py | ||
|
|
||
| 1. python -m venv venv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to use this opportunity to use uv venv instead? (as well as in all other READMEs?)
| 2. source venv/bin/activate # On Windows: venv\Scripts\activate | ||
| 3. uvx install stagehand python-dotenv pydantic | ||
| 4. cp .env.example .env | ||
| 5. Add required API keys/IDs to .env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, #5 should probably be a comment
| 🎮 Browserbase: https://www.browserbase.com | ||
| 💡 Try it out: https://www.browserbase.com/playground | ||
| 🔧 Templates: https://www.browserbase.com/templates | ||
| 📧 Need help? [email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind tagging the Discord here? http://stagehand.dev/discord
| 5. Add your Browserbase API key, Project ID, and Google Generative AI API key to .env | ||
| 6. Edit COMPANY_NAMES array in main.py to specify which companies to process |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these should be comments too -- just like above feedback
Add ESLint and Ruff for TypeScript and Python linting
This PR adds linting and formatting tools to maintain code quality across the templates repository.
Changes
TypeScript/JavaScript:
Added ESLint with TypeScript support
Configured with Prettier integration (no conflicts)
Set unused variables to warnings (lenient for template/example code)
Added scripts: pnpm lint and pnpm lint:fix
Python:
Added Ruff for Python linting (via uvx)
Configured with lenient rules for template/example code
Auto-fixed 287 linting issues (whitespace, imports, type annotations)
Added scripts: pnpm lint:python, pnpm lint:python:fix, pnpm format:python
Formatted all Python files (16 files)
Configuration
ESLint: Warns on unused vars (allows _ prefix), works with Prettier
Ruff: Ignores strict naming conventions (N815, N806) for template code
Both tools configured to be lenient for example/template code