Yuki Takei 2 месяцев назад
Родитель
Сommit
3a9fad191f

+ 50 - 52
apps/app/src/client/components/Admin/Customize/CustomizeLayoutSetting.tsx

@@ -56,68 +56,66 @@ const CustomizeLayoutSetting = (): JSX.Element => {
   }
   }
 
 
   return (
   return (
-    <React.Fragment>
-      <div className="row">
-        <div className="col-12">
-          <h2 className="admin-setting-header">
-            {t('customize_settings.layout')}
-          </h2>
+    <div className="row">
+      <div className="col-12">
+        <h2 className="admin-setting-header">
+          {t('customize_settings.layout')}
+        </h2>
 
 
-          <div className="d-flex justify-content-around mt-5">
-            <div className="row row-cols-2">
-              <div className="col">
-                <button
-                  type="button"
-                  className={`card border border-4 ${!isContainerFluid ? 'border-primary' : ''}`}
-                  onClick={() => setIsContainerFluid(false)}
-                  aria-pressed={!isContainerFluid}
-                >
-                  {/* eslint-disable-next-line @next/next/no-img-element */}
-                  <img
-                    className="card-img-top"
-                    src={`/images/customize-settings/default-${resolvedTheme}.svg`}
-                    alt={t('customize_settings.layout_options.default')}
-                  />
-                  <div className="card-body text-center">
-                    {t('customize_settings.layout_options.default')}
-                  </div>
-                </button>
-              </div>
-              <div className="col">
-                <button
-                  type="button"
-                  className={`card border border-4 ${isContainerFluid ? 'border-primary' : ''}`}
-                  onClick={() => setIsContainerFluid(true)}
-                  aria-pressed={isContainerFluid}
-                >
-                  {/* eslint-disable-next-line @next/next/no-img-element */}
-                  <img
-                    className="card-img-top"
-                    src={`/images/customize-settings/fluid-${resolvedTheme}.svg`}
-                    alt={t('customize_settings.layout_options.expanded')}
-                  />
-                  <div className="card-body text-center">
-                    {t('customize_settings.layout_options.expanded')}
-                  </div>
-                </button>
-              </div>
+        <div className="d-flex justify-content-around mt-5">
+          <div className="row row-cols-2">
+            <div className="col">
+              <button
+                type="button"
+                className={`card border border-4 ${!isContainerFluid ? 'border-primary' : ''}`}
+                onClick={() => setIsContainerFluid(false)}
+                aria-pressed={!isContainerFluid}
+              >
+                {/* biome-ignore lint/performance/noImgElement: Ignore for SVG */}
+                <img
+                  className="card-img-top"
+                  src={`/images/customize-settings/default-${resolvedTheme}.svg`}
+                  alt={t('customize_settings.layout_options.default')}
+                />
+                <div className="card-body text-center">
+                  {t('customize_settings.layout_options.default')}
+                </div>
+              </button>
             </div>
             </div>
-          </div>
-
-          <div className="row my-3">
-            <div className="mx-auto">
+            <div className="col">
               <button
               <button
                 type="button"
                 type="button"
-                className="btn btn-primary"
-                onClick={onClickSubmit}
+                className={`card border border-4 ${isContainerFluid ? 'border-primary' : ''}`}
+                onClick={() => setIsContainerFluid(true)}
+                aria-pressed={isContainerFluid}
               >
               >
-                {t('Update')}
+                {/* biome-ignore lint/performance/noImgElement: Ignore for SVG */}
+                <img
+                  className="card-img-top"
+                  src={`/images/customize-settings/fluid-${resolvedTheme}.svg`}
+                  alt={t('customize_settings.layout_options.expanded')}
+                />
+                <div className="card-body text-center">
+                  {t('customize_settings.layout_options.expanded')}
+                </div>
               </button>
               </button>
             </div>
             </div>
           </div>
           </div>
         </div>
         </div>
+
+        <div className="row my-3">
+          <div className="mx-auto">
+            <button
+              type="button"
+              className="btn btn-primary"
+              onClick={onClickSubmit}
+            >
+              {t('Update')}
+            </button>
+          </div>
+        </div>
       </div>
       </div>
-    </React.Fragment>
+    </div>
   );
   );
 };
 };
 
 

