marcoroth/stimulus-lsp

Diagnostic: warn if `data-action` references private controller action (or getter/setter)

marcoroth opened this issue · 0 comments

<div data-controller="hello">
  <button data-action="click->hello#greet">Greet</button>
  <!--                              ^^^^^  
  `data-action` attribute references private method `#greet` on `hello` controller -->
</div>
// hello_controller.js

import { Controller } from "@hotwired/stimulus"

export default class extends Controller {
  #greet() {
    // private
  }
}