Skip to content

Commit c5ec5d1

Browse files
committed
feat: adds oxfmt; migrates all rules over to oxfmt config; updates CONTRIBUTING; formats full codebase; makes editorconfig as consistens as possible with oxfmt; removes prettierrc.
1 parent 29c5127 commit c5ec5d1

File tree

126 files changed

+2847
-2847
lines changed

Some content is hidden

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

126 files changed

+2847
-2847
lines changed

.editorconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ indent_style = space
55
indent_size = 2
66
end_of_line = LF
77
charset = utf-8
8-
insert_final_newline = true
8+
insert_final_newline = true
9+
max_line_length = 100
10+
quote_type = double

.oxfmtrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxfmt/configuration_schema.json",
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"endOfLine": "lf",
6+
"trailingComma": "none",
7+
"semi": true,
8+
"singleQuote": false,
9+
"arrowParens": "avoid",
10+
"printWidth": 100
11+
}

.prettierrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ Once the PR is there, **create an issue** and link the PR (mention the PR as you
7474
> [!IMPORTANT]
7575
> Mark the **allow edit by the maintainers** so we can more easily investigate the failing test and propose a fix. Otherwise we may need to close your PR and cherry-pick your commit.
7676
77+
### Formatting your code
78+
79+
We have a set of rules defined in the `.editorconfig` and `.oxfmtrc.json` files. Please format your code before opening a PR, so that we keep the codebase consistent. Regardless of what editor you use, running `pnpm format` will format your code according to our rules.
80+
7781
---
7882

7983
If you have read all the way here, you're already a champ! 🏆

apps/fixtures/bare/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import { solidStart } from "../../../packages/start/src/config";
33
import { nitroV2Plugin } from "../../../packages/start-nitro-v2-vite-plugin/src";
44

55
export default defineConfig({
6-
plugins: [solidStart(), nitroV2Plugin()],
6+
plugins: [solidStart(), nitroV2Plugin()]
77
});

apps/fixtures/basic/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import { solidStart } from "../../../packages/start/src/config";
33
import { nitroV2Plugin } from "../../../packages/start-nitro-v2-vite-plugin/src";
44

55
export default defineConfig({
6-
plugins: [solidStart(), nitroV2Plugin()],
6+
plugins: [solidStart(), nitroV2Plugin()]
77
});

apps/fixtures/css/src/components/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ const Layout = (props: FlowProps<{ title: string }>) => {
2626

2727
<ul class="list-inside list-disc mb-4 text-gray-400 font-semibold text-xs">
2828
<li>
29-
Enable throttling & disable cache in the network tab to see eventual FOUC's (frames of unstyled
30-
content)
29+
Enable throttling & disable cache in the network tab to see eventual FOUC's (frames of
30+
unstyled content)
3131
</li>
3232
<li>Click on routes to test client navigation</li>
3333
</ul>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import "../styles/lazy.css";
22

33
const Lazy = () => {
4-
return <></>
5-
}
4+
return <></>;
5+
};
66

77
export default Lazy;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import "../styles/lazyGlob.css";
22

33
const Lazy = () => {
4-
return <></>
5-
}
4+
return <></>;
5+
};
66

77
export default Lazy;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import url from "../styles/lazyLink.css?url";
22

3-
const Lazy = () => <link rel="stylesheet" href={url} />
3+
const Lazy = () => <link rel="stylesheet" href={url} />;
44

55
export default Lazy;

0 commit comments

Comments
 (0)