+ 43 - 45
apps/app/src/client/components/Admin/Customize/CustomizeSidebarSetting.tsx

@@ -37,62 +37,60 @@ const CustomizeSidebarsetting = (): JSX.Element => {
   const { isSidebarCollapsedMode } = data;
   const { isSidebarCollapsedMode } = data;
 
 
   return (
   return (
-    <React.Fragment>
-      <div className="row">
-        <div className="col-12">
-          <h2 className="admin-setting-header">
-            {t('customize_settings.default_sidebar_mode.title')}
-          </h2>
+    <div className="row">
+      <div className="col-12">
+        <h2 className="admin-setting-header">
+          {t('customize_settings.default_sidebar_mode.title')}
+        </h2>
 
 
-          <Card className="card custom-card bg-body-tertiary my-3">
-            <CardBody className="px-0 py-2">
-              {t('customize_settings.default_sidebar_mode.desc')}
-            </CardBody>
-          </Card>
+        <Card className="card custom-card bg-body-tertiary my-3">
+          <CardBody className="px-0 py-2">
+            {t('customize_settings.default_sidebar_mode.desc')}
+          </CardBody>
+        </Card>
 
 
-          <div className="d-flex justify-content-around mt-5">
-            <div className="row row-cols-2">
-              <div className="col">
-                <button
-                  type="button"
-                  className={`card border border-4 ${isSidebarCollapsedMode ? 'border-primary' : ''}`}
-                  onClick={() => setIsSidebarCollapsedMode(true)}
-                  aria-pressed={isSidebarCollapsedMode}
-                >
-                  {/* eslint-disable-next-line @next/next/no-img-element */}
-                  <img src={collapsedIconFileName} alt="Collapsed Mode" />
-                  <div className="card-body text-center">Collapsed Mode</div>
-                </button>
-              </div>
-              <div className="col">
-                <button
-                  type="button"
-                  className={`card border border-4 ${!isSidebarCollapsedMode ? 'border-primary' : ''}`}
-                  onClick={() => setIsSidebarCollapsedMode(false)}
-                  aria-pressed={!isSidebarCollapsedMode}
-                >
-                  {/* eslint-disable-next-line @next/next/no-img-element */}
-                  <img src={dockIconFileName} alt="Dock Mode" />
-                  <div className="card-body  text-center">Dock Mode</div>
-                </button>
-              </div>
+        <div className="d-flex justify-content-around mt-5">
+          <div className="row row-cols-2">
+            <div className="col">
+              <button
+                type="button"
+                className={`card border border-4 ${isSidebarCollapsedMode ? 'border-primary' : ''}`}
+                onClick={() => setIsSidebarCollapsedMode(true)}
+                aria-pressed={isSidebarCollapsedMode}
+              >
+                {/* biome-ignore lint/performance/noImgElement: Ignore for SVG */}
+                <img src={collapsedIconFileName} alt="Collapsed Mode" />
+                <div className="card-body text-center">Collapsed Mode</div>
+              </button>
             </div>
             </div>
-          </div>
-
-          <div className="row my-3">
-            <div className="mx-auto">
+            <div className="col">
               <button
               <button
                 type="button"
                 type="button"
-                onClick={onClickSubmit}
-                className="btn btn-primary"
+                className={`card border border-4 ${!isSidebarCollapsedMode ? 'border-primary' : ''}`}
+                onClick={() => setIsSidebarCollapsedMode(false)}
+                aria-pressed={!isSidebarCollapsedMode}
               >
               >
-                {t('Update')}
+                {/* biome-ignore lint/performance/noImgElement: Ignore for SVG */}
+                <img src={dockIconFileName} alt="Dock Mode" />
+                <div className="card-body  text-center">Dock Mode</div>
               </button>
               </button>
             </div>
             </div>
           </div>
           </div>
         </div>
         </div>
+
+        <div className="row my-3">
+          <div className="mx-auto">
+            <button
+              type="button"
+              onClick={onClickSubmit}
+              className="btn btn-primary"
+            >
+              {t('Update')}
+            </button>
+          </div>
+        </div>
       </div>
       </div>
-    </React.Fragment>
+    </div>
   );
   );
 };
 };
 
 

