Skip to content

Commit

Permalink
fix: issues with precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-potter committed Jul 7, 2024
1 parent d34ad9b commit 471ae92
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
25 changes: 18 additions & 7 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ format:
build-wasm target:
cd {{justfile_directory()}}/harper-wasm && wasm-pack build --target {{target}}

# Compile the web demo's dependencies and start a development server.
# Note that if you make changes to `harper-wasm`, you will have to re-run this command.
dev-web:
#! /bin/bash
set -eo pipefail
Expand All @@ -23,7 +25,6 @@ build-web:

cd {{justfile_directory()}}/packages/web
yarn install -f
yarn run check
yarn run build

build-obsidian:
Expand All @@ -38,23 +39,33 @@ build-obsidian:

zip harper-obsidian-plugin.zip manifest.json main.js

precommit:
check:
#! /bin/bash
set -eo pipefail

cargo +nightly fmt --check
cargo clippy -- -Dwarnings

cd {{justfile_directory()}}/packages
yarn install
yarn prettier --check .
yarn eslint .

cd web
yarn run check

precommit:
#! /bin/bash
set -eo pipefail

just check

cargo test
cargo test --release
cargo doc
cargo build
cargo build --release
cargo bench

cd {{justfile_directory()}}/packages
yarn install
yarn prettier --check .
yarn eslint .

just build-obsidian
just build-web
2 changes: 1 addition & 1 deletion packages/web/src/lib/Underlines.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// For now, it works.
import { lintText } from '$lib/analysis';
import { Lint } from 'wasm';
import type { Lint } from 'wasm';
export let content: string;
export let focusLintIndex: number | undefined;
Expand Down

0 comments on commit 471ae92

Please sign in to comment.