Repo Configuration
First, create a configuration file called codeinsights.config.ts
in the root of your repository (.js
and .json
files are also supported)
Then, run the following command:
$ npx @codeinsights/js
Configuration
Name | Type | Default Value | Description |
---|---|---|---|
repoPath | string | null | Absolute path of the repository or GitHub URL |
ignoreFolders | string[] | [] | List of folder names to ignore during the scan (relative path), regex is supported |
useDefaultPlugins | boolean | true | Whether to use the default built-in plugins or not |
plugins | (Plugin|string)[] | DefaultPlugins | List of plugins to be used, can use the Plugin object or the full path |
Plugin
Name | Type | Default Value | Description |
---|---|---|---|
disabled | boolean | false | Disable the plugin |
params | any | null | Custom parameters to pass the plugin |
path | string | null | An absolute path to the plugin, or plugin id if using one of the built-in ones |
Configuration Example
// analyzer.config.json
import { ConfigModel } from '@codeinsights/js';
const config: ConfigModel = {
ignoreFolders: ['node_modules', 'public', 'src/assets'],
plugins: [
'/user/path-to-custom-plugin.ts',
'dependencies', // built-in plugin
{
path: 'html',
params: {
matchPattern: '^mat' // only components from angular material,
},
},
],
};
module.exports = config;