Skip to content

Commit c7e8439

Browse files
authored
chore: fix prettier script (#52)
1 parent c5eace5 commit c7e8439

File tree

76 files changed

+3168
-3153
lines changed

Some content is hidden

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

76 files changed

+3168
-3153
lines changed

.github/renovate.json5

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["config:base", "schedule:monthly", "group:allNonMajor"],
4-
"rangeStrategy": "bump",
5-
"packageRules": [{ "depTypeList": ["peerDependencies"], "enabled": false }]
2+
$schema: "https://docs.renovatebot.com/renovate-schema.json",
3+
extends: ["config:base", "schedule:monthly", "group:allNonMajor"],
4+
rangeStrategy: "bump",
5+
packageRules: [{ depTypeList: ["peerDependencies"], enabled: false }]
66
}

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Release Full
32

43
on:
@@ -29,7 +28,7 @@ on:
2928
- latest
3029
- beta
3130
- alpha
32-
31+
3332
dry_run:
3433
type: boolean
3534
description: "DryRun release"
@@ -72,7 +71,7 @@ jobs:
7271

7372
- name: Run Test
7473
run: pnpm run test
75-
74+
7675
- name: Try release to npm
7776
run: pnpm run release
7877
env:

.github/workflows/test.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@ on:
1313
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1414
jobs:
1515
test:
16+
permissions:
17+
contents: read
18+
1619
name: Test - ${{ matrix.os }} - Node v${{ matrix.node }})
1720

1821
strategy:
1922
matrix:
2023
os: [ubuntu-latest, windows-latest, macos-latest]
21-
node: [18.x]
24+
node: [20.x]
2225

2326
runs-on: ${{ matrix.os }}
2427

@@ -47,3 +50,30 @@ jobs:
4750

4851
- name: Run Test
4952
run: pnpm run test
53+
54+
check:
55+
name: Check
56+
runs-on: ubuntu-latest
57+
permissions:
58+
contents: read
59+
60+
steps:
61+
- name: Checkout
62+
uses: actions/checkout@v4
63+
64+
- name: Install Pnpm
65+
run: |
66+
npm install -g corepack@latest
67+
corepack enable
68+
69+
- name: Setup Node.js
70+
uses: actions/setup-node@v4
71+
with:
72+
node-version: 20
73+
cache: "pnpm"
74+
75+
- name: Install Dependencies
76+
run: pnpm install
77+
78+
- name: Prettier
79+
run: pnpm run prettier:ci

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist
2+
node_modules
3+
client
4+
*.tsbuildinfo
5+
pnpm-lock.yaml

.prettierrc.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
useTabs: true,
3+
tabWidth: 2,
4+
trailingComma: "none",
5+
arrowParens: "avoid",
6+
overrides: [
7+
{
8+
files: "*.json",
9+
options: {
10+
parser: "json",
11+
useTabs: false
12+
}
13+
},
14+
{
15+
files: "*.ts",
16+
options: {
17+
parser: "typescript"
18+
}
19+
}
20+
]
21+
};

.vscode/extensions.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"recommendations": [
3-
"streetsidesoftware.code-spell-checker",
4-
"tamasfe.even-better-toml",
5-
"rust-lang.rust-analyzer",
6-
"fabiospampinato.vscode-debug-launcher"
7-
]
2+
"recommendations": [
3+
"streetsidesoftware.code-spell-checker",
4+
"tamasfe.even-better-toml",
5+
"rust-lang.rust-analyzer",
6+
"fabiospampinato.vscode-debug-launcher"
7+
]
88
}

.vscode/settings.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"search.useIgnoreFiles": true,
3-
"[json]": {
4-
"editor.defaultFormatter": "biomejs.biome"
5-
},
6-
"[typescript]": {
7-
"editor.defaultFormatter": "biomejs.biome"
8-
},
9-
"[javascript]": {
10-
"editor.defaultFormatter": "biomejs.biome"
11-
},
12-
"[javascriptreact]": {
13-
"editor.defaultFormatter": "biomejs.biome"
14-
},
15-
"[css]": {
16-
"editor.defaultFormatter": "biomejs.biome"
17-
}
2+
"search.useIgnoreFiles": true,
3+
"[json]": {
4+
"editor.defaultFormatter": "biomejs.biome"
5+
},
6+
"[typescript]": {
7+
"editor.defaultFormatter": "biomejs.biome"
8+
},
9+
"[javascript]": {
10+
"editor.defaultFormatter": "biomejs.biome"
11+
},
12+
"[javascriptreact]": {
13+
"editor.defaultFormatter": "biomejs.biome"
14+
},
15+
"[css]": {
16+
"editor.defaultFormatter": "biomejs.biome"
17+
}
1818
}

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ While starting the development server, you can specify the configuration by the
7575
```js
7676
// rspack.config.mjs
7777
export default {
78-
// ...
79-
devServer: {
80-
// the configuration of the development server
81-
port: 8080,
82-
},
78+
// ...
79+
devServer: {
80+
// the configuration of the development server
81+
port: 8080
82+
}
8383
};
8484
```
8585

@@ -96,15 +96,15 @@ import rspackConfig from "./rspack.config.mjs";
9696

9797
const compiler = rspack(rspackConfig);
9898
const devServerOptions = {
99-
...rspackConfig.devServer,
100-
// override
101-
port: 8888,
99+
...rspackConfig.devServer,
100+
// override
101+
port: 8888
102102
};
103103

104104
const server = new RspackDevServer(devServerOptions, compiler);
105105

106106
server.startCallback(() => {
107-
console.log("Successfully started server on http://localhost:8888");
107+
console.log("Successfully started server on http://localhost:8888");
108108
});
109109
```
110110

0 commit comments

Comments
 (0)