Skip to content

Commit 6081c9f

Browse files
committed
add biome linting and formatting for a consistent style and easier contributions
this should prevent useless conflicts
1 parent 4623535 commit 6081c9f

File tree

26 files changed

+5818
-4930
lines changed

26 files changed

+5818
-4930
lines changed

.vscode/launch.json

Lines changed: 62 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,64 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
{
8-
"type": "lldb",
9-
"request": "launch",
10-
"name": "Debug unit tests in library 'sqlpage'",
11-
"cargo": {
12-
"args": [
13-
"test",
14-
"--no-run",
15-
"--lib",
16-
"--package=sqlpage"
17-
],
18-
"filter": {
19-
"name": "sqlpage",
20-
"kind": "lib"
21-
}
22-
},
23-
"args": [],
24-
"cwd": "${workspaceFolder}"
25-
},
26-
{
27-
"type": "lldb",
28-
"request": "launch",
29-
"name": "Debug executable 'sqlpage'",
30-
"cargo": {
31-
"args": [
32-
"build",
33-
"--bin=sqlpage",
34-
"--package=sqlpage"
35-
],
36-
"filter": {
37-
"name": "sqlpage",
38-
"kind": "bin"
39-
}
40-
},
41-
"args": [],
42-
"cwd": "${workspaceFolder}"
43-
},
44-
{
45-
"type": "lldb",
46-
"request": "launch",
47-
"name": "Debug unit tests in executable 'sqlpage'",
48-
"cargo": {
49-
"args": [
50-
"test",
51-
"--no-run",
52-
"--bin=sqlpage",
53-
"--package=sqlpage"
54-
],
55-
"filter": {
56-
"name": "sqlpage",
57-
"kind": "bin"
58-
}
59-
},
60-
"args": [],
61-
"cwd": "${workspaceFolder}"
62-
},
63-
{
64-
"type": "lldb",
65-
"request": "launch",
66-
"name": "Debug integration test 'index'",
67-
"cargo": {
68-
"args": [
69-
"test",
70-
"--no-run",
71-
"--test=index",
72-
"--package=sqlpage"
73-
],
74-
"filter": {
75-
"name": "index",
76-
"kind": "test"
77-
}
78-
},
79-
"args": [],
80-
"cwd": "${workspaceFolder}"
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "lldb",
9+
"request": "launch",
10+
"name": "Debug unit tests in library 'sqlpage'",
11+
"cargo": {
12+
"args": ["test", "--no-run", "--lib", "--package=sqlpage"],
13+
"filter": {
14+
"name": "sqlpage",
15+
"kind": "lib"
8116
}
82-
]
83-
}
17+
},
18+
"args": [],
19+
"cwd": "${workspaceFolder}"
20+
},
21+
{
22+
"type": "lldb",
23+
"request": "launch",
24+
"name": "Debug executable 'sqlpage'",
25+
"cargo": {
26+
"args": ["build", "--bin=sqlpage", "--package=sqlpage"],
27+
"filter": {
28+
"name": "sqlpage",
29+
"kind": "bin"
30+
}
31+
},
32+
"args": [],
33+
"cwd": "${workspaceFolder}"
34+
},
35+
{
36+
"type": "lldb",
37+
"request": "launch",
38+
"name": "Debug unit tests in executable 'sqlpage'",
39+
"cargo": {
40+
"args": ["test", "--no-run", "--bin=sqlpage", "--package=sqlpage"],
41+
"filter": {
42+
"name": "sqlpage",
43+
"kind": "bin"
44+
}
45+
},
46+
"args": [],
47+
"cwd": "${workspaceFolder}"
48+
},
49+
{
50+
"type": "lldb",
51+
"request": "launch",
52+
"name": "Debug integration test 'index'",
53+
"cargo": {
54+
"args": ["test", "--no-run", "--test=index", "--package=sqlpage"],
55+
"filter": {
56+
"name": "index",
57+
"kind": "test"
58+
}
59+
},
60+
"args": [],
61+
"cwd": "${workspaceFolder}"
62+
}
63+
]
64+
}

