From 6b541ec4686587d750e71eb401f1040b984407de Mon Sep 17 00:00:00 2001 From: Szymon Chmal Date: Fri, 14 Jun 2024 20:22:00 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/core/util.ts | 9 ++++----- packages/astro/test/underscore-in-folder-name.test.js | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/astro/src/core/util.ts b/packages/astro/src/core/util.ts index 8c6e161b82f6..d3e7c8662bb3 100644 --- a/packages/astro/src/core/util.ts +++ b/packages/astro/src/core/util.ts @@ -126,12 +126,11 @@ function isPublicRoute(file: URL, config: AstroConfig): boolean { // Normalize the file directory path by removing the pagesDir prefix if it exists, // otherwise remove the rootDir prefix. - const normalizedDir = fileDir.startsWith(pagesDir) ? fileDir.slice(pagesDir.length) : fileDir.slice(rootDir.length); + const normalizedDir = fileDir.startsWith(pagesDir) + ? fileDir.slice(pagesDir.length) + : fileDir.slice(rootDir.length); - const parts = normalizedDir - .replace(pagesDir.toString(), '') - .split('/') - .slice(1); + const parts = normalizedDir.replace(pagesDir.toString(), '').split('/').slice(1); for (const part of parts) { if (part.startsWith('_')) return false; diff --git a/packages/astro/test/underscore-in-folder-name.test.js b/packages/astro/test/underscore-in-folder-name.test.js index 2074c9d49965..622ba977d126 100644 --- a/packages/astro/test/underscore-in-folder-name.test.js +++ b/packages/astro/test/underscore-in-folder-name.test.js @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; -import { loadFixture } from './test-utils.js'; import testAdapter from './test-adapter.js'; +import { loadFixture } from './test-utils.js'; describe('Projects with a underscore in the folder name', () => { let fixture;