jscpd-config-nick2bad4u
v1.1.1
Published
Shared jscpd configuration for Nick2bad4u TypeScript/npm repositories.
Downloads
4,113
Maintainers
Readme
jscpd-config-nick2bad4u
Shared jscpd copy/paste detector configuration for Nick2bad4u TypeScript and npm repositories.
Install
npm install --save-dev jscpd jscpd-config-nick2bad4uUsage
Point jscpd at the shared config file from consuming repositories:
{
"scripts": {
"lint:jscpd": "jscpd --config node_modules/jscpd-config-nick2bad4u/jscpd.json"
}
}Additional CLI arguments still work through the native jscpd command:
npm run lint:jscpd -- ./src --reporters console,jsonProgrammatic Access
import { jscpdConfigPath, loadJscpdConfig } from "jscpd-config-nick2bad4u";
const jscpdConfig = await loadJscpdConfig();
console.log(jscpdConfigPath);
console.log(jscpdConfig.threshold);The raw JSON file is also exported:
import config from "jscpd-config-nick2bad4u/jscpd.json" with { type: "json" };Defaults
- Respects
.gitignore. - Scans
**/*with broad ignores for generated output, dependency folders, reports, docs, tests, binary/media assets, and common tool config files without suppressing tool package directories. - Uses
mildmatching withminLines: 10,minTokens: 50,maxLines: 10000, andmaxSize: "1mb". - Does not follow symlinks and suppresses jscpd tip output.
- Writes reports to
./reports/jscpd/. - Enables
html,markdown,json,console,badge,xml, andcsvreporters. - Keeps
exitCode: 0andthreshold: 100so duplicate reports are informational unless a consuming repo chooses stricter CLI overrides.
Maintenance
Use docs/UPDATE_CHECKLIST.md when refreshing the shared config or migrating consuming repositories.
