Skip to content

Commit 5bb5796

Browse files
test: Ignore *.html in prettier until go-template is fixed (#3067)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 04b5174 commit 5bb5796

File tree

13 files changed

+47
-24
lines changed

13 files changed

+47
-24
lines changed

.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ target/
1515
**/dist
1616
/web/book/book
1717
/web/website/public
18+
19+
# TODO: fix the go-template issue in `.prettierrc.yaml`
20+
**/*.html

.prettierrc.yaml

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
proseWrap: always
2-
overrides:
3-
# https://github.com/NiklasPor/prettier-plugin-go-template
4-
- files:
5-
- "*.html"
6-
options:
7-
parser: "go-template"
2+
# TODO: fix
3+
# overrides:
4+
# # https://github.com/NiklasPor/prettier-plugin-go-template
5+
# - files:
6+
# - "*.html"
7+
# options:
8+
# parser: "go-template"

bindings/prql-js/tests/test_all.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ describe("prql-js", () => {
2929
const sql = prql.compile(employee_prql);
3030
assert(
3131
sql.trim().toLowerCase().startsWith("with") ||
32-
sql.trim().toLowerCase().startsWith("select")
32+
sql.trim().toLowerCase().startsWith("select"),
3333
);
3434
});
3535

3636
it("should throw an error on invalid prql", () => {
3737
expect(() =>
38-
prql.compile("Mississippi has four Ss and four Is.")
38+
prql.compile("Mississippi has four Ss and four Is."),
3939
).to.throw("Error");
4040
});
4141

@@ -57,7 +57,7 @@ describe("prql-js", () => {
5757

5858
const res = prql.compile(
5959
"prql target:sql.sqlite\nfrom a | take 10",
60-
opts
60+
opts,
6161
);
6262
assert(res.includes("SELECT TOP (10) * FROM a"));
6363
assert(res.includes("target:sql.mssql"));

web/book/highlight-prql.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,5 +211,5 @@ hljs.registerLanguage("prql", formatting);
211211
// invocation, which tags unknown-language blocks with CSS classes but doesn't
212212
// highlight them.
213213
Array.from(document.querySelectorAll("code.language-prql")).forEach((a) =>
214-
hljs.highlightElement(a)
214+
hljs.highlightElement(a),
215215
);

web/book/mdbook-admonish.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
border: 0 solid black;
2626
border-inline-start-width: 0.4rem;
2727
border-radius: 0.2rem;
28-
box-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.05), 0 0 0.1rem rgba(0, 0, 0, 0.1);
28+
box-shadow:
29+
0 0.2rem 1rem rgba(0, 0, 0, 0.05),
30+
0 0 0.1rem rgba(0, 0, 0, 0.1);
2931
}
3032
@media print {
3133
:is(.admonition) {

web/book/src/reference/syntax/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ A summary of PRQL syntax:
1818
| `! && == +` | [Operations](./operators.md) | <code>filter a == b + c \|\| d >= e</code> |
1919
| `()` | [Parentheses](./operators.md#parentheses) | `derive celsius = (fahrenheit - 32) / 1.8` |
2020
| `''`, `""` | [Strings](./literals.md#strings) | `derive name = 'Mary'` |
21-
| `` ` ` `` | [Quoted identifiers](./keywords.md#quoting) | `` select `first name` `` |
21+
| `` ` ` `` | [Quoted identifiers](./keywords.md#quoting) | ``select `first name` `` |
2222
| `#` | [Comments](./comments.md) | `# A comment` |
2323
| `@` | [Dates & times](./literals.md#date-and-time) | `@2021-01-01` |
2424
| `==` | [Self-equality in `join`](../stdlib/transforms/join.md#self-equality-operator) | `join s=salaries (==id)` |

web/playground/generateBook.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function getSnippets(content, file) {
9898
const snippets = isFile(filePath)
9999
? getSnippets(
100100
(await readFile(filePath)).toString(),
101-
basename(filePath).replace(/\..+/g, "").trim()
101+
basename(filePath).replace(/\..+/g, "").trim(),
102102
)
103103
: [];
104104
if (!snippets.length && isFile(filePath)) {

web/playground/src/index.css

+13-3
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,22 @@ body {
2020
font-weight: bold;
2121
font-style: normal;
2222
font-display: swap;
23-
src: local(""),
23+
src:
24+
local(""),
2425
url("https://prql-lang.org/fonts/inter-extra-bold.woff2") format("woff2"),
2526
url("https://prql-lang.org/fonts/inter-extra-bold.woff") format("woff");
2627
}
2728

2829
h1 {
29-
font-family: "InterExtraBold", -apple-system, BlinkMacSystemFont, "Segoe UI",
30-
Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
30+
font-family:
31+
"InterExtraBold",
32+
-apple-system,
33+
BlinkMacSystemFont,
34+
"Segoe UI",
35+
Roboto,
36+
Oxygen-Sans,
37+
Ubuntu,
38+
Cantarell,
39+
"Helvetica Neue",
40+
sans-serif;
3141
}

web/playground/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const root = ReactDOM.createRoot(document.getElementById("root"));
99
root.render(
1010
<React.StrictMode>
1111
<App />
12-
</React.StrictMode>
12+
</React.StrictMode>,
1313
);
1414

1515
// If you want to start measuring performance in your app, pass a function

web/playground/src/sidebar/Sidebar.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function Sidebar({ library, onLoadFile }) {
5050
{name ?? filename}
5151
</div>
5252
)}
53-
</React.Fragment>
53+
</React.Fragment>,
5454
);
5555
}
5656

@@ -59,7 +59,7 @@ function Sidebar({ library, onLoadFile }) {
5959
<h2>{section}</h2>
6060

6161
{fileRows}
62-
</section>
62+
</section>,
6363
);
6464
}
6565

web/playground/src/workbench/Workbench.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class Workbench extends React.Component {
7979
this.monaco.editor.setModelMarkers(
8080
this.editor.getModel(),
8181
"prql",
82-
monacoErrors
82+
monacoErrors,
8383
);
8484
return;
8585
}

web/playground/src/workbench/duckdb.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function init() {
99
const worker_url = URL.createObjectURL(
1010
new Blob([`importScripts("${bundle.mainWorker}");`], {
1111
type: "text/javascript",
12-
})
12+
}),
1313
);
1414

1515
// Instantiate the asynchronous version of DuckDB-wasm
@@ -44,8 +44,13 @@ async function registerChinook(db) {
4444

4545
await Promise.all(
4646
CHINOOK_TABLES.map((table) =>
47-
db.registerFileURL(`${table}.csv`, `${baseUrl}/${table}.csv`, http, false)
48-
)
47+
db.registerFileURL(
48+
`${table}.csv`,
49+
`${baseUrl}/${table}.csv`,
50+
http,
51+
false,
52+
),
53+
),
4954
);
5055

5156
const c = await db.connect();

web/website/themes/prql-theme/static/style.css

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
font-weight: 800;
55
font-style: normal;
66
font-display: swap;
7-
src: local(""), url("../fonts/inter-extra-bold.woff2") format("woff2"),
7+
src:
8+
local(""),
9+
url("../fonts/inter-extra-bold.woff2") format("woff2"),
810
url("../fonts/inter-extra-bold.woff") format("woff");
911
}
1012

0 commit comments

Comments
 (0)