Skip to content

Commit

Permalink
chore: revert formatting package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Apr 15, 2024
1 parent 18f7bf2 commit 9380667
Show file tree
Hide file tree
Showing 13 changed files with 69 additions and 45 deletions.
58 changes: 30 additions & 28 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.4/schema.json",
"files": {
"ignore": ["vendor", "dist/**"],
"include": ["test/**", "e2e/**", "packages/**"]
},
"formatter": {
"indentStyle": "tab",
"indentWidth": 2,
"lineWidth": 100,
"ignore": [
"benchmark/projects/",
"benchmark/results/",
"**/dist/**",
"**/smoke/**",
"**/fixtures/**",
"**/vendor/**",
"**/.vercel/**",
".changeset",
"pnpm-lock.yaml"
]
},
"organizeImports": { "enabled": true },
"linter": { "enabled": false },
"javascript": {
"formatter": {
"trailingComma": "es5",
"quoteStyle": "single",
"$schema": "https://biomejs.dev/schemas/1.6.4/schema.json",
"files": {
"ignore": ["vendor", "dist/**"],
"include": ["test/**", "e2e/**", "packages/**"]
},
"formatter": {
"indentStyle": "tab",
"indentWidth": 2,
"lineWidth": 100,
"ignore": [
"benchmark/projects/",
"benchmark/results/",
"**/dist/**",
"**/smoke/**",
"**/fixtures/**",
"**/vendor/**",
"**/.vercel/**",
".changeset",
"pnpm-lock.yaml",
"package.json",
"*.astro"
]
},
"organizeImports": { "enabled": true },
"linter": { "enabled": false },
"javascript": {
"formatter": {
"trailingComma": "es5",
"quoteStyle": "single",
"semicolons": "always"
}
},
},
"json": {
"parser": {
"allowComments": true,
Expand Down
4 changes: 3 additions & 1 deletion packages/astro/src/assets/vite-plugin-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ export default function assets({
: settings.config.outDir
)
)});
export const assetsDir = /* #__PURE__ */ new URL(${JSON.stringify(settings.config.build.assets)}, outDir);
export const assetsDir = /* #__PURE__ */ new URL(${JSON.stringify(
settings.config.build.assets
)}, outDir);
export const getImage = async (options) => await getImageInternal(options, imageConfig);
`;
}
Expand Down
4 changes: 3 additions & 1 deletion packages/astro/src/cli/install-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export async function getPackage<T>(
return packageImport as T;
} catch (e) {
if (options.optional) return undefined;
let message = `To continue, Astro requires the following dependency to be installed: ${bold(packageName)}.`;
let message = `To continue, Astro requires the following dependency to be installed: ${bold(
packageName
)}.`;

if (ci.isCI) {
message += ` Packages cannot be installed automatically in CI environments.`;
Expand Down
4 changes: 3 additions & 1 deletion packages/astro/src/core/errors/dev/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ function collectInfoFromStacktrace(error: SSRError & { stack: string }): StackIn
error.pluginCode ||
error.id ||
// TODO: this could be better, `src` might be something else
stackText.split('\n').find((ln) => ln.includes('src') || ln.includes('node_modules'));
stackText
.split('\n')
.find((ln) => ln.includes('src') || ln.includes('node_modules'));
// Disable eslint as we're not sure how to improve this regex yet
// eslint-disable-next-line regexp/no-super-linear-backtracking
const source = possibleFilePath?.replace?.(/^[^(]+\(([^)]+).*$/, '$1').replace(/^\s+at\s+/, '');
Expand Down
4 changes: 1 addition & 3 deletions packages/astro/src/core/errors/errors-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,7 @@ export const NoMatchingRenderer = {
${
validRenderersCount > 0
? `There ${plural ? 'are' : 'is'} ${validRenderersCount} renderer${
plural ? 's' : ''
} configured in your \`astro.config.mjs\` file,
? `There ${plural ? 'are' : 'is'} ${validRenderersCount} renderer${plural ? 's' : ''} configured in your \`astro.config.mjs\` file,
but ${plural ? 'none were' : 'it was not'} able to server-side render \`${componentName}\`.`
: `No valid renderer was found ${
componentExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,9 @@ export default {
if (placement === settings.config[setting.settingKey]) {
option.selected = true;
}
option.textContent =
`${placement.slice(0, 1).toUpperCase()}${placement.slice(1)}`.replace('-', ' ');
option.textContent = `${placement.slice(0, 1).toUpperCase()}${placement.slice(
1
)}`.replace('-', ' ');
astroSelect.append(option);
});
astroSelect.element.addEventListener('change', setting.changeEvent);
Expand Down
8 changes: 6 additions & 2 deletions packages/astro/src/runtime/client/dev-toolbar/toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ export class AstroDevToolbar extends HTMLElement {
width: 1px;
}
</style>
<div id="dev-toolbar-root" data-hidden ${settings.config.disableAppNotification ? 'data-no-notification' : ''} data-placement="${settings.config.placement}">
<div id="dev-toolbar-root" data-hidden ${
settings.config.disableAppNotification ? 'data-no-notification' : ''
} data-placement="${settings.config.placement}">
<div id="dev-bar-hitbox-above"></div>
<div id="dev-bar">
<div id="bar-container">
Expand All @@ -281,7 +283,9 @@ export class AstroDevToolbar extends HTMLElement {
: ''
}
<div class="separator"></div>
${this.getAppTemplate(this.apps.find((app) => app.builtIn && app.id === 'astro:settings')!)}
${this.getAppTemplate(
this.apps.find((app) => app.builtIn && app.id === 'astro:settings')!
)}
</div>
</div>
<div id="dev-bar-hitbox-below"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ export class DevToolbarTooltip extends HTMLElement {
: ''
}
${section.content ? `<div class="section-content">${section.content}</div>` : ''}
${section.clickDescription ? `<span class="modal-cta">${section.clickDescription}</span>` : ''}
${
section.clickDescription
? `<span class="modal-cta">${section.clickDescription}</span>`
: ''
}
`;
fragment.append(sectionElement);

Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/transitions/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ async function transition(
preparationEvent.sourceElement instanceof HTMLFormElement
? preparationEvent.sourceElement
: preparationEvent.sourceElement instanceof HTMLElement &&
'form' in preparationEvent.sourceElement
'form' in preparationEvent.sourceElement
? (preparationEvent.sourceElement.form as HTMLFormElement)
: preparationEvent.sourceElement?.closest('form');
// Form elements without enctype explicitly set default to application/x-www-form-urlencoded.
Expand Down
6 changes: 5 additions & 1 deletion packages/astro/test/test-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ export default function (
return new Response(data);
}
${provideAddress ? `request[Symbol.for('astro.clientAddress')] = '0.0.0.0';` : ''}
${
provideAddress
? `request[Symbol.for('astro.clientAddress')] = '0.0.0.0';`
: ''
}
return super.render(request, routeData, locals);
}
}
Expand Down
3 changes: 1 addition & 2 deletions packages/db/src/core/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ export const RENAME_COLUMN_ERROR = (oldSelector: string, newSelector: string) =>
);
};

export const FILE_NOT_FOUND_ERROR = (path: string) =>
`${red('▶ File not found:')} ${bold(path)}\n`;
export const FILE_NOT_FOUND_ERROR = (path: string) => `${red('▶ File not found:')} ${bold(path)}\n`;

export const SHELL_QUERY_MISSING_ERROR = `${red(
'▶ Please provide a query to execute using the --query flag.'
Expand Down
4 changes: 3 additions & 1 deletion packages/db/src/core/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ export const dateColumnSchema = z.object({
.union([
sqlSchema,
// transform to ISO string for serialization
z.date().transform((d) => d.toISOString()),
z
.date()
.transform((d) => d.toISOString()),
])
.optional(),
}),
Expand Down
6 changes: 5 additions & 1 deletion packages/upgrade/src/actions/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ export async function getContext(argv: string[]): Promise<Context> {
);

const packageManager = detectPackageManager()?.name ?? 'npm';
const { _: [version = 'latest'] = [], '--help': help = false, '--dry-run': dryRun } = flags;
const {
_: [version = 'latest'] = [],
'--help': help = false,
'--dry-run': dryRun,
} = flags;

return {
help,
Expand Down

0 comments on commit 9380667

Please sign in to comment.