no_compiler_imports.create() — svelte Function Reference
Architecture documentation for the no_compiler_imports.create() function in eslint.config.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD ec5fa9d7_165c_28a8_7ab9_b8ce3143fc2e["no_compiler_imports.create()"] 83580498_6b95_ad34_2b87_490a227f300f["eslint.config.js"] ec5fa9d7_165c_28a8_7ab9_b8ce3143fc2e -->|defined in| 83580498_6b95_ad34_2b87_490a227f300f style ec5fa9d7_165c_28a8_7ab9_b8ce3143fc2e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
eslint.config.js lines 14–33
create(context) {
return {
Program: () => {
// Do a simple string search because ESLint doesn't provide a way to check JSDoc comments.
// The string search could in theory yield false positives, but in practice it's unlikely.
const text = context.sourceCode.getText();
const idx = Math.max(text.indexOf('../compiler/'), text.indexOf('#compiler'));
if (idx !== -1) {
context.report({
loc: {
start: context.sourceCode.getLocFromIndex(idx),
end: context.sourceCode.getLocFromIndex(idx + 12)
},
message:
'References to compiler code are forbidden in runtime code (both for type and value imports)'
});
}
}
};
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does no_compiler_imports.create() do?
no_compiler_imports.create() is a function in the svelte codebase, defined in eslint.config.js.
Where is no_compiler_imports.create() defined?
no_compiler_imports.create() is defined in eslint.config.js at line 14.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free