marcoroth / stimulus-parser

Statically analyze Stimulus controllers in your project.

Home Page:https://hotwire.io/ecosystem/tooling/stimulus-parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Function `analyzeStaticPropertiesExpressions` needs to take `object` into account

marcoroth opened this issue · comments

Currently, given this file, the targets ["name", "output"] will be assigned to both classes

import { Controller } from "@hotwired/stimulus"

class One extends Controller {}
class Two extends Controller {}

One.targets = ["name", "output"]

Playground: https://stimulus-parser.hotwire.io/#JYWwDg9gTgLgBAbzgYQgOxlCAbbBTKOAXzgDMsQ4AiAAQAsIYB3YKPAEwHoBnGUAV2z9uVAFCiAxtgCG3bnADyaPHDwAPGHjTt5qDFlwFERSTLlwAKkwiqNWnSnSYc+QghOileAHQxpUAHM8GHkAXjgAbSo0aRA8KgAaagh+GDBUqgBdIA