diff --git a/packages/knip/src/plugins/angular/index.ts b/packages/knip/src/plugins/angular/index.ts index 441e762ec..630ea8f46 100644 --- a/packages/knip/src/plugins/angular/index.ts +++ b/packages/knip/src/plugins/angular/index.ts @@ -14,8 +14,6 @@ const isEnabled: IsPluginEnabled = ({ dependencies }) => hasDependency(dependenc const config = ['angular.json']; -const production: string[] = []; - const resolveConfig: ResolveConfig = async (config, options) => { const { cwd, configFilePath } = options; @@ -82,6 +80,5 @@ export default { enablers, isEnabled, config, - production, resolveConfig, } satisfies Plugin; diff --git a/packages/knip/src/plugins/linthtml/index.ts b/packages/knip/src/plugins/linthtml/index.ts index 4085082bf..9669e3405 100644 --- a/packages/knip/src/plugins/linthtml/index.ts +++ b/packages/knip/src/plugins/linthtml/index.ts @@ -14,7 +14,7 @@ const enablers = ['@linthtml/linthtml']; const isEnabled: IsPluginEnabled = ({ dependencies }) => hasDependency(dependencies, enablers); -const config: string[] = ['package.json', ...toCosmiconfig('linthtml')]; +const config = ['package.json', ...toCosmiconfig('linthtml')]; const resolveConfig: ResolveConfig = config => { const extensions = config.extends ?? []; diff --git a/packages/knip/src/plugins/nest/index.ts b/packages/knip/src/plugins/nest/index.ts index e1342e4b6..838ee6203 100644 --- a/packages/knip/src/plugins/nest/index.ts +++ b/packages/knip/src/plugins/nest/index.ts @@ -11,7 +11,7 @@ const enablers = [/^@nestjs\/.*/]; const isEnabled: IsPluginEnabled = ({ dependencies }) => hasDependency(dependencies, enablers); -const config: string[] = ['nest-cli.json', '.nestcli.json', '.nest-cli.json', 'nest.json']; +const config = ['nest-cli.json', '.nestcli.json', '.nest-cli.json', 'nest.json']; const resolveConfig: ResolveConfig = async config => { const inputs = config?.collection ? [config.collection] : []; diff --git a/packages/knip/src/plugins/netlify/index.ts b/packages/knip/src/plugins/netlify/index.ts index 9b4b84984..06406b8e2 100644 --- a/packages/knip/src/plugins/netlify/index.ts +++ b/packages/knip/src/plugins/netlify/index.ts @@ -14,12 +14,12 @@ const enablers = [/^@netlify\/plugin-/, 'netlify-cli', '@netlify/functions']; const isEnabled: IsPluginEnabled = ({ dependencies }) => hasDependency(dependencies, enablers); -const config: string[] = ['netlify.toml']; +const config = ['netlify.toml']; const NETLIFY_FUNCTIONS_DIR = 'netlify/functions'; const NETLIFY_FUNCTIONS_EXTS = 'js,mjs,cjs,ts,mts,cts'; -const production: string[] = [`${NETLIFY_FUNCTIONS_DIR}/**/*.{${NETLIFY_FUNCTIONS_EXTS}}`]; +const production = [`${NETLIFY_FUNCTIONS_DIR}/**/*.{${NETLIFY_FUNCTIONS_EXTS}}`]; const resolveEntryPaths: ResolveEntryPaths = localConfig => { return [ diff --git a/packages/knip/src/plugins/simple-git-hooks/index.ts b/packages/knip/src/plugins/simple-git-hooks/index.ts index 027e768ba..ce3ccaecc 100644 --- a/packages/knip/src/plugins/simple-git-hooks/index.ts +++ b/packages/knip/src/plugins/simple-git-hooks/index.ts @@ -13,7 +13,7 @@ const isEnabled: IsPluginEnabled = ({ dependencies }) => hasDependency(dependenc const packageJsonPath = 'simple-git-hooks'; -const config: string[] = [ +const config = [ '.simple-git-hooks.{js,cjs}', 'simple-git-hooks.{js,cjs}', '.simple-git-hooks.json', diff --git a/packages/knip/src/plugins/syncpack/index.ts b/packages/knip/src/plugins/syncpack/index.ts index a943b48ef..16363d4dd 100644 --- a/packages/knip/src/plugins/syncpack/index.ts +++ b/packages/knip/src/plugins/syncpack/index.ts @@ -2,7 +2,7 @@ import type { IsPluginEnabled, Plugin } from '../../types/config.js'; import { toCosmiconfig } from '../../util/plugin-config.js'; import { hasDependency } from '../../util/plugin.js'; -// link to syncpack docs https://jamiemason.github.io/syncpack/config/syncpackrc/ +// https://jamiemason.github.io/syncpack/config/syncpackrc/ const title = 'Syncpack'; diff --git a/packages/knip/src/plugins/xo/index.ts b/packages/knip/src/plugins/xo/index.ts index d4f47d918..9a7c7be12 100644 --- a/packages/knip/src/plugins/xo/index.ts +++ b/packages/knip/src/plugins/xo/index.ts @@ -3,8 +3,7 @@ import { hasDependency } from '../../util/plugin.js'; import { getDependencies } from '../eslint/helpers.js'; import type { XOConfig } from './types.js'; -// link to xo docs: https://github.com/xojs/xo#config -// Uses custom cosmiconfig search paths +// https://github.com/xojs/xo#config // https://github.com/xojs/xo/blob/ee9f0a3d72d55df098fc321c4d54a1ea3804e226/lib/constants.js const title = 'xo'; @@ -14,10 +13,9 @@ const enablers = ['xo']; const isEnabled: IsPluginEnabled = ({ dependencies, config }) => hasDependency(dependencies, enablers) || 'xo' in config; -const packageJsonPath = 'xo'; const config = ['package.json', '.xo-config', '.xo-config.{js,cjs,json}', 'xo.config.{js,cjs}']; -const entry: string[] = ['.xo-config.{js,cjs}', 'xo.config.{js,cjs}']; +const entry = ['.xo-config.{js,cjs}', 'xo.config.{js,cjs}']; const resolveConfig: ResolveConfig = async (config, options) => { const inputs = getDependencies(config, options); @@ -28,7 +26,6 @@ export default { title, enablers, isEnabled, - packageJsonPath, entry, config, resolveConfig,