mirror of
https://github.com/Ku6epXBOCTuK/easy-png-tools.git
synced 2026-09-14 13:36:36 +00:00
chore: update lint rules
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// Shared helpers for the conventions plugin (web/eslint-plugins/conventions).
|
||||
|
||||
/**
|
||||
* True when the node sits somewhere under a Svelte <script> block
|
||||
* (SvelteScriptElement). Used to limit $props() checks to script code.
|
||||
* @param {any} node
|
||||
*/
|
||||
export function isInsideScriptElement(node) {
|
||||
let cursor = node.parent;
|
||||
while (cursor && cursor.type !== "Program") {
|
||||
if (cursor.type === "SvelteScriptElement") return true;
|
||||
cursor = cursor.parent;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user