Install the Komaci Static Analyzer
The Komaci static analyser is an ESLint plugin that you install using a package manager,
such as NPM or Yarn.
-
Add the Komaci Static Analyzer plugin and its dependencies to the development dependencies
of your project.
NPMYARN
-
Install all project modules and dependencies locally in the project.
YARN
-
Configure your project to use the new plugin.
Configuration depends on your ESLint version. Add your configuration at the root directory of your LWC "tree", which by default resides at force-app/main/default/lwc/.ESLint 9 and later (Flat Config)
Use the recommended config in your eslint.config.js and eslint.config.mjs file.
eslint.config.js
eslint.config.mjs
ESLint 8 and earlier (Legacy Config)The configurations for legacy ESLint are now found in extensions with the -legacy suffix. An example of this is the following .eslintrc.json file, which sets up the eslint-plugin-lwc-graph-analyzer plugin using the recommended-legacy configuration: