@studiometa/eslint-plugin-js-toolkit 3.9.0-beta.1 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -112,17 +112,18 @@ export default [
112
112
 
113
113
  ### Forbidden patterns
114
114
 
115
- | Rule | Description | Recommended | Fixable |
116
- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------- |
117
- | `js-toolkit/no-deprecated-properties` | Disallows deprecated properties (`$parent`, `$root`, `$children`). Use `$closest()` or `$query()` instead. | warn | |
118
- | `js-toolkit/no-dispatch-event` | Disallows `dispatchEvent()` inside `Base` subclasses. Use `this.$emit()` instead. | warn | |
119
- | `js-toolkit/no-shadow-dom` | Disallows `attachShadow()` inside `Base` subclasses. The framework uses Light DOM only. | error | |
120
- | `js-toolkit/no-create-app` | Disallows `createApp()` (deprecated). Use `registerComponent()` instead. | warn | |
121
- | `js-toolkit/no-event-listener-methods` | Disallows `addEventListener()` and `removeEventListener()` inside `Base` subclasses. Define `on*` methods instead — the framework handles binding and cleanup automatically. | error | |
122
- | `js-toolkit/no-deep-utils-import` | Disallows deep imports from `@studiometa/js-toolkit/utils/*`. Use the public entrypoint `@studiometa/js-toolkit/utils` instead. | error | 🔧 |
123
- | `js-toolkit/no-redundant-with-mount-when-in-view` | Disallows wrapping `withMountWhenInView` inside `withScrolledInView` — the latter already includes the former internally. | warn | |
124
- | `js-toolkit/no-manual-intersection-observer` | Disallows `new IntersectionObserver()` inside `Base` subclasses. Use `withIntersectionObserver` or `withMountWhenInView` decorators instead. | warn | |
125
- | `js-toolkit/no-manual-mutation-observer` | Disallows `new MutationObserver()` inside `Base` subclasses. Use the `withMutation` decorator instead. | warn | |
115
+ | Rule | Description | Recommended | Fixable |
116
+ | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------- |
117
+ | `js-toolkit/no-deprecated-properties` | Disallows deprecated properties (`$parent`, `$root`, `$children`). Use `$closest()` or `$query()` instead. | warn | |
118
+ | `js-toolkit/no-dispatch-event` | Disallows `dispatchEvent()` inside `Base` subclasses. Use `this.$emit()` instead. | warn | |
119
+ | `js-toolkit/no-shadow-dom` | Disallows `attachShadow()` inside `Base` subclasses. The framework uses Light DOM only. | error | |
120
+ | `js-toolkit/no-create-app` | Disallows `createApp()` (deprecated). Use `registerComponent()` instead. | warn | |
121
+ | `js-toolkit/no-event-listener-methods` | Disallows `addEventListener()` and `removeEventListener()` inside `Base` subclasses. Define `on*` methods instead — the framework handles binding and cleanup automatically. | error | |
122
+ | `js-toolkit/no-deep-utils-import` | Disallows imports reaching into the package layout under `@studiometa/js-toolkit/utils/`. Use the per-symbol subpath `@studiometa/js-toolkit/utils/<name>`, or the `utils` barrel for several. | error | |
123
+ | `js-toolkit/no-internal-barrel-import` | Disallows relative imports of an internal barrel (`./utils/index.js`). Import the module declaring the symbol instead. For libraries published as unbundled ES modules. | off | |
124
+ | `js-toolkit/no-redundant-with-mount-when-in-view` | Disallows wrapping `withMountWhenInView` inside `withScrolledInView` — the latter already includes the former internally. | warn | |
125
+ | `js-toolkit/no-manual-intersection-observer` | Disallows `new IntersectionObserver()` inside `Base` subclasses. Use `withIntersectionObserver` or `withMountWhenInView` decorators instead. | warn | |
126
+ | `js-toolkit/no-manual-mutation-observer` | Disallows `new MutationObserver()` inside `Base` subclasses. Use the `withMutation` decorator instead. | warn | |
126
127
 
127
128
  ### Emits
128
129
 
package/dist/index.js CHANGED
@@ -730,46 +730,48 @@ function check5(node, context) {
730
730
  }
731
731
 
732
732
  // src/rules/no-deep-utils-import.ts
733
- var DEEP_UTILS_RE = /^@studiometa\/js-toolkit\/utils\/.+/;
733
+ var UTILS_PREFIX = "@studiometa/js-toolkit/utils/";
734
+ var PUBLIC_SUBPATH_RE = /^[^/.]+$/;
734
735
  var noDeepUtilsImport = createRule({
735
736
  meta: {
736
737
  type: "problem",
737
- fixable: "code",
738
738
  docs: {
739
- description: "Disallow deep imports from @studiometa/js-toolkit/utils/*"
739
+ description: "Disallow importing internal module paths from @studiometa/js-toolkit/utils \u2014 use the public per-symbol subpath"
740
740
  },
741
741
  messages: {
742
- noDeepImport: 'Import from "{{source}}" should use the public entrypoint "@studiometa/js-toolkit/utils".'
742
+ noDeepImport: 'Import from "{{source}}" reaches into the package layout. Use the public subpath "@studiometa/js-toolkit/utils/<name>" for a single util, or "@studiometa/js-toolkit/utils" for several.'
743
743
  }
744
744
  },
745
745
  createOnce(context) {
746
746
  return {
747
747
  ImportDeclaration(node) {
748
748
  const source = node.source.value;
749
- if (!DEEP_UTILS_RE.test(source)) return;
750
- context.report({
751
- node,
752
- messageId: "noDeepImport",
753
- data: { source },
754
- fix(fixer) {
755
- const specifiers = node.specifiers ?? [];
756
- const parts = [];
757
- for (const s of specifiers) {
758
- if (s.type === "ImportDefaultSpecifier") {
759
- parts.push(s.local.name);
760
- } else if (s.type === "ImportSpecifier") {
761
- const imported = s.imported.name;
762
- const local = s.local.name;
763
- parts.push(imported === local ? imported : `${imported} as ${local}`);
764
- }
765
- }
766
- const named = parts.join(", ");
767
- return fixer.replaceText(
768
- node,
769
- `import { ${named} } from '@studiometa/js-toolkit/utils';`
770
- );
771
- }
772
- });
749
+ if (!source.startsWith(UTILS_PREFIX)) return;
750
+ if (PUBLIC_SUBPATH_RE.test(source.slice(UTILS_PREFIX.length))) return;
751
+ context.report({ node, messageId: "noDeepImport", data: { source } });
752
+ }
753
+ };
754
+ }
755
+ });
756
+
757
+ // src/rules/no-internal-barrel-import.ts
758
+ var RELATIVE_BARREL_RE = /^\.{1,2}\/.*\/index\.js$/;
759
+ var noInternalBarrelImport = createRule({
760
+ meta: {
761
+ type: "problem",
762
+ docs: {
763
+ description: "Disallow importing an internal barrel inside the package \u2014 import the declaring module instead"
764
+ },
765
+ messages: {
766
+ noBarrelImport: 'Import from "{{source}}" pulls in every symbol the barrel names. Import the module declaring the symbol instead, so a consumer served by a CDN only downloads what it uses.'
767
+ }
768
+ },
769
+ createOnce(context) {
770
+ return {
771
+ ImportDeclaration(node) {
772
+ const source = node.source.value;
773
+ if (!RELATIVE_BARREL_RE.test(source)) return;
774
+ context.report({ node, messageId: "noBarrelImport", data: { source } });
773
775
  }
774
776
  };
775
777
  }
@@ -1562,6 +1564,7 @@ var rules = {
1562
1564
  "no-create-app": noCreateApp,
1563
1565
  "no-event-listener-methods": noEventListenerMethods,
1564
1566
  "no-deep-utils-import": noDeepUtilsImport,
1567
+ "no-internal-barrel-import": noInternalBarrelImport,
1565
1568
  "refs-no-bracket-access": refsNoBracketAccess,
1566
1569
  "no-redundant-with-mount-when-in-view": noRedundantWithMountWhenInView,
1567
1570
  "prefer-ref-over-query-selector": preferRefOverQuerySelector,
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../node_modules/@oxlint/plugins/index.js", "../src/utils/ast.ts", "../src/rules/require-config.ts", "../src/rules/require-config-name-pascal-case.ts", "../src/rules/refs-camel-case.ts", "../src/rules/options-camel-case.ts", "../src/rules/async-lifecycle-methods.ts", "../src/rules/on-handler-naming.ts", "../src/rules/on-global-handler-prefix.ts", "../src/rules/no-deprecated-properties.ts", "../src/rules/no-dispatch-event.ts", "../src/rules/no-shadow-dom.ts", "../src/rules/no-create-app.ts", "../src/rules/no-event-listener-methods.ts", "../src/rules/refs-plural-multiple.ts", "../src/rules/no-deep-utils-import.ts", "../src/rules/refs-no-bracket-access.ts", "../src/rules/no-redundant-with-mount-when-in-view.ts", "../src/rules/prefer-ref-over-query-selector.ts", "../src/rules/require-refs-declared-in-config.ts", "../src/rules/no-manual-intersection-observer.ts", "../src/rules/no-manual-mutation-observer.ts", "../src/rules/emits-kebab-case.ts", "../src/rules/emits-multi-word.ts", "../src/rules/components-pascal-case.ts", "../src/rules/require-emit-declared-in-config.ts", "../src/rules/require-children-declared-in-config.ts", "../src/rules/require-options-declared-in-config.ts", "../src/rules/prefer-destructured-lookups.ts", "../src/rules/no-dollar-prefix.ts", "../src/rules/require-destroyed-cleanup.ts", "../src/index.ts"],
4
- "sourcesContent": ["//#region src-js/package/define.ts\n/**\n* Define a plugin.\n*\n* No-op function, just to provide type safety. Input is passed through unchanged.\n*\n* @param plugin - Plugin to define\n* @returns Same plugin as passed in\n*/\nfunction definePlugin(plugin) {\n\treturn plugin;\n}\n/**\n* Define a rule.\n*\n* No-op function, just to provide type safety. Input is passed through unchanged.\n*\n* @param rule - Rule to define\n* @returns Same rule as passed in\n*/\nfunction defineRule(rule) {\n\treturn rule;\n}\n//#endregion\n//#region src-js/package/compat.ts\nconst EMPTY_VISITOR = {};\n/**\n* Convert a plugin which used Oxlint's `createOnce` API to also work with ESLint.\n*\n* If any of the plugin's rules use the Oxlint alternative `createOnce` API,\n* add ESLint-compatible `create` methods to those rules, which delegate to `createOnce`.\n* This makes the plugin compatible with ESLint.\n*\n* The `plugin` object passed in is mutated in-place.\n*\n* @param plugin - Plugin to convert\n* @returns Plugin with all rules having `create` method\n* @throws {Error} If `plugin` is not an object, or `plugin.rules` is not an object\n*/\nfunction eslintCompatPlugin(plugin) {\n\tif (typeof plugin != \"object\" || !plugin) throw Error(\"Plugin must be an object\");\n\tlet { rules } = plugin;\n\tif (typeof rules != \"object\" || !rules) throw Error(\"Plugin must have an object as `rules` property\");\n\tlet afterHooksState = new AfterHooksState();\n\tfor (let ruleName in rules) Object.hasOwn(rules, ruleName) && convertRule(rules[ruleName], afterHooksState);\n\treturn plugin;\n}\n/**\n* Class containing state for tracking if any `after` hooks for a plugin's rules need to be called.\n*\n* # Aims\n*\n* Aims are:\n* 1. `after` hook of each rule runs after all other AST visit functions, and CFG event handlers.\n* 2. `after` hooks for *all* a plugin's rules run after *all* that plugin's rules have completed visiting AST.\n* 3. `after` hooks for *all* a plugin's rules run before *any* of plugin's rules begin linting another file.\n* 4. In the case of an error during AST traversal, `after` hooks are always still run.\n*\n* The above exactly matches the behavior when running a `createOnce` rule in Oxlint.\n*\n* # Why this is important\n*\n* All the complication comes from ensuring `after` hooks run even after an error during AST traversal.\n*\n* In ESLint CLI, an error will crash the process, so it doesn't particularly matter if `after` hooks run or not,\n* but language servers will typically swallow errors, and keep the process running.\n*\n* Rules using `before` and `after` hooks will often rely on both hooks running in a predictable order,\n* to maintain some internal state. For example, they may use `before` and `after` hooks to maintain a per-file\n* cache of data which is shared between rules. The cache use case is why rule (2) above is important.\n*\n* Below is an example of using `before` and `after` hooks to maintain a per-file cache, shared between rules.\n* It relies on all `before` hooks running before any rule starts visiting the AST,\n* and all `after` hooks running after all rules have finished visiting the AST.\n*\n* ```ts\n* let cache: Data | null = null;\n*\n* let numRunningRules = 0;\n*\n* const setupCache = (context) => {\n* if (cache === null) cache = new Data(context);\n* numRunningRules++;\n* };\n*\n* const teardownCache = () => {\n* numRunningRules--;\n* if (numRunningRules === 0) cache = null;\n* };\n*\n* const rule1 = {\n* createOnce(context) {\n* return {\n* before() {\n* setupCache(context);\n* },\n* Identifier(node) {\n* // Use `cache`\n* },\n* after: teardownCache,\n* };\n* },\n* };\n*\n* const rule2 = {\n* // Same as above\n* };\n*\n* const rule3 = {\n* // Same as above\n* };\n* ```\n*\n* If `after` hooks did not always run, the next lint run could get stale state, and malfunction.\n* If `after` hooks ran in the wrong order (e.g. after some `before` hooks for next file),\n* `numRunningRules` would never get to 0, and cache would never be cleared.\n*\n* Note that because all rules run together in a single AST traversal, if a rule from plugin X throws an error,\n* it can disrupt rules from plugin Y. This would make it hard to debug.\n*\n* # Mechanism\n*\n* ## Initialization\n*\n* Rules with an `after` hook register themselves by:\n*\n* 1. Calling `registerResetFunction` to register a function to run `after` hook and clean up internal state.\n* This call adds the reset fn to `resetFunctions`, and adds `AFTER_HOOK_INACTIVE` to `pendingStates`.\n* 2. Adding an `onCodePathEnd` CFG event handler to the visitor which calls `ruleFinished` at end of AST traversal.\n*\n* ## Per-file setup\n*\n* Before linting a file, `create` will call `setupAfterHook` which is created by `createContextAndVisitor`.\n* This registers that the `after` hook for the rule needs to run, by setting `pendingStates[ruleIndex]`\n* to `AFTER_HOOK_PENDING`, and incrementing `pendingCount`.\n*\n* If a cleanup microtask has not been scheduled yet, one is scheduled now (see reason below).\n*\n* ## Normal operation\n*\n* AST traversal for each rule ends with `ruleFinished` hook being called from `onCodePathEnd` CFG event handler.\n* It increments `lintFinishedCount`. If `lintFinishedCount` equals `pendingCount`, all rules have finished linting\n* the file, and `reset` is called, which calls all the pending `after` hooks.\n*\n* ## Error handling\n*\n* If an error is thrown during AST traversal, we ensure that `after` hooks are still run by 2 mechanisms:\n*\n* ### 1. Next microtick\n*\n* Before any rules began linting files, a microtask was scheduled, which runs on next micro-tick.\n* All language servers we're aware of run each lint task in a separate tick, so this microtask will run in next tick\n* after a linting run, before the next lint task starts.\n*\n* If the linting run completed successfully, the microtask does nothing.\n*\n* But if an error was thrown during AST traversal, this will be visible from the state of `pendingCount`.\n* The microtask will run any `after` hooks which need to be run, and reset state to reflect that there are\n* no more pending `after` hooks.\n*\n* ### 2. Fallback: Next lint run\n*\n* Before linting any file, the state of `pendingCount` is checked.\n* If any `after` hooks are still pending, they are run immediately.\n* They're run before the `context` objects in `createOnce` closures are updated to the next file,\n* so they run with access to the old `context` object from the last file.\n*\n* This fallback should not be required, but it's included as \"belt and braces\", to handle if any language server\n* or other environment running ESLint programmatically, does not pause a tick between linting runs.\n*/\nvar AfterHooksState = class {\n\tresetFunctions = [];\n\tpendingStates = [];\n\tpendingCount = 0;\n\tlintFinishedCount = 0;\n\tresetIsScheduled = !1;\n\tsourceCode = null;\n\tresetMicrotask = this.resetMicrotaskImpl.bind(this);\n\t/**\n\t* Register a function to run `after` hook for a rule, and reset state.\n\t* @param reset - Function to run `after` hook and reset state\n\t* @returns Index of rule\n\t*/\n\tregisterResetFunction(reset) {\n\t\tlet { pendingStates } = this, index = pendingStates.length;\n\t\treturn pendingStates.push(0), this.resetFunctions.push(reset), index;\n\t}\n\t/**\n\t* Register that a rule with `after` hook has completed linting a file.\n\t* Called by `onCodePathEnd` CFG event handler which is added to visitor for rules with `after` hooks.\n\t*\n\t* If all rules with an `after` hook which needs to be run have completed linting the file, run all `after` hooks.\n\t*/\n\truleFinished() {\n\t\tthis.lintFinishedCount++, this.lintFinishedCount === this.pendingCount && this.reset(!1);\n\t}\n\t/**\n\t* Call all reset functions where corresponding entry in `pendingStates` is `AFTER_HOOK_PENDING`.\n\t* Should only be called when some `after` hooks are pending.\n\t*\n\t* @param ignoreErrors - `true` to catch and silently ignore any errors which occur in `after` hooks.\n\t* `false` to throw them,\n\t* @throws {unknown} If `ignoreErrors` is `false` and an error occurs in any `after` hooks.\n\t*/\n\treset(ignoreErrors) {\n\t\tthis.pendingCount;\n\t\tlet { resetFunctions, pendingStates } = this, hooksLen = pendingStates.length, hasError = !1, error;\n\t\tfor (let i = 0; i < hooksLen; i++) if (pendingStates[i] !== 0) {\n\t\t\tpendingStates[i] = 0;\n\t\t\ttry {\n\t\t\t\tresetFunctions[i]();\n\t\t\t} catch (e) {\n\t\t\t\thasError === !1 && (hasError = !0, error = e);\n\t\t\t}\n\t\t}\n\t\tif (this.pendingCount = 0, this.lintFinishedCount = 0, this.sourceCode = null, hasError === !0 && ignoreErrors === !1) throw error;\n\t}\n\t/**\n\t* Schedule a microtask to run `reset` functions.\n\t*/\n\tscheduleReset() {\n\t\tqueueMicrotask(this.resetMicrotask), this.resetIsScheduled = !0;\n\t}\n\t/**\n\t* Function which is scheduled as the cleanup microtask.\n\t* `scheduleReset` uses `resetMicrotask` which is this method bound to `this`.\n\t*/\n\tresetMicrotaskImpl() {\n\t\tthis.resetIsScheduled = !1, this.pendingCount !== 0 && this.reset(!0);\n\t}\n};\n/**\n* Convert a rule.\n*\n* The `rule` object passed in is mutated in-place.\n*\n* @param rule - Rule to convert\n* @param afterHooksState - State of `after` hooks\n* @throws {Error} If `rule` is not an object\n*/\nfunction convertRule(rule, afterHooksState) {\n\tif (typeof rule != \"object\" || !rule) throw Error(\"Rule must be an object\");\n\tif (\"create\" in rule) return;\n\tlet context = null, visitor, beforeHook, setupAfterHook;\n\trule.create = (eslintContext) => {\n\t\tcontext === null && ({context, visitor, beforeHook, setupAfterHook} = createContextAndVisitor(rule, afterHooksState));\n\t\tlet eslintFileContext = Object.getPrototypeOf(eslintContext);\n\t\tif (setupAfterHook !== null) {\n\t\t\tlet { sourceCode } = eslintFileContext;\n\t\t\tafterHooksState.sourceCode !== sourceCode && (afterHooksState.sourceCode = sourceCode, afterHooksState.pendingCount !== 0 && afterHooksState.reset(!0));\n\t\t}\n\t\treturn Object.defineProperties(context, {\n\t\t\tid: { value: eslintContext.id },\n\t\t\toptions: { value: eslintContext.options },\n\t\t\treport: { value: eslintContext.report }\n\t\t}), Object.setPrototypeOf(context, eslintFileContext), beforeHook !== null && beforeHook() === !1 ? EMPTY_VISITOR : (setupAfterHook !== null && (setupAfterHook(eslintFileContext.sourceCode.ast), afterHooksState.resetIsScheduled === !1 && afterHooksState.scheduleReset()), visitor);\n\t};\n}\nconst FILE_CONTEXT = Object.freeze({\n\tget filename() {\n\t\tthrow Error(\"Cannot access `context.filename` in `createOnce`\");\n\t},\n\tgetFilename() {\n\t\tthrow Error(\"Cannot call `context.getFilename` in `createOnce`\");\n\t},\n\tget physicalFilename() {\n\t\tthrow Error(\"Cannot access `context.physicalFilename` in `createOnce`\");\n\t},\n\tgetPhysicalFilename() {\n\t\tthrow Error(\"Cannot call `context.getPhysicalFilename` in `createOnce`\");\n\t},\n\tget cwd() {\n\t\tthrow Error(\"Cannot access `context.cwd` in `createOnce`\");\n\t},\n\tgetCwd() {\n\t\tthrow Error(\"Cannot call `context.getCwd` in `createOnce`\");\n\t},\n\tget sourceCode() {\n\t\tthrow Error(\"Cannot access `context.sourceCode` in `createOnce`\");\n\t},\n\tgetSourceCode() {\n\t\tthrow Error(\"Cannot call `context.getSourceCode` in `createOnce`\");\n\t},\n\tget languageOptions() {\n\t\tthrow Error(\"Cannot access `context.languageOptions` in `createOnce`\");\n\t},\n\tget settings() {\n\t\tthrow Error(\"Cannot access `context.settings` in `createOnce`\");\n\t},\n\textend(extension) {\n\t\treturn Object.freeze(Object.assign(Object.create(this), extension));\n\t},\n\tget parserOptions() {\n\t\tthrow Error(\"Cannot access `context.parserOptions` in `createOnce`\");\n\t},\n\tget parserPath() {\n\t\tthrow Error(\"Cannot access `context.parserPath` in `createOnce`\");\n\t}\n});\n/**\n* Call `createOnce` method of rule, and return `Context`, `Visitor`, and `beforeHook` (if any).\n*\n* @param rule - Rule with `createOnce` method\n* @param afterHooksState - State of `after` hooks\n* @returns Object with `context`, `visitor`, and `beforeHook` properties,\n* and `setupAfterHook` function if visitor has an `after` hook\n*/\nfunction createContextAndVisitor(rule, afterHooksState) {\n\tlet { createOnce } = rule;\n\tif (createOnce == null) throw Error(\"Rules must define either a `create` or `createOnce` method\");\n\tif (typeof createOnce != \"function\") throw Error(\"Rule `createOnce` property must be a function\");\n\tlet context = Object.create(FILE_CONTEXT, {\n\t\tid: {\n\t\t\tvalue: null,\n\t\t\tenumerable: !0,\n\t\t\tconfigurable: !0\n\t\t},\n\t\toptions: {\n\t\t\tvalue: null,\n\t\t\tenumerable: !0,\n\t\t\tconfigurable: !0\n\t\t},\n\t\treport: {\n\t\t\tvalue() {\n\t\t\t\tthrow Error(\"Cannot report errors in `createOnce`\");\n\t\t\t},\n\t\t\tenumerable: !0,\n\t\t\tconfigurable: !0\n\t\t}\n\t}), { before: beforeHook, after: afterHook, ...visitor } = createOnce.call(rule, context);\n\tif (beforeHook === void 0) beforeHook = null;\n\telse if (beforeHook !== null && typeof beforeHook != \"function\") throw Error(\"`before` property of visitor must be a function if defined\");\n\tlet setupAfterHook = null;\n\tif (afterHook != null) {\n\t\tif (typeof afterHook != \"function\") throw Error(\"`after` property of visitor must be a function if defined\");\n\t\tlet program = null, ruleIndex = afterHooksState.registerResetFunction(() => {\n\t\t\tprogram = null, afterHook();\n\t\t});\n\t\tsetupAfterHook = (ast) => {\n\t\t\tprogram = ast, afterHooksState.pendingStates[ruleIndex] = 1, afterHooksState.pendingCount++;\n\t\t};\n\t\tlet onCodePathEnd = visitor.onCodePathEnd;\n\t\tvisitor.onCodePathEnd = onCodePathEnd == null ? function(_codePath, node) {\n\t\t\tnode === program && afterHooksState.ruleFinished();\n\t\t} : function(codePath, node) {\n\t\t\tonCodePathEnd.call(this, codePath, node), node === program && afterHooksState.ruleFinished();\n\t\t};\n\t}\n\treturn {\n\t\tcontext,\n\t\tvisitor,\n\t\tbeforeHook,\n\t\tsetupAfterHook\n\t};\n}\n//#endregion\nexport { definePlugin, defineRule, eslintCompatPlugin };\n", "/**\n * ESLint v9 compatible AST node types used across rules.\n * We use loose typings here since oxlint/eslint expose their own node types.\n */\n\nexport type Node = Record<string, any>;\nexport type RuleContext = Record<string, any>;\n\nexport type RuleMeta = {\n type?: 'problem' | 'suggestion' | 'layout';\n fixable?: 'code' | 'whitespace';\n hasSuggestions?: boolean;\n docs?: { description?: string };\n messages?: Record<string, string>;\n};\n\nexport function createRule<V extends Record<string, (node: Node) => unknown>>(rule: {\n meta?: RuleMeta;\n createOnce(context: RuleContext): V;\n}): { meta?: RuleMeta; createOnce(context: RuleContext): V } {\n return rule;\n}\n\nexport const LIFECYCLE_METHODS = new Set([\n 'mounted',\n 'destroyed',\n 'updated',\n 'terminated',\n 'ticked',\n 'scrolled',\n 'resized',\n 'moved',\n 'loaded',\n 'keyed',\n]);\n\nexport const TOOLKIT_PACKAGE = '@studiometa/js-toolkit';\n\n/**\n * Returns true if a class declaration extends an identifier imported from\n * @studiometa/js-toolkit, or extends a bare identifier named `Base`.\n *\n * This is a heuristic \u2014 we cannot do full type resolution in a lint rule.\n */\nexport function isBaseSubclass(node: Node, context: RuleContext): boolean {\n if (node.type !== 'ClassDeclaration' && node.type !== 'ClassExpression') {\n return false;\n }\n\n if (!node.superClass) {\n return false;\n }\n\n const superName = node.superClass.type === 'Identifier' ? node.superClass.name : null;\n\n if (!superName) {\n return false;\n }\n\n // Fast path: class extends Base\n if (superName === 'Base') {\n return true;\n }\n\n // Check if the superclass identifier is imported from @studiometa/js-toolkit\n const sourceCode = context.sourceCode ?? context.getSourceCode?.();\n const ast = sourceCode?.ast;\n\n if (!ast) {\n return false;\n }\n\n for (const node of ast.body) {\n if (node.type !== 'ImportDeclaration') continue;\n if (node.source.value !== TOOLKIT_PACKAGE) continue;\n\n for (const specifier of node.specifiers) {\n if (specifier.type === 'ImportSpecifier' && specifier.local.name === superName) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the string is camelCase (starts lowercase, no separators).\n */\nexport function isCamelCase(value: string): boolean {\n return /^[a-z][a-zA-Z0-9]*$/.test(value);\n}\n\n/**\n * Returns true if the string is PascalCase.\n */\nexport function isPascalCase(value: string): boolean {\n return /^[A-Z][a-zA-Z0-9]*$/.test(value);\n}\n\n/**\n * Converts a kebab-case, snake_case or PascalCase string to camelCase.\n */\nexport function toCamelCase(value: string): string {\n return value\n .replace(/[-_](.)/g, (_, c: string) => c.toUpperCase())\n .replace(/^[A-Z]/, (c) => c.toLowerCase());\n}\n\n/**\n * Converts a kebab-case, snake_case or camelCase string to PascalCase.\n */\nexport function toPascalCase(value: string): string {\n return value\n .replace(/[-_](.)/g, (_, c: string) => c.toUpperCase())\n .replace(/^[a-z]/, (c) => c.toUpperCase());\n}\n\n/**\n * Walks up ancestor nodes to find the nearest class declaration/expression.\n */\nexport function findEnclosingClass(ancestors: Node[]): Node | null {\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const node = ancestors[i];\n if (node.type === 'ClassDeclaration' || node.type === 'ClassExpression') {\n return node;\n }\n }\n return null;\n}\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nexport const requireConfig = createRule({\n meta: {\n type: 'problem',\n docs: {\n description: 'Require a static config property on classes extending Base',\n },\n messages: {\n missingConfig: 'Classes extending Base must define a static config property.',\n missingName: 'The static config must include a name property.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp) {\n context.report({ node, messageId: 'missingConfig' });\n return;\n }\n\n // Check that config has a `name` property\n const value = configProp.value;\n if (!value || value.type !== 'ObjectExpression') return;\n\n const hasName = value.properties?.some(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'name' && prop.value?.value,\n );\n\n if (!hasName) {\n context.report({ node: configProp, messageId: 'missingName' });\n }\n}\n", "import {\n isBaseSubclass,\n isPascalCase,\n toPascalCase,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const requireConfigNamePascalCase = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Require config.name to be PascalCase on classes extending Base',\n },\n messages: {\n notPascalCase: 'config.name \"{{name}}\" must be PascalCase.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const nameProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'name',\n );\n\n if (!nameProp) return;\n\n const nameValue = nameProp.value?.value;\n if (typeof nameValue !== 'string') return;\n\n if (!isPascalCase(nameValue)) {\n context.report({\n node: nameProp.value,\n messageId: 'notPascalCase',\n data: { name: nameValue },\n fix: (fixer: any) => fixer.replaceText(nameProp.value, `'${toPascalCase(nameValue)}'`),\n });\n }\n}\n", "import {\n isBaseSubclass,\n isCamelCase,\n toCamelCase,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const refsCamelCase = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Require ref names in static config to be camelCase',\n },\n messages: {\n notCamelCase: 'Ref name \"{{name}}\" must be camelCase.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const refsProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'refs',\n );\n\n if (!refsProp?.value || refsProp.value.type !== 'ArrayExpression') return;\n\n for (const element of refsProp.value.elements ?? []) {\n if (!element || element.type !== 'Literal') continue;\n const raw = element.value;\n if (typeof raw !== 'string') continue;\n // Strip the multiple-ref suffix before checking casing\n const name = raw.endsWith('[]') ? raw.slice(0, -2) : raw;\n if (!isCamelCase(name)) {\n const fixed = toCamelCase(name) + (raw.endsWith('[]') ? '[]' : '');\n context.report({\n node: element,\n messageId: 'notCamelCase',\n data: { name },\n fix: (fixer: any) => fixer.replaceText(element, `'${fixed}'`),\n });\n }\n }\n}\n", "import {\n isBaseSubclass,\n isCamelCase,\n toCamelCase,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const optionsCamelCase = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Require option keys in static config to be camelCase',\n },\n messages: {\n notCamelCase: 'Option key \"{{name}}\" must be camelCase.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const optionsProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'options',\n );\n\n if (!optionsProp?.value || optionsProp.value.type !== 'ObjectExpression') return;\n\n for (const prop of optionsProp.value.properties ?? []) {\n if (prop.type !== 'Property') continue;\n const name = prop.key?.name ?? prop.key?.value;\n if (typeof name !== 'string') continue;\n if (!isCamelCase(name)) {\n const fixed = toCamelCase(name);\n // Quoted key ('slides-to-show') vs identifier key (SlidesToShow)\n const fixedText = prop.key.type === 'Literal' ? `'${fixed}'` : fixed;\n context.report({\n node: prop.key,\n messageId: 'notCamelCase',\n data: { name },\n fix: (fixer: any) => fixer.replaceText(prop.key, fixedText),\n });\n }\n }\n}\n", "import {\n isBaseSubclass,\n LIFECYCLE_METHODS,\n findEnclosingClass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const asyncLifecycleMethods = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Require lifecycle methods on Base subclasses to be async',\n },\n messages: {\n notAsync: 'Lifecycle method \"{{name}}\" must be declared as async.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n MethodDefinition(node: Node) {\n const name = node.key?.name;\n if (!name || !LIFECYCLE_METHODS.has(name)) return;\n if (node.value?.async) return;\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n context.report({\n node,\n messageId: 'notAsync',\n data: { name },\n fix: (fixer: any) => fixer.insertTextBefore(node.key, 'async '),\n });\n },\n };\n },\n});\n", "import {\n isBaseSubclass,\n findEnclosingClass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\n// onXxxYyy \u2014 the part after \"on\" must start with an uppercase letter\nconst ON_HANDLER_RE = /^on[A-Z][a-zA-Z0-9]*$/;\n\nexport const onHandlerNaming = createRule({\n meta: {\n type: 'problem',\n docs: {\n description: 'Require event handler methods to follow the onXxxYyy naming convention',\n },\n messages: {\n invalidName:\n 'Event handler \"{{name}}\" must follow the onXxxYyy camelCase convention (e.g. onClickButton).',\n },\n },\n createOnce(context: RuleContext) {\n return {\n MethodDefinition(node: Node) {\n // Skip getters, setters \u2014 those are not event handlers\n if (node.kind === 'get' || node.kind === 'set') return;\n\n const name = node.key?.name;\n // Only lint methods that start with \"on\" followed by an uppercase letter \u2014\n // that's the unambiguous signal of an intended event handler.\n if (!name || !/^on[A-Z]/.test(name)) return;\n if (ON_HANDLER_RE.test(name)) return;\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n context.report({ node, messageId: 'invalidName', data: { name } });\n },\n };\n },\n});\n", "import {\n isBaseSubclass,\n findEnclosingClass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\n// Events that only make sense on window/document, never on a DOM element.\n// Pointer, keyboard, and form events are intentionally excluded \u2014 they can all\n// fire on elements too, so onResize/onScroll without a prefix is the only\n// unambiguous mistake worth flagging automatically.\nconst GLOBAL_ONLY_EVENTS = new Set(['Resize']);\n\nexport const onGlobalHandlerPrefix = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Require global event handlers (resize, scroll, etc.) to be prefixed with onWindow or onDocument',\n },\n messages: {\n missingPrefix:\n '\"{{name}}\" looks like a global event handler. Use \"onWindow{{event}}\" or \"onDocument{{event}}\" to bind to window/document events.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n MethodDefinition(node: Node) {\n const name = node.key?.name;\n if (!name || !name.startsWith('on')) return;\n\n const suffix = name.slice(2); // strip \"on\"\n const event = GLOBAL_ONLY_EVENTS.has(suffix) ? suffix : null;\n if (!event) return;\n\n // Allow onWindow* and onDocument* \u2014 those are correct\n if (name.startsWith('onWindow') || name.startsWith('onDocument')) return;\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n context.report({\n node,\n messageId: 'missingPrefix',\n data: { name, event },\n });\n },\n };\n },\n});\n", "import {\n isBaseSubclass,\n findEnclosingClass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nconst DEPRECATED = new Map([\n ['$parent', '$closest()'],\n ['$root', '$closest()'],\n ['$children', '$query()'],\n]);\n\nexport const noDeprecatedProperties = createRule({\n meta: {\n type: 'problem',\n docs: {\n description: 'Disallow deprecated Base properties ($parent, $children, $root)',\n },\n messages: {\n deprecated: '\"{{name}}\" is deprecated. Use {{replacement}} instead.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n MemberExpression(node: Node) {\n const prop = node.property?.name;\n if (!prop || !DEPRECATED.has(prop)) return;\n\n // Only flag `this.$parent` etc. \u2014 not arbitrary object access\n if (node.object?.type !== 'ThisExpression') return;\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n const replacement = DEPRECATED.get(prop);\n context.report({\n node,\n messageId: 'deprecated',\n data: { name: prop, replacement },\n });\n },\n };\n },\n});\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const noDispatchEvent = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description: 'Disallow dispatchEvent() in Base subclasses \u2014 use this.$emit() instead',\n },\n messages: {\n useEmit: 'Use this.$emit() instead of dispatchEvent() to emit events in a Base component.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n CallExpression(node: Node) {\n const callee = node.callee;\n\n const isDispatchEvent =\n // this.dispatchEvent(...)\n (callee.type === 'MemberExpression' &&\n callee.object?.type === 'ThisExpression' &&\n callee.property?.name === 'dispatchEvent') ||\n // this.$el.dispatchEvent(...) or el.dispatchEvent(...)\n (callee.type === 'MemberExpression' && callee.property?.name === 'dispatchEvent');\n\n if (!isDispatchEvent) return;\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n context.report({ node, messageId: 'useEmit' });\n },\n };\n },\n});\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const noShadowDom = createRule({\n meta: {\n type: 'problem',\n docs: {\n description: 'Disallow attachShadow() in Base subclasses \u2014 js-toolkit uses Light DOM only',\n },\n messages: {\n noShadow:\n 'Do not use attachShadow() in a Base component. @studiometa/js-toolkit uses Light DOM only.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n CallExpression(node: Node) {\n const callee = node.callee;\n if (callee.type !== 'MemberExpression' || callee.property?.name !== 'attachShadow') {\n return;\n }\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n context.report({ node, messageId: 'noShadow' });\n },\n };\n },\n});\n", "import { type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nexport const noCreateApp = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description: 'Disallow createApp() \u2014 use registerComponent() instead',\n },\n messages: {\n useRegister:\n 'createApp() is deprecated. Use registerComponent() from @studiometa/js-toolkit instead.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n CallExpression(node: Node) {\n const callee = node.callee;\n if (callee.type === 'Identifier' && callee.name === 'createApp') {\n context.report({ node, messageId: 'useRegister' });\n }\n },\n };\n },\n});\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nconst FORBIDDEN = new Set(['addEventListener', 'removeEventListener']);\n\nexport const noEventListenerMethods = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Disallow addEventListener/removeEventListener in Base subclasses \u2014 use on* methods instead',\n },\n messages: {\n useOnMethod:\n '\"{{method}}()\" should not be used in a Base component. ' +\n 'Define an \"on<Target><Event>()\" method instead \u2014 the framework handles binding and cleanup automatically.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n CallExpression(node: Node) {\n const callee = node.callee;\n if (callee.type !== 'MemberExpression') return;\n\n const method = callee.property?.name;\n if (!method || !FORBIDDEN.has(method)) return;\n\n // Only flag calls on `this.*`, `document`, or `window`\n let root = callee.object;\n while (root?.type === 'MemberExpression') root = root.object;\n const isThis = root?.type === 'ThisExpression';\n const isGlobal =\n root?.type === 'Identifier' && (root.name === 'document' || root.name === 'window');\n if (!isThis && !isGlobal) return;\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n context.report({ node, messageId: 'useOnMethod', data: { method } });\n },\n };\n },\n});\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nexport const refsPluralMultiple = createRule({\n meta: {\n type: 'problem',\n docs: {\n description: 'Require multiple-ref names (using [] suffix) to be pluralized',\n },\n messages: {\n notPlural: 'Multiple ref \"{{name}}\" must be pluralized (e.g. \"{{name}}s[]\").',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const refsProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'refs',\n );\n\n if (!refsProp?.value || refsProp.value.type !== 'ArrayExpression') return;\n\n for (const element of refsProp.value.elements ?? []) {\n if (!element || element.type !== 'Literal') continue;\n const raw = element.value;\n if (typeof raw !== 'string') continue;\n if (!raw.endsWith('[]')) continue;\n\n const name = raw.slice(0, -2);\n if (!name.endsWith('s')) {\n context.report({\n node: element,\n messageId: 'notPlural',\n data: { name },\n });\n }\n }\n}\n", "import { type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nconst DEEP_UTILS_RE = /^@studiometa\\/js-toolkit\\/utils\\/.+/;\n\nexport const noDeepUtilsImport = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Disallow deep imports from @studiometa/js-toolkit/utils/*',\n },\n messages: {\n noDeepImport:\n 'Import from \"{{source}}\" should use the public entrypoint \"@studiometa/js-toolkit/utils\".',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ImportDeclaration(node: Node) {\n const source: string = node.source.value;\n if (!DEEP_UTILS_RE.test(source)) return;\n\n context.report({\n node,\n messageId: 'noDeepImport',\n data: { source },\n fix(fixer: any) {\n const specifiers: Node[] = node.specifiers ?? [];\n const parts: string[] = [];\n\n for (const s of specifiers) {\n if (s.type === 'ImportDefaultSpecifier') {\n parts.push(s.local.name);\n } else if (s.type === 'ImportSpecifier') {\n const imported = s.imported.name;\n const local = s.local.name;\n parts.push(imported === local ? imported : `${imported} as ${local}`);\n }\n }\n\n const named = parts.join(', ');\n return fixer.replaceText(\n node,\n `import { ${named} } from '@studiometa/js-toolkit/utils';`,\n );\n },\n });\n },\n };\n },\n});\n", "import { toCamelCase, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nfunction isThisRefs(node: Node): boolean {\n return (\n node.type === 'MemberExpression' &&\n node.object?.type === 'ThisExpression' &&\n node.property?.name === '$refs'\n );\n}\n\nexport const refsNoBracketAccess = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Disallow bracket access with [] suffix on this.$refs',\n },\n messages: {\n noBracketAccess: 'Use \"this.$refs.{{fixed}}\" instead of \"this.$refs[\\'{{raw}}\\']\".',\n },\n },\n createOnce(context: RuleContext) {\n return {\n MemberExpression(node: Node) {\n if (!isThisRefs(node.object)) return;\n if (!node.computed) return;\n const prop = node.property;\n if (prop.type !== 'Literal' || typeof prop.value !== 'string') return;\n const raw: string = prop.value;\n if (!raw.endsWith('[]')) return;\n\n const stripped = raw.slice(0, -2);\n const fixed = toCamelCase(stripped);\n\n context.report({\n node,\n messageId: 'noBracketAccess',\n data: { raw, fixed },\n fix(fixer: any) {\n const src = context.sourceCode ?? context.getSourceCode?.();\n const objText = src.getText(node.object);\n return fixer.replaceText(node, `${objText}.${fixed}`);\n },\n });\n },\n };\n },\n});\n", "import { type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nexport const noRedundantWithMountWhenInView = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description: 'Disallow wrapping withMountWhenInView inside withScrolledInView (redundant)',\n },\n messages: {\n redundant:\n 'withScrolledInView already includes withMountWhenInView internally. Remove the inner withMountWhenInView call.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n 'ClassDeclaration, ClassExpression'(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n const superClass = node.superClass;\n if (!superClass || superClass.type !== 'CallExpression') return;\n if (superClass.callee?.name !== 'withScrolledInView') return;\n\n const arg = superClass.arguments?.[0];\n if (!arg || arg.type !== 'CallExpression') return;\n if (arg.callee?.name !== 'withMountWhenInView') return;\n\n context.report({ node: superClass, messageId: 'redundant' });\n}\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nconst QUERY_METHODS = new Set(['querySelector', 'querySelectorAll']);\n\nfunction isThisEl(node: Node): boolean {\n return (\n node.type === 'MemberExpression' &&\n node.object?.type === 'ThisExpression' &&\n node.property?.name === '$el'\n );\n}\n\nexport const preferRefOverQuerySelector = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description: 'Prefer this.$refs over this.$el.querySelector() in Base subclasses',\n },\n messages: {\n preferRef:\n 'Avoid \"this.$el.{{method}}()\". Declare a ref in static config and use \"this.$refs\" instead.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n CallExpression(node: Node) {\n const callee = node.callee;\n if (callee?.type !== 'MemberExpression') return;\n if (!isThisEl(callee.object)) return;\n const method = callee.property?.name;\n if (!QUERY_METHODS.has(method)) return;\n\n const ancestors =\n context.getAncestors?.() ?? context.sourceCode?.getAncestors?.(node) ?? [];\n const cls = findEnclosingClass(ancestors);\n if (!cls || !isBaseSubclass(cls, context)) return;\n\n context.report({ node, messageId: 'preferRef', data: { method } });\n },\n };\n },\n});\n", "import {\n isBaseSubclass,\n toCamelCase,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nfunction collectDeclaredRefs(classNode: Node): Set<string> {\n const body: Node[] = classNode.body?.body ?? [];\n const configProp = body.find(\n (m: Node) => m.type === 'PropertyDefinition' && m.static === true && m.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return new Set();\n\n const refsProp = configProp.value.properties?.find(\n (p: Node) => p.type === 'Property' && p.key?.name === 'refs',\n );\n\n if (!refsProp?.value || refsProp.value.type !== 'ArrayExpression') return new Set();\n\n const names = new Set<string>();\n for (const el of refsProp.value.elements ?? []) {\n if (!el || el.type !== 'Literal' || typeof el.value !== 'string') continue;\n const raw: string = el.value;\n const stripped = raw.endsWith('[]') ? raw.slice(0, -2) : raw;\n names.add(toCamelCase(stripped));\n }\n return names;\n}\n\nfunction isThisRefs(node: Node): boolean {\n return (\n node.type === 'MemberExpression' &&\n node.object?.type === 'ThisExpression' &&\n node.property?.name === '$refs'\n );\n}\n\nexport const requireRefsDeclaredInConfig = createRule({\n meta: {\n type: 'problem',\n docs: {\n description: 'Require all this.$refs accesses to be declared in static config.refs',\n },\n messages: {\n undeclared: 'Ref \"{{name}}\" is not declared in static config.refs.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n 'ClassDeclaration, ClassExpression'(classNode: Node) {\n if (!isBaseSubclass(classNode, context)) return;\n\n const declared = collectDeclaredRefs(classNode);\n\n // Walk the class body looking for this.$refs.<name> accesses\n walkNode(classNode.body, (node: Node) => {\n if (node.type !== 'MemberExpression') return;\n if (!isThisRefs(node.object)) return;\n\n let refName: string | null = null;\n\n if (!node.computed && node.property?.type === 'Identifier') {\n refName = node.property.name;\n } else if (\n node.computed &&\n node.property?.type === 'Literal' &&\n typeof node.property.value === 'string'\n ) {\n const raw: string = node.property.value;\n const stripped = raw.endsWith('[]') ? raw.slice(0, -2) : raw;\n refName = toCamelCase(stripped);\n }\n\n if (refName && !declared.has(refName)) {\n context.report({\n node,\n messageId: 'undeclared',\n data: { name: refName },\n });\n }\n });\n },\n };\n },\n});\n\nfunction walkNode(node: Node, visit: (n: Node) => void) {\n if (!node || typeof node !== 'object') return;\n visit(node);\n for (const key of Object.keys(node)) {\n if (key === 'parent') continue;\n const child = node[key];\n if (Array.isArray(child)) {\n for (const item of child) walkNode(item, visit);\n } else if (child && typeof child === 'object' && child.type) {\n walkNode(child, visit);\n }\n }\n}\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const noManualIntersectionObserver = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Disallow manual IntersectionObserver inside Base subclasses; use withIntersectionObserver or withMountWhenInView instead',\n },\n messages: {\n noManual:\n 'Avoid manual \"new IntersectionObserver()\". Use \"withIntersectionObserver\" or \"withMountWhenInView\" decorators instead.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n NewExpression(node: Node) {\n if (node.callee?.name !== 'IntersectionObserver') return;\n\n const ancestors =\n context.getAncestors?.() ?? context.sourceCode?.getAncestors?.(node) ?? [];\n const cls = findEnclosingClass(ancestors);\n if (!cls || !isBaseSubclass(cls, context)) return;\n\n context.report({ node, messageId: 'noManual' });\n },\n };\n },\n});\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const noManualMutationObserver = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Disallow manual MutationObserver inside Base subclasses; use withMutation decorator instead',\n },\n messages: {\n noManual: 'Avoid manual \"new MutationObserver()\". Use the \"withMutation\" decorator instead.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n NewExpression(node: Node) {\n if (node.callee?.name !== 'MutationObserver') return;\n\n const ancestors =\n context.getAncestors?.() ?? context.sourceCode?.getAncestors?.(node) ?? [];\n const cls = findEnclosingClass(ancestors);\n if (!cls || !isBaseSubclass(cls, context)) return;\n\n context.report({ node, messageId: 'noManual' });\n },\n };\n },\n});\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\n/**\n * Returns true if the string is kebab-case:\n * all lowercase letters, digits and hyphens, no underscores or uppercase.\n */\nfunction isKebabCase(value: string): boolean {\n return /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/.test(value);\n}\n\n/**\n * Converts a camelCase, PascalCase or snake_case string to kebab-case.\n */\nfunction toKebabCase(value: string): string {\n return value\n .replace(/([A-Z])/g, (_, c: string) => `-${c.toLowerCase()}`)\n .replace(/_/g, '-')\n .replace(/^-/, '')\n .toLowerCase();\n}\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const emitsProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'emits',\n );\n\n if (!emitsProp?.value || emitsProp.value.type !== 'ArrayExpression') return;\n\n for (const element of emitsProp.value.elements ?? []) {\n if (!element || element.type !== 'Literal') continue;\n const name = element.value;\n if (typeof name !== 'string') continue;\n if (!isKebabCase(name)) {\n const fixed = toKebabCase(name);\n context.report({\n node: element,\n messageId: 'notKebabCase',\n data: { name },\n fix: (fixer: any) => fixer.replaceText(element, `'${fixed}'`),\n });\n }\n }\n}\n\nexport const emitsKebabCase = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Require emit names in static config to be kebab-case',\n },\n messages: {\n notKebabCase: 'Emit name \"{{name}}\" must be kebab-case (e.g. \"content-change\").',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const emitsProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'emits',\n );\n\n if (!emitsProp?.value || emitsProp.value.type !== 'ArrayExpression') return;\n\n for (const element of emitsProp.value.elements ?? []) {\n if (!element || element.type !== 'Literal') continue;\n const name = element.value;\n if (typeof name !== 'string') continue;\n if (!name.includes('-')) {\n context.report({\n node: element,\n messageId: 'singleWord',\n data: { name },\n });\n }\n }\n}\n\nexport const emitsMultiWord = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Require emit names in static config to be multi-word to avoid collision with native DOM events',\n },\n messages: {\n singleWord:\n 'Emit name \"{{name}}\" must be multi-word (e.g. \"item-click\" instead of \"click\") to avoid collisions with native DOM events.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n", "import {\n isBaseSubclass,\n isPascalCase,\n toPascalCase,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const componentsProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'components',\n );\n\n if (!componentsProp?.value || componentsProp.value.type !== 'ObjectExpression') return;\n\n for (const prop of componentsProp.value.properties ?? []) {\n if (prop.type !== 'Property') continue;\n const name = prop.key?.name ?? prop.key?.value;\n if (typeof name !== 'string') continue;\n if (!isPascalCase(name)) {\n const fixed = toPascalCase(name);\n const fixedText = prop.key.type === 'Literal' ? `'${fixed}'` : fixed;\n context.report({\n node: prop.key,\n messageId: 'notPascalCase',\n data: { name },\n fix: (fixer: any) => fixer.replaceText(prop.key, fixedText),\n });\n }\n }\n}\n\nexport const componentsPascalCase = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Require component keys in static config to be PascalCase',\n },\n messages: {\n notPascalCase: 'Component key \"{{name}}\" must be PascalCase (e.g. \"MyComponent\").',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nfunction collectDeclaredEmits(classNode: Node): Set<string> {\n const body: Node[] = classNode.body?.body ?? [];\n const configProp = body.find(\n (m: Node) => m.type === 'PropertyDefinition' && m.static === true && m.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return new Set();\n\n const emitsProp = configProp.value.properties?.find(\n (p: Node) => p.type === 'Property' && p.key?.name === 'emits',\n );\n\n if (!emitsProp?.value || emitsProp.value.type !== 'ArrayExpression') return new Set();\n\n const names = new Set<string>();\n for (const el of emitsProp.value.elements ?? []) {\n if (el?.type === 'Literal' && typeof el.value === 'string') {\n names.add(el.value);\n }\n }\n return names;\n}\n\n/**\n * Returns true if `node` looks like `this.$emit`.\n */\nfunction isThisEmit(node: Node): boolean {\n return (\n node.type === 'MemberExpression' &&\n node.object?.type === 'ThisExpression' &&\n node.property?.name === '$emit'\n );\n}\n\nexport const requireEmitDeclaredInConfig = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Require all this.$emit() calls to use event names declared in static config.emits',\n },\n messages: {\n undeclared: 'Emit \"{{name}}\" is not declared in static config.emits.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n 'ClassDeclaration, ClassExpression'(classNode: Node) {\n if (!isBaseSubclass(classNode, context)) return;\n\n const declared = collectDeclaredEmits(classNode);\n\n walkNode(classNode.body, (node: Node) => {\n // Match: this.$emit('event-name', ...)\n if (node.type !== 'CallExpression') return;\n if (!isThisEmit(node.callee)) return;\n\n const firstArg = node.arguments?.[0];\n if (!firstArg || firstArg.type !== 'Literal') return;\n const name = firstArg.value;\n if (typeof name !== 'string') return;\n\n if (!declared.has(name)) {\n context.report({\n node: firstArg,\n messageId: 'undeclared',\n data: { name },\n });\n }\n });\n },\n };\n },\n});\n\nfunction walkNode(node: Node, visit: (n: Node) => void) {\n if (!node || typeof node !== 'object') return;\n visit(node);\n for (const key of Object.keys(node)) {\n if (key === 'parent') continue;\n const child = node[key];\n if (Array.isArray(child)) {\n for (const item of child) walkNode(item, visit);\n } else if (child && typeof child === 'object' && child.type) {\n walkNode(child, visit);\n }\n }\n}\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nfunction collectDeclaredComponents(classNode: Node): Set<string> {\n const body: Node[] = classNode.body?.body ?? [];\n const configProp = body.find(\n (m: Node) => m.type === 'PropertyDefinition' && m.static === true && m.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return new Set();\n\n const componentsProp = configProp.value.properties?.find(\n (p: Node) => p.type === 'Property' && p.key?.name === 'components',\n );\n\n if (!componentsProp?.value || componentsProp.value.type !== 'ObjectExpression') return new Set();\n\n const names = new Set<string>();\n for (const prop of componentsProp.value.properties ?? []) {\n if (prop.type !== 'Property') continue;\n const name = prop.key?.name ?? prop.key?.value;\n if (typeof name === 'string') {\n names.add(name);\n }\n }\n return names;\n}\n\n/**\n * Returns true if `node` looks like `this.$children`.\n */\nfunction isThisChildren(node: Node): boolean {\n return (\n node.type === 'MemberExpression' &&\n node.object?.type === 'ThisExpression' &&\n node.property?.name === '$children'\n );\n}\n\nexport const requireChildrenDeclaredInConfig = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Require all this.$children accesses to use component names declared in static config.components',\n },\n messages: {\n undeclared: 'Component \"{{name}}\" is not declared in static config.components.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n 'ClassDeclaration, ClassExpression'(classNode: Node) {\n if (!isBaseSubclass(classNode, context)) return;\n\n const declared = collectDeclaredComponents(classNode);\n\n walkNode(classNode.body, (node: Node) => {\n if (node.type !== 'MemberExpression') return;\n if (!isThisChildren(node.object)) return;\n\n let name: string | null = null;\n\n if (!node.computed && node.property?.type === 'Identifier') {\n name = node.property.name;\n } else if (\n node.computed &&\n node.property?.type === 'Literal' &&\n typeof node.property.value === 'string'\n ) {\n name = node.property.value;\n }\n\n if (name && !declared.has(name)) {\n context.report({\n node,\n messageId: 'undeclared',\n data: { name },\n });\n }\n });\n },\n };\n },\n});\n\nfunction walkNode(node: Node, visit: (n: Node) => void) {\n if (!node || typeof node !== 'object') return;\n visit(node);\n for (const key of Object.keys(node)) {\n if (key === 'parent') continue;\n const child = node[key];\n if (Array.isArray(child)) {\n for (const item of child) walkNode(item, visit);\n } else if (child && typeof child === 'object' && child.type) {\n walkNode(child, visit);\n }\n }\n}\n", "import {\n isBaseSubclass,\n toCamelCase,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nfunction collectDeclaredOptions(classNode: Node): Set<string> {\n const body: Node[] = classNode.body?.body ?? [];\n const configProp = body.find(\n (m: Node) => m.type === 'PropertyDefinition' && m.static === true && m.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return new Set();\n\n const optionsProp = configProp.value.properties?.find(\n (p: Node) => p.type === 'Property' && p.key?.name === 'options',\n );\n\n if (!optionsProp?.value || optionsProp.value.type !== 'ObjectExpression') return new Set();\n\n const names = new Set<string>();\n for (const prop of optionsProp.value.properties ?? []) {\n if (prop.type !== 'Property') continue;\n const name = prop.key?.name ?? prop.key?.value;\n if (typeof name === 'string') {\n names.add(toCamelCase(name));\n }\n }\n return names;\n}\n\n/**\n * Returns true if `node` looks like `this.$options`.\n */\nfunction isThisOptions(node: Node): boolean {\n return (\n node.type === 'MemberExpression' &&\n node.object?.type === 'ThisExpression' &&\n node.property?.name === '$options'\n );\n}\n\nexport const requireOptionsDeclaredInConfig = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Require all this.$options accesses to use option names declared in static config.options',\n },\n messages: {\n undeclared: 'Option \"{{name}}\" is not declared in static config.options.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n 'ClassDeclaration, ClassExpression'(classNode: Node) {\n if (!isBaseSubclass(classNode, context)) return;\n\n const declared = collectDeclaredOptions(classNode);\n\n walkNode(classNode.body, (node: Node) => {\n if (node.type !== 'MemberExpression') return;\n if (!isThisOptions(node.object)) return;\n\n let name: string | null = null;\n\n if (!node.computed && node.property?.type === 'Identifier') {\n name = node.property.name;\n } else if (\n node.computed &&\n node.property?.type === 'Literal' &&\n typeof node.property.value === 'string'\n ) {\n name = toCamelCase(node.property.value);\n }\n\n if (name && !declared.has(name)) {\n context.report({\n node,\n messageId: 'undeclared',\n data: { name },\n });\n }\n });\n },\n };\n },\n});\n\nfunction walkNode(node: Node, visit: (n: Node) => void) {\n if (!node || typeof node !== 'object') return;\n visit(node);\n for (const key of Object.keys(node)) {\n if (key === 'parent') continue;\n const child = node[key];\n if (Array.isArray(child)) {\n for (const item of child) walkNode(item, visit);\n } else if (child && typeof child === 'object' && child.type) {\n walkNode(child, visit);\n }\n }\n}\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nconst TRACKED_PROPERTIES = new Set(['$refs', '$options', '$children']);\n\nfunction isTrackedLookup(node: Node): { prop: string; name: string } | null {\n if (\n node.type === 'MemberExpression' &&\n node.object?.type === 'MemberExpression' &&\n node.object.object?.type === 'ThisExpression' &&\n node.object.property?.type === 'Identifier' &&\n TRACKED_PROPERTIES.has(node.object.property.name) &&\n node.property?.type === 'Identifier' &&\n !node.computed\n ) {\n return { prop: node.object.property.name, name: node.property.name };\n }\n return null;\n}\n\nfunction findEnclosingMethod(ancestors: Node[]): Node | null {\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const node = ancestors[i];\n if (node.type === 'MethodDefinition') return node;\n }\n return null;\n}\n\nexport const preferDestructuredLookups = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Prefer destructuring this.$refs, this.$options and this.$children into local variables when accessed multiple times in the same method',\n },\n messages: {\n preferDestructured:\n '\"this.{{prop}}.{{name}}\" is accessed {{count}} times. Destructure it into a local variable to avoid repeated lookups.',\n },\n },\n createOnce(context: RuleContext) {\n // methodKey -> lookup key -> list of nodes\n const methodLookups = new Map<Node, Map<string, Node[]>>();\n\n return {\n MemberExpression(node: Node) {\n const match = isTrackedLookup(node);\n if (!match) return;\n\n const ancestors =\n context.getAncestors?.() ?? context.sourceCode?.getAncestors?.(node) ?? [];\n const method = findEnclosingMethod(ancestors);\n if (!method) return;\n\n const cls = findEnclosingClass(ancestors);\n if (!cls || !isBaseSubclass(cls, context)) return;\n\n if (!methodLookups.has(method)) methodLookups.set(method, new Map());\n const map = methodLookups.get(method)!;\n const key = `${match.prop}.${match.name}`;\n const list = map.get(key) ?? [];\n list.push(node);\n map.set(key, list);\n },\n\n 'MethodDefinition:exit'(node: Node) {\n const map = methodLookups.get(node);\n if (!map) return;\n methodLookups.delete(node);\n\n for (const [key, nodes] of map) {\n if (nodes.length < 2) continue;\n const [prop, name] = key.split('.');\n context.report({\n node: nodes[0],\n messageId: 'preferDestructured',\n data: { prop, name, count: String(nodes.length) },\n });\n }\n },\n };\n },\n});\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nexport const noDollarPrefix = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Disallow user-defined methods and properties prefixed with \"$\" in Base subclasses \u2014 \"$\" is reserved for js-toolkit framework members',\n },\n messages: {\n noDollarPrefix:\n '\"${{name}}\" uses the \"$\" prefix, which is reserved for js-toolkit framework members. Rename it without the \"$\" prefix.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n for (const member of node.body?.body ?? []) {\n if (member.static) continue;\n if (member.type !== 'MethodDefinition' && member.type !== 'PropertyDefinition') continue;\n const name: string = member.key?.name ?? '';\n if (name.startsWith('$')) {\n context.report({\n node: member.key,\n messageId: 'noDollarPrefix',\n data: { name: name.slice(1) },\n });\n }\n }\n}\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nconst SETUP_CALLS = new Set(['setTimeout', 'setInterval', 'requestAnimationFrame']);\n\nexport const requireDestroyedCleanup = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Require a destroyed() method in Base subclasses that use setTimeout, setInterval or requestAnimationFrame',\n },\n messages: {\n requireDestroyed:\n 'This component uses {{calls}} but has no destroyed() method. Add destroyed() to clear timers and avoid memory leaks.',\n },\n },\n createOnce(context: RuleContext) {\n // class node -> set of timer call names found\n const classTimers = new Map<Node, Set<string>>();\n // class node -> whether destroyed() exists\n const classHasDestroyed = new Map<Node, boolean>();\n\n return {\n ClassDeclaration(node: Node) {\n classTimers.set(node, new Set());\n classHasDestroyed.set(node, false);\n },\n\n ClassExpression(node: Node) {\n classTimers.set(node, new Set());\n classHasDestroyed.set(node, false);\n },\n\n MethodDefinition(node: Node) {\n if (node.key?.name === 'destroyed') {\n // Find the enclosing class\n const sourceCode = context.sourceCode ?? context.getSourceCode?.();\n const ancestors = context.getAncestors?.() ?? sourceCode?.getAncestors?.(node) ?? [];\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const a = ancestors[i];\n if (a.type === 'ClassDeclaration' || a.type === 'ClassExpression') {\n classHasDestroyed.set(a, true);\n break;\n }\n }\n }\n },\n\n CallExpression(node: Node) {\n if (node.callee?.type !== 'Identifier') return;\n if (!SETUP_CALLS.has(node.callee.name)) return;\n\n const sourceCode = context.sourceCode ?? context.getSourceCode?.();\n const ancestors = context.getAncestors?.() ?? sourceCode?.getAncestors?.(node) ?? [];\n\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const a = ancestors[i];\n if (a.type === 'ClassDeclaration' || a.type === 'ClassExpression') {\n if (!isBaseSubclass(a, context)) break;\n classTimers.get(a)?.add(node.callee.name);\n break;\n }\n }\n },\n\n 'ClassDeclaration:exit'(node: Node) {\n reportIfNeeded(node, context, classTimers, classHasDestroyed);\n },\n\n 'ClassExpression:exit'(node: Node) {\n reportIfNeeded(node, context, classTimers, classHasDestroyed);\n },\n };\n },\n});\n\nfunction reportIfNeeded(\n node: Node,\n context: RuleContext,\n classTimers: Map<Node, Set<string>>,\n classHasDestroyed: Map<Node, boolean>,\n) {\n const timers = classTimers.get(node);\n const hasDestroyed = classHasDestroyed.get(node);\n classTimers.delete(node);\n classHasDestroyed.delete(node);\n\n if (!timers || timers.size === 0) return;\n if (hasDestroyed) return;\n\n context.report({\n node: node.id ?? node,\n messageId: 'requireDestroyed',\n data: { calls: [...timers].join(', ') },\n });\n}\n", "import { eslintCompatPlugin } from '@oxlint/plugins';\nimport {\n requireConfig,\n requireConfigNamePascalCase,\n refsCamelCase,\n optionsCamelCase,\n asyncLifecycleMethods,\n onHandlerNaming,\n onGlobalHandlerPrefix,\n noDeprecatedProperties,\n noDispatchEvent,\n noShadowDom,\n noCreateApp,\n noEventListenerMethods,\n refsPluralMultiple,\n noDeepUtilsImport,\n refsNoBracketAccess,\n noRedundantWithMountWhenInView,\n preferRefOverQuerySelector,\n requireRefsDeclaredInConfig,\n noManualIntersectionObserver,\n noManualMutationObserver,\n emitsKebabCase,\n emitsMultiWord,\n componentsPascalCase,\n requireEmitDeclaredInConfig,\n requireChildrenDeclaredInConfig,\n requireOptionsDeclaredInConfig,\n preferDestructuredLookups,\n noDollarPrefix,\n requireDestroyedCleanup,\n} from './rules/index.ts';\n\nconst PLUGIN_NAME = 'js-toolkit';\n\nconst rules = {\n 'require-config': requireConfig,\n 'require-config-name-pascal-case': requireConfigNamePascalCase,\n 'refs-camel-case': refsCamelCase,\n 'refs-plural-multiple': refsPluralMultiple,\n 'options-camel-case': optionsCamelCase,\n 'async-lifecycle-methods': asyncLifecycleMethods,\n 'on-handler-naming': onHandlerNaming,\n 'on-global-handler-prefix': onGlobalHandlerPrefix,\n 'no-deprecated-properties': noDeprecatedProperties,\n 'no-dispatch-event': noDispatchEvent,\n 'no-shadow-dom': noShadowDom,\n 'no-create-app': noCreateApp,\n 'no-event-listener-methods': noEventListenerMethods,\n 'no-deep-utils-import': noDeepUtilsImport,\n 'refs-no-bracket-access': refsNoBracketAccess,\n 'no-redundant-with-mount-when-in-view': noRedundantWithMountWhenInView,\n 'prefer-ref-over-query-selector': preferRefOverQuerySelector,\n 'require-refs-declared-in-config': requireRefsDeclaredInConfig,\n 'no-manual-intersection-observer': noManualIntersectionObserver,\n 'no-manual-mutation-observer': noManualMutationObserver,\n 'emits-kebab-case': emitsKebabCase,\n 'emits-multi-word': emitsMultiWord,\n 'components-pascal-case': componentsPascalCase,\n 'require-emit-declared-in-config': requireEmitDeclaredInConfig,\n 'require-children-declared-in-config': requireChildrenDeclaredInConfig,\n 'require-options-declared-in-config': requireOptionsDeclaredInConfig,\n 'prefer-destructured-lookups': preferDestructuredLookups,\n 'no-dollar-prefix': noDollarPrefix,\n 'require-destroyed-cleanup': requireDestroyedCleanup,\n};\n\nconst recommendedRules: Record<string, string> = {\n [`${PLUGIN_NAME}/require-config`]: 'error',\n [`${PLUGIN_NAME}/require-config-name-pascal-case`]: 'error',\n [`${PLUGIN_NAME}/refs-camel-case`]: 'error',\n [`${PLUGIN_NAME}/refs-plural-multiple`]: 'error',\n [`${PLUGIN_NAME}/options-camel-case`]: 'error',\n [`${PLUGIN_NAME}/async-lifecycle-methods`]: 'error',\n [`${PLUGIN_NAME}/on-handler-naming`]: 'error',\n [`${PLUGIN_NAME}/on-global-handler-prefix`]: 'warn',\n [`${PLUGIN_NAME}/no-deprecated-properties`]: 'warn',\n [`${PLUGIN_NAME}/no-dispatch-event`]: 'warn',\n [`${PLUGIN_NAME}/no-shadow-dom`]: 'error',\n [`${PLUGIN_NAME}/no-create-app`]: 'warn',\n [`${PLUGIN_NAME}/no-event-listener-methods`]: 'error',\n [`${PLUGIN_NAME}/no-deep-utils-import`]: 'error',\n [`${PLUGIN_NAME}/refs-no-bracket-access`]: 'error',\n [`${PLUGIN_NAME}/no-redundant-with-mount-when-in-view`]: 'warn',\n [`${PLUGIN_NAME}/prefer-ref-over-query-selector`]: 'warn',\n [`${PLUGIN_NAME}/require-refs-declared-in-config`]: 'error',\n [`${PLUGIN_NAME}/no-manual-intersection-observer`]: 'warn',\n [`${PLUGIN_NAME}/no-manual-mutation-observer`]: 'warn',\n [`${PLUGIN_NAME}/emits-kebab-case`]: 'error',\n [`${PLUGIN_NAME}/emits-multi-word`]: 'error',\n [`${PLUGIN_NAME}/components-pascal-case`]: 'error',\n [`${PLUGIN_NAME}/require-emit-declared-in-config`]: 'error',\n [`${PLUGIN_NAME}/require-children-declared-in-config`]: 'error',\n [`${PLUGIN_NAME}/require-options-declared-in-config`]: 'error',\n [`${PLUGIN_NAME}/prefer-destructured-lookups`]: 'warn',\n [`${PLUGIN_NAME}/no-dollar-prefix`]: 'error',\n [`${PLUGIN_NAME}/require-destroyed-cleanup`]: 'warn',\n};\n\nconst base = eslintCompatPlugin({\n meta: {\n name: '@studiometa/eslint-plugin-js-toolkit',\n },\n rules,\n});\n\nconst plugin = Object.assign(base, { configs: {} as Record<string, object> });\n\nplugin.configs['recommended'] = {\n plugins: { [PLUGIN_NAME]: plugin },\n rules: recommendedRules,\n};\n\nexport { plugin as jsToolkit };\nexport default plugin;\n"],
5
- "mappings": ";AAyBA,IAAM,gBAAgB,CAAC;AAcvB,SAAS,mBAAmBA,SAAQ;AACnC,MAAI,OAAOA,WAAU,YAAY,CAACA,QAAQ,OAAM,MAAM,0BAA0B;AAChF,MAAI,EAAE,OAAAC,OAAM,IAAID;AAChB,MAAI,OAAOC,UAAS,YAAY,CAACA,OAAO,OAAM,MAAM,gDAAgD;AACpG,MAAI,kBAAkB,IAAI,gBAAgB;AAC1C,WAAS,YAAYA,OAAO,QAAO,OAAOA,QAAO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A,EACzC,CAAC,GAAG,WAAW,yBAAyB,GAAG;AAAA,EAC3C,CAAC,GAAG,WAAW,uCAAuC,GAAG;AAAA,EACzD,CAAC,GAAG,WAAW,iCAAiC,GAAG;AAAA,EACnD,CAAC,GAAG,WAAW,kCAAkC,GAAG;AAAA,EACpD,CAAC,GAAG,WAAW,kCAAkC,GAAG;AAAA,EACpD,CAAC,GAAG,WAAW,8BAA8B,GAAG;AAAA,EAChD,CAAC,GAAG,WAAW,mBAAmB,GAAG;AAAA,EACrC,CAAC,GAAG,WAAW,mBAAmB,GAAG;AAAA,EACrC,CAAC,GAAG,WAAW,yBAAyB,GAAG;AAAA,EAC3C,CAAC,GAAG,WAAW,kCAAkC,GAAG;AAAA,EACpD,CAAC,GAAG,WAAW,sCAAsC,GAAG;AAAA,EACxD,CAAC,GAAG,WAAW,qCAAqC,GAAG;AAAA,EACvD,CAAC,GAAG,WAAW,8BAA8B,GAAG;AAAA,EAChD,CAAC,GAAG,WAAW,mBAAmB,GAAG;AAAA,EACrC,CAAC,GAAG,WAAW,4BAA4B,GAAG;AAChD;AAEA,IAAM,OAAO,mBAAmB;AAAA,EAC9B,MAAM;AAAA,IACJ,MAAM;AAAA,EACR;AAAA,EACA;AACF,CAAC;AAED,IAAM,SAAS,OAAO,OAAO,MAAM,EAAE,SAAS,CAAC,EAA4B,CAAC;AAE5E,OAAO,QAAQ,aAAa,IAAI;AAAA,EAC9B,SAAS,EAAE,CAAC,WAAW,GAAG,OAAO;AAAA,EACjC,OAAO;AACT;AAGA,IAAO,gBAAQ;",
3
+ "sources": ["../../../node_modules/@oxlint/plugins/index.js", "../src/utils/ast.ts", "../src/rules/require-config.ts", "../src/rules/require-config-name-pascal-case.ts", "../src/rules/refs-camel-case.ts", "../src/rules/options-camel-case.ts", "../src/rules/async-lifecycle-methods.ts", "../src/rules/on-handler-naming.ts", "../src/rules/on-global-handler-prefix.ts", "../src/rules/no-deprecated-properties.ts", "../src/rules/no-dispatch-event.ts", "../src/rules/no-shadow-dom.ts", "../src/rules/no-create-app.ts", "../src/rules/no-event-listener-methods.ts", "../src/rules/refs-plural-multiple.ts", "../src/rules/no-deep-utils-import.ts", "../src/rules/no-internal-barrel-import.ts", "../src/rules/refs-no-bracket-access.ts", "../src/rules/no-redundant-with-mount-when-in-view.ts", "../src/rules/prefer-ref-over-query-selector.ts", "../src/rules/require-refs-declared-in-config.ts", "../src/rules/no-manual-intersection-observer.ts", "../src/rules/no-manual-mutation-observer.ts", "../src/rules/emits-kebab-case.ts", "../src/rules/emits-multi-word.ts", "../src/rules/components-pascal-case.ts", "../src/rules/require-emit-declared-in-config.ts", "../src/rules/require-children-declared-in-config.ts", "../src/rules/require-options-declared-in-config.ts", "../src/rules/prefer-destructured-lookups.ts", "../src/rules/no-dollar-prefix.ts", "../src/rules/require-destroyed-cleanup.ts", "../src/index.ts"],
4
+ "sourcesContent": ["//#region src-js/package/define.ts\n/**\n* Define a plugin.\n*\n* No-op function, just to provide type safety. Input is passed through unchanged.\n*\n* @param plugin - Plugin to define\n* @returns Same plugin as passed in\n*/\nfunction definePlugin(plugin) {\n\treturn plugin;\n}\n/**\n* Define a rule.\n*\n* No-op function, just to provide type safety. Input is passed through unchanged.\n*\n* @param rule - Rule to define\n* @returns Same rule as passed in\n*/\nfunction defineRule(rule) {\n\treturn rule;\n}\n//#endregion\n//#region src-js/package/compat.ts\nconst EMPTY_VISITOR = {};\n/**\n* Convert a plugin which used Oxlint's `createOnce` API to also work with ESLint.\n*\n* If any of the plugin's rules use the Oxlint alternative `createOnce` API,\n* add ESLint-compatible `create` methods to those rules, which delegate to `createOnce`.\n* This makes the plugin compatible with ESLint.\n*\n* The `plugin` object passed in is mutated in-place.\n*\n* @param plugin - Plugin to convert\n* @returns Plugin with all rules having `create` method\n* @throws {Error} If `plugin` is not an object, or `plugin.rules` is not an object\n*/\nfunction eslintCompatPlugin(plugin) {\n\tif (typeof plugin != \"object\" || !plugin) throw Error(\"Plugin must be an object\");\n\tlet { rules } = plugin;\n\tif (typeof rules != \"object\" || !rules) throw Error(\"Plugin must have an object as `rules` property\");\n\tlet afterHooksState = new AfterHooksState();\n\tfor (let ruleName in rules) Object.hasOwn(rules, ruleName) && convertRule(rules[ruleName], afterHooksState);\n\treturn plugin;\n}\n/**\n* Class containing state for tracking if any `after` hooks for a plugin's rules need to be called.\n*\n* # Aims\n*\n* Aims are:\n* 1. `after` hook of each rule runs after all other AST visit functions, and CFG event handlers.\n* 2. `after` hooks for *all* a plugin's rules run after *all* that plugin's rules have completed visiting AST.\n* 3. `after` hooks for *all* a plugin's rules run before *any* of plugin's rules begin linting another file.\n* 4. In the case of an error during AST traversal, `after` hooks are always still run.\n*\n* The above exactly matches the behavior when running a `createOnce` rule in Oxlint.\n*\n* # Why this is important\n*\n* All the complication comes from ensuring `after` hooks run even after an error during AST traversal.\n*\n* In ESLint CLI, an error will crash the process, so it doesn't particularly matter if `after` hooks run or not,\n* but language servers will typically swallow errors, and keep the process running.\n*\n* Rules using `before` and `after` hooks will often rely on both hooks running in a predictable order,\n* to maintain some internal state. For example, they may use `before` and `after` hooks to maintain a per-file\n* cache of data which is shared between rules. The cache use case is why rule (2) above is important.\n*\n* Below is an example of using `before` and `after` hooks to maintain a per-file cache, shared between rules.\n* It relies on all `before` hooks running before any rule starts visiting the AST,\n* and all `after` hooks running after all rules have finished visiting the AST.\n*\n* ```ts\n* let cache: Data | null = null;\n*\n* let numRunningRules = 0;\n*\n* const setupCache = (context) => {\n* if (cache === null) cache = new Data(context);\n* numRunningRules++;\n* };\n*\n* const teardownCache = () => {\n* numRunningRules--;\n* if (numRunningRules === 0) cache = null;\n* };\n*\n* const rule1 = {\n* createOnce(context) {\n* return {\n* before() {\n* setupCache(context);\n* },\n* Identifier(node) {\n* // Use `cache`\n* },\n* after: teardownCache,\n* };\n* },\n* };\n*\n* const rule2 = {\n* // Same as above\n* };\n*\n* const rule3 = {\n* // Same as above\n* };\n* ```\n*\n* If `after` hooks did not always run, the next lint run could get stale state, and malfunction.\n* If `after` hooks ran in the wrong order (e.g. after some `before` hooks for next file),\n* `numRunningRules` would never get to 0, and cache would never be cleared.\n*\n* Note that because all rules run together in a single AST traversal, if a rule from plugin X throws an error,\n* it can disrupt rules from plugin Y. This would make it hard to debug.\n*\n* # Mechanism\n*\n* ## Initialization\n*\n* Rules with an `after` hook register themselves by:\n*\n* 1. Calling `registerResetFunction` to register a function to run `after` hook and clean up internal state.\n* This call adds the reset fn to `resetFunctions`, and adds `AFTER_HOOK_INACTIVE` to `pendingStates`.\n* 2. Adding an `onCodePathEnd` CFG event handler to the visitor which calls `ruleFinished` at end of AST traversal.\n*\n* ## Per-file setup\n*\n* Before linting a file, `create` will call `setupAfterHook` which is created by `createContextAndVisitor`.\n* This registers that the `after` hook for the rule needs to run, by setting `pendingStates[ruleIndex]`\n* to `AFTER_HOOK_PENDING`, and incrementing `pendingCount`.\n*\n* If a cleanup microtask has not been scheduled yet, one is scheduled now (see reason below).\n*\n* ## Normal operation\n*\n* AST traversal for each rule ends with `ruleFinished` hook being called from `onCodePathEnd` CFG event handler.\n* It increments `lintFinishedCount`. If `lintFinishedCount` equals `pendingCount`, all rules have finished linting\n* the file, and `reset` is called, which calls all the pending `after` hooks.\n*\n* ## Error handling\n*\n* If an error is thrown during AST traversal, we ensure that `after` hooks are still run by 2 mechanisms:\n*\n* ### 1. Next microtick\n*\n* Before any rules began linting files, a microtask was scheduled, which runs on next micro-tick.\n* All language servers we're aware of run each lint task in a separate tick, so this microtask will run in next tick\n* after a linting run, before the next lint task starts.\n*\n* If the linting run completed successfully, the microtask does nothing.\n*\n* But if an error was thrown during AST traversal, this will be visible from the state of `pendingCount`.\n* The microtask will run any `after` hooks which need to be run, and reset state to reflect that there are\n* no more pending `after` hooks.\n*\n* ### 2. Fallback: Next lint run\n*\n* Before linting any file, the state of `pendingCount` is checked.\n* If any `after` hooks are still pending, they are run immediately.\n* They're run before the `context` objects in `createOnce` closures are updated to the next file,\n* so they run with access to the old `context` object from the last file.\n*\n* This fallback should not be required, but it's included as \"belt and braces\", to handle if any language server\n* or other environment running ESLint programmatically, does not pause a tick between linting runs.\n*/\nvar AfterHooksState = class {\n\tresetFunctions = [];\n\tpendingStates = [];\n\tpendingCount = 0;\n\tlintFinishedCount = 0;\n\tresetIsScheduled = !1;\n\tsourceCode = null;\n\tresetMicrotask = this.resetMicrotaskImpl.bind(this);\n\t/**\n\t* Register a function to run `after` hook for a rule, and reset state.\n\t* @param reset - Function to run `after` hook and reset state\n\t* @returns Index of rule\n\t*/\n\tregisterResetFunction(reset) {\n\t\tlet { pendingStates } = this, index = pendingStates.length;\n\t\treturn pendingStates.push(0), this.resetFunctions.push(reset), index;\n\t}\n\t/**\n\t* Register that a rule with `after` hook has completed linting a file.\n\t* Called by `onCodePathEnd` CFG event handler which is added to visitor for rules with `after` hooks.\n\t*\n\t* If all rules with an `after` hook which needs to be run have completed linting the file, run all `after` hooks.\n\t*/\n\truleFinished() {\n\t\tthis.lintFinishedCount++, this.lintFinishedCount === this.pendingCount && this.reset(!1);\n\t}\n\t/**\n\t* Call all reset functions where corresponding entry in `pendingStates` is `AFTER_HOOK_PENDING`.\n\t* Should only be called when some `after` hooks are pending.\n\t*\n\t* @param ignoreErrors - `true` to catch and silently ignore any errors which occur in `after` hooks.\n\t* `false` to throw them,\n\t* @throws {unknown} If `ignoreErrors` is `false` and an error occurs in any `after` hooks.\n\t*/\n\treset(ignoreErrors) {\n\t\tthis.pendingCount;\n\t\tlet { resetFunctions, pendingStates } = this, hooksLen = pendingStates.length, hasError = !1, error;\n\t\tfor (let i = 0; i < hooksLen; i++) if (pendingStates[i] !== 0) {\n\t\t\tpendingStates[i] = 0;\n\t\t\ttry {\n\t\t\t\tresetFunctions[i]();\n\t\t\t} catch (e) {\n\t\t\t\thasError === !1 && (hasError = !0, error = e);\n\t\t\t}\n\t\t}\n\t\tif (this.pendingCount = 0, this.lintFinishedCount = 0, this.sourceCode = null, hasError === !0 && ignoreErrors === !1) throw error;\n\t}\n\t/**\n\t* Schedule a microtask to run `reset` functions.\n\t*/\n\tscheduleReset() {\n\t\tqueueMicrotask(this.resetMicrotask), this.resetIsScheduled = !0;\n\t}\n\t/**\n\t* Function which is scheduled as the cleanup microtask.\n\t* `scheduleReset` uses `resetMicrotask` which is this method bound to `this`.\n\t*/\n\tresetMicrotaskImpl() {\n\t\tthis.resetIsScheduled = !1, this.pendingCount !== 0 && this.reset(!0);\n\t}\n};\n/**\n* Convert a rule.\n*\n* The `rule` object passed in is mutated in-place.\n*\n* @param rule - Rule to convert\n* @param afterHooksState - State of `after` hooks\n* @throws {Error} If `rule` is not an object\n*/\nfunction convertRule(rule, afterHooksState) {\n\tif (typeof rule != \"object\" || !rule) throw Error(\"Rule must be an object\");\n\tif (\"create\" in rule) return;\n\tlet context = null, visitor, beforeHook, setupAfterHook;\n\trule.create = (eslintContext) => {\n\t\tcontext === null && ({context, visitor, beforeHook, setupAfterHook} = createContextAndVisitor(rule, afterHooksState));\n\t\tlet eslintFileContext = Object.getPrototypeOf(eslintContext);\n\t\tif (setupAfterHook !== null) {\n\t\t\tlet { sourceCode } = eslintFileContext;\n\t\t\tafterHooksState.sourceCode !== sourceCode && (afterHooksState.sourceCode = sourceCode, afterHooksState.pendingCount !== 0 && afterHooksState.reset(!0));\n\t\t}\n\t\treturn Object.defineProperties(context, {\n\t\t\tid: { value: eslintContext.id },\n\t\t\toptions: { value: eslintContext.options },\n\t\t\treport: { value: eslintContext.report }\n\t\t}), Object.setPrototypeOf(context, eslintFileContext), beforeHook !== null && beforeHook() === !1 ? EMPTY_VISITOR : (setupAfterHook !== null && (setupAfterHook(eslintFileContext.sourceCode.ast), afterHooksState.resetIsScheduled === !1 && afterHooksState.scheduleReset()), visitor);\n\t};\n}\nconst FILE_CONTEXT = Object.freeze({\n\tget filename() {\n\t\tthrow Error(\"Cannot access `context.filename` in `createOnce`\");\n\t},\n\tgetFilename() {\n\t\tthrow Error(\"Cannot call `context.getFilename` in `createOnce`\");\n\t},\n\tget physicalFilename() {\n\t\tthrow Error(\"Cannot access `context.physicalFilename` in `createOnce`\");\n\t},\n\tgetPhysicalFilename() {\n\t\tthrow Error(\"Cannot call `context.getPhysicalFilename` in `createOnce`\");\n\t},\n\tget cwd() {\n\t\tthrow Error(\"Cannot access `context.cwd` in `createOnce`\");\n\t},\n\tgetCwd() {\n\t\tthrow Error(\"Cannot call `context.getCwd` in `createOnce`\");\n\t},\n\tget sourceCode() {\n\t\tthrow Error(\"Cannot access `context.sourceCode` in `createOnce`\");\n\t},\n\tgetSourceCode() {\n\t\tthrow Error(\"Cannot call `context.getSourceCode` in `createOnce`\");\n\t},\n\tget languageOptions() {\n\t\tthrow Error(\"Cannot access `context.languageOptions` in `createOnce`\");\n\t},\n\tget settings() {\n\t\tthrow Error(\"Cannot access `context.settings` in `createOnce`\");\n\t},\n\textend(extension) {\n\t\treturn Object.freeze(Object.assign(Object.create(this), extension));\n\t},\n\tget parserOptions() {\n\t\tthrow Error(\"Cannot access `context.parserOptions` in `createOnce`\");\n\t},\n\tget parserPath() {\n\t\tthrow Error(\"Cannot access `context.parserPath` in `createOnce`\");\n\t}\n});\n/**\n* Call `createOnce` method of rule, and return `Context`, `Visitor`, and `beforeHook` (if any).\n*\n* @param rule - Rule with `createOnce` method\n* @param afterHooksState - State of `after` hooks\n* @returns Object with `context`, `visitor`, and `beforeHook` properties,\n* and `setupAfterHook` function if visitor has an `after` hook\n*/\nfunction createContextAndVisitor(rule, afterHooksState) {\n\tlet { createOnce } = rule;\n\tif (createOnce == null) throw Error(\"Rules must define either a `create` or `createOnce` method\");\n\tif (typeof createOnce != \"function\") throw Error(\"Rule `createOnce` property must be a function\");\n\tlet context = Object.create(FILE_CONTEXT, {\n\t\tid: {\n\t\t\tvalue: null,\n\t\t\tenumerable: !0,\n\t\t\tconfigurable: !0\n\t\t},\n\t\toptions: {\n\t\t\tvalue: null,\n\t\t\tenumerable: !0,\n\t\t\tconfigurable: !0\n\t\t},\n\t\treport: {\n\t\t\tvalue() {\n\t\t\t\tthrow Error(\"Cannot report errors in `createOnce`\");\n\t\t\t},\n\t\t\tenumerable: !0,\n\t\t\tconfigurable: !0\n\t\t}\n\t}), { before: beforeHook, after: afterHook, ...visitor } = createOnce.call(rule, context);\n\tif (beforeHook === void 0) beforeHook = null;\n\telse if (beforeHook !== null && typeof beforeHook != \"function\") throw Error(\"`before` property of visitor must be a function if defined\");\n\tlet setupAfterHook = null;\n\tif (afterHook != null) {\n\t\tif (typeof afterHook != \"function\") throw Error(\"`after` property of visitor must be a function if defined\");\n\t\tlet program = null, ruleIndex = afterHooksState.registerResetFunction(() => {\n\t\t\tprogram = null, afterHook();\n\t\t});\n\t\tsetupAfterHook = (ast) => {\n\t\t\tprogram = ast, afterHooksState.pendingStates[ruleIndex] = 1, afterHooksState.pendingCount++;\n\t\t};\n\t\tlet onCodePathEnd = visitor.onCodePathEnd;\n\t\tvisitor.onCodePathEnd = onCodePathEnd == null ? function(_codePath, node) {\n\t\t\tnode === program && afterHooksState.ruleFinished();\n\t\t} : function(codePath, node) {\n\t\t\tonCodePathEnd.call(this, codePath, node), node === program && afterHooksState.ruleFinished();\n\t\t};\n\t}\n\treturn {\n\t\tcontext,\n\t\tvisitor,\n\t\tbeforeHook,\n\t\tsetupAfterHook\n\t};\n}\n//#endregion\nexport { definePlugin, defineRule, eslintCompatPlugin };\n", "/**\n * ESLint v9 compatible AST node types used across rules.\n * We use loose typings here since oxlint/eslint expose their own node types.\n */\n\nexport type Node = Record<string, any>;\nexport type RuleContext = Record<string, any>;\n\nexport type RuleMeta = {\n type?: 'problem' | 'suggestion' | 'layout';\n fixable?: 'code' | 'whitespace';\n hasSuggestions?: boolean;\n docs?: { description?: string };\n messages?: Record<string, string>;\n};\n\nexport function createRule<V extends Record<string, (node: Node) => unknown>>(rule: {\n meta?: RuleMeta;\n createOnce(context: RuleContext): V;\n}): { meta?: RuleMeta; createOnce(context: RuleContext): V } {\n return rule;\n}\n\nexport const LIFECYCLE_METHODS = new Set([\n 'mounted',\n 'destroyed',\n 'updated',\n 'terminated',\n 'ticked',\n 'scrolled',\n 'resized',\n 'moved',\n 'loaded',\n 'keyed',\n]);\n\nexport const TOOLKIT_PACKAGE = '@studiometa/js-toolkit';\n\n/**\n * Returns true if a class declaration extends an identifier imported from\n * @studiometa/js-toolkit, or extends a bare identifier named `Base`.\n *\n * This is a heuristic \u2014 we cannot do full type resolution in a lint rule.\n */\nexport function isBaseSubclass(node: Node, context: RuleContext): boolean {\n if (node.type !== 'ClassDeclaration' && node.type !== 'ClassExpression') {\n return false;\n }\n\n if (!node.superClass) {\n return false;\n }\n\n const superName = node.superClass.type === 'Identifier' ? node.superClass.name : null;\n\n if (!superName) {\n return false;\n }\n\n // Fast path: class extends Base\n if (superName === 'Base') {\n return true;\n }\n\n // Check if the superclass identifier is imported from @studiometa/js-toolkit\n const sourceCode = context.sourceCode ?? context.getSourceCode?.();\n const ast = sourceCode?.ast;\n\n if (!ast) {\n return false;\n }\n\n for (const node of ast.body) {\n if (node.type !== 'ImportDeclaration') continue;\n if (node.source.value !== TOOLKIT_PACKAGE) continue;\n\n for (const specifier of node.specifiers) {\n if (specifier.type === 'ImportSpecifier' && specifier.local.name === superName) {\n return true;\n }\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the string is camelCase (starts lowercase, no separators).\n */\nexport function isCamelCase(value: string): boolean {\n return /^[a-z][a-zA-Z0-9]*$/.test(value);\n}\n\n/**\n * Returns true if the string is PascalCase.\n */\nexport function isPascalCase(value: string): boolean {\n return /^[A-Z][a-zA-Z0-9]*$/.test(value);\n}\n\n/**\n * Converts a kebab-case, snake_case or PascalCase string to camelCase.\n */\nexport function toCamelCase(value: string): string {\n return value\n .replace(/[-_](.)/g, (_, c: string) => c.toUpperCase())\n .replace(/^[A-Z]/, (c) => c.toLowerCase());\n}\n\n/**\n * Converts a kebab-case, snake_case or camelCase string to PascalCase.\n */\nexport function toPascalCase(value: string): string {\n return value\n .replace(/[-_](.)/g, (_, c: string) => c.toUpperCase())\n .replace(/^[a-z]/, (c) => c.toUpperCase());\n}\n\n/**\n * Walks up ancestor nodes to find the nearest class declaration/expression.\n */\nexport function findEnclosingClass(ancestors: Node[]): Node | null {\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const node = ancestors[i];\n if (node.type === 'ClassDeclaration' || node.type === 'ClassExpression') {\n return node;\n }\n }\n return null;\n}\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nexport const requireConfig = createRule({\n meta: {\n type: 'problem',\n docs: {\n description: 'Require a static config property on classes extending Base',\n },\n messages: {\n missingConfig: 'Classes extending Base must define a static config property.',\n missingName: 'The static config must include a name property.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp) {\n context.report({ node, messageId: 'missingConfig' });\n return;\n }\n\n // Check that config has a `name` property\n const value = configProp.value;\n if (!value || value.type !== 'ObjectExpression') return;\n\n const hasName = value.properties?.some(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'name' && prop.value?.value,\n );\n\n if (!hasName) {\n context.report({ node: configProp, messageId: 'missingName' });\n }\n}\n", "import {\n isBaseSubclass,\n isPascalCase,\n toPascalCase,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const requireConfigNamePascalCase = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Require config.name to be PascalCase on classes extending Base',\n },\n messages: {\n notPascalCase: 'config.name \"{{name}}\" must be PascalCase.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const nameProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'name',\n );\n\n if (!nameProp) return;\n\n const nameValue = nameProp.value?.value;\n if (typeof nameValue !== 'string') return;\n\n if (!isPascalCase(nameValue)) {\n context.report({\n node: nameProp.value,\n messageId: 'notPascalCase',\n data: { name: nameValue },\n fix: (fixer: any) => fixer.replaceText(nameProp.value, `'${toPascalCase(nameValue)}'`),\n });\n }\n}\n", "import {\n isBaseSubclass,\n isCamelCase,\n toCamelCase,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const refsCamelCase = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Require ref names in static config to be camelCase',\n },\n messages: {\n notCamelCase: 'Ref name \"{{name}}\" must be camelCase.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const refsProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'refs',\n );\n\n if (!refsProp?.value || refsProp.value.type !== 'ArrayExpression') return;\n\n for (const element of refsProp.value.elements ?? []) {\n if (!element || element.type !== 'Literal') continue;\n const raw = element.value;\n if (typeof raw !== 'string') continue;\n // Strip the multiple-ref suffix before checking casing\n const name = raw.endsWith('[]') ? raw.slice(0, -2) : raw;\n if (!isCamelCase(name)) {\n const fixed = toCamelCase(name) + (raw.endsWith('[]') ? '[]' : '');\n context.report({\n node: element,\n messageId: 'notCamelCase',\n data: { name },\n fix: (fixer: any) => fixer.replaceText(element, `'${fixed}'`),\n });\n }\n }\n}\n", "import {\n isBaseSubclass,\n isCamelCase,\n toCamelCase,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const optionsCamelCase = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Require option keys in static config to be camelCase',\n },\n messages: {\n notCamelCase: 'Option key \"{{name}}\" must be camelCase.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const optionsProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'options',\n );\n\n if (!optionsProp?.value || optionsProp.value.type !== 'ObjectExpression') return;\n\n for (const prop of optionsProp.value.properties ?? []) {\n if (prop.type !== 'Property') continue;\n const name = prop.key?.name ?? prop.key?.value;\n if (typeof name !== 'string') continue;\n if (!isCamelCase(name)) {\n const fixed = toCamelCase(name);\n // Quoted key ('slides-to-show') vs identifier key (SlidesToShow)\n const fixedText = prop.key.type === 'Literal' ? `'${fixed}'` : fixed;\n context.report({\n node: prop.key,\n messageId: 'notCamelCase',\n data: { name },\n fix: (fixer: any) => fixer.replaceText(prop.key, fixedText),\n });\n }\n }\n}\n", "import {\n isBaseSubclass,\n LIFECYCLE_METHODS,\n findEnclosingClass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const asyncLifecycleMethods = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Require lifecycle methods on Base subclasses to be async',\n },\n messages: {\n notAsync: 'Lifecycle method \"{{name}}\" must be declared as async.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n MethodDefinition(node: Node) {\n const name = node.key?.name;\n if (!name || !LIFECYCLE_METHODS.has(name)) return;\n if (node.value?.async) return;\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n context.report({\n node,\n messageId: 'notAsync',\n data: { name },\n fix: (fixer: any) => fixer.insertTextBefore(node.key, 'async '),\n });\n },\n };\n },\n});\n", "import {\n isBaseSubclass,\n findEnclosingClass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\n// onXxxYyy \u2014 the part after \"on\" must start with an uppercase letter\nconst ON_HANDLER_RE = /^on[A-Z][a-zA-Z0-9]*$/;\n\nexport const onHandlerNaming = createRule({\n meta: {\n type: 'problem',\n docs: {\n description: 'Require event handler methods to follow the onXxxYyy naming convention',\n },\n messages: {\n invalidName:\n 'Event handler \"{{name}}\" must follow the onXxxYyy camelCase convention (e.g. onClickButton).',\n },\n },\n createOnce(context: RuleContext) {\n return {\n MethodDefinition(node: Node) {\n // Skip getters, setters \u2014 those are not event handlers\n if (node.kind === 'get' || node.kind === 'set') return;\n\n const name = node.key?.name;\n // Only lint methods that start with \"on\" followed by an uppercase letter \u2014\n // that's the unambiguous signal of an intended event handler.\n if (!name || !/^on[A-Z]/.test(name)) return;\n if (ON_HANDLER_RE.test(name)) return;\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n context.report({ node, messageId: 'invalidName', data: { name } });\n },\n };\n },\n});\n", "import {\n isBaseSubclass,\n findEnclosingClass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\n// Events that only make sense on window/document, never on a DOM element.\n// Pointer, keyboard, and form events are intentionally excluded \u2014 they can all\n// fire on elements too, so onResize/onScroll without a prefix is the only\n// unambiguous mistake worth flagging automatically.\nconst GLOBAL_ONLY_EVENTS = new Set(['Resize']);\n\nexport const onGlobalHandlerPrefix = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Require global event handlers (resize, scroll, etc.) to be prefixed with onWindow or onDocument',\n },\n messages: {\n missingPrefix:\n '\"{{name}}\" looks like a global event handler. Use \"onWindow{{event}}\" or \"onDocument{{event}}\" to bind to window/document events.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n MethodDefinition(node: Node) {\n const name = node.key?.name;\n if (!name || !name.startsWith('on')) return;\n\n const suffix = name.slice(2); // strip \"on\"\n const event = GLOBAL_ONLY_EVENTS.has(suffix) ? suffix : null;\n if (!event) return;\n\n // Allow onWindow* and onDocument* \u2014 those are correct\n if (name.startsWith('onWindow') || name.startsWith('onDocument')) return;\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n context.report({\n node,\n messageId: 'missingPrefix',\n data: { name, event },\n });\n },\n };\n },\n});\n", "import {\n isBaseSubclass,\n findEnclosingClass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nconst DEPRECATED = new Map([\n ['$parent', '$closest()'],\n ['$root', '$closest()'],\n ['$children', '$query()'],\n]);\n\nexport const noDeprecatedProperties = createRule({\n meta: {\n type: 'problem',\n docs: {\n description: 'Disallow deprecated Base properties ($parent, $children, $root)',\n },\n messages: {\n deprecated: '\"{{name}}\" is deprecated. Use {{replacement}} instead.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n MemberExpression(node: Node) {\n const prop = node.property?.name;\n if (!prop || !DEPRECATED.has(prop)) return;\n\n // Only flag `this.$parent` etc. \u2014 not arbitrary object access\n if (node.object?.type !== 'ThisExpression') return;\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n const replacement = DEPRECATED.get(prop);\n context.report({\n node,\n messageId: 'deprecated',\n data: { name: prop, replacement },\n });\n },\n };\n },\n});\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const noDispatchEvent = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description: 'Disallow dispatchEvent() in Base subclasses \u2014 use this.$emit() instead',\n },\n messages: {\n useEmit: 'Use this.$emit() instead of dispatchEvent() to emit events in a Base component.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n CallExpression(node: Node) {\n const callee = node.callee;\n\n const isDispatchEvent =\n // this.dispatchEvent(...)\n (callee.type === 'MemberExpression' &&\n callee.object?.type === 'ThisExpression' &&\n callee.property?.name === 'dispatchEvent') ||\n // this.$el.dispatchEvent(...) or el.dispatchEvent(...)\n (callee.type === 'MemberExpression' && callee.property?.name === 'dispatchEvent');\n\n if (!isDispatchEvent) return;\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n context.report({ node, messageId: 'useEmit' });\n },\n };\n },\n});\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const noShadowDom = createRule({\n meta: {\n type: 'problem',\n docs: {\n description: 'Disallow attachShadow() in Base subclasses \u2014 js-toolkit uses Light DOM only',\n },\n messages: {\n noShadow:\n 'Do not use attachShadow() in a Base component. @studiometa/js-toolkit uses Light DOM only.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n CallExpression(node: Node) {\n const callee = node.callee;\n if (callee.type !== 'MemberExpression' || callee.property?.name !== 'attachShadow') {\n return;\n }\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n context.report({ node, messageId: 'noShadow' });\n },\n };\n },\n});\n", "import { type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nexport const noCreateApp = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description: 'Disallow createApp() \u2014 use registerComponent() instead',\n },\n messages: {\n useRegister:\n 'createApp() is deprecated. Use registerComponent() from @studiometa/js-toolkit instead.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n CallExpression(node: Node) {\n const callee = node.callee;\n if (callee.type === 'Identifier' && callee.name === 'createApp') {\n context.report({ node, messageId: 'useRegister' });\n }\n },\n };\n },\n});\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nconst FORBIDDEN = new Set(['addEventListener', 'removeEventListener']);\n\nexport const noEventListenerMethods = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Disallow addEventListener/removeEventListener in Base subclasses \u2014 use on* methods instead',\n },\n messages: {\n useOnMethod:\n '\"{{method}}()\" should not be used in a Base component. ' +\n 'Define an \"on<Target><Event>()\" method instead \u2014 the framework handles binding and cleanup automatically.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n CallExpression(node: Node) {\n const callee = node.callee;\n if (callee.type !== 'MemberExpression') return;\n\n const method = callee.property?.name;\n if (!method || !FORBIDDEN.has(method)) return;\n\n // Only flag calls on `this.*`, `document`, or `window`\n let root = callee.object;\n while (root?.type === 'MemberExpression') root = root.object;\n const isThis = root?.type === 'ThisExpression';\n const isGlobal =\n root?.type === 'Identifier' && (root.name === 'document' || root.name === 'window');\n if (!isThis && !isGlobal) return;\n\n const ancestors = context.getAncestors\n ? context.getAncestors()\n : (context.sourceCode?.getAncestors?.(node) ?? []);\n\n const enclosingClass = findEnclosingClass(ancestors);\n if (!enclosingClass || !isBaseSubclass(enclosingClass, context)) return;\n\n context.report({ node, messageId: 'useOnMethod', data: { method } });\n },\n };\n },\n});\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nexport const refsPluralMultiple = createRule({\n meta: {\n type: 'problem',\n docs: {\n description: 'Require multiple-ref names (using [] suffix) to be pluralized',\n },\n messages: {\n notPlural: 'Multiple ref \"{{name}}\" must be pluralized (e.g. \"{{name}}s[]\").',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const refsProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'refs',\n );\n\n if (!refsProp?.value || refsProp.value.type !== 'ArrayExpression') return;\n\n for (const element of refsProp.value.elements ?? []) {\n if (!element || element.type !== 'Literal') continue;\n const raw = element.value;\n if (typeof raw !== 'string') continue;\n if (!raw.endsWith('[]')) continue;\n\n const name = raw.slice(0, -2);\n if (!name.endsWith('s')) {\n context.report({\n node: element,\n messageId: 'notPlural',\n data: { name },\n });\n }\n }\n}\n", "import { type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nconst UTILS_PREFIX = '@studiometa/js-toolkit/utils/';\n\n/**\n * A published per-symbol subpath: exactly one segment after `utils/`, and no dot in it.\n *\n * Since v3.9.0 every util is exported at `@studiometa/js-toolkit/utils/<name>`. Those subpaths are\n * public API and the cheapest way to import a util \u2014 they resolve to the module declaring the symbol,\n * so a consumer served by a CDN downloads that module instead of the whole `utils` barrel. Anything\n * deeper (`utils/math/damp.js`) reaches into the package layout, which is not part of the API and\n * changes without notice.\n *\n * Every key of the `exports` map is a symbol name, so none of them contains a dot; rejecting the dot\n * outright keeps a file path out (`utils/damp.ts`, `utils/foo.css`) whatever its extension.\n */\nconst PUBLIC_SUBPATH_RE = /^[^/.]+$/;\n\nexport const noDeepUtilsImport = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Disallow importing internal module paths from @studiometa/js-toolkit/utils \u2014 use the public per-symbol subpath',\n },\n messages: {\n noDeepImport:\n 'Import from \"{{source}}\" reaches into the package layout. Use the public subpath \"@studiometa/js-toolkit/utils/<name>\" for a single util, or \"@studiometa/js-toolkit/utils\" for several.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ImportDeclaration(node: Node) {\n const source: string = node.source.value;\n if (!source.startsWith(UTILS_PREFIX)) return;\n\n if (PUBLIC_SUBPATH_RE.test(source.slice(UTILS_PREFIX.length))) return;\n\n // No autofix: the subpath key is the symbol's exported name, which does not always match the\n // module path (`utils/history.js` exports `push`, published as `utils/historyPush`), so a\n // mechanical rewrite can produce a subpath which does not exist.\n context.report({ node, messageId: 'noDeepImport', data: { source } });\n },\n };\n },\n});\n", "import { type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\n/** A relative import of a barrel: `'./utils/index.js'`, `'../Base/index.js'`. */\nconst RELATIVE_BARREL_RE = /^\\.{1,2}\\/.*\\/index\\.js$/;\n\nexport const noInternalBarrelImport = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Disallow importing an internal barrel inside the package \u2014 import the declaring module instead',\n },\n messages: {\n noBarrelImport:\n 'Import from \"{{source}}\" pulls in every symbol the barrel names. Import the module declaring the symbol instead, so a consumer served by a CDN only downloads what it uses.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ImportDeclaration(node: Node) {\n const source: string = node.source.value;\n if (!RELATIVE_BARREL_RE.test(source)) return;\n\n context.report({ node, messageId: 'noBarrelImport', data: { source } });\n },\n };\n },\n});\n", "import { toCamelCase, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nfunction isThisRefs(node: Node): boolean {\n return (\n node.type === 'MemberExpression' &&\n node.object?.type === 'ThisExpression' &&\n node.property?.name === '$refs'\n );\n}\n\nexport const refsNoBracketAccess = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Disallow bracket access with [] suffix on this.$refs',\n },\n messages: {\n noBracketAccess: 'Use \"this.$refs.{{fixed}}\" instead of \"this.$refs[\\'{{raw}}\\']\".',\n },\n },\n createOnce(context: RuleContext) {\n return {\n MemberExpression(node: Node) {\n if (!isThisRefs(node.object)) return;\n if (!node.computed) return;\n const prop = node.property;\n if (prop.type !== 'Literal' || typeof prop.value !== 'string') return;\n const raw: string = prop.value;\n if (!raw.endsWith('[]')) return;\n\n const stripped = raw.slice(0, -2);\n const fixed = toCamelCase(stripped);\n\n context.report({\n node,\n messageId: 'noBracketAccess',\n data: { raw, fixed },\n fix(fixer: any) {\n const src = context.sourceCode ?? context.getSourceCode?.();\n const objText = src.getText(node.object);\n return fixer.replaceText(node, `${objText}.${fixed}`);\n },\n });\n },\n };\n },\n});\n", "import { type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nexport const noRedundantWithMountWhenInView = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description: 'Disallow wrapping withMountWhenInView inside withScrolledInView (redundant)',\n },\n messages: {\n redundant:\n 'withScrolledInView already includes withMountWhenInView internally. Remove the inner withMountWhenInView call.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n 'ClassDeclaration, ClassExpression'(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n const superClass = node.superClass;\n if (!superClass || superClass.type !== 'CallExpression') return;\n if (superClass.callee?.name !== 'withScrolledInView') return;\n\n const arg = superClass.arguments?.[0];\n if (!arg || arg.type !== 'CallExpression') return;\n if (arg.callee?.name !== 'withMountWhenInView') return;\n\n context.report({ node: superClass, messageId: 'redundant' });\n}\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nconst QUERY_METHODS = new Set(['querySelector', 'querySelectorAll']);\n\nfunction isThisEl(node: Node): boolean {\n return (\n node.type === 'MemberExpression' &&\n node.object?.type === 'ThisExpression' &&\n node.property?.name === '$el'\n );\n}\n\nexport const preferRefOverQuerySelector = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description: 'Prefer this.$refs over this.$el.querySelector() in Base subclasses',\n },\n messages: {\n preferRef:\n 'Avoid \"this.$el.{{method}}()\". Declare a ref in static config and use \"this.$refs\" instead.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n CallExpression(node: Node) {\n const callee = node.callee;\n if (callee?.type !== 'MemberExpression') return;\n if (!isThisEl(callee.object)) return;\n const method = callee.property?.name;\n if (!QUERY_METHODS.has(method)) return;\n\n const ancestors =\n context.getAncestors?.() ?? context.sourceCode?.getAncestors?.(node) ?? [];\n const cls = findEnclosingClass(ancestors);\n if (!cls || !isBaseSubclass(cls, context)) return;\n\n context.report({ node, messageId: 'preferRef', data: { method } });\n },\n };\n },\n});\n", "import {\n isBaseSubclass,\n toCamelCase,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nfunction collectDeclaredRefs(classNode: Node): Set<string> {\n const body: Node[] = classNode.body?.body ?? [];\n const configProp = body.find(\n (m: Node) => m.type === 'PropertyDefinition' && m.static === true && m.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return new Set();\n\n const refsProp = configProp.value.properties?.find(\n (p: Node) => p.type === 'Property' && p.key?.name === 'refs',\n );\n\n if (!refsProp?.value || refsProp.value.type !== 'ArrayExpression') return new Set();\n\n const names = new Set<string>();\n for (const el of refsProp.value.elements ?? []) {\n if (!el || el.type !== 'Literal' || typeof el.value !== 'string') continue;\n const raw: string = el.value;\n const stripped = raw.endsWith('[]') ? raw.slice(0, -2) : raw;\n names.add(toCamelCase(stripped));\n }\n return names;\n}\n\nfunction isThisRefs(node: Node): boolean {\n return (\n node.type === 'MemberExpression' &&\n node.object?.type === 'ThisExpression' &&\n node.property?.name === '$refs'\n );\n}\n\nexport const requireRefsDeclaredInConfig = createRule({\n meta: {\n type: 'problem',\n docs: {\n description: 'Require all this.$refs accesses to be declared in static config.refs',\n },\n messages: {\n undeclared: 'Ref \"{{name}}\" is not declared in static config.refs.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n 'ClassDeclaration, ClassExpression'(classNode: Node) {\n if (!isBaseSubclass(classNode, context)) return;\n\n const declared = collectDeclaredRefs(classNode);\n\n // Walk the class body looking for this.$refs.<name> accesses\n walkNode(classNode.body, (node: Node) => {\n if (node.type !== 'MemberExpression') return;\n if (!isThisRefs(node.object)) return;\n\n let refName: string | null = null;\n\n if (!node.computed && node.property?.type === 'Identifier') {\n refName = node.property.name;\n } else if (\n node.computed &&\n node.property?.type === 'Literal' &&\n typeof node.property.value === 'string'\n ) {\n const raw: string = node.property.value;\n const stripped = raw.endsWith('[]') ? raw.slice(0, -2) : raw;\n refName = toCamelCase(stripped);\n }\n\n if (refName && !declared.has(refName)) {\n context.report({\n node,\n messageId: 'undeclared',\n data: { name: refName },\n });\n }\n });\n },\n };\n },\n});\n\nfunction walkNode(node: Node, visit: (n: Node) => void) {\n if (!node || typeof node !== 'object') return;\n visit(node);\n for (const key of Object.keys(node)) {\n if (key === 'parent') continue;\n const child = node[key];\n if (Array.isArray(child)) {\n for (const item of child) walkNode(item, visit);\n } else if (child && typeof child === 'object' && child.type) {\n walkNode(child, visit);\n }\n }\n}\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const noManualIntersectionObserver = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Disallow manual IntersectionObserver inside Base subclasses; use withIntersectionObserver or withMountWhenInView instead',\n },\n messages: {\n noManual:\n 'Avoid manual \"new IntersectionObserver()\". Use \"withIntersectionObserver\" or \"withMountWhenInView\" decorators instead.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n NewExpression(node: Node) {\n if (node.callee?.name !== 'IntersectionObserver') return;\n\n const ancestors =\n context.getAncestors?.() ?? context.sourceCode?.getAncestors?.(node) ?? [];\n const cls = findEnclosingClass(ancestors);\n if (!cls || !isBaseSubclass(cls, context)) return;\n\n context.report({ node, messageId: 'noManual' });\n },\n };\n },\n});\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nexport const noManualMutationObserver = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Disallow manual MutationObserver inside Base subclasses; use withMutation decorator instead',\n },\n messages: {\n noManual: 'Avoid manual \"new MutationObserver()\". Use the \"withMutation\" decorator instead.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n NewExpression(node: Node) {\n if (node.callee?.name !== 'MutationObserver') return;\n\n const ancestors =\n context.getAncestors?.() ?? context.sourceCode?.getAncestors?.(node) ?? [];\n const cls = findEnclosingClass(ancestors);\n if (!cls || !isBaseSubclass(cls, context)) return;\n\n context.report({ node, messageId: 'noManual' });\n },\n };\n },\n});\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\n/**\n * Returns true if the string is kebab-case:\n * all lowercase letters, digits and hyphens, no underscores or uppercase.\n */\nfunction isKebabCase(value: string): boolean {\n return /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/.test(value);\n}\n\n/**\n * Converts a camelCase, PascalCase or snake_case string to kebab-case.\n */\nfunction toKebabCase(value: string): string {\n return value\n .replace(/([A-Z])/g, (_, c: string) => `-${c.toLowerCase()}`)\n .replace(/_/g, '-')\n .replace(/^-/, '')\n .toLowerCase();\n}\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const emitsProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'emits',\n );\n\n if (!emitsProp?.value || emitsProp.value.type !== 'ArrayExpression') return;\n\n for (const element of emitsProp.value.elements ?? []) {\n if (!element || element.type !== 'Literal') continue;\n const name = element.value;\n if (typeof name !== 'string') continue;\n if (!isKebabCase(name)) {\n const fixed = toKebabCase(name);\n context.report({\n node: element,\n messageId: 'notKebabCase',\n data: { name },\n fix: (fixer: any) => fixer.replaceText(element, `'${fixed}'`),\n });\n }\n }\n}\n\nexport const emitsKebabCase = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Require emit names in static config to be kebab-case',\n },\n messages: {\n notKebabCase: 'Emit name \"{{name}}\" must be kebab-case (e.g. \"content-change\").',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const emitsProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'emits',\n );\n\n if (!emitsProp?.value || emitsProp.value.type !== 'ArrayExpression') return;\n\n for (const element of emitsProp.value.elements ?? []) {\n if (!element || element.type !== 'Literal') continue;\n const name = element.value;\n if (typeof name !== 'string') continue;\n if (!name.includes('-')) {\n context.report({\n node: element,\n messageId: 'singleWord',\n data: { name },\n });\n }\n }\n}\n\nexport const emitsMultiWord = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Require emit names in static config to be multi-word to avoid collision with native DOM events',\n },\n messages: {\n singleWord:\n 'Emit name \"{{name}}\" must be multi-word (e.g. \"item-click\" instead of \"click\") to avoid collisions with native DOM events.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n", "import {\n isBaseSubclass,\n isPascalCase,\n toPascalCase,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n const body: Node[] = node.body?.body ?? [];\n\n const configProp = body.find(\n (member: Node) =>\n member.type === 'PropertyDefinition' &&\n member.static === true &&\n member.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return;\n\n const componentsProp = configProp.value.properties?.find(\n (prop: Node) => prop.type === 'Property' && prop.key?.name === 'components',\n );\n\n if (!componentsProp?.value || componentsProp.value.type !== 'ObjectExpression') return;\n\n for (const prop of componentsProp.value.properties ?? []) {\n if (prop.type !== 'Property') continue;\n const name = prop.key?.name ?? prop.key?.value;\n if (typeof name !== 'string') continue;\n if (!isPascalCase(name)) {\n const fixed = toPascalCase(name);\n const fixedText = prop.key.type === 'Literal' ? `'${fixed}'` : fixed;\n context.report({\n node: prop.key,\n messageId: 'notPascalCase',\n data: { name },\n fix: (fixer: any) => fixer.replaceText(prop.key, fixedText),\n });\n }\n }\n}\n\nexport const componentsPascalCase = createRule({\n meta: {\n type: 'problem',\n fixable: 'code',\n docs: {\n description: 'Require component keys in static config to be PascalCase',\n },\n messages: {\n notPascalCase: 'Component key \"{{name}}\" must be PascalCase (e.g. \"MyComponent\").',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nfunction collectDeclaredEmits(classNode: Node): Set<string> {\n const body: Node[] = classNode.body?.body ?? [];\n const configProp = body.find(\n (m: Node) => m.type === 'PropertyDefinition' && m.static === true && m.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return new Set();\n\n const emitsProp = configProp.value.properties?.find(\n (p: Node) => p.type === 'Property' && p.key?.name === 'emits',\n );\n\n if (!emitsProp?.value || emitsProp.value.type !== 'ArrayExpression') return new Set();\n\n const names = new Set<string>();\n for (const el of emitsProp.value.elements ?? []) {\n if (el?.type === 'Literal' && typeof el.value === 'string') {\n names.add(el.value);\n }\n }\n return names;\n}\n\n/**\n * Returns true if `node` looks like `this.$emit`.\n */\nfunction isThisEmit(node: Node): boolean {\n return (\n node.type === 'MemberExpression' &&\n node.object?.type === 'ThisExpression' &&\n node.property?.name === '$emit'\n );\n}\n\nexport const requireEmitDeclaredInConfig = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Require all this.$emit() calls to use event names declared in static config.emits',\n },\n messages: {\n undeclared: 'Emit \"{{name}}\" is not declared in static config.emits.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n 'ClassDeclaration, ClassExpression'(classNode: Node) {\n if (!isBaseSubclass(classNode, context)) return;\n\n const declared = collectDeclaredEmits(classNode);\n\n walkNode(classNode.body, (node: Node) => {\n // Match: this.$emit('event-name', ...)\n if (node.type !== 'CallExpression') return;\n if (!isThisEmit(node.callee)) return;\n\n const firstArg = node.arguments?.[0];\n if (!firstArg || firstArg.type !== 'Literal') return;\n const name = firstArg.value;\n if (typeof name !== 'string') return;\n\n if (!declared.has(name)) {\n context.report({\n node: firstArg,\n messageId: 'undeclared',\n data: { name },\n });\n }\n });\n },\n };\n },\n});\n\nfunction walkNode(node: Node, visit: (n: Node) => void) {\n if (!node || typeof node !== 'object') return;\n visit(node);\n for (const key of Object.keys(node)) {\n if (key === 'parent') continue;\n const child = node[key];\n if (Array.isArray(child)) {\n for (const item of child) walkNode(item, visit);\n } else if (child && typeof child === 'object' && child.type) {\n walkNode(child, visit);\n }\n }\n}\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nfunction collectDeclaredComponents(classNode: Node): Set<string> {\n const body: Node[] = classNode.body?.body ?? [];\n const configProp = body.find(\n (m: Node) => m.type === 'PropertyDefinition' && m.static === true && m.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return new Set();\n\n const componentsProp = configProp.value.properties?.find(\n (p: Node) => p.type === 'Property' && p.key?.name === 'components',\n );\n\n if (!componentsProp?.value || componentsProp.value.type !== 'ObjectExpression') return new Set();\n\n const names = new Set<string>();\n for (const prop of componentsProp.value.properties ?? []) {\n if (prop.type !== 'Property') continue;\n const name = prop.key?.name ?? prop.key?.value;\n if (typeof name === 'string') {\n names.add(name);\n }\n }\n return names;\n}\n\n/**\n * Returns true if `node` looks like `this.$children`.\n */\nfunction isThisChildren(node: Node): boolean {\n return (\n node.type === 'MemberExpression' &&\n node.object?.type === 'ThisExpression' &&\n node.property?.name === '$children'\n );\n}\n\nexport const requireChildrenDeclaredInConfig = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Require all this.$children accesses to use component names declared in static config.components',\n },\n messages: {\n undeclared: 'Component \"{{name}}\" is not declared in static config.components.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n 'ClassDeclaration, ClassExpression'(classNode: Node) {\n if (!isBaseSubclass(classNode, context)) return;\n\n const declared = collectDeclaredComponents(classNode);\n\n walkNode(classNode.body, (node: Node) => {\n if (node.type !== 'MemberExpression') return;\n if (!isThisChildren(node.object)) return;\n\n let name: string | null = null;\n\n if (!node.computed && node.property?.type === 'Identifier') {\n name = node.property.name;\n } else if (\n node.computed &&\n node.property?.type === 'Literal' &&\n typeof node.property.value === 'string'\n ) {\n name = node.property.value;\n }\n\n if (name && !declared.has(name)) {\n context.report({\n node,\n messageId: 'undeclared',\n data: { name },\n });\n }\n });\n },\n };\n },\n});\n\nfunction walkNode(node: Node, visit: (n: Node) => void) {\n if (!node || typeof node !== 'object') return;\n visit(node);\n for (const key of Object.keys(node)) {\n if (key === 'parent') continue;\n const child = node[key];\n if (Array.isArray(child)) {\n for (const item of child) walkNode(item, visit);\n } else if (child && typeof child === 'object' && child.type) {\n walkNode(child, visit);\n }\n }\n}\n", "import {\n isBaseSubclass,\n toCamelCase,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nfunction collectDeclaredOptions(classNode: Node): Set<string> {\n const body: Node[] = classNode.body?.body ?? [];\n const configProp = body.find(\n (m: Node) => m.type === 'PropertyDefinition' && m.static === true && m.key?.name === 'config',\n );\n\n if (!configProp?.value || configProp.value.type !== 'ObjectExpression') return new Set();\n\n const optionsProp = configProp.value.properties?.find(\n (p: Node) => p.type === 'Property' && p.key?.name === 'options',\n );\n\n if (!optionsProp?.value || optionsProp.value.type !== 'ObjectExpression') return new Set();\n\n const names = new Set<string>();\n for (const prop of optionsProp.value.properties ?? []) {\n if (prop.type !== 'Property') continue;\n const name = prop.key?.name ?? prop.key?.value;\n if (typeof name === 'string') {\n names.add(toCamelCase(name));\n }\n }\n return names;\n}\n\n/**\n * Returns true if `node` looks like `this.$options`.\n */\nfunction isThisOptions(node: Node): boolean {\n return (\n node.type === 'MemberExpression' &&\n node.object?.type === 'ThisExpression' &&\n node.property?.name === '$options'\n );\n}\n\nexport const requireOptionsDeclaredInConfig = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Require all this.$options accesses to use option names declared in static config.options',\n },\n messages: {\n undeclared: 'Option \"{{name}}\" is not declared in static config.options.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n 'ClassDeclaration, ClassExpression'(classNode: Node) {\n if (!isBaseSubclass(classNode, context)) return;\n\n const declared = collectDeclaredOptions(classNode);\n\n walkNode(classNode.body, (node: Node) => {\n if (node.type !== 'MemberExpression') return;\n if (!isThisOptions(node.object)) return;\n\n let name: string | null = null;\n\n if (!node.computed && node.property?.type === 'Identifier') {\n name = node.property.name;\n } else if (\n node.computed &&\n node.property?.type === 'Literal' &&\n typeof node.property.value === 'string'\n ) {\n name = toCamelCase(node.property.value);\n }\n\n if (name && !declared.has(name)) {\n context.report({\n node,\n messageId: 'undeclared',\n data: { name },\n });\n }\n });\n },\n };\n },\n});\n\nfunction walkNode(node: Node, visit: (n: Node) => void) {\n if (!node || typeof node !== 'object') return;\n visit(node);\n for (const key of Object.keys(node)) {\n if (key === 'parent') continue;\n const child = node[key];\n if (Array.isArray(child)) {\n for (const item of child) walkNode(item, visit);\n } else if (child && typeof child === 'object' && child.type) {\n walkNode(child, visit);\n }\n }\n}\n", "import {\n findEnclosingClass,\n isBaseSubclass,\n type Node,\n type RuleContext,\n createRule,\n} from '../utils/ast.ts';\n\nconst TRACKED_PROPERTIES = new Set(['$refs', '$options', '$children']);\n\nfunction isTrackedLookup(node: Node): { prop: string; name: string } | null {\n if (\n node.type === 'MemberExpression' &&\n node.object?.type === 'MemberExpression' &&\n node.object.object?.type === 'ThisExpression' &&\n node.object.property?.type === 'Identifier' &&\n TRACKED_PROPERTIES.has(node.object.property.name) &&\n node.property?.type === 'Identifier' &&\n !node.computed\n ) {\n return { prop: node.object.property.name, name: node.property.name };\n }\n return null;\n}\n\nfunction findEnclosingMethod(ancestors: Node[]): Node | null {\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const node = ancestors[i];\n if (node.type === 'MethodDefinition') return node;\n }\n return null;\n}\n\nexport const preferDestructuredLookups = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Prefer destructuring this.$refs, this.$options and this.$children into local variables when accessed multiple times in the same method',\n },\n messages: {\n preferDestructured:\n '\"this.{{prop}}.{{name}}\" is accessed {{count}} times. Destructure it into a local variable to avoid repeated lookups.',\n },\n },\n createOnce(context: RuleContext) {\n // methodKey -> lookup key -> list of nodes\n const methodLookups = new Map<Node, Map<string, Node[]>>();\n\n return {\n MemberExpression(node: Node) {\n const match = isTrackedLookup(node);\n if (!match) return;\n\n const ancestors =\n context.getAncestors?.() ?? context.sourceCode?.getAncestors?.(node) ?? [];\n const method = findEnclosingMethod(ancestors);\n if (!method) return;\n\n const cls = findEnclosingClass(ancestors);\n if (!cls || !isBaseSubclass(cls, context)) return;\n\n if (!methodLookups.has(method)) methodLookups.set(method, new Map());\n const map = methodLookups.get(method)!;\n const key = `${match.prop}.${match.name}`;\n const list = map.get(key) ?? [];\n list.push(node);\n map.set(key, list);\n },\n\n 'MethodDefinition:exit'(node: Node) {\n const map = methodLookups.get(node);\n if (!map) return;\n methodLookups.delete(node);\n\n for (const [key, nodes] of map) {\n if (nodes.length < 2) continue;\n const [prop, name] = key.split('.');\n context.report({\n node: nodes[0],\n messageId: 'preferDestructured',\n data: { prop, name, count: String(nodes.length) },\n });\n }\n },\n };\n },\n});\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nexport const noDollarPrefix = createRule({\n meta: {\n type: 'problem',\n docs: {\n description:\n 'Disallow user-defined methods and properties prefixed with \"$\" in Base subclasses \u2014 \"$\" is reserved for js-toolkit framework members',\n },\n messages: {\n noDollarPrefix:\n '\"${{name}}\" uses the \"$\" prefix, which is reserved for js-toolkit framework members. Rename it without the \"$\" prefix.',\n },\n },\n createOnce(context: RuleContext) {\n return {\n ClassDeclaration(node: Node) {\n check(node, context);\n },\n ClassExpression(node: Node) {\n check(node, context);\n },\n };\n },\n});\n\nfunction check(node: Node, context: RuleContext) {\n if (!isBaseSubclass(node, context)) return;\n\n for (const member of node.body?.body ?? []) {\n if (member.static) continue;\n if (member.type !== 'MethodDefinition' && member.type !== 'PropertyDefinition') continue;\n const name: string = member.key?.name ?? '';\n if (name.startsWith('$')) {\n context.report({\n node: member.key,\n messageId: 'noDollarPrefix',\n data: { name: name.slice(1) },\n });\n }\n }\n}\n", "import { isBaseSubclass, type Node, type RuleContext, createRule } from '../utils/ast.ts';\n\nconst SETUP_CALLS = new Set(['setTimeout', 'setInterval', 'requestAnimationFrame']);\n\nexport const requireDestroyedCleanup = createRule({\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Require a destroyed() method in Base subclasses that use setTimeout, setInterval or requestAnimationFrame',\n },\n messages: {\n requireDestroyed:\n 'This component uses {{calls}} but has no destroyed() method. Add destroyed() to clear timers and avoid memory leaks.',\n },\n },\n createOnce(context: RuleContext) {\n // class node -> set of timer call names found\n const classTimers = new Map<Node, Set<string>>();\n // class node -> whether destroyed() exists\n const classHasDestroyed = new Map<Node, boolean>();\n\n return {\n ClassDeclaration(node: Node) {\n classTimers.set(node, new Set());\n classHasDestroyed.set(node, false);\n },\n\n ClassExpression(node: Node) {\n classTimers.set(node, new Set());\n classHasDestroyed.set(node, false);\n },\n\n MethodDefinition(node: Node) {\n if (node.key?.name === 'destroyed') {\n // Find the enclosing class\n const sourceCode = context.sourceCode ?? context.getSourceCode?.();\n const ancestors = context.getAncestors?.() ?? sourceCode?.getAncestors?.(node) ?? [];\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const a = ancestors[i];\n if (a.type === 'ClassDeclaration' || a.type === 'ClassExpression') {\n classHasDestroyed.set(a, true);\n break;\n }\n }\n }\n },\n\n CallExpression(node: Node) {\n if (node.callee?.type !== 'Identifier') return;\n if (!SETUP_CALLS.has(node.callee.name)) return;\n\n const sourceCode = context.sourceCode ?? context.getSourceCode?.();\n const ancestors = context.getAncestors?.() ?? sourceCode?.getAncestors?.(node) ?? [];\n\n for (let i = ancestors.length - 1; i >= 0; i--) {\n const a = ancestors[i];\n if (a.type === 'ClassDeclaration' || a.type === 'ClassExpression') {\n if (!isBaseSubclass(a, context)) break;\n classTimers.get(a)?.add(node.callee.name);\n break;\n }\n }\n },\n\n 'ClassDeclaration:exit'(node: Node) {\n reportIfNeeded(node, context, classTimers, classHasDestroyed);\n },\n\n 'ClassExpression:exit'(node: Node) {\n reportIfNeeded(node, context, classTimers, classHasDestroyed);\n },\n };\n },\n});\n\nfunction reportIfNeeded(\n node: Node,\n context: RuleContext,\n classTimers: Map<Node, Set<string>>,\n classHasDestroyed: Map<Node, boolean>,\n) {\n const timers = classTimers.get(node);\n const hasDestroyed = classHasDestroyed.get(node);\n classTimers.delete(node);\n classHasDestroyed.delete(node);\n\n if (!timers || timers.size === 0) return;\n if (hasDestroyed) return;\n\n context.report({\n node: node.id ?? node,\n messageId: 'requireDestroyed',\n data: { calls: [...timers].join(', ') },\n });\n}\n", "import { eslintCompatPlugin } from '@oxlint/plugins';\nimport {\n requireConfig,\n requireConfigNamePascalCase,\n refsCamelCase,\n optionsCamelCase,\n asyncLifecycleMethods,\n onHandlerNaming,\n onGlobalHandlerPrefix,\n noDeprecatedProperties,\n noDispatchEvent,\n noShadowDom,\n noCreateApp,\n noEventListenerMethods,\n refsPluralMultiple,\n noDeepUtilsImport,\n noInternalBarrelImport,\n refsNoBracketAccess,\n noRedundantWithMountWhenInView,\n preferRefOverQuerySelector,\n requireRefsDeclaredInConfig,\n noManualIntersectionObserver,\n noManualMutationObserver,\n emitsKebabCase,\n emitsMultiWord,\n componentsPascalCase,\n requireEmitDeclaredInConfig,\n requireChildrenDeclaredInConfig,\n requireOptionsDeclaredInConfig,\n preferDestructuredLookups,\n noDollarPrefix,\n requireDestroyedCleanup,\n} from './rules/index.ts';\n\nconst PLUGIN_NAME = 'js-toolkit';\n\nconst rules = {\n 'require-config': requireConfig,\n 'require-config-name-pascal-case': requireConfigNamePascalCase,\n 'refs-camel-case': refsCamelCase,\n 'refs-plural-multiple': refsPluralMultiple,\n 'options-camel-case': optionsCamelCase,\n 'async-lifecycle-methods': asyncLifecycleMethods,\n 'on-handler-naming': onHandlerNaming,\n 'on-global-handler-prefix': onGlobalHandlerPrefix,\n 'no-deprecated-properties': noDeprecatedProperties,\n 'no-dispatch-event': noDispatchEvent,\n 'no-shadow-dom': noShadowDom,\n 'no-create-app': noCreateApp,\n 'no-event-listener-methods': noEventListenerMethods,\n 'no-deep-utils-import': noDeepUtilsImport,\n 'no-internal-barrel-import': noInternalBarrelImport,\n 'refs-no-bracket-access': refsNoBracketAccess,\n 'no-redundant-with-mount-when-in-view': noRedundantWithMountWhenInView,\n 'prefer-ref-over-query-selector': preferRefOverQuerySelector,\n 'require-refs-declared-in-config': requireRefsDeclaredInConfig,\n 'no-manual-intersection-observer': noManualIntersectionObserver,\n 'no-manual-mutation-observer': noManualMutationObserver,\n 'emits-kebab-case': emitsKebabCase,\n 'emits-multi-word': emitsMultiWord,\n 'components-pascal-case': componentsPascalCase,\n 'require-emit-declared-in-config': requireEmitDeclaredInConfig,\n 'require-children-declared-in-config': requireChildrenDeclaredInConfig,\n 'require-options-declared-in-config': requireOptionsDeclaredInConfig,\n 'prefer-destructured-lookups': preferDestructuredLookups,\n 'no-dollar-prefix': noDollarPrefix,\n 'require-destroyed-cleanup': requireDestroyedCleanup,\n};\n\nconst recommendedRules: Record<string, string> = {\n [`${PLUGIN_NAME}/require-config`]: 'error',\n [`${PLUGIN_NAME}/require-config-name-pascal-case`]: 'error',\n [`${PLUGIN_NAME}/refs-camel-case`]: 'error',\n [`${PLUGIN_NAME}/refs-plural-multiple`]: 'error',\n [`${PLUGIN_NAME}/options-camel-case`]: 'error',\n [`${PLUGIN_NAME}/async-lifecycle-methods`]: 'error',\n [`${PLUGIN_NAME}/on-handler-naming`]: 'error',\n [`${PLUGIN_NAME}/on-global-handler-prefix`]: 'warn',\n [`${PLUGIN_NAME}/no-deprecated-properties`]: 'warn',\n [`${PLUGIN_NAME}/no-dispatch-event`]: 'warn',\n [`${PLUGIN_NAME}/no-shadow-dom`]: 'error',\n [`${PLUGIN_NAME}/no-create-app`]: 'warn',\n [`${PLUGIN_NAME}/no-event-listener-methods`]: 'error',\n [`${PLUGIN_NAME}/no-deep-utils-import`]: 'error',\n [`${PLUGIN_NAME}/refs-no-bracket-access`]: 'error',\n [`${PLUGIN_NAME}/no-redundant-with-mount-when-in-view`]: 'warn',\n [`${PLUGIN_NAME}/prefer-ref-over-query-selector`]: 'warn',\n [`${PLUGIN_NAME}/require-refs-declared-in-config`]: 'error',\n [`${PLUGIN_NAME}/no-manual-intersection-observer`]: 'warn',\n [`${PLUGIN_NAME}/no-manual-mutation-observer`]: 'warn',\n [`${PLUGIN_NAME}/emits-kebab-case`]: 'error',\n [`${PLUGIN_NAME}/emits-multi-word`]: 'error',\n [`${PLUGIN_NAME}/components-pascal-case`]: 'error',\n [`${PLUGIN_NAME}/require-emit-declared-in-config`]: 'error',\n [`${PLUGIN_NAME}/require-children-declared-in-config`]: 'error',\n [`${PLUGIN_NAME}/require-options-declared-in-config`]: 'error',\n [`${PLUGIN_NAME}/prefer-destructured-lookups`]: 'warn',\n [`${PLUGIN_NAME}/no-dollar-prefix`]: 'error',\n [`${PLUGIN_NAME}/require-destroyed-cleanup`]: 'warn',\n};\n\nconst base = eslintCompatPlugin({\n meta: {\n name: '@studiometa/eslint-plugin-js-toolkit',\n },\n rules,\n});\n\nconst plugin = Object.assign(base, { configs: {} as Record<string, object> });\n\nplugin.configs['recommended'] = {\n plugins: { [PLUGIN_NAME]: plugin },\n rules: recommendedRules,\n};\n\nexport { plugin as jsToolkit };\nexport default plugin;\n"],
5
+ "mappings": ";AAyBA,IAAM,gBAAgB,CAAC;AAcvB,SAAS,mBAAmBA,SAAQ;AACnC,MAAI,OAAOA,WAAU,YAAY,CAACA,QAAQ,OAAM,MAAM,0BAA0B;AAChF,MAAI,EAAE,OAAAC,OAAM,IAAID;AAChB,MAAI,OAAOC,UAAS,YAAY,CAACA,OAAO,OAAM,MAAM,gDAAgD;AACpG,MAAI,kBAAkB,IAAI,gBAA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C,GAAG,WAAW,4BAA4B,GAAG;AAAA,EAC9C,CAAC,GAAG,WAAW,uBAAuB,GAAG;AAAA,EACzC,CAAC,GAAG,WAAW,yBAAyB,GAAG;AAAA,EAC3C,CAAC,GAAG,WAAW,uCAAuC,GAAG;AAAA,EACzD,CAAC,GAAG,WAAW,iCAAiC,GAAG;AAAA,EACnD,CAAC,GAAG,WAAW,kCAAkC,GAAG;AAAA,EACpD,CAAC,GAAG,WAAW,kCAAkC,GAAG;AAAA,EACpD,CAAC,GAAG,WAAW,8BAA8B,GAAG;AAAA,EAChD,CAAC,GAAG,WAAW,mBAAmB,GAAG;AAAA,EACrC,CAAC,GAAG,WAAW,mBAAmB,GAAG;AAAA,EACrC,CAAC,GAAG,WAAW,yBAAyB,GAAG;AAAA,EAC3C,CAAC,GAAG,WAAW,kCAAkC,GAAG;AAAA,EACpD,CAAC,GAAG,WAAW,sCAAsC,GAAG;AAAA,EACxD,CAAC,GAAG,WAAW,qCAAqC,GAAG;AAAA,EACvD,CAAC,GAAG,WAAW,8BAA8B,GAAG;AAAA,EAChD,CAAC,GAAG,WAAW,mBAAmB,GAAG;AAAA,EACrC,CAAC,GAAG,WAAW,4BAA4B,GAAG;AAChD;AAEA,IAAM,OAAO,mBAAmB;AAAA,EAC9B,MAAM;AAAA,IACJ,MAAM;AAAA,EACR;AAAA,EACA;AACF,CAAC;AAED,IAAM,SAAS,OAAO,OAAO,MAAM,EAAE,SAAS,CAAC,EAA4B,CAAC;AAE5E,OAAO,QAAQ,aAAa,IAAI;AAAA,EAC9B,SAAS,EAAE,CAAC,WAAW,GAAG,OAAO;AAAA,EACjC,OAAO;AACT;AAGA,IAAO,gBAAQ;",
6
6
  "names": ["plugin", "rules", "node", "check", "check", "check", "check", "check", "isThisRefs", "check", "check", "check", "walkNode", "walkNode", "walkNode", "check"]
7
7
  }
@@ -12,6 +12,7 @@ export { noCreateApp } from './no-create-app.ts';
12
12
  export { noEventListenerMethods } from './no-event-listener-methods.ts';
13
13
  export { refsPluralMultiple } from './refs-plural-multiple.ts';
14
14
  export { noDeepUtilsImport } from './no-deep-utils-import.ts';
15
+ export { noInternalBarrelImport } from './no-internal-barrel-import.ts';
15
16
  export { refsNoBracketAccess } from './refs-no-bracket-access.ts';
16
17
  export { noRedundantWithMountWhenInView } from './no-redundant-with-mount-when-in-view.ts';
17
18
  export { preferRefOverQuerySelector } from './prefer-ref-over-query-selector.ts';
@@ -0,0 +1,7 @@
1
+ import { type Node, type RuleContext } from '../utils/ast.ts';
2
+ export declare const noInternalBarrelImport: {
3
+ meta?: import("../utils/ast.ts").RuleMeta;
4
+ createOnce(context: RuleContext): {
5
+ ImportDeclaration(node: Node): void;
6
+ };
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studiometa/eslint-plugin-js-toolkit",
3
- "version": "3.9.0-beta.1",
3
+ "version": "3.9.0",
4
4
  "description": "Oxlint/ESLint plugin for @studiometa/js-toolkit best practices",
5
5
  "publishConfig": {
6
6
  "access": "public"