+ 0 - 1
apps/app/src/client/components/AlertSiteUrlUndefined.tsx

@@ -5,7 +5,6 @@ import { useSiteUrl } from '~/states/global';
 
 
 const isValidUrl = (str: string): boolean => {
 const isValidUrl = (str: string): boolean => {
   try {
   try {
-    // eslint-disable-next-line no-new
     new URL(str);
     new URL(str);
     return true;
     return true;
   } catch {
   } catch {

+ 2 - 2
apps/app/src/client/components/Navbar/GrowiContextualSubNavigation.tsx

@@ -124,7 +124,7 @@ const PageOperationMenuItems = (
   const [isBulkExportTooltipOpen, setIsBulkExportTooltipOpen] = useState(false);
   const [isBulkExportTooltipOpen, setIsBulkExportTooltipOpen] = useState(false);
 
 
   const syncLatestRevisionBodyHandler = useCallback(async () => {
   const syncLatestRevisionBodyHandler = useCallback(async () => {
-    // eslint-disable-next-line no-alert
+    // biome-ignore lint/suspicious/noAlert: Allow to use confirm dialog here
     const answer = window.confirm(t('sync-latest-revision-body.confirm'));
     const answer = window.confirm(t('sync-latest-revision-body.confirm'));
     if (answer) {
     if (answer) {
       try {
       try {
@@ -137,7 +137,7 @@ const PageOperationMenuItems = (
         }
         }
 
 
         if (res?.isYjsDataBroken) {
         if (res?.isYjsDataBroken) {
-          // eslint-disable-next-line no-alert
+          // biome-ignore lint/suspicious/noAlert: Allow to use confirm dialog here
           window.alert(t('sync-latest-revision-body.alert'));
           window.alert(t('sync-latest-revision-body.alert'));
           return;
           return;
         }
         }

+ 0 - 1
apps/app/src/client/components/PageAttachment/DeleteAttachmentModal.tsx

@@ -73,7 +73,6 @@ const DeleteAttachmentModalSubstance = ({
     }
     }
 
 
     const content = attachment.fileFormat.match(/image\/.+/i) ? (
     const content = attachment.fileFormat.match(/image\/.+/i) ? (
-      // eslint-disable-next-line @next/next/no-img-element
       <img src={attachment.filePathProxied} alt="deleting attachment" />
       <img src={attachment.filePathProxied} alt="deleting attachment" />
     ) : (
     ) : (
       ''
       ''

+ 0 - 1
apps/app/src/client/components/ReactMarkdownComponents/LightBox.tsx

@@ -28,7 +28,6 @@ export const LightBox = (props: Props): JSX.Element => {
 
 
   return (
   return (
     <>
     <>
-      {/* eslint-disable-next-line @next/next/no-img-element */}
       <button
       <button
         type="button"
         type="button"
         className="border-0 bg-transparent p-0"
         className="border-0 bg-transparent p-0"

+ 0 - 1
apps/app/src/client/components/Sidebar/SidebarBrandLogo.tsx

@@ -12,7 +12,6 @@ export const SidebarBrandLogo = memo((props: SidebarBrandLogoProps) => {
   return isDefaultLogo ? (
   return isDefaultLogo ? (
     <GrowiLogo />
     <GrowiLogo />
   ) : (
   ) : (
-    // eslint-disable-next-line @next/next/no-img-element
     <div>
     <div>
       <img
       <img
         src="/attachment/brand-logo"
         src="/attachment/brand-logo"

+ 1 - 1
apps/app/src/client/components/UnsavedAlertDialog.tsx

@@ -26,7 +26,7 @@ const UnsavedAlertDialog = (): JSX.Element => {
   const alertUnsavedWarningByNextRouter = useCallback(() => {
   const alertUnsavedWarningByNextRouter = useCallback(() => {
     if (isEnabledUnsavedWarning) {
     if (isEnabledUnsavedWarning) {
       // see: https://zenn.dev/qaynam/articles/c4794537a163d2
       // see: https://zenn.dev/qaynam/articles/c4794537a163d2
-      // eslint-disable-next-line no-alert
+      // biome-ignore lint/suspicious/noAlert: Allow to use confirm dialog here
       const answer = window.confirm(t('page_edit.changes_not_saved'));
       const answer = window.confirm(t('page_edit.changes_not_saved'));
       if (!answer) {
       if (!answer) {
         // eslint-disable-next-line no-throw-literal
         // eslint-disable-next-line no-throw-literal

+ 1 - 1
apps/app/src/server/service/yjs/yjs.integ.ts

@@ -22,7 +22,7 @@ vi.mock('../revision/normalize-latest-revision-if-broken', () => ({
 const ObjectId = Types.ObjectId;
 const ObjectId = Types.ObjectId;
 
 
 const getPrivateMdbInstance = (yjsService: IYjsService): MongodbPersistence => {
 const getPrivateMdbInstance = (yjsService: IYjsService): MongodbPersistence => {
-  // eslint-disable-next-line dot-notation
+  // biome-ignore lint/complexity/useLiteralKeys: ignore
   return yjsService['mdb'];
   return yjsService['mdb'];
 };
 };
 
 

+ 1 - 1
apps/app/src/server/service/yjs/yjs.ts

@@ -111,7 +111,7 @@ class YjsService implements IYjsService {
     const persistece = createMongoDBPersistence(mdb);
     const persistece = createMongoDBPersistence(mdb);
 
 
     // foce set to private property
     // foce set to private property
-    // eslint-disable-next-line dot-notation
+    // biome-ignore lint/complexity/useLiteralKeys: ignore
     ysocketio['persistence'] = persistece;
     ysocketio['persistence'] = persistece;
   }
   }
 
 

+ 2 - 1
biome.json

@@ -64,7 +64,8 @@
         "noParameterAssign": "warn"
         "noParameterAssign": "warn"
       },
       },
       "suspicious": {
       "suspicious": {
-        "noConsole": "error"
+        "noConsole": "error",
+        "noAlert": "error"
       },
       },
       "performance": {
       "performance": {
         "noAwaitInLoops": "warn"
         "noAwaitInLoops": "warn"

+ 0 - 1
packages/remark-growi-directive/src/mdast-util-growi-directive/lib/index.js

@@ -224,7 +224,6 @@ function attributes(node, state) {
   /** @type {string} */
   /** @type {string} */
   let key;
   let key;
 
 
-  // eslint-disable-next-line no-restricted-syntax
   for (key in attrs) {
   for (key in attrs) {
     if (
     if (
       own.call(attrs, key) &&
       own.call(attrs, key) &&

+ 0 - 3
packages/remark-growi-directive/test/micromark-extension-growi-directive.test.js

@@ -886,7 +886,6 @@ function youtube(d) {
     list.push(`title="${this.encode(d.label)}"`);
     list.push(`title="${this.encode(d.label)}"`);
   }
   }
 
 
-  // eslint-disable-next-line no-restricted-syntax
   for (prop in attrs) {
   for (prop in attrs) {
     if (prop !== 'v') {
     if (prop !== 'v') {
       list.push(`${this.encode(prop)}="${this.encode(attrs[prop])}"`);
       list.push(`${this.encode(prop)}="${this.encode(attrs[prop])}"`);
@@ -910,7 +909,6 @@ function lsx(d) {
 
 
   const props = [];
   const props = [];
 
 
-  // eslint-disable-next-line no-restricted-syntax
   for (const key in attrs) {
   for (const key in attrs) {
     if (attrs[key].length === 0) {
     if (attrs[key].length === 0) {
       props.push(`prefix="${key}"`);
       props.push(`prefix="${key}"`);
@@ -932,7 +930,6 @@ function h(d) {
   /** @type {string} */
   /** @type {string} */
   let prop;
   let prop;
 
 
-  // eslint-disable-next-line no-restricted-syntax
   for (prop in attrs) {
   for (prop in attrs) {
     if (own.call(attrs, prop)) {
     if (own.call(attrs, prop)) {
       list.push(`${this.encode(prop)}="${this.encode(attrs[prop])}"`);
       list.push(`${this.encode(prop)}="${this.encode(attrs[prop])}"`);