Skip to content

Commit

Permalink
refactor: use biome instead of eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin committed Jul 12, 2024
1 parent 226e3ce commit df1fd82
Show file tree
Hide file tree
Showing 5 changed files with 3,656 additions and 6,120 deletions.
23 changes: 0 additions & 23 deletions .eslintrc

This file was deleted.

12 changes: 12 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
8 changes: 4 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ const plugin = (options = {}) => tree => {

// Don't parse nested tags, just remove them
if (Array.isArray(node.content)) {
node.content.forEach(line => {
for (const line of node.content) {
if (line.tag && [options.tag, `not-${options.tag}`].includes(line.tag)) {
line.tag = false
}
})
}
}

// default behavior
Expand All @@ -57,11 +57,11 @@ const plugin = (options = {}) => tree => {
if (items.length > 1) {
let conditions = []

items.forEach(item => {
for (const item of items) {
if (versions[item]) {
conditions.push(`(mso ${versions[item]})`)
}
})
}

conditions = [...new Set(conditions)]
conditions = conditions.length > 1 ? conditions.join('|') : conditions[0].replace(/[()]/g, '')
Expand Down
Loading

0 comments on commit df1fd82

Please sign in to comment.