stop Svelte warnings from failing the build

+ check for them at test time
This commit is contained in:
Damien Elmes 2021-04-12 14:28:09 +10:00
parent 94330fc0eb
commit 6e4cdc52a6
4 changed files with 2 additions and 3 deletions

View file

@ -8,7 +8,6 @@
import WithGraphData from "./WithGraphData.svelte"; import WithGraphData from "./WithGraphData.svelte";
import * as tr from "anki/i18n";
export let nightMode: boolean; export let nightMode: boolean;
export let graphs: SvelteComponent[]; export let graphs: SvelteComponent[];

View file

@ -9,7 +9,6 @@
import { defaultGraphBounds } from "./graph-helpers"; import { defaultGraphBounds } from "./graph-helpers";
export let data: HistogramData | null = null; export let data: HistogramData | null = null;
import * as tr from "anki/i18n";
let bounds = defaultGraphBounds(); let bounds = defaultGraphBounds();
let svg = null as HTMLElement | SVGElement | null; let svg = null as HTMLElement | SVGElement | null;

View file

@ -64,6 +64,8 @@ def svelte_check(name = "svelte_check", srcs = []):
args = [ args = [
"--workspace", "--workspace",
native.package_name(), native.package_name(),
"--fail-on-warnings",
"--fail-on-hints",
], ],
data = [ data = [
"//ts:tsconfig.json", "//ts:tsconfig.json",

View file

@ -158,7 +158,6 @@ async function writeJs(
// warnings are an error // warnings are an error
if (result.warnings.length > 0) { if (result.warnings.length > 0) {
console.log(`warnings during compile: ${result.warnings}`); console.log(`warnings during compile: ${result.warnings}`);
return;
} }
// write out the css file // write out the css file
const outputCss = result.css.code ?? ""; const outputCss = result.css.code ?? "";