diff --git a/errors/no-page-custom-font.md b/errors/no-page-custom-font.md
index 51052a34422cbe..edcea71d99b333 100644
--- a/errors/no-page-custom-font.md
+++ b/errors/no-page-custom-font.md
@@ -3,7 +3,7 @@
### Why This Error Occurred
- The custom font you're adding was added to a page - this only adds the font to the specific page and not the entire application.
-- The custom font you're adding was added to a separate component within `Document` - this disables automatic font optimiztion.
+- The custom font you're adding was added to a separate component within `Document` - this disables automatic font optimization.
### Possible Ways to Fix It
diff --git a/examples/cms-kontent/components/cover-image.js b/examples/cms-kontent/components/cover-image.js
index 7b00d3adf6a44b..cf76be52975fdf 100644
--- a/examples/cms-kontent/components/cover-image.js
+++ b/examples/cms-kontent/components/cover-image.js
@@ -17,7 +17,7 @@ export default function CoverImage({ title, src, slug }) {
return (
- Show Modal}>
-
- publicPath should be set to /_next/static/
-
-
+ setOpen(false)}
+ onOpen={() => setOpen(true)}
+ open={open}
+ trigger={}
+ >
+ Select a Photo
+
+
+
+
-
-
-
- Larger content should be still available as a fallback to{' '}
- fileLoader but it should not pollute{' '}
- /.next/static/css folder. You should see two images
- below. One, smaller, loaded as data url, and one, bigger,
- loaded via url.
-
-
-
-
-
- A small image should be loaded as data url:{' '}
- {SmallImage.substr(0, 100)}...
-
-
-
-
-
-
- A large image should be loaded as a url: {LargeImage}
-
-
-
- You should also still be able to load regular css. This text
- should have border.
-
-
+ Default Profile Image
+
+ We've found the following gravatar image associated with your
+ e-mail address.
+
+
Is it okay to use this photo?
+
+
+
)
diff --git a/examples/with-semantic-ui/pages/LargeImage.png b/examples/with-semantic-ui/public/image.png
similarity index 100%
rename from examples/with-semantic-ui/pages/LargeImage.png
rename to examples/with-semantic-ui/public/image.png
diff --git a/examples/with-semantic-ui/pages/styles.css b/examples/with-semantic-ui/styles/global.css
similarity index 100%
rename from examples/with-semantic-ui/pages/styles.css
rename to examples/with-semantic-ui/styles/global.css
diff --git a/packages/eslint-plugin-next/lib/rules/no-html-link-for-pages.js b/packages/eslint-plugin-next/lib/rules/no-html-link-for-pages.js
index e7a07aa9f30d12..73a32d1462b3ae 100644
--- a/packages/eslint-plugin-next/lib/rules/no-html-link-for-pages.js
+++ b/packages/eslint-plugin-next/lib/rules/no-html-link-for-pages.js
@@ -90,6 +90,14 @@ module.exports = {
return
}
+ const target = node.attributes.find(
+ (attr) => attr.type === 'JSXAttribute' && attr.name.name === 'target'
+ )
+
+ if (target && target.value.value === '_blank') {
+ return
+ }
+
const href = node.attributes.find(
(attr) => attr.type === 'JSXAttribute' && attr.name.name === 'href'
)
diff --git a/test/unit/eslint-plugin-next/no-html-link-for-pages.test.ts b/test/unit/eslint-plugin-next/no-html-link-for-pages.test.ts
index fa868428bf8432..d0ce0c7ea46dec 100644
--- a/test/unit/eslint-plugin-next/no-html-link-for-pages.test.ts
+++ b/test/unit/eslint-plugin-next/no-html-link-for-pages.test.ts
@@ -96,6 +96,20 @@ export class Blah extends Head {
}
}
`
+const validTargetBlankLinkCode = `
+import Link from 'next/link';
+
+export class Blah extends Head {
+ render() {
+ return (
+