Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

21 changes: 21 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# React Awesome Stars Rating

## Commit Message Generation

When generating or suggesting commit messages (including in Source Control, Generate Commit Message, or any commit UI):

1. Follow the format and rules in `.cursor/rules/commit-messages.mdc`
2. Use **Conventional Commits** — messages must pass `commitlint` in this project
3. **Subject line**: max 100 characters
4. **Body lines**: max 120 characters per line — split long lines or use short bullets
5. Use imperative mood: "add" not "added", "fix" not "fixed"

If the message has a body with multiple bullet points, keep each bullet under 120 characters. Example:

```
chore: update dependencies

- Bump @semantic-release, eslint, jsdom, lint-staged
- Update GitHub workflows for labels and release
- Refactor Storybook config
```
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Report a problem or regression
labels: bug
---

## Summary

A clear and concise description of the bug.

## Steps To Reproduce

1.
2.
3.

## Expected Behavior

What you expected to happen.

## Actual Behavior

What actually happened.

## Environment

- OS:
- Node:
- npm:
- Browser (if relevant):
- Package version:

## Additional Context

Screenshots, logs, or other relevant info.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Questions & Discussions
url: https://github.com/fedoryakubovich/react-awesome-stars-rating/discussions
about: Ask questions or start a discussion.
- name: Security Issues
url: https://github.com/fedoryakubovich/react-awesome-stars-rating/security/policy
about: Please report security vulnerabilities here.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Feature request
about: Suggest an enhancement or new feature
labels: enhancement
---

## Summary

A concise description of the feature or improvement.

## Motivation

Why is this valuable? What problem does it solve?

## Proposed Solution

How should it work? Any API ideas?

## Alternatives Considered

Other approaches you’ve thought about.

## Additional Context

Mockups, references, or related issues.
50 changes: 50 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# GitHub labels synced via sync-labels.yml workflow
# Colors without # (6 hex characters)

- name: bug
color: 'd73a4a'
description: Something isn't working

- name: documentation
color: '0075ca'
description: Documentation improvements

- name: duplicate
color: 'cfd3d7'
description: This issue or PR already exists

- name: enhancement
color: 'a2eeef'
description: New feature or request

- name: good first issue
color: '7057ff'
description: Good for newcomers

- name: help wanted
color: '008672'
description: Extra attention is needed

- name: invalid
color: 'e4e669'
description: This doesn't seem right

- name: question
color: 'd876e3'
description: Further information is requested

- name: wontfix
color: 'ffffff'
description: This will not be worked on

- name: dependencies
color: '0366d6'
description: Dependency updates

- name: breaking change
color: 'b60205'
description: Breaking change

- name: chore
color: 'fef2c0'
description: Chore or maintenance
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Summary

What does this PR change?

## Changes

-

## Testing

- [ ] `npm run test`
- [ ] `npm run typecheck`
- [ ] `npm run coverage`

## Screenshots (if UI)

## Checklist

- [ ] Tests added/updated
- [ ] Docs updated (if public API changed)
- [ ] Commit messages follow Conventional Commits
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run lint
- run: |
if [ -n "${GITHUB_BASE_REF}" ]; then
npm run commitlint -- --from="origin/${GITHUB_BASE_REF}" --to=HEAD
else
npm run commitlint -- --from="origin/main" --to=HEAD
fi
- run: npm run typecheck
- run: npm run test
- run: npm run coverage
- run: npm run build
35 changes: 26 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
name: Publish
name: Release

on:
release:
types: [published]
push:
branches: ['main']

jobs:
build:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
fetch-depth: 0
persist-credentials: true

- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/
cache: npm

- run: npm ci
- run: npm publish

- run: npm run lint
- run: npm run typecheck
- run: npm run test
- run: npm run build

- name: Release
run: npx semantic-release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Sync labels

on:
push:
branches: ['main']
paths:
- '.github/labels.yml'
- '.github/workflows/sync-labels.yml'
workflow_dispatch:

permissions:
issues: write

jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Sync labels
uses: EndBug/label-sync@v2
with:
config-file: .github/labels.yml
token: ${{ secrets.GITHUB_TOKEN }}
43 changes: 0 additions & 43 deletions .github/workflows/tests.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@

# production
/build
storybook-static

# misc
.cursor
.DS_Store
.env.local
.env.development.local
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
3 changes: 3 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

npx --no-install commitlint --edit "$1"
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

npx lint-staged
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
coverage
node_modules
CHANGELOG.md
13 changes: 13 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
stories: ['../src/**/*.stories.@(ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-a11y'],

framework: {
name: '@storybook/react-vite',
options: {},
},
};

export default config;
Loading