diff --git a/src/docs/guide/usage/linter/generated-cli.md b/src/docs/guide/usage/linter/generated-cli.md
index 1addaa0b69..bba097ffb3 100644
--- a/src/docs/guide/usage/linter/generated-cli.md
+++ b/src/docs/guide/usage/linter/generated-cli.md
@@ -89,8 +89,6 @@ Arguments:
The supported syntax is the same as for .eslintignore and .gitignore files You should quote your patterns in order to avoid shell interpretation of glob patterns
- **`--no-ignore`** —
Disables excluding of files from .eslintignore files, **`--ignore-path`** flags and **`--ignore-pattern`** flags
-- **`--symlinks`** —
- Follow symbolic links. Oxlint ignores symbolic links by default.
## Handle Warnings
diff --git a/src/docs/guide/usage/linter/rules/nextjs/no-document-import-in-page.md b/src/docs/guide/usage/linter/rules/nextjs/no-document-import-in-page.md
index 66a5c336dd..3beb7e0a00 100644
--- a/src/docs/guide/usage/linter/rules/nextjs/no-document-import-in-page.md
+++ b/src/docs/guide/usage/linter/rules/nextjs/no-document-import-in-page.md
@@ -19,16 +19,35 @@ Prevent importing `next/document` outside of `pages/_document.js`.
### Why is this bad?
+Importing `next/document` outside of `pages/_document.js` can cause
+unexpected issues in your Next.js application.
+
### Examples
Examples of **incorrect** code for this rule:
-```javascript
+```jsx
+// `components/MyDocument.jsx`
+import Document from "next/document";
+
+class MyDocument extends Document {
+ // ...
+}
+
+export default MyDocument;
```
Examples of **correct** code for this rule:
-```javascript
+```jsx
+// `pages/_document.jsx`
+import Document from "next/document";
+
+class MyDocument extends Document {
+ // ...
+}
+
+export default MyDocument;
```
## How to use
diff --git a/src/docs/guide/usage/linter/rules/nextjs/no-head-element.md b/src/docs/guide/usage/linter/rules/nextjs/no-head-element.md
index 62725af81a..df3544527c 100644
--- a/src/docs/guide/usage/linter/rules/nextjs/no-head-element.md
+++ b/src/docs/guide/usage/linter/rules/nextjs/no-head-element.md
@@ -15,20 +15,49 @@ const source = `https://github.com/oxc-project/oxc/blob/${ data }/crates/oxc_lin
### What it does
-Prevent usage of `
` element.
+Prevents the usage of the native `` element inside a Next.js application.
### Why is this bad?
+A `` element can cause unexpected behavior in a Next.js application.
+Use Next.js' built-in `next/head` component instead.
+
### Examples
Examples of **incorrect** code for this rule:
-```javascript
+```jsx
+function Index() {
+ return (
+ <>
+
+ My page title
+
+
+ >
+ );
+}
+
+export default Index;
```
Examples of **correct** code for this rule:
-```javascript
+```jsx
+import Head from "next/head";
+
+function Index() {
+ return (
+ <>
+
+ My page title
+
+
+ >
+ );
+}
+
+export default Index;
```
## How to use
diff --git a/src/docs/guide/usage/linter/rules/nextjs/no-head-import-in-document.md b/src/docs/guide/usage/linter/rules/nextjs/no-head-import-in-document.md
index 4f95f211be..183dcff55b 100644
--- a/src/docs/guide/usage/linter/rules/nextjs/no-head-import-in-document.md
+++ b/src/docs/guide/usage/linter/rules/nextjs/no-head-import-in-document.md
@@ -15,18 +15,58 @@ const source = `https://github.com/oxc-project/oxc/blob/${ data }/crates/oxc_lin
### What it does
+Prevents the usage of `next/head` inside a Next.js document.
+
### Why is this bad?
+Importing `next/head` inside `pages/_document.js` can cause
+unexpected issues in your Next.js application.
+
### Examples
Examples of **incorrect** code for this rule:
-```javascript
+```jsx
+import Document, { Html, Main, NextScript } from "next/document";
+import Head from "next/head";
+
+class MyDocument extends Document {
+ static async getInitialProps(ctx) {
+ // ...
+ }
+
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+export default MyDocument;
```
Examples of **correct** code for this rule:
-```javascript
+```jsx
+import Document, { Head, Html, Main, NextScript } from "next/document";
+
+class MyDocument extends Document {
+ static async getInitialProps(ctx) {
+ // ...
+ }
+
+ render() {
+ return (
+
+
+
+ );
+ }
+}
+
+export default MyDocument;
```
## How to use
diff --git a/src/docs/guide/usage/linter/rules/nextjs/no-page-custom-font.md b/src/docs/guide/usage/linter/rules/nextjs/no-page-custom-font.md
index fb0c31b0aa..8f75b3d167 100644
--- a/src/docs/guide/usage/linter/rules/nextjs/no-page-custom-font.md
+++ b/src/docs/guide/usage/linter/rules/nextjs/no-page-custom-font.md
@@ -20,18 +20,48 @@ Prevent page-only custom fonts.
### Why is this bad?
- 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 pages/_document.js - this disables automatic font optimization.
+- The custom font you're adding was added to a separate component within `pages/_document.js` - this disables automatic font optimization.
### Examples
Examples of **incorrect** code for this rule:
-```javascript
+```jsx
+// pages/index.jsx
+import Head from "next/head";
+function IndexPage() {
+ return (
+
+
+
+ );
+}
+export default IndexPage;
```
Examples of **correct** code for this rule:
-```javascript
+```jsx
+// pages/_document.jsx
+import NextDocument, { Head, Html } from "next/document";
+class Document extends NextDocument {
+ render() {
+ return (
+
+
+
+
+
+ );
+ }
+}
+export default Document;
```
## How to use
diff --git a/src/docs/guide/usage/linter/rules/nextjs/no-script-component-in-head.md b/src/docs/guide/usage/linter/rules/nextjs/no-script-component-in-head.md
index ce21560559..c3bd000b46 100644
--- a/src/docs/guide/usage/linter/rules/nextjs/no-script-component-in-head.md
+++ b/src/docs/guide/usage/linter/rules/nextjs/no-script-component-in-head.md
@@ -15,18 +15,47 @@ const source = `https://github.com/oxc-project/oxc/blob/${ data }/crates/oxc_lin
### What it does
+Prevent usage of `next/script` in `next/head` component.
+
### Why is this bad?
+The `next/script` component should not be used in a `next/head` component.
+Instead move the``component outside of`` instead.
+
### Examples
Examples of **incorrect** code for this rule:
-```javascript
+```jsx
+import Head from "next/head";
+import Script from "next/script";
+
+export default function Index() {
+ return (
+
+ Next.js
+
+
+ );
+}
```
Examples of **correct** code for this rule:
-```javascript
+```jsx
+import Head from "next/head";
+import Script from "next/script";
+
+export default function Index() {
+ return (
+ <>
+
+ Next.js
+
+
+ >
+ );
+}
```
## How to use
diff --git a/src/docs/guide/usage/linter/rules/nextjs/no-title-in-document-head.md b/src/docs/guide/usage/linter/rules/nextjs/no-title-in-document-head.md
index 0a27750e36..db5491ef11 100644
--- a/src/docs/guide/usage/linter/rules/nextjs/no-title-in-document-head.md
+++ b/src/docs/guide/usage/linter/rules/nextjs/no-title-in-document-head.md
@@ -15,18 +15,45 @@ const source = `https://github.com/oxc-project/oxc/blob/${ data }/crates/oxc_lin
### What it does
+Prevent usage of `` with `Head` component from `next/document`.
+
### Why is this bad?
+A `` element should only be used for any `` code that is common for all pages.
+Title tags should be defined at the page-level using `next/head` instead.
+
### Examples
Examples of **incorrect** code for this rule:
```javascript
+import { Head } from "next/document";
+
+export function Home() {
+ return (
+
+
+ My page title
+
+
+ );
+}
```
Examples of **correct** code for this rule:
```javascript
+import Head from "next/head";
+
+export function Home() {
+ return (
+
+
+ My page title
+
+
+ );
+}
```
## How to use
diff --git a/src/docs/guide/usage/linter/rules/typescript/consistent-indexed-object-style.md b/src/docs/guide/usage/linter/rules/typescript/consistent-indexed-object-style.md
index a2c25c5e14..691d6170a4 100644
--- a/src/docs/guide/usage/linter/rules/typescript/consistent-indexed-object-style.md
+++ b/src/docs/guide/usage/linter/rules/typescript/consistent-indexed-object-style.md
@@ -15,7 +15,7 @@ const source = `https://github.com/oxc-project/oxc/blob/${ data }/crates/oxc_lin
### What it does
-Require or disallow the `Record` type.
+Choose between requiring either `Record` type or indexed signature types.
### Why is this bad?
@@ -23,9 +23,11 @@ Inconsistent style for indexed object types can harm readability in a project.
### Examples
-Examples of **incorrect** code for this rule:
+Examples of **incorrect** code for this rule with the default "record":
```ts
+/*eslint consistent-indexed-object-style: ["error", "record"]*/
+
interface Foo {
[key: string]: unknown;
}
@@ -37,9 +39,32 @@ type Foo = {
Examples of **correct** code for this rule:
```ts
+/*eslint consistent-indexed-object-style: ["error", "record"]*/
+
+type Foo = Record;
+```
+
+Examples of **incorrect** code for this rule with "index-signature":
+
+```ts
+/*eslint consistent-indexed-object-style: ["error", "index-signature"]*/
+
type Foo = Record;
```
+Examples of **correct** code for this rule:
+
+```ts
+/*eslint consistent-indexed-object-style: ["error", "index-signature"]*/
+
+interface Foo {
+ [key: string]: unknown;
+}
+type Foo = {
+ [key: string]: unknown;
+};
+```
+
## How to use
To **enable** this rule in the CLI or using the config file, you can use:
diff --git a/src/docs/guide/usage/linter/rules/version.data.js b/src/docs/guide/usage/linter/rules/version.data.js
index 252b537ba2..a9380b63e2 100644
--- a/src/docs/guide/usage/linter/rules/version.data.js
+++ b/src/docs/guide/usage/linter/rules/version.data.js
@@ -1,5 +1,5 @@
export default {
load() {
- return "d7076b31d244d4074d86aa9c7c835612766bb08b";
+ return "54cf5cb2536e9f9c1d00c259d04fc4bcf0007683";
},
};