Skip to content

Commit b05318e

Browse files
committed
filter_warning -> warning_filter, for symmetry with public option
1 parent c9c8842 commit b05318e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/svelte/src/compiler/state.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export let source;
2323
export let locator = getLocator('', { offsetLine: 1 });
2424

2525
/** @type {NonNullable<CompileOptions['warningFilter']>} */
26-
export let filter_warning;
26+
export let warning_filter;
2727

2828
/**
2929
* The current stack of ignored warnings
@@ -70,7 +70,7 @@ export function reset(_source, options) {
7070
}
7171

7272
locator = getLocator(source, { offsetLine: 1 });
73-
filter_warning = options.warningFilter ?? (() => true);
73+
warning_filter = options.warningFilter ?? (() => true);
7474
warnings = [];
7575
ignore_stack = [];
7676
ignore_map.clear();

packages/svelte/src/compiler/warnings.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
warnings,
55
ignore_stack,
66
ignore_map,
7-
filter_warning
7+
warning_filter
88
} from './state.js';
99

1010
import { CompileDiagnostic } from './utils/compile_diagnostic.js';
@@ -39,7 +39,7 @@ function w(node, code, message) {
3939

4040
const warning = new InternalCompileWarning(code, message, node && node.start !== undefined ? [node.start, node.end ?? node.start] : undefined);
4141

42-
if (!filter_warning(warning)) return;
42+
if (!warning_filter(warning)) return;
4343
warnings.push(warning);
4444
}
4545

@@ -744,4 +744,4 @@ export function slot_element_deprecated(node) {
744744
*/
745745
export function svelte_element_invalid_this(node) {
746746
w(node, "svelte_element_invalid_this", "`this` should be an `{expression}`. Using a string attribute value will cause an error in future versions of Svelte");
747-
}
747+
}

0 commit comments

Comments
 (0)