[{"data":1,"prerenderedAt":1039},["ShallowReactive",2],{"navigation_docs":3,"-ci-and-hooks-pre-commit":129,"-ci-and-hooks-pre-commit-surround":1034},[4,45,62,88,108],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15,20,25,30,35,40],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F2.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F3.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F4.configuration","i-lucide-settings",{"title":26,"path":27,"stem":28,"icon":29},"Supported Formats","\u002Fgetting-started\u002Fsupported-formats","1.getting-started\u002F5.supported-formats","i-lucide-file-code",{"title":31,"path":32,"stem":33,"icon":34},"Agent Skill","\u002Fgetting-started\u002Fagent-skill","1.getting-started\u002F6.agent-skill","i-lucide-cpu",{"title":36,"path":37,"stem":38,"icon":39},"Changelog","\u002Fgetting-started\u002Fchangelog","1.getting-started\u002F7.changelog","i-lucide-scroll-text",{"title":41,"path":42,"stem":43,"icon":44},"Migrating from v4 to v5","\u002Fgetting-started\u002Fmigration","1.getting-started\u002F8.migration","i-lucide-arrow-right-left",{"title":46,"path":47,"stem":48,"children":49,"icon":6},"CI & Hooks","\u002Fci-and-hooks","2.ci-and-hooks\u002F1.index",[50,52,57],{"title":46,"path":47,"stem":48,"icon":51},"i-lucide-git-pull-request",{"title":53,"path":54,"stem":55,"icon":56},"Use jscpd in CI","\u002Fci-and-hooks\u002Fci","2.ci-and-hooks\u002F2.ci","i-lucide-github",{"title":58,"path":59,"stem":60,"icon":61},"Use jscpd in Pre-Commit Hook","\u002Fci-and-hooks\u002Fpre-commit","2.ci-and-hooks\u002F3.pre-commit","i-lucide-git-commit",{"title":63,"path":64,"stem":65,"children":66,"icon":68},"Reporters","\u002Freporters","3.reporters\u002F1.index",[67,69,73,78,83],{"title":63,"path":64,"stem":65,"icon":68},"i-lucide-file-chart-column",{"title":70,"path":71,"stem":72,"icon":29},"HTML Reporter","\u002Freporters\u002Fhtml","3.reporters\u002F2.html",{"title":74,"path":75,"stem":76,"icon":77},"JSON Reporter","\u002Freporters\u002Fjson","3.reporters\u002F3.json","i-lucide-braces",{"title":79,"path":80,"stem":81,"icon":82},"Badge Reporter","\u002Freporters\u002Fbadge","3.reporters\u002F4.badge","i-lucide-award",{"title":84,"path":85,"stem":86,"icon":87},"SARIF Reporter","\u002Freporters\u002Fsarif","3.reporters\u002F5.sarif","i-lucide-shield-check",{"title":89,"icon":6,"path":90,"stem":91,"children":92,"page":6},"Benchmarks","\u002Fbenchmarks","4.benchmarks",[93,98,103],{"title":94,"path":95,"stem":96,"icon":97},"Detection Speed","\u002Fbenchmarks\u002Fdetection-speed","4.benchmarks\u002F1.detection-speed","i-lucide-zap",{"title":99,"path":100,"stem":101,"icon":102},"Multi-Format Detection","\u002Fbenchmarks\u002Fcross-format","4.benchmarks\u002F2.cross-format","i-lucide-layers",{"title":104,"path":105,"stem":106,"icon":107},"AI Token Efficiency","\u002Fbenchmarks\u002Fai-token-efficiency","4.benchmarks\u002F3.ai-token-efficiency","i-lucide-sparkles",{"title":109,"path":110,"stem":111,"children":112,"icon":114},"API","\u002Fapi","5.api\u002F1.index",[113,115,120,125],{"title":109,"path":110,"stem":111,"icon":114},"i-lucide-code",{"title":116,"path":117,"stem":118,"icon":119},"Rust Crates (v5)","\u002Fapi\u002Fcore","5.api\u002F2.core","i-lucide-box",{"title":121,"path":122,"stem":123,"icon":124},"Server API","\u002Fapi\u002Fserver","5.api\u002F3.server","i-lucide-server",{"title":126,"path":127,"stem":128,"icon":119},"MCP Server","\u002Fapi\u002Fmcp-server","5.api\u002F4.mcp-server",{"id":130,"title":58,"body":131,"description":137,"extension":1027,"links":1028,"meta":1029,"navigation":1030,"path":59,"seo":1031,"stem":60,"__hash__":1033},"docs\u002F2.ci-and-hooks\u002F3.pre-commit.md",{"type":132,"value":133,"toc":1009},"minimark",[134,138,143,159,164,244,248,255,265,431,440,550,560,564,576,582,585,603,607,635,638,663,667,673,677,683,700,703,719,725,729,736,754,757,764,767,786,791,803,817,831,844,852,858,915,928,932,955,962,966,1005],[135,136,137],"p",{},"Run jscpd before every commit to prevent duplicated code from entering the repository.",[139,140,142],"h2",{"id":141},"using-pre-commit-framework","Using pre-commit framework",[135,144,145,146,153,154,158],{},"The ",[147,148,152],"a",{"href":149,"rel":150},"https:\u002F\u002Fpre-commit.com",[151],"nofollow","pre-commit"," framework manages git hooks for you. After configuring the hook, it runs automatically on every ",[155,156,157],"code",{},"git commit",".",[160,161,163],"h3",{"id":162},"install-pre-commit","Install pre-commit",[165,166,172],"pre",{"className":167,"code":168,"filename":169,"language":170,"meta":171,"style":171},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# pip\npip install pre-commit\n\n# brew\nbrew install pre-commit\n\n# npm (wrapper around the Python tool)\nnpm install -g pre-commit\n","Terminal","bash","",[155,173,174,183,197,204,210,220,225,231],{"__ignoreMap":171},[175,176,179],"span",{"class":177,"line":178},"line",1,[175,180,182],{"class":181},"sHwdD","# pip\n",[175,184,186,190,194],{"class":177,"line":185},2,[175,187,189],{"class":188},"sBMFI","pip",[175,191,193],{"class":192},"sfazB"," install",[175,195,196],{"class":192}," pre-commit\n",[175,198,200],{"class":177,"line":199},3,[175,201,203],{"emptyLinePlaceholder":202},true,"\n",[175,205,207],{"class":177,"line":206},4,[175,208,209],{"class":181},"# brew\n",[175,211,213,216,218],{"class":177,"line":212},5,[175,214,215],{"class":188},"brew",[175,217,193],{"class":192},[175,219,196],{"class":192},[175,221,223],{"class":177,"line":222},6,[175,224,203],{"emptyLinePlaceholder":202},[175,226,228],{"class":177,"line":227},7,[175,229,230],{"class":181},"# npm (wrapper around the Python tool)\n",[175,232,234,237,239,242],{"class":177,"line":233},8,[175,235,236],{"class":188},"npm",[175,238,193],{"class":192},[175,240,241],{"class":192}," -g",[175,243,196],{"class":192},[160,245,247],{"id":246},"add-the-hook-config","Add the hook config",[135,249,250,251,254],{},"Add the hook config to ",[155,252,253],{},".pre-commit-config.yaml"," in your repo.",[135,256,257,264],{},[258,259,260,261],"strong",{},"Option A: ",[155,262,263],{},"language: node"," — pre-commit installs jscpd automatically:",[165,266,270],{"className":267,"code":268,"filename":253,"language":269,"meta":171,"style":171},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","repos:\n  - repo: local\n    hooks:\n      - id: jscpd\n        name: jscpd - copy\u002Fpaste detector\n        entry: jscpd\n        language: node\n        additional_dependencies: ['jscpd@5']\n        args: [--threshold, \"5\", --reporters, console,silent]\n        pass_filenames: false\n        always_run: true\n","yaml",[155,271,272,282,296,303,316,326,335,345,366,408,420],{"__ignoreMap":171},[175,273,274,278],{"class":177,"line":178},[175,275,277],{"class":276},"swJcz","repos",[175,279,281],{"class":280},"sMK4o",":\n",[175,283,284,287,290,293],{"class":177,"line":185},[175,285,286],{"class":280},"  -",[175,288,289],{"class":276}," repo",[175,291,292],{"class":280},":",[175,294,295],{"class":192}," local\n",[175,297,298,301],{"class":177,"line":199},[175,299,300],{"class":276},"    hooks",[175,302,281],{"class":280},[175,304,305,308,311,313],{"class":177,"line":206},[175,306,307],{"class":280},"      -",[175,309,310],{"class":276}," id",[175,312,292],{"class":280},[175,314,315],{"class":192}," jscpd\n",[175,317,318,321,323],{"class":177,"line":212},[175,319,320],{"class":276},"        name",[175,322,292],{"class":280},[175,324,325],{"class":192}," jscpd - copy\u002Fpaste detector\n",[175,327,328,331,333],{"class":177,"line":222},[175,329,330],{"class":276},"        entry",[175,332,292],{"class":280},[175,334,315],{"class":192},[175,336,337,340,342],{"class":177,"line":227},[175,338,339],{"class":276},"        language",[175,341,292],{"class":280},[175,343,344],{"class":192}," node\n",[175,346,347,350,352,355,358,361,363],{"class":177,"line":233},[175,348,349],{"class":276},"        additional_dependencies",[175,351,292],{"class":280},[175,353,354],{"class":280}," [",[175,356,357],{"class":280},"'",[175,359,360],{"class":192},"jscpd@5",[175,362,357],{"class":280},[175,364,365],{"class":280},"]\n",[175,367,369,372,374,376,379,382,385,388,391,393,396,398,401,403,406],{"class":177,"line":368},9,[175,370,371],{"class":276},"        args",[175,373,292],{"class":280},[175,375,354],{"class":280},[175,377,378],{"class":192},"--threshold",[175,380,381],{"class":280},",",[175,383,384],{"class":280}," \"",[175,386,387],{"class":192},"5",[175,389,390],{"class":280},"\"",[175,392,381],{"class":280},[175,394,395],{"class":192}," --reporters",[175,397,381],{"class":280},[175,399,400],{"class":192}," console",[175,402,381],{"class":280},[175,404,405],{"class":192},"silent",[175,407,365],{"class":280},[175,409,411,414,416],{"class":177,"line":410},10,[175,412,413],{"class":276},"        pass_filenames",[175,415,292],{"class":280},[175,417,419],{"class":418},"sfNiH"," false\n",[175,421,423,426,428],{"class":177,"line":422},11,[175,424,425],{"class":276},"        always_run",[175,427,292],{"class":280},[175,429,430],{"class":418}," true\n",[135,432,433,439],{},[258,434,435,436],{},"Option B: ",[155,437,438],{},"language: system"," — jscpd must be pre-installed globally:",[165,441,443],{"className":267,"code":442,"filename":253,"language":269,"meta":171,"style":171},"repos:\n  - repo: local\n    hooks:\n      - id: jscpd\n        name: jscpd - copy\u002Fpaste detector\n        entry: jscpd\n        language: system\n        args: [--threshold, \"5\", --reporters, console,silent]\n        pass_filenames: false\n        always_run: true\n",[155,444,445,451,461,467,477,485,493,502,534,542],{"__ignoreMap":171},[175,446,447,449],{"class":177,"line":178},[175,448,277],{"class":276},[175,450,281],{"class":280},[175,452,453,455,457,459],{"class":177,"line":185},[175,454,286],{"class":280},[175,456,289],{"class":276},[175,458,292],{"class":280},[175,460,295],{"class":192},[175,462,463,465],{"class":177,"line":199},[175,464,300],{"class":276},[175,466,281],{"class":280},[175,468,469,471,473,475],{"class":177,"line":206},[175,470,307],{"class":280},[175,472,310],{"class":276},[175,474,292],{"class":280},[175,476,315],{"class":192},[175,478,479,481,483],{"class":177,"line":212},[175,480,320],{"class":276},[175,482,292],{"class":280},[175,484,325],{"class":192},[175,486,487,489,491],{"class":177,"line":222},[175,488,330],{"class":276},[175,490,292],{"class":280},[175,492,315],{"class":192},[175,494,495,497,499],{"class":177,"line":227},[175,496,339],{"class":276},[175,498,292],{"class":280},[175,500,501],{"class":192}," system\n",[175,503,504,506,508,510,512,514,516,518,520,522,524,526,528,530,532],{"class":177,"line":233},[175,505,371],{"class":276},[175,507,292],{"class":280},[175,509,354],{"class":280},[175,511,378],{"class":192},[175,513,381],{"class":280},[175,515,384],{"class":280},[175,517,387],{"class":192},[175,519,390],{"class":280},[175,521,381],{"class":280},[175,523,395],{"class":192},[175,525,381],{"class":280},[175,527,400],{"class":192},[175,529,381],{"class":280},[175,531,405],{"class":192},[175,533,365],{"class":280},[175,535,536,538,540],{"class":177,"line":368},[175,537,413],{"class":276},[175,539,292],{"class":280},[175,541,419],{"class":418},[175,543,544,546,548],{"class":177,"line":410},[175,545,425],{"class":276},[175,547,292],{"class":280},[175,549,430],{"class":418},[135,551,552,553,556,557,158],{},"If using Option B, install jscpd globally first: ",[155,554,555],{},"npm install -g jscpd@5"," or ",[155,558,559],{},"cargo install jscpd",[160,561,563],{"id":562},"install-the-hook-into-git","Install the hook into git",[165,565,567],{"className":167,"code":566,"filename":169,"language":170,"meta":171,"style":171},"pre-commit install\n",[155,568,569],{"__ignoreMap":171},[175,570,571,573],{"class":177,"line":178},[175,572,152],{"class":188},[175,574,575],{"class":192}," install\n",[135,577,578,579,581],{},"jscpd now runs on every ",[155,580,157],{},". If duplication exceeds the threshold, the commit is blocked.",[135,583,584],{},"To run manually without committing:",[165,586,588],{"className":167,"code":587,"filename":169,"language":170,"meta":171,"style":171},"pre-commit run jscpd --all-files\n",[155,589,590],{"__ignoreMap":171},[175,591,592,594,597,600],{"class":177,"line":178},[175,593,152],{"class":188},[175,595,596],{"class":192}," run",[175,598,599],{"class":192}," jscpd",[175,601,602],{"class":192}," --all-files\n",[139,604,606],{"id":605},"using-husky","Using Husky",[165,608,610],{"className":167,"code":609,"filename":169,"language":170,"meta":171,"style":171},"npm install -D husky\nnpx husky init\n",[155,611,612,624],{"__ignoreMap":171},[175,613,614,616,618,621],{"class":177,"line":178},[175,615,236],{"class":188},[175,617,193],{"class":192},[175,619,620],{"class":192}," -D",[175,622,623],{"class":192}," husky\n",[175,625,626,629,632],{"class":177,"line":185},[175,627,628],{"class":188},"npx",[175,630,631],{"class":192}," husky",[175,633,634],{"class":192}," init\n",[135,636,637],{},"Add the hook:",[165,639,641],{"className":167,"code":640,"filename":169,"language":170,"meta":171,"style":171},"echo 'npx jscpd@5 --threshold 5 --reporters console,silent .' > .husky\u002Fpre-commit\n",[155,642,643],{"__ignoreMap":171},[175,644,645,649,652,655,657,660],{"class":177,"line":178},[175,646,648],{"class":647},"s2Zo4","echo",[175,650,651],{"class":280}," '",[175,653,654],{"class":192},"npx jscpd@5 --threshold 5 --reporters console,silent .",[175,656,357],{"class":280},[175,658,659],{"class":280}," >",[175,661,662],{"class":192}," .husky\u002Fpre-commit\n",[139,664,666],{"id":665},"manual-git-hook","Manual git hook",[135,668,669,670,158],{},"No extra tools required — just a shell script in ",[155,671,672],{},".git\u002Fhooks\u002F",[160,674,676],{"id":675},"create-the-hook","Create the hook",[135,678,679,680,292],{},"Create ",[155,681,682],{},".git\u002Fhooks\u002Fpre-commit",[165,684,688],{"className":685,"code":686,"filename":682,"language":687,"meta":171,"style":171},"language-sh shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","#!\u002Fbin\u002Fsh\njscpd --threshold 5 --reporters console,silent .\n","sh",[155,689,690,695],{"__ignoreMap":171},[175,691,692],{"class":177,"line":178},[175,693,694],{},"#!\u002Fbin\u002Fsh\n",[175,696,697],{"class":177,"line":185},[175,698,699],{},"jscpd --threshold 5 --reporters console,silent .\n",[135,701,702],{},"Make it executable:",[165,704,706],{"className":167,"code":705,"filename":169,"language":170,"meta":171,"style":171},"chmod +x .git\u002Fhooks\u002Fpre-commit\n",[155,707,708],{"__ignoreMap":171},[175,709,710,713,716],{"class":177,"line":178},[175,711,712],{"class":188},"chmod",[175,714,715],{"class":192}," +x",[175,717,718],{"class":192}," .git\u002Fhooks\u002Fpre-commit\n",[135,720,721,722,724],{},"Hooks in ",[155,723,672],{}," are not version-controlled. To share the hook with your team, store it in the repo and symlink or copy it.",[160,726,728],{"id":727},"option-a-symlink-from-a-versioned-script","Option A: Symlink from a versioned script",[135,730,731,732,735],{},"Store the hook logic in the repo (e.g. ",[155,733,734],{},"scripts\u002Fpre-commit","), then symlink:",[165,737,739],{"className":167,"code":738,"filename":169,"language":170,"meta":171,"style":171},"ln -s ..\u002F..\u002Fscripts\u002Fpre-commit .git\u002Fhooks\u002Fpre-commit\n",[155,740,741],{"__ignoreMap":171},[175,742,743,746,749,752],{"class":177,"line":178},[175,744,745],{"class":188},"ln",[175,747,748],{"class":192}," -s",[175,750,751],{"class":192}," ..\u002F..\u002Fscripts\u002Fpre-commit",[175,753,718],{"class":192},[135,755,756],{},"Each developer runs the symlink command once after cloning.",[160,758,435,760,763],{"id":759},"option-b-corehookspath-git-29",[155,761,762],{},"core.hooksPath"," (Git 2.9+)",[135,765,766],{},"Point Git at a versioned hooks directory:",[165,768,770],{"className":167,"code":769,"filename":169,"language":170,"meta":171,"style":171},"git config core.hooksPath .githooks\n",[155,771,772],{"__ignoreMap":171},[175,773,774,777,780,783],{"class":177,"line":178},[175,775,776],{"class":188},"git",[175,778,779],{"class":192}," config",[175,781,782],{"class":192}," core.hooksPath",[175,784,785],{"class":192}," .githooks\n",[135,787,679,788,292],{},[155,789,790],{},".githooks\u002Fpre-commit",[165,792,793],{"className":685,"code":686,"filename":790,"language":687,"meta":171,"style":171},[155,794,795,799],{"__ignoreMap":171},[175,796,797],{"class":177,"line":178},[175,798,694],{},[175,800,801],{"class":177,"line":185},[175,802,699],{},[165,804,806],{"className":167,"code":805,"filename":169,"language":170,"meta":171,"style":171},"chmod +x .githooks\u002Fpre-commit\n",[155,807,808],{"__ignoreMap":171},[175,809,810,812,814],{"class":177,"line":178},[175,811,712],{"class":188},[175,813,715],{"class":192},[175,815,816],{"class":192}," .githooks\u002Fpre-commit\n",[135,818,819,820,823,824,827,828,292],{},"Commit ",[155,821,822],{},".githooks\u002F"," to the repo. New contributors run the ",[155,825,826],{},"git config"," command once after cloning. Add it to your onboarding docs or a ",[155,829,830],{},"scripts\u002Fsetup.sh",[165,832,834],{"className":685,"code":833,"filename":830,"language":687,"meta":171,"style":171},"#!\u002Fbin\u002Fsh\ngit config core.hooksPath .githooks\n",[155,835,836,840],{"__ignoreMap":171},[175,837,838],{"class":177,"line":178},[175,839,694],{},[175,841,842],{"class":177,"line":185},[175,843,769],{},[160,845,847,848,851],{"id":846},"option-c-npm-prepare-script","Option C: npm ",[155,849,850],{},"prepare"," script",[135,853,854,855,292],{},"Add to ",[155,856,857],{},"package.json",[165,859,863],{"className":860,"code":861,"filename":857,"language":862,"meta":171,"style":171},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"scripts\": {\n    \"prepare\": \"git config core.hooksPath .githooks\"\n  }\n}\n","json",[155,864,865,870,886,905,910],{"__ignoreMap":171},[175,866,867],{"class":177,"line":178},[175,868,869],{"class":280},"{\n",[175,871,872,875,879,881,883],{"class":177,"line":185},[175,873,874],{"class":280},"  \"",[175,876,878],{"class":877},"spNyl","scripts",[175,880,390],{"class":280},[175,882,292],{"class":280},[175,884,885],{"class":280}," {\n",[175,887,888,891,893,895,897,899,902],{"class":177,"line":199},[175,889,890],{"class":280},"    \"",[175,892,850],{"class":188},[175,894,390],{"class":280},[175,896,292],{"class":280},[175,898,384],{"class":280},[175,900,901],{"class":192},"git config core.hooksPath .githooks",[175,903,904],{"class":280},"\"\n",[175,906,907],{"class":177,"line":206},[175,908,909],{"class":280},"  }\n",[175,911,912],{"class":177,"line":212},[175,913,914],{"class":280},"}\n",[135,916,917,920,921,924,925,927],{},[155,918,919],{},"npm install"," (and ",[155,922,923],{},"npm ci",") automatically run ",[155,926,850],{},", so the hooks path is set with no manual steps.",[160,929,931],{"id":930},"option-d-makefile","Option D: Makefile",[165,933,938],{"className":934,"code":935,"filename":936,"language":937,"meta":171,"style":171},"language-makefile shiki shiki-themes material-theme-lighter material-theme material-theme-palenight",".PHONY: hooks\nhooks:\n    git config core.hooksPath .githooks\n","Makefile","makefile",[155,939,940,945,950],{"__ignoreMap":171},[175,941,942],{"class":177,"line":178},[175,943,944],{},".PHONY: hooks\n",[175,946,947],{"class":177,"line":185},[175,948,949],{},"hooks:\n",[175,951,952],{"class":177,"line":199},[175,953,954],{},"    git config core.hooksPath .githooks\n",[135,956,957,958,961],{},"Contributors run ",[155,959,960],{},"make hooks"," after cloning.",[139,963,965],{"id":964},"tips","Tips",[967,968,969,977,982,988,998],"ul",{},[970,971,972,973,976],"li",{},"Use ",[155,974,975],{},"--reporters console,silent"," to show clone details without writing report files on every commit",[970,978,972,979,981],{},[155,980,378],{}," to set a failure threshold — the hook exits with code 1 if exceeded",[970,983,972,984,987],{},[155,985,986],{},"--ignore"," to exclude generated files, test fixtures, or vendor directories",[970,989,990,991,993,994,997],{},"For large repos, use the Rust engine (",[155,992,360],{}," \u002F ",[155,995,996],{},"cpd",") — it runs 24-37x faster, keeping commit latency low",[970,999,1000,1001,1004],{},"Consider ",[155,1002,1003],{},"--format"," to limit detection to specific languages during the hook, with a full scan in CI",[1006,1007,1008],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}",{"title":171,"searchDepth":185,"depth":185,"links":1010},[1011,1016,1017,1026],{"id":141,"depth":185,"text":142,"children":1012},[1013,1014,1015],{"id":162,"depth":199,"text":163},{"id":246,"depth":199,"text":247},{"id":562,"depth":199,"text":563},{"id":605,"depth":185,"text":606},{"id":665,"depth":185,"text":666,"children":1018},[1019,1020,1021,1023,1025],{"id":675,"depth":199,"text":676},{"id":727,"depth":199,"text":728},{"id":759,"depth":199,"text":1022},"Option B: core.hooksPath (Git 2.9+)",{"id":846,"depth":199,"text":1024},"Option C: npm prepare script",{"id":930,"depth":199,"text":931},{"id":964,"depth":185,"text":965},"md",null,{},{"icon":61},{"title":58,"description":1032},"Configure jscpd as a pre-commit hook using the pre-commit framework, Husky, or manual git hooks to block commits with excessive code duplication.","0rdss_cApXe6kTiPFEUV6s1bV414wwrZQByaUytqrGk",[1035,1037],{"title":53,"path":54,"stem":55,"description":1036,"icon":56,"children":-1},"Run jscpd in GitHub Actions, GitLab CI, and other CI systems to enforce duplication thresholds.",{"title":63,"path":64,"stem":65,"description":1038,"icon":68,"children":-1},"Output formats and reporters in jscpd.",1782123773346]