1
0
Fork 0

everything passes lint

This commit is contained in:
Enoch Riese 2022-12-03 11:25:02 -06:00
parent e28ca4ea86
commit 477a4d93f5
24 changed files with 304 additions and 303 deletions

View file

@ -21,7 +21,7 @@ export default (userOptions = {}) => {
...userOptions,
}
const splitParams = (node, i, parent) => {
const splitParams = (node) => {
if (node.children.length === 1 && node.children[0].type === 'text') {
const content = node.children[0].value.split('\n')
node.children = content.map((value) =>
@ -42,7 +42,6 @@ export default (userOptions = {}) => {
// Keep track of whether we've opened a highlight block
let isOpen = 0
let children = {}
let variant
// Detect opening or closing comment
const isOpeningOrClosingComment = (node) => {
@ -64,12 +63,6 @@ export default (userOptions = {}) => {
return [false, 'highlight']
}
// Detect opening comment
const isOpeningComment = (node) =>
node.tagName === options.commentTag && node.properties?.className === options.commentClass
? true
: false
// Visitor method
const visitor = (node, i, parent) => {
const [type, variant] = isOpeningOrClosingComment(node)