Skip to content

Commit

Permalink
chore: update README and add cursorrules (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusrbrown authored Feb 8, 2025
1 parent 3965f47 commit 624e001
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 2 deletions.
81 changes: 81 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# @bfra.me/.github Cursor Rules

This is a GitHub organization template repository that defines defaults and settings for the @bfra-me GitHub Organization. The project uses TypeScript with strict ESLint and Prettier configurations.

## Project Context

- This is a template repository for GitHub organization settings and workflows
- Uses TypeScript with ESM modules
- Follows strict ESLint and Prettier configurations from @bfra.me
- Uses pnpm as the package manager
- Implements changesets for versioning and releases

## Coding Standards

Please follow these coding standards when generating code:

- Use ESM modules with TypeScript (`"type": "module"` in package.json)
- Follow the @bfra.me/eslint-config and @bfra.me/prettier-config rules
- Use strict TypeScript configurations
- Prefer `const` over `let` for variable declarations
- Use camelCase for variable and function names
- Follow EditorConfig settings for different file types

## File Structure

- `.github/workflows/`: GitHub Actions workflow definitions
- `.github/settings.yml`: Repository-specific settings
- `workflow-templates/`: Reusable workflow templates
- `scripts/`: Utility scripts (TypeScript)
- `.changeset/`: Changeset configurations and files

## Dependencies and Tools

When suggesting code, use these tools and versions:

- Node.js: Use version specified in .node-version
- Package Manager: [email protected]
- TypeScript: ^5.7.3
- ESLint: ^9.19.0
- Prettier: ^3.4.2
- Changesets for versioning
- GitHub Actions for CI/CD

## Development Workflow

- All changes must pass linting and formatting checks
- Changes should be documented using changesets
- Pull requests must pass required status checks
- Main branch requires linear history
- Renovate handles dependency updates automatically
- Release process is automated through GitHub Actions

## Testing and Validation

- Run `pnpm lint` for ESLint checks
- Run `pnpm check-format` for Prettier checks
- Run `pnpm fix` to automatically fix linting issues
- Run `pnpm format` to automatically format code
- Ensure all GitHub Actions workflows pass

## Error Handling and Logging

- Use TypeScript's strict type checking
- Implement proper error boundaries in workflows
- Log errors appropriately in GitHub Actions
- Handle async operations with proper error catching

## Documentation

- Maintain clear README files
- Use JSDoc comments for TypeScript functions
- Keep workflow YAML files well-documented
- Update changelogs through changesets

## Security Considerations

- Follow security best practices for GitHub Actions
- Use proper token permissions
- Implement dependency scanning
- Follow OpenSSF Scorecard recommendations
- Use Renovate for automated security updates
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@
*.out -text
*.pdb -text
*.so -text

.cursorrules text linguist-language=Markdown
3 changes: 3 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ config:
MD033:
allowed_elements: [a, h3, img, p]
MD041: false

globs:
- '!.cursorrules'
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,37 @@
</p>

<p align="center">
Defaults for the <a href="https://github.com/bfra-me">@bfra-me</a> GitHub Organization
Community health files and configuration for the <a href="https://github.com/bfra-me">@bfra-me</a> GitHub organization
</p>

&nbsp;

This repository is used as a template for new repositories. After creating a new repository using the template, this file should be replaced by [.github/README.md](.github/README.md).
This repository is used as a template for `.github` repositories. After creating a new repository using the template, this file should be replaced by [.github/README.md](.github/README.md).

It contains a collection of reusable workflows and workflow templates for the GitHub Actions ecosystem. Global settings for the @bfra-me organization are defined here.

## Reusable Workflows

This repository contains reusable workflows that can be used in other repositories.

### `renovate.yaml`

Renovate is used to manage the dependencies of the repository. This workflow runs a self-hosted Renovate bot (see: [@bfra-me/renovate-action](https://github.com/bfra-me/renovate-action) to create and update the dependency update PRs.

### `update-repo-settings.yaml`

Update repository settings. Repository settings are defined in [.github/settings.yml](.github/settings.yml) in the same format used by the [Reository Settings App](https://github.com/repository-settings/app). The workflow uses the [elstudio/actions-settings](https://github.com/elstudio/actions-settings/tree/v3-beta) action to update the repository settings.

## Development

This repository uses [pnpm](https://pnpm.io/) as the package manager.

To install the dependencies, run:

```bash
pnpm bootstrap
```

### Releases

Releases are managed using [changesets](https://github.com/changesets/changesets). Renovate dependency updates are captured in changesets by the `renovate-changeset` workflow.

0 comments on commit 624e001

Please sign in to comment.