eslint-plugin-kepler, provides automated linting rules for Vega apps, helping you discover and fix performance and compatibility issues.
Prerequisites
Install the plugin and its dependencies:Configure the plugin
-
Update
extends,plugins, andoverridessections of your.eslintrcconfiguration file:The plugin configurations include:performance- Performance-related rules onlysystem-distributed-libs- System distributed library checks only (package.json validation and import informational flagging)
performanceandsystem-distributed-libstogether to achieve the same result. - (Optional) Customize lint rules following ESLint’s configure rules guide. For rules provided by Vega ESLint plugin, see Understand the performance rules.
-
Specify custom formatter in
package.json: -
Run the linter:
You can see the result on the console:
The linter also generates an HTML report:
You can check these linter warnings on VS Code while hovering over your code:
Understand the performance rules
The following rules help identify common performance issues in Vega apps and enforce best practices for optimal runtime performance.Understand the system distributed library rules
The following rules detect system distributed library usage and guide you on proper implementation.(Optional) Configure semantic version guidance
The system distributed library rules check semantic versioning in your package.json dependencies. By default, the plugin uses auto mode to detect your project’s versioning settings. Override the default by setting thesemverGuidance option:
- Patch only mode (
semverGuidance: "patch"): Restricts updates to patches using~prefix. - Minor and patch mode (
semverGuidance: "minor"): Allows minor updates using^prefix. - Auto mode (
semverGuidance: "auto"): Detects settings based on project signatures in the project repo. This is the default.
(Optional) Configure VS Code for JSON validation
If you want to see errors and warnings in VS Code’spackage.json, add json to these settings.json entries:

