Skip to content

Latest commit

 

History

History
87 lines (54 loc) · 4 KB

CONTRIBUTING.md

File metadata and controls

87 lines (54 loc) · 4 KB

🦄 Contributing to the Dart Frog Visual Studio Code extension

First of all, thank you for taking the time to contribute! 🎉👍 Before you do, please carefully read this guide.

Opening an issue

We highly recommend creating an issue if you have found a bug, want to suggest a feature, or recommend a change. Please do not immediately open a pull request. Opening an issue first allows us to reach an agreement on a fix before you put significant effort into a pull request.

When reporting a bug, please use the built-in Bug Report template and provide as much information as possible including detailed reproduction steps. Once one of the package maintainers has reviewed the issue and we reach an agreement on the fix, open a pull request.

Developing for Dart Frog's Visual Studio Code extension

To develop for the Dart Frog Visual Studio Code (VS Code) extension you will need to become familiar with VS Code extension development and the Very Good Ventures processes and conventions:

Setting up your local development environment

  1. Install a valid Dart SDK in your local environment, it should be compatible with the latest version of Dart Frog CLI. If you have Flutter installed, you likely have a valid Dart SDK version already installed.

  2. Install a valid Node.js runtime in your local environment, it should be compatible with the VS Code engine version.

  3. Open the project in VS Code:

# Open VS Code (from /extensions/vscode)
code .
  1. Get all project dependencies:
# Get project dependencies (from /extensions/vscode)
npm i
  1. Run all the extension tests:
# 💻 Run Dart Frog's VS Code extension tests (from /extensions/vscode)
npm test

If some tests do not pass out of the box, please submit an issue.

  1. Inside the VS Code editor, press F5. This will compile and run the extension in a new Extension Development Host window.

  2. After a change, make sure to Run Developer: Reload Window from the command palette in the new window.

💡 Note: For further information about debugging VS Code's extensions refer to the official documentation.

Creating a Pull Request

Before creating a Pull Request please:

  1. Fork the GitHub repository and create your branch from main:
# 🪵 Branch from `main`
git branch <branch-name>
git checkout <branch-name>
  1. Ensure you have a meaningful semantic commit message.

  2. Analyze your code:

# 🔍 Run ESLint linter
npm run lint
  1. Ensure all tests are passing and that coverage is 100%:
# 💻 Run Dart Frog's VS Code extension tests (from /extensions/vscode)
npm test

💡 Note: As contributors we should avoid cross-test dependencies. We rely on Mocha as our testing framework, unfortunately, it doesn't yet support randomized test ordering.

  1. Create the Pull Request with a meaningful description, linking to the original issue where possible.

  2. Verify that all status checks are passing for your Pull Request once they have been approved to run by a maintainer.

💡 Note: While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional work, tests, or other changes before your pull request can be accepted.