Skip to content

Commit 8df8d66

Browse files
committed
chore: fix linting
1 parent eab676b commit 8df8d66

File tree

21 files changed

+42
-29
lines changed

21 files changed

+42
-29
lines changed

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const { overrides } = require('@netlify/eslint-config-node')
1+
const { overrides } = require('@netlify/eslint-config-node/react_config')
22

33
module.exports = {
4-
extends: '@netlify/eslint-config-node',
4+
extends: '@netlify/eslint-config-node/react_config',
55
rules: {
66
complexity: 0,
77
'fp/no-let': 0,

demo/.eslintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "next",
3+
"root": true
4+
}

demo/next.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
// Supported targets are "serverless" and "experimental-serverless-trace"
3+
target: "serverless"
4+
}

demo/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,5 @@
1111
"next": "^11.0.0",
1212
"react": "17.0.2",
1313
"react-dom": "17.0.2"
14-
},
15-
"devDependencies": {
16-
"eslint-config-next": "^11.0.0"
1714
}
1815
}

demo/pages/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const Index = ({ shows }) => (
6161
<h1>3. Catch-All Routes? Included ✔</h1>
6262
<p>
6363
You can even take advantage of{' '}
64-
<a href="https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes">NextJS' catch-all routes feature</a>
64+
<a href="https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes">NextJS catch-all routes feature</a>
6565
.
6666
<br />
6767
Here are three examples:
@@ -90,7 +90,7 @@ const Index = ({ shows }) => (
9090
<br />
9191
Only dynamic pages are server-side rendered.
9292
<br />
93-
Static pages are pre-rendered and served directly by Netlify's CDN.
93+
Static pages are pre-rendered and served directly by Netlify&apos;s CDN.
9494
</p>
9595

9696
<ul>

demo/pages/static.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const Static = (props) => (
99
<br />
1010
It is never server-side rendered.
1111
<br />
12-
It is served directly by Netlify's CDN.
12+
It is served directly by Netlify&apos;s CDN.
1313
<br />
1414
The <a href="https://www.npmjs.com/package/next-on-netlify">next-on-netlify</a> npm package takes care of deciding
1515
which pages to render server-side and which ones to serve directly via CDN.

demo/pages/static/[id].js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const StaticWithID = (props) => (
99
<br />
1010
It is never server-side rendered.
1111
<br />
12-
It is served directly by Netlify's CDN.
12+
It is served directly by Netlify&apos;s CDN.
1313
<br />
1414
<br />
1515
But it has a dynamic URL parameter: /static/:id.
@@ -18,7 +18,7 @@ const StaticWithID = (props) => (
1818
<br />
1919
I am not sure what this is useful for.
2020
<br />
21-
But it's a feature of NextJS, so... I'm supporting it.
21+
But it&apos;s a feature of NextJS, so... I&apos;m supporting it.
2222
</p>
2323

2424
<hr />

src/cypress/fixtures/pages-with-i18n/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const Index = ({ shows }) => (
6161
<h1>3. Catch-All Routes? Included ✔</h1>
6262
<p>
6363
You can even take advantage of{' '}
64-
<a href="https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes">NextJS' catch-all routes feature</a>
64+
<a href="https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes">NextJS catch-all routes feature</a>
6565
.
6666
<br />
6767
Here are three examples:
@@ -198,7 +198,7 @@ const Index = ({ shows }) => (
198198
<br />
199199
Only dynamic pages are server-side rendered.
200200
<br />
201-
Static pages are pre-rendered and served directly by Netlify's CDN.
201+
Static pages are pre-rendered and served directly by Netlify&apos;s CDN.
202202
</p>
203203

204204
<ul>

src/cypress/fixtures/pages-with-i18n/static.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const Static = (props) => (
99
<br />
1010
It is never server-side rendered.
1111
<br />
12-
It is served directly by Netlify's CDN.
12+
It is served directly by Netlify&apos;s CDN.
1313
<br />
1414
The <a href="https://www.npmjs.com/package/next-on-netlify">next-on-netlify</a> npm package takes care of deciding
1515
which pages to render server-side and which ones to serve directly via CDN.

src/cypress/fixtures/pages-with-i18n/static/[id].js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const StaticWithID = (props) => (
99
<br />
1010
It is never server-side rendered.
1111
<br />
12-
It is served directly by Netlify's CDN.
12+
It is served directly by Netlify&apos;s CDN.
1313
<br />
1414
<br />
1515
But it has a dynamic URL parameter: /static/:id.
@@ -18,7 +18,7 @@ const StaticWithID = (props) => (
1818
<br />
1919
I am not sure what this is useful for.
2020
<br />
21-
But it's a feature of NextJS, so... I'm supporting it.
21+
But it&apos;s a feature of NextJS, so... I&apos;m supporting it.
2222
</p>
2323

2424
<hr />

src/cypress/fixtures/pages/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const Index = ({ shows }) => (
6161
<h1>3. Catch-All Routes? Included ✔</h1>
6262
<p>
6363
You can even take advantage of{' '}
64-
<a href="https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes">NextJS' catch-all routes feature</a>
64+
<a href="https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes">NextJS catch-all routes feature</a>
6565
.
6666
<br />
6767
Here are three examples:
@@ -198,7 +198,7 @@ const Index = ({ shows }) => (
198198
<br />
199199
Only dynamic pages are server-side rendered.
200200
<br />
201-
Static pages are pre-rendered and served directly by Netlify's CDN.
201+
Static pages are pre-rendered and served directly by Netlify&apos;s CDN.
202202
</p>
203203

204204
<ul>

src/cypress/fixtures/pages/static.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const Static = (props) => (
99
<br />
1010
It is never server-side rendered.
1111
<br />
12-
It is served directly by Netlify's CDN.
12+
It is served directly by Netlify&apos;s CDN.
1313
<br />
1414
The <a href="https://www.npmjs.com/package/next-on-netlify">next-on-netlify</a> npm package takes care of deciding
1515
which pages to render server-side and which ones to serve directly via CDN.

src/cypress/fixtures/pages/static/[id].js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const StaticWithID = (props) => (
99
<br />
1010
It is never server-side rendered.
1111
<br />
12-
It is served directly by Netlify's CDN.
12+
It is served directly by Netlify&apos;s CDN.
1313
<br />
1414
<br />
1515
But it has a dynamic URL parameter: /static/:id.
@@ -18,7 +18,7 @@ const StaticWithID = (props) => (
1818
<br />
1919
I am not sure what this is useful for.
2020
<br />
21-
But it's a feature of NextJS, so... I'm supporting it.
21+
But it&apos;s a feature of NextJS, so... I&apos;m supporting it.
2222
</p>
2323

2424
<hr />

src/lib/steps/copyNextAssets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { copySync, existsSync } = require('fs-extra')
55
const getNextDistDir = require('../helpers/getNextDistDir')
66
const { logTitle } = require('../helpers/logger')
77

8-
// Copy the NextJS' static assets from NextJS distDir to Netlify publish folder.
8+
// Copy the NextJS static assets from NextJS distDir to Netlify publish folder.
99
// These need to be available for NextJS to work.
1010
const copyNextAssets = async (publishPath) => {
1111
const nextDistDir = await getNextDistDir()

src/tests/fixtures/.eslintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "next",
3+
"root": true
4+
}

src/tests/fixtures/pages-dynamic-imports/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const Index = ({ shows }) => (
6464
<h1>3. Catch-All Routes? Included ✔</h1>
6565
<p>
6666
You can even take advantage of{' '}
67-
<a href="https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes">NextJS' catch-all routes feature</a>
67+
<a href="https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes">NextJS catch-all routes feature</a>
6868
.
6969
<br />
7070
Here are three examples:
@@ -93,7 +93,7 @@ const Index = ({ shows }) => (
9393
<br />
9494
Only dynamic pages are server-side rendered.
9595
<br />
96-
Static pages are pre-rendered and served directly by Netlify's CDN.
96+
Static pages are pre-rendered and served directly by Netlify&apos;s CDN.
9797
</p>
9898

9999
<ul>

src/tests/fixtures/pages/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const Index = ({ shows }) => (
6161
<h1>3. Catch-All Routes? Included ✔</h1>
6262
<p>
6363
You can even take advantage of{' '}
64-
<a href="https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes">NextJS' catch-all routes feature</a>
64+
<a href="https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes">NextJS catch-all routes feature</a>
6565
.
6666
<br />
6767
Here are three examples:
@@ -90,7 +90,7 @@ const Index = ({ shows }) => (
9090
<br />
9191
Only dynamic pages are server-side rendered.
9292
<br />
93-
Static pages are pre-rendered and served directly by Netlify's CDN.
93+
Static pages are pre-rendered and served directly by Netlify&apos;s CDN.
9494
</p>
9595

9696
<ul>

src/tests/fixtures/pages/static.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const Static = (props) => (
99
<br />
1010
It is never server-side rendered.
1111
<br />
12-
It is served directly by Netlify's CDN.
12+
It is served directly by Netlify&apos;s CDN.
1313
<br />
1414
The <a href="https://www.npmjs.com/package/next-on-netlify">next-on-netlify</a> npm package takes care of deciding
1515
which pages to render server-side and which ones to serve directly via CDN.

src/tests/fixtures/pages/static/[id].js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const StaticWithID = (props) => (
99
<br />
1010
It is never server-side rendered.
1111
<br />
12-
It is served directly by Netlify's CDN.
12+
It is served directly by Netlify&apos;s CDN.
1313
<br />
1414
<br />
1515
But it has a dynamic URL parameter: /static/:id.
@@ -18,7 +18,7 @@ const StaticWithID = (props) => (
1818
<br />
1919
I am not sure what this is useful for.
2020
<br />
21-
But it's a feature of NextJS, so... I'm supporting it.
21+
But it&apos;s a feature of NextJS, so... I&apos;m supporting it.
2222
</p>
2323

2424
<hr />

src/tests/helpers/buildNextApp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class NextAppBuilder {
2727
emptyDirSync(this.__stagingPath)
2828
emptyDirSync(this.__appPath)
2929

30-
return this
30+
return this.withFile('.eslintrc')
3131
}
3232

3333
// Copy the fixture folder with the pagesFolder name to

test/sample/.eslintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "next",
3+
"root": true
4+
}

0 commit comments

Comments
 (0)