Skip to content

Commit

Permalink
chore: Enable Alex documentation linting for error pages (#26526)
Browse files Browse the repository at this point in the history
  • Loading branch information
petermekhaeil authored Jun 24, 2021
1 parent ccf189f commit 94d7450
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 8 deletions.
1 change: 0 additions & 1 deletion .alexignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
CODE_OF_CONDUCT.md
docs/
errors/
examples/
12 changes: 12 additions & 0 deletions .alexrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"allow": [
"dead",
"executed",
"executes",
"failed",
"failure",
"hook",
"host-hostess",
"invalid"
]
}
2 changes: 1 addition & 1 deletion errors/api-routes-static-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

An `exportPathMap` path was matched to an API route. Statically exporting a Next.js application via `next export` disables API routes.

This command is meant for static-only hosts, and is not necessary to make your application static. Pages in your application without server-side data dependencies will be automatically statically exported by `next build`, including pages powered by `getStaticProps`
This command is meant for a static-only setup, and is not necessary to make your application static. Pages in your application without server-side data dependencies will be automatically statically exported by `next build`, including pages powered by `getStaticProps`

#### Possible Ways to Fix It

Expand Down
2 changes: 1 addition & 1 deletion errors/can-not-output-to-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Either you set `distDir` to `public` in your `next.config.js` or during `next export` you tried to export to the `public` directory.

This is not allowed due to `public` being a special folder in Next.js used to serve static assets.
This is not allowed because `public` is used by Next.js to serve static assets.

#### Possible Ways to Fix It

Expand Down
2 changes: 1 addition & 1 deletion errors/can-not-output-to-static.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Either you set `distDir` to `static` in your `next.config.js` or during `next export` you tried to export to the `static` directory.

This is not allowed due to `static` being a special folder in Next.js used to serve static assets.
This is not allowed because `static` is used by Next.js to serve static assets.

#### Possible Ways to Fix It

Expand Down
2 changes: 1 addition & 1 deletion errors/future-webpack5-moved-to-webpack5.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `future.webpack5` option has been moved to `webpack5` in `next.config.js`.

If you had the value `true` you can remove the option as webpack 5 is now the default for all Next.js apps unless opted out.

If you had he value `false` you can update `next.config.js`:
If you had the value `false` you can update `next.config.js`:

Change `future.webpack5` to `webpack5`.

Expand Down
2 changes: 1 addition & 1 deletion errors/next-start-serverless.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Next.js can only handle running a server when the `target` is set to `server` (t

#### Possible Ways to Fix It

Use a different handler than `next start` when testing a serverless **production** build, otherwise just use `next dev`.
Use a different handler than `next start` when testing a serverless **production** build, otherwise use `next dev`.
2 changes: 1 addition & 1 deletion errors/prefetch-true-deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ These requests have low-priority and yield to fetch() or XHR requests. Next.js w

The prefetch attribute is no longer needed, when set to true, example: `prefetch={true}`, remove the property.

Prefetching can be disabled with `prefetch={false}`.
Prefetching can be turned off with `prefetch={false}`.
2 changes: 1 addition & 1 deletion errors/static-dir-deprecated.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The reason we want to support a `public` directory instead is to not require the

#### Possible Ways to Fix It

You can move your `static` directory inside of the `public` directory and all URLs will remain the same as they were before.
You can move your `static` directory inside of the `public` directory and all URLs will stay the same as they were before.

**Before**

Expand Down

0 comments on commit 94d7450

Please sign in to comment.