.vscode/settings.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"rust-analyzer.linkedProjects": [
3-
"./Cargo.toml"
4-
]
5-
}
2+
"rust-analyzer.linkedProjects": ["./Cargo.toml"]
3+
}

biome.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3+
"files": {
4+
"ignore": ["examples/official-site/pgconf/**"],
5+
"ignoreUnknown": true
6+
},
7+
"formatter": {
8+
"indentStyle": "space",
9+
"indentWidth": 2
10+
},
11+
"vcs": {
12+
"enabled": true,
13+
"useIgnoreFile": true,
14+
"clientKind": "git"
15+
}
16+
}

examples/CRUD - Authentication/www/css/prism-tabler-theme.css

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,91 +2,91 @@
22
.token.prolog,
33
.token.doctype,
44
.token.cdata {
5-
color: var(--tblr-gray-300);
5+
color: var(--tblr-gray-300);
66
}
77

88
.token.punctuation {
9-
color: var(--tblr-gray-500);
9+
color: var(--tblr-gray-500);
1010
}
1111

1212
.namespace {
13-
opacity: .7;
13+
opacity: 0.7;
1414
}
1515

1616
.token.property,
1717
.token.tag {
18-
color: #f92672;
18+
color: #f92672;
1919

20-
/* We need to reset the 'tag' styles set by tabler */
21-
border: 0;
22-
display: inherit;
23-
height: inherit;
24-
border-radius: inherit;
25-
padding: 0;
26-
background: inherit;
27-
box-shadow: inherit;
20+
/* We need to reset the 'tag' styles set by tabler */
21+
border: 0;
22+
display: inherit;
23+
height: inherit;
24+
border-radius: inherit;
25+
padding: 0;
26+
background: inherit;
27+
box-shadow: inherit;
2828
}
2929

3030
.token.number {
31-
color: #ea9999;
31+
color: #ea9999;
3232
}
3333

3434
.token.boolean {
35-
color: #ae81ff;
35+
color: #ae81ff;
3636
}
3737

3838
.token.selector,
3939
.token.attr-name,
4040
.token.string {
41-
color: #97e1a3;
41+
color: #97e1a3;
4242
}
4343

4444
.token.operator,
4545
.token.entity,
4646
.token.url,
4747
.language-css .token.string,
4848
.style .token.string {
49-
color: #f8f8f2;
49+
color: #f8f8f2;
5050
}
5151

5252
.token.atrule,
53-
.token.attr-value
54-
{
55-
color: #e6db74;
53+
.token.attr-value {
54+
color: #e6db74;
5655
}
5756

58-
59-
.token.keyword{
60-
color: #95d1ff;
57+
.token.keyword {
58+
color: #95d1ff;
6159
}
6260

6361
.token.regex,
6462
.token.important {
65-
color: var(--tblr-yellow);
63+
color: var(--tblr-yellow);
6664
}
6765

6866
.token.important {
69-
font-weight: bold;
67+
font-weight: bold;
7068
}
7169

7270
.token.entity {
73-
cursor: help;
71+
cursor: help;
7472
}
7573

7674
.token {
77-
transition: .3s;
75+
transition: .3s;
7876
}
7977

80-
code::selection, code ::selection {
81-
background: var(--tblr-yellow);
82-
color: var(--tblr-gray-900);
83-
border-radius: .1em;
78+
code::selection,
79+
code ::selection {
80+
background: var(--tblr-yellow);
81+
color: var(--tblr-gray-900);
82+
border-radius: .1em;
8483
}
8584

86-
code .token.keyword::selection, code .token.punctuation::selection {
87-
color: var(--tblr-gray-800);
85+
code .token.keyword::selection,
86+
code .token.punctuation::selection {
87+
color: var(--tblr-gray-800);
8888
}
8989

9090
pre code {
91-
padding: 0;
92-
}
91+
padding: 0;
92+
}

examples/CRUD - Authentication/www/css/style.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
}
1212

1313
div.dropdown-menu- {
14-
min-width: inherit !important;
14+
min-width: inherit !important;
1515
}
1616

1717
a.dropdown-item- {
18-
min-width: inherit !important;
18+
min-width: inherit !important;
1919
}
2020

2121
.slim_item {
22-
min-width: inherit !important;
22+
min-width: inherit !important;
2323
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"database_url": "postgres://my_username:my_password@localhost:5432/my_geographic_database"
3-
}
2+
"database_url": "postgres://my_username:my_password@localhost:5432/my_geographic_database"
3+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"content_security_policy": "script-src blob: 'self' https://cdn.jsdelivr.net;"
3-
}
2+
"content_security_policy": "script-src blob: 'self' https://cdn.jsdelivr.net;"
3+
}
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
const cdn = 'https://cdn.jsdelivr.net/npm/[email protected]/';
1+
const cdn = "https://cdn.jsdelivr.net/npm/[email protected]/";
22

