Skip to content

Commit

Permalink
chore: tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
pengzhanbo committed Aug 20, 2024
1 parent ac45e0a commit 6287124
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const ROOT = path.resolve(fileURLToPath(import.meta.url), '..')
const E2E_DIR = path.resolve(ROOT, 'e2e')
const PLUGINS_DIRS = fs
.readdirSync(path.resolve(ROOT, 'plugins'))
.filter((category) =>
fs.statSync(path.resolve(ROOT, `./plugins/${category}`)).isDirectory(),
)
.flatMap((category) =>
fs
.readdirSync(path.resolve(ROOT, `./plugins/${category}`))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ export const createNotationRule = (
return match[0]
})

if (
replaced &&
!(node.content = node.content.replace(COMMENT_EMPTY_TAG, '')).trim()
) {
nodeRemove.push(node)
if (replaced) {
node.content = node.content.replace(COMMENT_EMPTY_TAG, '')
if (!node.content.trim()) nodeRemove.push(node)
}
})
for (const node of nodeRemove)
Expand Down

0 comments on commit 6287124

Please sign in to comment.