Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/squawk_wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ impl SquawkDatabase {
.map(|(_, ending)| ending)
.unwrap_or_default();
let parse = db::parse(&self.db, file);
if !parse.errors().is_empty() {
return Err(Error::new("Cannot format SQL with syntax errors."));
}
squawk_fmt::fmt(&parse.tree(), line_ending).map_err(into_error)
}

Expand Down
17 changes: 17 additions & 0 deletions playground/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import styleXPlugin from "@stylexjs/babel-plugin"

export default {
presets: ["@babel/preset-typescript"],
plugins: [
[
styleXPlugin,
{
runtimeInjection: false,
unstable_moduleResolution: {
type: "commonJS",
rootDir: import.meta.dirname,
},
},
],
],
}
2 changes: 1 addition & 1 deletion playground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Squawk Playground</title>
</head>
<body class="bg-[rgb(30,30,30)] select-none">
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
Expand Down
10 changes: 7 additions & 3 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,28 @@
"dependencies": {
"@sentry/react": "^9.46.0",
"@sentry/vite-plugin": "^3.6.1",
"@tailwindcss/vite": "^4.1.12",
"@stylexjs/stylex": "^0.19.0",
"lz-string": "^1.5.0",
"monaco-editor": "^0.52.2",
"oxfmt": "^0.44.0",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"tailwindcss": "^4.1.12"
"react-dom": "^19.2.0"
},
"devDependencies": {
"@babel/preset-typescript": "^7.29.7",
"@eslint/js": "^9.34.0",
"@stylexjs/babel-plugin": "^0.19.0",
"@stylexjs/postcss-plugin": "^0.19.0",
"@types/react": "^19.2.0",
"@types/react-dom": "^19.2.0",
"@vitejs/plugin-react": "^4.7.0",
"autoprefixer": "^10.5.4",
"babel-plugin-react-compiler": "19.1.0-rc.3",
"eslint": "^9.34.0",
"eslint-plugin-react-hooks": "6.1.0",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^15.15.0",
"postcss": "^8.5.26",
"typescript": "~5.7.3",
"typescript-eslint": "^8.41.0",
"vite": "^6.4.3"
Expand Down
Loading
Loading