Actions
Create dynamic suggestions for your rules with Actions.
Heads up!
See vale-ls for an easy way to integrate Actions into your favorite text editor.
Actions provide a way for users to define dynamic fixes for their custom rules that show up in the CLI and LSP-based integrations.

In the Sublime Text example above, the “Quick Fix” menu is powered by the action defined in the rule definition:
See the documentation on each action type for more information:
Most Vale rules are based on static suggestions—for example,
Here, the action is a to replaceJavascript with JavaScript. In such cases, we know what we want to suggest to the user ahead of time and Vale can easily generate the appropriate output message.
However, there are cases in which we don’t know the appropriate suggestion ahead of time. For example, consider the following rule:
This rule is designed to catch instances of snake_case and suggest that the user convert to kebab-case. In this case, the exact suggestion is dependent on a string transformation that needs to be computed at runtime.
Using the edit action allows us to define a rule that can dynamically generate suggestions based on the matched text in CLI output:

As you can see, the CLI output is dynamically computing the suggestion based on the matched text.
In both static and dynamic cases, any application that uses the Vale Language Server will be able to provide the user with a list of “Quick Fixes” that can be applied to the document.
