Skip to content

Commit cbf9031

Browse files
slorberclaude
andauthored
refactor: remove the remaining dead code leftovers (AI-assisted) (#12751)
- docs: remove the unused CategoryMetadataFilenameBase constant - debug: remove the unused .active CSS class - remove commented-out code leftovers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b5440da commit cbf9031

6 files changed

Lines changed: 0 additions & 10 deletions

File tree

‎packages/docusaurus-mdx-loader/src/remark/contentTitle/index.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ const plugin: Plugin<PluginOptions[], Root> = function plugin(
4545
return undefined;
4646
}
4747
if (node.type === 'heading') {
48-
// console.log('headingNode:', headingNode);
49-
5048
if (node.depth === 1) {
5149
vfile.data.contentTitle = toString(node);
5250
if (removeContentTitle) {

‎packages/docusaurus-plugin-content-docs/src/sidebars/generator.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ function getLocalDocId(docId: string): string {
2626
return _.last(docId.split('/'))!;
2727
}
2828

29-
export const CategoryMetadataFilenameBase = '_category_';
3029
export const CategoryMetadataFilenamePattern = '_category_.{json,yml,yaml}';
3130

3231
type WithPosition<T> = T & {

‎packages/docusaurus-plugin-content-docs/src/sidebars/validation.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ const sidebarItemSchema = Joi.object<SidebarItemConfig>().when('.type', {
143143
},
144144
],
145145
});
146-
// .id('sidebarItemSchema');
147146

148147
function validateSidebarItem(
149148
item: unknown,

‎packages/docusaurus-plugin-debug/src/theme/DebugLayout/styles.module.css‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@
4444
background-color: #292a2b;
4545
}
4646

47-
.active {
48-
background-color: #363739;
49-
}
50-
5147
@media screen and (width >= 800px) {
5248
.nav {
5349
flex-direction: column;

‎packages/docusaurus-theme-common/src/hooks/useTOCHighlight.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ export function useTOCHighlight(config: TOCHighlightConfig | undefined): void {
155155
}
156156
link.classList.add(linkActiveClassName);
157157
lastActiveLinkRef.current = link;
158-
// link.scrollIntoView({block: 'nearest'});
159158
} else {
160159
link.classList.remove(linkActiveClassName);
161160
}

‎packages/docusaurus-theme-common/src/utils/emojiUtils.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export function extractLeadingEmoji(input: string): {
2222
} {
2323
const it = segmenter.segment(input)[Symbol.iterator]();
2424

25-
// const first = segmenter.segment(input).containing(0)?.segment;
2625
const grapheme = it.next().value?.segment;
2726

2827
if (!grapheme) {

0 commit comments

Comments
 (0)