Skip to content

Commit 5c6c385

Browse files
authoredJan 26, 2022
Use relative path for example (#33565)
The paths starting with slashes in the ESLint config examples are absolute, which are almost never the correct configuration for a project. Using a relative path is a much more common configuration, and leads to much less debugging why these examples don't work. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
1 parent 65c63c9 commit 5c6c385

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎docs/basic-features/eslint.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ If you're using `eslint-plugin-next` in a project where Next.js isn't installed
114114
"extends": "next",
115115
"settings": {
116116
"next": {
117-
"rootDir": "/packages/my-app/"
117+
"rootDir": "packages/my-app/"
118118
}
119119
}
120120
}
121121
```
122122

123-
`rootDir` can be a path (relative or absolute), a glob (i.e. `"/packages/*/"`), or an array of paths and/or globs.
123+
`rootDir` can be a path (relative or absolute), a glob (i.e. `"packages/*/"`), or an array of paths and/or globs.
124124

125125
## Linting Custom Directories and Files
126126

‎errors/no-html-link-for-pages.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ In some cases, you may also need to configure this rule directly by providing a
5353
```json
5454
{
5555
"rules": {
56-
"@next/next/no-html-link-for-pages": ["error", "/my-app/pages/"]
56+
"@next/next/no-html-link-for-pages": ["error", "packages/my-app/pages/"]
5757
}
5858
}
5959
```

0 commit comments

Comments
 (0)
Please sign in to comment.