33
function on_monaco_load() {
4-
// Create an editor div, display it after the '#code-editor' textarea, hide the textarea, and create a Monaco editor in the div with the contents of the textarea
5-
// When the form is submitted, set the value of the textarea to the value of the Monaco editor
6-
const textarea = document.getElementById('code-editor');
7-
const editorDiv = document.createElement('div');
8-
editorDiv.style.width = '100%';
9-
editorDiv.style.height = '700px';
10-
textarea.parentNode.insertBefore(editorDiv, textarea.nextSibling);
11-
const monacoConfig = {
12-
value: textarea.value,
13-
language: 'sql',
14-
};
4+
// Create an editor div, display it after the '#code-editor' textarea, hide the textarea, and create a Monaco editor in the div with the contents of the textarea
5+
// When the form is submitted, set the value of the textarea to the value of the Monaco editor
6+
const textarea = document.getElementById("code-editor");
7+
const editorDiv = document.createElement("div");
8+
editorDiv.style.width = "100%";
9+
editorDiv.style.height = "700px";
10+
textarea.parentNode.insertBefore(editorDiv, textarea.nextSibling);
11+
const monacoConfig = {
12+
value: textarea.value,
13+
language: "sql",
14+
};
1515

16-
self.MonacoEnvironment = {
17-
baseUrl: cdn + 'min/',
18-
};
19-
const editor = monaco.editor.create(editorDiv, monacoConfig);
20-
textarea.style.display = 'none';
21-
const form = textarea.form;
22-
form.addEventListener('submit', () => {
23-
textarea.value = editor.getValue();
24-
});
16+
self.MonacoEnvironment = {
17+
baseUrl: `${cdn}min/`,
18+
};
19+
const editor = monaco.editor.create(editorDiv, monacoConfig);
20+
textarea.style.display = "none";
21+
const form = textarea.form;
22+
form.addEventListener("submit", () => {
23+
textarea.value = editor.getValue();
24+
});
2525
}
2626

2727
function set_require_config() {
28-
require.config({ paths: { vs: cdn + 'min/vs' } });
29-
require(['vs/editor/editor.main'], on_monaco_load);
28+
require.config({ paths: { vs: `${cdn}min/vs` } });
29+
require(["vs/editor/editor.main"], on_monaco_load);
3030
}
31-
const loader_script = document.createElement('script');
32-
loader_script.src = cdn + 'min/vs/loader.js';
31+
const loader_script = document.createElement("script");
32+
loader_script.src = `${cdn}min/vs/loader.js`;
3333
loader_script.onload = set_require_config;
34-
document.head.appendChild(loader_script);
34+
document.head.appendChild(loader_script);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"max_uploaded_file_size": 5000000
3-
}
2+
"max_uploaded_file_size": 5000000
3+
}

0 commit comments

Comments
 (0)