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
4 changes: 3 additions & 1 deletion backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ pub struct AppState {
async fn main() -> anyhow::Result<()> {
dotenvy::dotenv().ok();
tracing_subscriber::fmt()
.with_env_filter(EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")))
.with_env_filter(
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")),
)
.init();

let database_url = std::env::var("DATABASE_URL")
Expand Down
4 changes: 2 additions & 2 deletions backend/src/routes/health.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use axum::{Json, Router, routing::get};
use serde_json::{Value, json};
use axum::{routing::get, Json, Router};
use serde_json::{json, Value};

use crate::AppState;

Expand Down
4 changes: 2 additions & 2 deletions backend/src/routes/hello.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use axum::{Json, Router, extract::Query, routing::get};
use axum::{extract::Query, routing::get, Json, Router};
use chrono::Utc;
use serde::Deserialize;
use serde_json::{Value, json};
use serde_json::{json, Value};

use crate::AppState;

Expand Down
4 changes: 2 additions & 2 deletions backend/src/routes/notes.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use axum::{
Json, Router,
extract::{Path, State},
http::StatusCode,
routing::{delete, get},
Json, Router,
};
use uuid::Uuid;

use crate::AppState;
use crate::models::note::{NewNote, Note};
use crate::AppState;

pub fn routes() -> Router<AppState> {
Router::new()
Expand Down
6 changes: 5 additions & 1 deletion backend/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ async fn notes_crud_roundtrip() {
.json()
.await
.expect("json");
assert!(list.as_array().expect("array").iter().any(|n| n["id"] == id));
assert!(list
.as_array()
.expect("array")
.iter()
.any(|n| n["id"] == id));

let del = client
.delete(format!("{base}/api/notes/{id}"))
Expand Down
4 changes: 4 additions & 0 deletions frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.svelte-kit/
build/
node_modules/
package-lock.json
14 changes: 14 additions & 0 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,25 @@ import js from '@eslint/js';
import ts from 'typescript-eslint';
import svelte from 'eslint-plugin-svelte';
import prettier from 'eslint-config-prettier';
import globals from 'globals';

export default [
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
{
languageOptions: { globals: { ...globals.browser, ...globals.node } },
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' }
]
}
},
{
files: ['**/*.svelte'],
languageOptions: { parserOptions: { parser: ts.parser } }
},
{ ignores: ['build/', '.svelte-kit/', 'dist/', 'node_modules/'] }
];
Loading
Loading