Skip to content

Commit 36704df

Browse files
Copilothi-ogawa
andauthored
chore: setup oxfmt for formatting (#997)
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: hi-ogawa <[email protected]> Co-authored-by: Hiroshi Ogawa <[email protected]>
1 parent 54231d9 commit 36704df

File tree

113 files changed

+459
-388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+459
-388
lines changed

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "\U0001F680 New feature proposal"
22
description: Propose a new feature
3-
labels: ["pending triage"]
3+
labels: ['pending triage']
44
type: Feature
55
body:
66
- type: markdown
@@ -25,15 +25,15 @@ body:
2525
id: feature-description
2626
attributes:
2727
label: Description
28-
description: "Clear and concise description of the problem. Please make the reason and usecases as detailed as possible. If you intend to submit a PR for this issue, tell us in the description. Thanks!"
28+
description: 'Clear and concise description of the problem. Please make the reason and usecases as detailed as possible. If you intend to submit a PR for this issue, tell us in the description. Thanks!'
2929
placeholder: As a developer using Vite I want [goal / wish] so that [benefit].
3030
validations:
3131
required: true
3232
- type: textarea
3333
id: suggested-solution
3434
attributes:
3535
label: Suggested solution
36-
description: "In module [xy] we could provide following implementation..."
36+
description: 'In module [xy] we could provide following implementation...'
3737
validations:
3838
required: true
3939
- type: textarea

.github/renovate.json5

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
{
2-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["config:recommended", "schedule:weekly", "group:allNonMajor"],
4-
"labels": ["dependencies"],
5-
"ignorePaths": ["**/__tests__/**"],
6-
"rangeStrategy": "bump",
7-
"packageRules": [
2+
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3+
extends: ['config:recommended', 'schedule:weekly', 'group:allNonMajor'],
4+
labels: ['dependencies'],
5+
ignorePaths: ['**/__tests__/**'],
6+
rangeStrategy: 'bump',
7+
packageRules: [
88
{
9-
"matchDepTypes": ["peerDependencies"],
10-
"enabled": false,
9+
matchDepTypes: ['peerDependencies'],
10+
enabled: false,
1111
},
1212
{
13-
"matchFileNames": ["**/react-18/**", "**/compiler-react-18/**"],
14-
"ignoreDeps": ["react", "react-dom", "@types/react", "@types/react-dom"],
13+
matchFileNames: ['**/react-18/**', '**/compiler-react-18/**'],
14+
ignoreDeps: ['react', 'react-dom', '@types/react', '@types/react-dom'],
1515
},
1616
{
17-
"extends": ["monorepo:swc"],
18-
"groupName": "swc monorepo",
19-
"separateMajorMinor": false,
17+
extends: ['monorepo:swc'],
18+
groupName: 'swc monorepo',
19+
separateMajorMinor: false,
2020
},
2121
// renovate doesn't properly handle x.x.x-beta-hash-yyyymm version schema
2222
{
23-
"matchPackageNames": [
24-
"react-compiler-runtime",
25-
"babel-plugin-react-compiler",
23+
matchPackageNames: [
24+
'react-compiler-runtime',
25+
'babel-plugin-react-compiler',
2626
],
27-
"followTag": "latest",
27+
followTag: 'latest',
2828
},
2929
{
30-
"matchDepTypes": ["action"],
31-
"pinDigests": true,
32-
"matchPackageNames": ["!actions/{/,}**", "!github/{/,}**"],
30+
matchDepTypes: ['action'],
31+
pinDigests: true,
32+
matchPackageNames: ['!actions/{/,}**', '!github/{/,}**'],
3333
},
3434
{
35-
"groupName": "react-related dependencies",
36-
"matchPackageNames": [
37-
"react",
38-
"react-dom",
39-
"@types/react",
40-
"@types/react-dom",
41-
"react-refresh",
42-
"react-server-dom-webpack",
43-
"use-sync-external-store",
35+
groupName: 'react-related dependencies',
36+
matchPackageNames: [
37+
'react',
38+
'react-dom',
39+
'@types/react',
40+
'@types/react-dom',
41+
'react-refresh',
42+
'react-server-dom-webpack',
43+
'use-sync-external-store',
4444
],
4545
},
4646
],
47-
"ignoreDeps": [
47+
ignoreDeps: [
4848
// manually bumping
49-
"node",
49+
'node',
5050

5151
// breaking changes
52-
"source-map", // `source-map:v0.7.0+` needs more investigation
53-
"kill-port", // `kill-port:^2.0.0 has perf issues (#8392)
52+
'source-map', // `source-map:v0.7.0+` needs more investigation
53+
'kill-port', // `kill-port:^2.0.0 has perf issues (#8392)
5454

55-
"prettier", // waiting for stable choice on ternaries
55+
'prettier', // waiting for stable choice on ternaries
5656
],
5757
}

.github/workflows/ci-rsc.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ on:
99
- main
1010
pull_request:
1111
paths:
12-
- "packages/plugin-rsc/**"
13-
- "pnpm-lock.yaml"
14-
- ".github/workflows/ci-rsc.yml"
12+
- 'packages/plugin-rsc/**'
13+
- 'pnpm-lock.yaml'
14+
- '.github/workflows/ci-rsc.yml'
1515
schedule:
1616
# Run daily at 00:00 UTC to test canary/experimental React versions
17-
- cron: "0 0 * * *"
17+
- cron: '0 0 * * *'
1818

1919
concurrency:
2020
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
@@ -42,7 +42,7 @@ jobs:
4242
os: [ubuntu-latest, macos-latest, windows-latest]
4343
browser: [chromium]
4444
rolldown: [false]
45-
react_version: [""]
45+
react_version: ['']
4646
include:
4747
- os: ubuntu-latest
4848
browser: firefox

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ env:
55
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
66
NODE_OPTIONS: --max-old-space-size=6144
77
# install playwright binary manually (because pnpm only runs install script once)
8-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
8+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
99
# Vitest auto retry on flaky segfault
1010
VITEST_SEGFAULT_RETRY: 3
1111

@@ -38,7 +38,7 @@ jobs:
3838
node_version: 22
3939
fail-fast: false
4040

41-
name: "Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}"
41+
name: 'Build&Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
4242
steps:
4343
- name: Checkout
4444
uses: actions/checkout@v6
@@ -107,7 +107,7 @@ jobs:
107107
if: github.repository == 'vitejs/vite-plugin-react'
108108
timeout-minutes: 10
109109
runs-on: ubuntu-latest
110-
name: "Lint: node-20, ubuntu-latest"
110+
name: 'Lint: node-20, ubuntu-latest'
111111
steps:
112112
- uses: actions/checkout@v6
113113
with:
@@ -131,7 +131,7 @@ jobs:
131131
run: pnpm run lint
132132

133133
- name: Check formatting
134-
run: pnpm prettier --check .
134+
run: pnpm format --check
135135

136136
- name: Typecheck
137137
run: pnpm run typecheck

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment
22

3-
name: "Copilot Setup Steps"
3+
name: 'Copilot Setup Steps'
44

55
on:
66
workflow_dispatch:

.github/workflows/issue-close-require.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Issue Close Require
22

33
on:
44
schedule:
5-
- cron: "0 0 * * *"
5+
- cron: '0 0 * * *'
66

77
jobs:
88
close-issues:
@@ -15,7 +15,7 @@ jobs:
1515
- name: need reproduction
1616
uses: actions-cool/issues-helper@e2ff99831a4f13625d35064e2b3dfe65c07a0396 # v3
1717
with:
18-
actions: "close-issues"
18+
actions: 'close-issues'
1919
token: ${{ secrets.GITHUB_TOKEN }}
20-
labels: "need reproduction"
20+
labels: 'need reproduction'
2121
inactive-day: 3

.github/workflows/issue-labeled.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,29 @@ jobs:
1616
if: github.event.label.name == 'contribution welcome' || github.event.label.name == 'help wanted'
1717
uses: actions-cool/issues-helper@e2ff99831a4f13625d35064e2b3dfe65c07a0396 # v3
1818
with:
19-
actions: "create-comment, remove-labels"
19+
actions: 'create-comment, remove-labels'
2020
token: ${{ secrets.GITHUB_TOKEN }}
2121
issue-number: ${{ github.event.issue.number }}
2222
body: |
2323
Hello @${{ github.event.issue.user.login }}. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it!
24-
labels: "pending triage, need reproduction"
24+
labels: 'pending triage, need reproduction'
2525

2626
- name: remove pending
2727
if: (github.event.label.name == 'enhancement' || contains(github.event.label.description, '(priority)')) && contains(github.event.issue.labels.*.name, 'pending triage')
2828
uses: actions-cool/issues-helper@e2ff99831a4f13625d35064e2b3dfe65c07a0396 # v3
2929
with:
30-
actions: "remove-labels"
30+
actions: 'remove-labels'
3131
token: ${{ secrets.GITHUB_TOKEN }}
3232
issue-number: ${{ github.event.issue.number }}
33-
labels: "pending triage"
33+
labels: 'pending triage'
3434

3535
- name: need reproduction
3636
if: github.event.label.name == 'need reproduction'
3737
uses: actions-cool/issues-helper@e2ff99831a4f13625d35064e2b3dfe65c07a0396 # v3
3838
with:
39-
actions: "create-comment, remove-labels"
39+
actions: 'create-comment, remove-labels'
4040
token: ${{ secrets.GITHUB_TOKEN }}
4141
issue-number: ${{ github.event.issue.number }}
4242
body: |
4343
Hello @${{ github.event.issue.user.login }}. Please provide a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) using a GitHub repository or [StackBlitz](https://vite.new). Issues marked with `need reproduction` will be closed if they have no activity within 3 days.
44-
labels: "pending triage"
44+
labels: 'pending triage'

.github/workflows/lock-closed-issues.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Lock Closed Issues
22

33
on:
44
schedule:
5-
- cron: "0 0 * * *"
5+
- cron: '0 0 * * *'
66

77
permissions:
88
issues: write
@@ -15,10 +15,10 @@ jobs:
1515
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5
1616
with:
1717
github-token: ${{ secrets.GITHUB_TOKEN }}
18-
issue-inactive-days: "14"
18+
issue-inactive-days: '14'
1919
#issue-comment: |
2020
# This issue has been locked since it has been closed for more than 14 days.
2121
#
2222
# If you have found a concrete bug or regression related to it, please open a new [bug report](https://github.com/vitejs/vite-plugin-react/issues/new/choose) with a reproduction against the latest Vite version. If you have any other comments you should join the chat at [Vite Land](https://chat.vite.dev) or create a new [discussion](https://github.com/vitejs/vite-plugin-react/discussions).
23-
issue-lock-reason: ""
24-
process-only: "issues"
23+
issue-lock-reason: ''
24+
process-only: 'issues'

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish Package
33
on:
44
push:
55
tags:
6-
- "plugin-*"
6+
- 'plugin-*'
77

88
jobs:
99
publish:
@@ -33,7 +33,7 @@ jobs:
3333
- name: Install deps
3434
run: pnpm install
3535
env:
36-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
36+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
3737

3838
- name: Get pkgName for tag
3939
id: tag

.oxfmtrc.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"semi": false,
4+
"singleQuote": true,
5+
"printWidth": 80,
6+
"experimentalSortImports": {
7+
"newlinesBetween": false,
8+
"partitionByNewline": true,
9+
"groups": [["builtin"], ["external"]]
10+
},
11+
"ignorePatterns": [
12+
"packages/*/CHANGELOG.md",
13+
"playground-temp/",
14+
"dist/",
15+
"temp/",
16+
"LICENSE.md",
17+
"pnpm-lock.yaml",
18+
"pnpm-workspace.yaml"
19+
]
20+
}

0 commit comments

Comments
 (0)