Biome 2.0 with format (#510)

* execute migrate command

* migrate to v2

* update config

* supress linter error
This commit is contained in:
Katsuyuki Karasawa
2025-06-18 23:01:28 +09:00
committed by GitHub
parent dd929f87f1
commit 9130765d45
25 changed files with 96 additions and 73 deletions
@@ -6,7 +6,8 @@ import { definePlugin } from "@expressive-code/core";
export function pluginLanguageBadge() {
return definePlugin({
name: "Language Badge",
baseStyles: ({ cssVar }) => `
// @ts-ignore
baseStyles: ({ _cssVar }) => `
[data-language]::before {
position: absolute;
z-index: 2;
+1 -1
View File
@@ -21,7 +21,7 @@ export function AdmonitionComponent(properties, children, type) {
let label = null;
if (properties?.["has-directive-label"]) {
label = children[0]; // The first child is the label
// biome-ignore lint/style/noParameterAssign: <explanation>
// biome-ignore lint/style/noParameterAssign: <check later>
children = children.slice(1);
label.tagName = "div"; // Change the tag <p> to <div>
}
+2 -2
View File
@@ -2,14 +2,14 @@ import { h } from "hastscript";
import { visit } from "unist-util-visit";
export function parseDirectiveNode() {
return (tree, { data }) => {
return (tree, { _data }) => {
visit(tree, (node) => {
if (
node.type === "containerDirective" ||
node.type === "leafDirective" ||
node.type === "textDirective"
) {
// biome-ignore lint/suspicious/noAssignInExpressions: <explanation>
// biome-ignore lint/suspicious/noAssignInExpressions: <check later>
const data = node.data || (node.data = {});
node.attributes = node.attributes || {};
if (
+1 -1
View File
@@ -1,4 +1,4 @@
// biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>
// biome-ignore lint/suspicious/noShadowRestrictedNames: <toString from mdast-util-to-string>
import { toString } from "mdast-util-to-string";
/* Use the post's first paragraph as the excerpt */
+1 -1
View File
@@ -1,4 +1,4 @@
// biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>
// biome-ignore lint/suspicious/noShadowRestrictedNames: <toString from mdast-util-to-string>
import { toString } from "mdast-util-to-string";
import getReadingTime from "reading-time";