warnings.js — svelte Source File
Architecture documentation for warnings.js, a javascript file in the svelte codebase. 3 imports, 25 dependents.
Entity Profile
Dependency Diagram
graph LR 56a689f9_11c0_cc76_bd60_41bb6dc96475["warnings.js"] 62f818c8_e890_17ed_5ec1_92f953d4a7a6["state.js"] 56a689f9_11c0_cc76_bd60_41bb6dc96475 --> 62f818c8_e890_17ed_5ec1_92f953d4a7a6 266f0f82_b1c9_08bb_80b9_55a66e7d3dba["compile_diagnostic.js"] 56a689f9_11c0_cc76_bd60_41bb6dc96475 --> 266f0f82_b1c9_08bb_80b9_55a66e7d3dba fca2e303_5d6d_304a_d0fc_14ab13a1ecb7["CompileDiagnostic"] 56a689f9_11c0_cc76_bd60_41bb6dc96475 --> fca2e303_5d6d_304a_d0fc_14ab13a1ecb7 90aa5201_1990_23b6_f05a_1ff5d9b22b14["script.js"] 90aa5201_1990_23b6_f05a_1ff5d9b22b14 --> 56a689f9_11c0_cc76_bd60_41bb6dc96475 206889ff_1f9f_b6c1_d530_059d001e1cf4["element.js"] 206889ff_1f9f_b6c1_d530_059d001e1cf4 --> 56a689f9_11c0_cc76_bd60_41bb6dc96475 4676a465_3cd7_1d4c_04b8_a56bf8469f18["css-warn.js"] 4676a465_3cd7_1d4c_04b8_a56bf8469f18 --> 56a689f9_11c0_cc76_bd60_41bb6dc96475 4aa8a188_84d4_0274_ed83_cac0ab1d3572["index.js"] 4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 56a689f9_11c0_cc76_bd60_41bb6dc96475 6b8c189e_23e1_77d3_9ee3_3eec5012a9b2["BindDirective.js"] 6b8c189e_23e1_77d3_9ee3_3eec5012a9b2 --> 56a689f9_11c0_cc76_bd60_41bb6dc96475 9c8c3898_c88a_e729_415d_3dfa25f39aa1["ClassDeclaration.js"] 9c8c3898_c88a_e729_415d_3dfa25f39aa1 --> 56a689f9_11c0_cc76_bd60_41bb6dc96475 dbb15ae0_a432_16e3_1429_24ffed462356["ExpressionStatement.js"] dbb15ae0_a432_16e3_1429_24ffed462356 --> 56a689f9_11c0_cc76_bd60_41bb6dc96475 dbcd64ee_7333_aa92_9b8e_ed189c6c4449["Identifier.js"] dbcd64ee_7333_aa92_9b8e_ed189c6c4449 --> 56a689f9_11c0_cc76_bd60_41bb6dc96475 5d572700_84fa_a20f_b641_c5b7becd2684["LabeledStatement.js"] 5d572700_84fa_a20f_b641_c5b7becd2684 --> 56a689f9_11c0_cc76_bd60_41bb6dc96475 d812d0a1_2202_85b0_1991_a9ba140dd8b4["Literal.js"] d812d0a1_2202_85b0_1991_a9ba140dd8b4 --> 56a689f9_11c0_cc76_bd60_41bb6dc96475 4a1787d0_f65e_afaf_574b_c50d2f0f6992["NewExpression.js"] 4a1787d0_f65e_afaf_574b_c50d2f0f6992 --> 56a689f9_11c0_cc76_bd60_41bb6dc96475 style 56a689f9_11c0_cc76_bd60_41bb6dc96475 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/* This file is generated by scripts/process-messages/index.js. Do not edit! */
import { warnings, ignore_stack, ignore_map, warning_filter } from './state.js';
import { CompileDiagnostic } from './utils/compile_diagnostic.js';
/** @typedef {{ start?: number, end?: number }} NodeLike */
class InternalCompileWarning extends CompileDiagnostic {
name = 'CompileWarning';
/**
* @param {string} code
* @param {string} message
* @param {[number, number] | undefined} position
*/
constructor(code, message, position) {
super(code, message, position);
}
}
/**
* @param {null | NodeLike} node
* @param {string} code
* @param {string} message
*/
function w(node, code, message) {
let stack = ignore_stack;
if (node) {
stack = ignore_map.get(node) ?? ignore_stack;
}
if (stack && stack.at(-1)?.has(code)) return;
const warning = new InternalCompileWarning(code, message, node && node.start !== undefined ? [node.start, node.end ?? node.start] : undefined);
if (!warning_filter(warning)) return;
warnings.push(warning);
}
export const codes = [
'a11y_accesskey',
'a11y_aria_activedescendant_has_tabindex',
'a11y_aria_attributes',
'a11y_autocomplete_valid',
'a11y_autofocus',
'a11y_click_events_have_key_events',
'a11y_consider_explicit_label',
'a11y_distracting_elements',
'a11y_figcaption_index',
'a11y_figcaption_parent',
'a11y_hidden',
'a11y_img_redundant_alt',
'a11y_incorrect_aria_attribute_type',
'a11y_incorrect_aria_attribute_type_boolean',
'a11y_incorrect_aria_attribute_type_id',
'a11y_incorrect_aria_attribute_type_idlist',
'a11y_incorrect_aria_attribute_type_integer',
'a11y_incorrect_aria_attribute_type_token',
'a11y_incorrect_aria_attribute_type_tokenlist',
// ... (785 more lines)
Domain
Subdomains
Functions
- a11y_accesskey()
- a11y_aria_activedescendant_has_tabindex()
- a11y_aria_attributes()
- a11y_autocomplete_valid()
- a11y_autofocus()
- a11y_click_events_have_key_events()
- a11y_consider_explicit_label()
- a11y_distracting_elements()
- a11y_figcaption_index()
- a11y_figcaption_parent()
- a11y_hidden()
- a11y_img_redundant_alt()
- a11y_incorrect_aria_attribute_type()
- a11y_incorrect_aria_attribute_type_boolean()
- a11y_incorrect_aria_attribute_type_id()
- a11y_incorrect_aria_attribute_type_idlist()
- a11y_incorrect_aria_attribute_type_integer()
- a11y_incorrect_aria_attribute_type_token()
- a11y_incorrect_aria_attribute_type_tokenlist()
- a11y_incorrect_aria_attribute_type_tristate()
- a11y_interactive_supports_focus()
- a11y_invalid_attribute()
- a11y_label_has_associated_control()
- a11y_media_has_caption()
- a11y_misplaced_role()
- a11y_misplaced_scope()
- a11y_missing_attribute()
- a11y_missing_content()
- a11y_mouse_events_have_key_events()
- a11y_no_abstract_role()
- a11y_no_interactive_element_to_noninteractive_role()
- a11y_no_noninteractive_element_interactions()
- a11y_no_noninteractive_element_to_interactive_role()
- a11y_no_noninteractive_tabindex()
- a11y_no_redundant_roles()
- a11y_no_static_element_interactions()
- a11y_positive_tabindex()
- a11y_role_has_required_aria_props()
- a11y_role_supports_aria_props()
- a11y_role_supports_aria_props_implicit()
- a11y_unknown_aria_attribute()
- a11y_unknown_role()
- attribute_avoid_is()
- attribute_global_event_reference()
- attribute_illegal_colon()
- attribute_invalid_property_name()
- attribute_quoted()
- bidirectional_control_characters()
- bind_invalid_each_rest()
- block_empty()
- component_name_lowercase()
- css_unused_selector()
- custom_element_props_identifier()
- element_implicitly_closed()
- element_invalid_self_closing_tag()
- event_directive_deprecated()
- export_let_unused()
- legacy_code()
- legacy_component_creation()
- node_invalid_placement_ssr()
- non_reactive_update()
- options_deprecated_accessors()
- options_deprecated_immutable()
- options_missing_custom_element()
- options_removed_enable_sourcemap()
- options_removed_hydratable()
- options_removed_loop_guard_timeout()
- options_renamed_ssr_dom()
- perf_avoid_inline_class()
- perf_avoid_nested_class()
- reactive_declaration_invalid_placement()
- reactive_declaration_module_script_dependency()
- script_context_deprecated()
- script_unknown_attribute()
- slot_element_deprecated()
- state_referenced_locally()
- store_rune_conflict()
- svelte_component_deprecated()
- svelte_element_invalid_this()
- svelte_self_deprecated()
- unknown_code()
- w()
Classes
Dependencies
Imported By
- packages/svelte/src/compiler/phases/2-analyze/visitors/BindDirective.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/ClassDeclaration.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/ExpressionStatement.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/Identifier.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/LabeledStatement.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/Literal.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/NewExpression.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/OnDirective.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/RegularElement.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/SlotElement.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/SvelteComponent.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/SvelteSelf.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/TemplateElement.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/Text.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/VariableDeclarator.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/shared/attribute.js
- packages/svelte/src/compiler/phases/2-analyze/css/css-warn.js
- packages/svelte/src/compiler/phases/1-parse/state/element.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/shared/element.js
- packages/svelte/src/compiler/utils/extract_svelte_ignore.js
- packages/svelte/src/compiler/phases/2-analyze/index.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/shared/a11y/index.js
- packages/svelte/src/compiler/phases/1-parse/read/script.js
- packages/svelte/src/compiler/phases/2-analyze/visitors/shared/utils.js
- packages/svelte/src/compiler/validate-options.js
Source
Frequently Asked Questions
What does warnings.js do?
warnings.js is a source file in the svelte codebase, written in javascript. It belongs to the Compiler domain, Transformer subdomain.
What functions are defined in warnings.js?
warnings.js defines 82 function(s): a11y_accesskey, a11y_aria_activedescendant_has_tabindex, a11y_aria_attributes, a11y_autocomplete_valid, a11y_autofocus, a11y_click_events_have_key_events, a11y_consider_explicit_label, a11y_distracting_elements, a11y_figcaption_index, a11y_figcaption_parent, and 72 more.
What does warnings.js depend on?
warnings.js imports 3 module(s): CompileDiagnostic, compile_diagnostic.js, state.js.
What files import warnings.js?
warnings.js is imported by 25 file(s): BindDirective.js, ClassDeclaration.js, ExpressionStatement.js, Identifier.js, LabeledStatement.js, Literal.js, NewExpression.js, OnDirective.js, and 17 more.
Where is warnings.js in the architecture?
warnings.js is located at packages/svelte/src/compiler/warnings.js (domain: Compiler, subdomain: Transformer, directory: packages/svelte/src/compiler).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free