3.3 KiB
Contributing Guidelines
Welcome, and thanks in advance for your help!
Prerequisites
- Node.js 24 or greater is required for development
- npm (comes with Node.js)
Getting Started
-
Fork the repository on GitHub, then clone your fork:
git clone https://github.com/<your-username>/serverless.git cd serverless npm install -
Run the framework locally on a test project:
cd /path/to/your/test-project node /path/to/serverless/packages/sf-core/bin/sf-core.js deploy
A good first step is to search for open issues. Look for issues labeled good first issue or help wanted.
When You Propose a New Feature or Bug Fix
Please make sure there is an open issue discussing your contribution before jumping into a Pull Request. It's fine to submit a PR without an issue for:
- Documentation updates
- Obvious bug fixes
- Maintenance improvements
In non-trivial cases, please propose and let us review an implementation spec (in the corresponding issue) before jumping into implementation.
When You Want to Work on an Existing Issue
Please write a quick comment in the corresponding issue and ask if the feature is still relevant and that you want to work on it.
We will do our best to respond/review/merge your PR according to priority. Please note that PRs will be closed if there hasn't been activity for ~30 days.
Reviewing Pull Requests
Another useful way to contribute is to review other people's Pull Requests. Having feedback from multiple people is helpful and reduces the overall time to make a final decision.
Writing / Improving Documentation
Our documentation lives in the docs directory. See a typo or improvement? Feel free to submit a Pull Request!
Providing Support
Help the community by:
- Replying to issues on GitHub
- Chatting in our Community Slack
- Answering questions in GitHub Discussions
Code Style
We use Prettier for formatting and ESLint for static analysis.
# Check formatting
npm run prettier
# Fix formatting
npm run prettier:fix
# Run linting
npm run lint
# Fix lint issues
npm run lint:fix
Other Guidelines
- Minimize lodash usage - prefer native JavaScript constructs
- Use async/await and native Promise API for asynchronous code
Testing
Unit Tests
Unit tests run locally without external dependencies:
npm run test:unit -w @serverlessinc/sf-core
npm run test:unit -w serverless
Integration Tests
Integration tests require AWS credentials and Dashboard access. They run automatically as part of the CI pipeline when you submit a pull request.
For more details, see TESTING.md.
Code of Conduct
Please read our code of conduct. It outlines our core values and will make working together a happier experience.
Thanks for being a contributor to the Serverless Community! 🎉
Cheers, The ⚡ Serverless Team