Skip to content

Commit 6d4bb46

Browse files
Merge branch 'canary' into bug/#28194
2 parents 2920ed6 + 517ea6d commit 6d4bb46

File tree

55 files changed

+1483
-444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1483
-444
lines changed

.github/workflows/build_test_deploy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ jobs:
2929
with:
3030
fetch-depth: 25
3131

32+
# https://github.com/actions/virtual-environments/issues/1187
33+
- name: tune linux network
34+
run: sudo ethtool -K eth0 tx off rx off
35+
3236
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
3337
- run: yarn install --frozen-lockfile --check-files
3438
- run: node run-tests.js --timings --write-timings -g 1/1
@@ -61,6 +65,10 @@ jobs:
6165
env:
6266
NEXT_TELEMETRY_DISABLED: 1
6367
steps:
68+
# https://github.com/actions/virtual-environments/issues/1187
69+
- name: tune linux network
70+
run: sudo ethtool -K eth0 tx off rx off
71+
6472
- uses: actions/cache@v2
6573
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
6674
id: restore-build
@@ -115,6 +123,11 @@ jobs:
115123
group: [1, 2, 3, 4, 5, 6]
116124
steps:
117125
- run: echo ${{needs.build.outputs.docsChange}}
126+
127+
# https://github.com/actions/virtual-environments/issues/1187
128+
- name: tune linux network
129+
run: sudo ethtool -K eth0 tx off rx off
130+
118131
- uses: actions/cache@v2
119132
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
120133
id: restore-build
@@ -191,6 +204,10 @@ jobs:
191204
NEXT_PRIVATE_TEST_WEBPACK4_MODE: 1
192205

193206
steps:
207+
# https://github.com/actions/virtual-environments/issues/1187
208+
- name: tune linux network
209+
run: sudo ethtool -K eth0 tx off rx off
210+
194211
- uses: actions/cache@v2
195212
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
196213
id: restore-build
@@ -231,6 +248,10 @@ jobs:
231248
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
232249
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
233250
steps:
251+
# https://github.com/actions/virtual-environments/issues/1187
252+
- name: tune linux network
253+
run: sudo ethtool -K eth0 tx off rx off
254+
234255
- uses: actions/cache@v2
235256
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
236257
id: restore-build
@@ -253,6 +274,10 @@ jobs:
253274
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
254275
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
255276
steps:
277+
# https://github.com/actions/virtual-environments/issues/1187
278+
- name: tune linux network
279+
run: sudo ethtool -K eth0 tx off rx off
280+
256281
- uses: actions/cache@v2
257282
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
258283
id: restore-build
@@ -270,6 +295,10 @@ jobs:
270295
env:
271296
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
272297
steps:
298+
# https://github.com/actions/virtual-environments/issues/1187
299+
- name: tune linux network
300+
run: sudo ethtool -K eth0 tx off rx off
301+
273302
- uses: actions/cache@v2
274303
id: restore-build
275304
with:
@@ -318,6 +347,17 @@ jobs:
318347
runs-on: ${{ matrix.os }}
319348

320349
steps:
350+
# https://github.com/actions/virtual-environments/issues/1187
351+
- name: tune linux network
352+
run: sudo ethtool -K eth0 tx off rx off
353+
if: ${{ matrix.os == 'ubuntu-18.04' }}
354+
- name: tune windows network
355+
run: Disable-NetAdapterChecksumOffload -Name * -TcpIPv4 -UdpIPv4 -TcpIPv6 -UdpIPv6
356+
if: ${{ matrix.os == 'windows-latest' }}
357+
- name: tune mac network
358+
run: sudo sysctl -w net.link.generic.system.hwcksum_tx=0 && sudo sysctl -w net.link.generic.system.hwcksum_rx=0
359+
if: ${{ matrix.os == 'macos-latest' }}
360+
321361
- uses: actions/checkout@v2
322362
with:
323363
fetch-depth: 25

