Skip to content

Commit 342324e

Browse files
committed
Refactor category validation to use consistent VALID_CATEGORIES constant
1 parent 5fcc741 commit 342324e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/docs/buildDocsCommon.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const SERVICES_DOCS_DIR = './docs/services';
1010
const COMPOSITE_DOCS_DIR = './docs/composite';
1111
const FOUNDATION_DOCS_DIR = './docs/foundation';
1212

13-
const VALID_COMPONENTS_CATEGORIES = [
13+
const VALID_CATEGORIES = [
1414
'foundation',
1515
'basic',
1616
'assets',
@@ -75,7 +75,7 @@ function processComponents(components) {
7575
const isParentComponent = parentComponents.includes(componentName);
7676
const isIncubatorComponent = component.category === 'incubator';
7777

78-
if (!VALID_COMPONENTS_CATEGORIES.includes(component.category)) {
78+
if (!VALID_CATEGORIES.includes(component.category)) {
7979
console.error(`${componentName} has invalid category "${component.category}"`);
8080
}
8181

0 commit comments

Comments
 (0)