feat(build): migrate from Prettier to Oxfmt for docs

Signed-off-by: hainenber <dotronghai96@gmail.com>
This commit is contained in:
hainenber
2026-07-28 21:38:39 +07:00
parent af9729a861
commit 1bbc63099b
2163 changed files with 89307 additions and 32009 deletions

View File

@@ -29,12 +29,14 @@ Learn how to create and submit high-quality pull requests to Apache Superset.
## Before You Start
### Prerequisites
- [ ] Development environment is set up
- [ ] You've forked and cloned the repository
- [ ] You've read the [contributing overview](./overview.md)
- [ ] You've found or created an issue to work on
### PR Readiness Checklist
- [ ] Code follows [coding guidelines](../guidelines/design-guidelines.md)
- [ ] Tests are passing locally
- [ ] Linting passes (`pre-commit run --all-files`)
@@ -82,6 +84,7 @@ type(scope): description
```
**Types:**
- `feat`: New feature
- `fix`: Bug fix
- `docs`: Documentation only
@@ -95,6 +98,7 @@ type(scope): description
- `revert`: Reverting changes
**Scopes:**
- `dashboard`: Dashboard functionality
- `sqllab`: SQL Lab features
- `explore`: Chart explorer
@@ -105,6 +109,7 @@ type(scope): description
- `config`: Configuration
**Examples:**
```
feat(sqllab): add query cost estimation
fix(dashboard): resolve filter cascading issue
@@ -119,23 +124,28 @@ Use the template from `.github/PULL_REQUEST_TEMPLATE.md`:
```markdown
### SUMMARY
Brief description of changes and motivation.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
[Required for UI changes]
### TESTING INSTRUCTIONS
1. Step-by-step instructions
2. How to verify the fix/feature
3. Any specific test scenarios
### ADDITIONAL INFORMATION
- [ ] Has associated issue: #12345
- [ ] Required feature flags:
- [ ] API changes:
- [ ] DB migration required:
### CHECKLIST
- [ ] CI checks pass
- [ ] Tests added/updated
- [ ] Documentation updated
@@ -158,11 +168,13 @@ gh pr create --title "feat(sqllab): add query cost estimation" \
## PR Best Practices
### Keep PRs Focused
- One feature/fix per PR
- Break large changes into smaller PRs
- Separate refactoring from feature changes
### Write Good Commit Messages
```bash
# Good
git commit -m "fix(dashboard): prevent duplicate API calls when filters change"
@@ -173,6 +185,7 @@ git commit -m "updates"
```
### Include Tests
```python
# Backend test example
def test_new_feature():
@@ -190,15 +203,19 @@ test('renders new component', () => {
```
### Add Screenshots for UI Changes
```markdown
### Before
![Before](link-to-before-screenshot)
### After
### After
![After](link-to-after-screenshot)
```
### Update Documentation
- Update relevant docs in `/docs` directory
- Add docstrings to new functions/classes
- Update UPDATING.md for breaking changes
@@ -206,7 +223,9 @@ test('renders new component', () => {
## CI Checks
### Required Checks
All PRs must pass:
- `Python Tests` - Backend unit/integration tests
- `Frontend Tests` - JavaScript/TypeScript tests
- `Linting` - Code style checks
@@ -217,6 +236,7 @@ All PRs must pass:
### Common CI Failures
#### Python Test Failures
```bash
# Run locally to debug
pytest tests/unit_tests/ -v
@@ -224,12 +244,14 @@ pytest tests/integration_tests/ -v
```
#### Frontend Test Failures
```bash
cd superset-frontend
npm run test -- --coverage
```
#### Linting Failures
```bash
# Auto-fix many issues
pre-commit run --all-files
@@ -243,6 +265,7 @@ pre-commit run --all-files
## Responding to Reviews
### Address Feedback Promptly
```bash
# Make requested changes
edit files...
@@ -254,11 +277,13 @@ git push origin feature/your-feature-name
```
### Request Re-review
- Click "Re-request review" after addressing feedback
- Comment on resolved discussions
- Thank reviewers for their time
### Handling Conflicts
```bash
# Update your branch
git fetch upstream
@@ -276,6 +301,7 @@ git push --force-with-lease origin feature/your-feature-name
## After Merge
### Clean Up
```bash
# Delete local branch
git checkout master
@@ -291,6 +317,7 @@ git push origin master
```
### Follow Up
- Monitor for any issues reported
- Help with documentation if needed
- Consider related improvements
@@ -298,6 +325,7 @@ git push origin master
## Tips for Success
### Do
- ✅ Keep PRs small and focused
- ✅ Write descriptive PR titles and descriptions
- ✅ Include tests for new functionality
@@ -306,6 +334,7 @@ git push origin master
- ✅ Be patient with the review process
### Don't
- ❌ Submit PRs with failing tests
- ❌ Include unrelated changes
- ❌ Force push to master