docs/basic-features/eslint.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,25 @@ Next.js provides an ESLint plugin, [`eslint-plugin-next`](https://www.npmjs.com/
101101

102102
If you already have ESLint configured in your application, we recommend extending from this plugin directly instead of including `eslint-config-next` unless a few conditions are met. Refer to the [Recommended Plugin Ruleset](/docs/basic-features/eslint.md#recommended-plugin-ruleset) to learn more.
103103

104+
### Custom Settings
105+
106+
#### `rootDir`
107+
108+
If you're using `eslint-plugin-next` in a project where Next.js isn't installed in your root directory (such as a monorepo), you can tell `eslint-plugin-next` where to find your Next.js application using the `settings` property in your `.eslintrc`:
109+
110+
```json
111+
{
112+
"extends": "next",
113+
"settings": {
114+
"next": {
115+
"rootDir": "/packages/my-app/"
116+
}
117+
}
118+
}
119+
```
120+
121+
`rootDir` can be a path (relative or absolute), a glob (i.e. `"/packages/*/"`), or an array of paths and/or globs.
122+
104123
## Linting Custom Directories
105124

106125
By default, Next.js will run ESLint for all files in the `pages/`, `components/`, and `lib/` directories. However, you can specify which directories using the `dirs` option in the `eslint` config in `next.config.js` for production builds:

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,24 @@ function Home() {
4040
export default Home
4141
```
4242

43+
### Options
44+
45+
#### `pagesDir`
46+
47+
This rule can normally locate your `pages` directory automatically.
48+
49+
If you're working in a monorepo, we recommend configuring the [`rootDir`](/docs/basic-features/eslint.md#rootDir) setting in `eslint-plugin-next`, which `pagesDir` will use to locate your `pages` directory.
50+
51+
In some cases, you may also need to configure this rule directly by providing a `pages` directory. This can be a path or an array of paths.
52+
53+
```json
54+
{
55+
"rules": {
56+
"@next/next/no-html-link-for-pages": ["error", "/my-app/pages/"]
57+
}
58+
}
59+
```
60+
4361
### Useful Links
4462

4563
- [next/link API Reference](https://nextjs.org/docs/api-reference/next/link)

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
"registry": "https://registry.npmjs.org/"
1818
}
1919
},
20-
"version": "11.1.1-canary.10"
20+
"version": "11.1.1-canary.12"
2121
}

packages/create-next-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-next-app",
3-
"version": "11.1.1-canary.10",
3+
"version": "11.1.1-canary.12",
44
"keywords": [
55
"react",
66
"next",

packages/eslint-config-next/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-next",
3-
"version": "11.1.1-canary.10",
3+
"version": "11.1.1-canary.12",
44
"description": "ESLint configuration used by NextJS.",
55
"main": "index.js",
66
"license": "MIT",
@@ -9,7 +9,7 @@
99
"directory": "packages/eslint-config-next"
1010
},
1111
"dependencies": {
12-
"@next/eslint-plugin-next": "11.1.1-canary.10",
12+
"@next/eslint-plugin-next": "11.1.1-canary.12",
1313
"@rushstack/eslint-patch": "^1.0.6",
1414
"@typescript-eslint/parser": "^4.20.0",
1515
"eslint-import-resolver-node": "^0.3.4",

packages/eslint-plugin-next/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/eslint-plugin-next",
3-
"version": "11.1.1-canary.10",
3+
"version": "11.1.1-canary.12",
44
"description": "ESLint plugin for NextJS.",
55
"main": "lib/index.js",
66
"license": "MIT",

packages/next-bundle-analyzer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/bundle-analyzer",
3-
"version": "11.1.1-canary.10",
3+
"version": "11.1.1-canary.12",
44
"main": "index.js",
55
"license": "MIT",
66
"repository": {

packages/next-codemod/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/codemod",
3-
"version": "11.1.1-canary.10",
3+
"version": "11.1.1-canary.12",
44
"license": "MIT",
55
"dependencies": {
66
"chalk": "4.1.0",

packages/next-env/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next/env",
3-
"version": "11.1.1-canary.10",
3+
"version": "11.1.1-canary.12",
44
"keywords": [
55
"react",
66
"next",

0 commit comments

Comments
 (0)