Skip to content

Commit

Permalink
Improve code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
yiwen101 committed Apr 18, 2024
1 parent 9375e98 commit c052a4d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/core/src/utils/htmlValidationUtil.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import cheerio from 'cheerio';
import * as logger from './logger';

export function checkForVueHydrationViolation(content: string, path: string) {
const $ = cheerio.load(content);
logWarningForMissingTbody($, path);
}

function logWarningForMissingTbody(rootNode: cheerio.Root, path: string) {
const tables = rootNode('table');
for (let i = 0; i < tables.length; i += 1) {
Expand All @@ -11,8 +16,3 @@ function logWarningForMissingTbody(rootNode: cheerio.Root, path: string) {
}
}
}

export function checkForVueHydrationViolation(content: string, path: string) {
const $ = cheerio.load(content);
logWarningForMissingTbody($, path);
}

0 comments on commit c052a4d

Please sign in to comment.