Skip to content

Commit

Permalink
include templates in next-on-pages lint script (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-piotrowicz authored Aug 24, 2023
1 parent fe6ea04 commit b3a2ca4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/next-on-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.5.1",
"bin": "./bin/index.js",
"scripts": {
"lint": "eslint src",
"lint": "eslint src templates",
"types-check": "tsc --noEmit",
"build": "esbuild --bundle --platform=node ./src/index.ts --external:esbuild --external:chokidar --outfile=./dist/index.js",
"build:watch": "npm run build -- --watch=forever",
Expand Down
8 changes: 4 additions & 4 deletions packages/next-on-pages/templates/_worker.js/routes-matcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ export class RoutesMatcher {
// This happens with invalid `/_next/static/...` and `/_next/data/...` requests.

if (phase !== 'miss') {
return await this.checkPhase(getNextPhase(phase));
return this.checkPhase(getNextPhase(phase));
}

this.status = 404;
Expand All @@ -485,7 +485,7 @@ export class RoutesMatcher {
// avoids rewrites in `none` that do the opposite of those in `miss`, and would cause infinite
// loops (e.g. i18n). If it is in the build output, remove a potentially applied `404` status.
if (!(this.path in this.output)) {
return await this.checkPhase('filesystem');
return this.checkPhase('filesystem');
}

if (this.status === 404) {
Expand All @@ -494,7 +494,7 @@ export class RoutesMatcher {
} else {
// In all other instances, we need to enter the `none` phase so we can ensure that requests
// for the `RSC` variant of pages are served correctly.
return await this.checkPhase('none');
return this.checkPhase('none');
}
}

Expand Down Expand Up @@ -577,7 +577,7 @@ export class RoutesMatcher {
nextPhase = getNextPhase(phase);
}

return await this.checkPhase(nextPhase);
return this.checkPhase(nextPhase);
}

/**
Expand Down

0 comments on commit b3a2ca4

Please sign in to comment.