Skip to content

Commit 0698f81

Browse files
committed
chore(lint): fix noUnusedTemplateLiteral rule and remove from config
1 parent c89f1fb commit 0698f81

26 files changed

+42
-43
lines changed

.changeset/aggregate.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ console.log(`::set-output name=notes::${notes.join("%0A")}`);
4747
console.log(`::set-output name=version::v${version}`);
4848

4949
execSync(`git tag v${version}`);
50-
execSync(`git push origin --tags`);
50+
execSync("git push origin --tags");

biome.jsonc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"noConfusingVoidType": "warn"
2020
},
2121
"style": {
22-
"noUnusedTemplateLiteral": "warn",
2322
"noNonNullAssertion": "warn",
2423
"noParameterAssign": "warn",
2524
"noCommaOperator": "warn"

packages/open-next/src/adapters/dynamo-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async function defaultHandler(
4747
async function insert(
4848
requestType: InitializationFunctionEvent["requestType"],
4949
): Promise<InitializationFunctionEvent> {
50-
const file = readFileSync(`dynamodb-cache.json`, "utf8");
50+
const file = readFileSync("dynamodb-cache.json", "utf8");
5151

5252
const data: DataType[] = JSON.parse(file);
5353

packages/open-next/src/adapters/edge-adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const defaultHandler = async (
2828
const url = initialUrl.toString();
2929

3030
// @ts-expect-error - This is bundled
31-
const handler = await import(`./middleware.mjs`);
31+
const handler = await import("./middleware.mjs");
3232

3333
const response: Response = await handler.default({
3434
headers: internalEvent.headers,

packages/open-next/src/adapters/image-optimization-adapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ function buildFailureResponse(
190190
);
191191
response.writeHead(500, {
192192
Vary: "Accept",
193-
"Cache-Control": `public,max-age=60,immutable`,
193+
"Cache-Control": "public,max-age=60,immutable",
194194
"Content-Type": "application/json",
195195
});
196196
response.end(e?.message || e?.toString() || "An error occurred");
@@ -202,7 +202,7 @@ function buildFailureResponse(
202202
headers: {
203203
Vary: "Accept",
204204
// For failed images, allow client to retry after 1 minute.
205-
"Cache-Control": `public,max-age=60,immutable`,
205+
"Cache-Control": "public,max-age=60,immutable",
206206
"Content-Type": "application/json",
207207
},
208208
body: toReadableStream(e?.message || e?.toString() || "An error occurred"),

packages/open-next/src/adapters/revalidate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const defaultHandler = async (event: RevalidateEvent) => {
2929
const failedRecords: RevalidateEvent["records"] = [];
3030
for (const record of event.records) {
3131
const { host, url } = record;
32-
debug(`Revalidating stale page`, { host, url });
32+
debug("Revalidating stale page", { host, url });
3333

3434
// Make a HEAD request to the page to revalidate it. This will trigger
3535
// the page to be re-rendered and cached in S3
@@ -67,7 +67,7 @@ const defaultHandler = async (event: RevalidateEvent) => {
6767
},
6868
);
6969
req.on("error", (err) => {
70-
error(`Error revalidating page`, { host, url });
70+
error("Error revalidating page", { host, url });
7171
reject(err);
7272
});
7373
req.end();

packages/open-next/src/build/compileConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function compileOpenNextConfig(
4040
const config = (await import(configPath)).default as OpenNextConfig;
4141
if (!config || !config.default) {
4242
logger.error(
43-
`config.default cannot be empty, it should be at least {}, see more info here: https://opennext.js.org/config#configuration-file`,
43+
"config.default cannot be empty, it should be at least {}, see more info here: https://opennext.js.org/config#configuration-file",
4444
);
4545
process.exit(1);
4646
}

packages/open-next/src/build/createAssets.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import logger from "../logger.js";
66
import * as buildHelper from "./helper.js";
77

88
export function createStaticAssets(options: buildHelper.BuildOptions) {
9-
logger.info(`Bundling static assets...`);
9+
logger.info("Bundling static assets...");
1010

1111
const { appBuildOutputPath, appPublicPath, outputDir, appPath } = options;
1212

@@ -51,7 +51,7 @@ export function createStaticAssets(options: buildHelper.BuildOptions) {
5151
* @returns Whether tag cache is used.
5252
*/
5353
export function createCacheAssets(options: buildHelper.BuildOptions) {
54-
logger.info(`Bundling cache assets...`);
54+
logger.info("Bundling cache assets...");
5555

5656
const { appBuildOutputPath, outputDir } = options;
5757
const packagePath = path.relative(options.monorepoRoot, appBuildOutputPath);

packages/open-next/src/build/createImageOptimizationBundle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const require = createRequire(import.meta.url);
1313
export async function createImageOptimizationBundle(
1414
options: buildHelper.BuildOptions,
1515
) {
16-
logger.info(`Bundling image optimization function...`);
16+
logger.info("Bundling image optimization function...");
1717

1818
const { appBuildOutputPath, config, outputDir } = options;
1919

packages/open-next/src/build/createMiddleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export async function createMiddleware(
2020
options: buildHelper.BuildOptions,
2121
{ forceOnlyBuildOnce = false } = {},
2222
) {
23-
logger.info(`Bundling middleware function...`);
23+
logger.info("Bundling middleware function...");
2424

2525
const { appBuildOutputPath, config, outputDir } = options;
2626

0 commit comments

Comments
 (0)