language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | vercel | next.js | 11a161f2964fd1a25d07ff1deda4f2a3efa465bd.json | Add possible explanation for webpack resolve error (#6682)
When overriding `config.resolve.alias` incorrectly webpack will throw an error because private-next-pages is not defined. This adds a more descriptive error explaining the error better.
Fixes: #6681 | test/integration/config-resolve-alias/test/index.test.js | @@ -0,0 +1,19 @@
+/* eslint-env jest */
+/* global jasmine */
+import { join } from 'path'
+import { runNextCommand } from 'next-test-utils'
+
+jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
+
+describe('Invalid resolve alias', () => {
+ it('should show relevant error when webpack resolve alias is wrong', async () =... | true |
Other | vercel | next.js | 70a2c7834249328fc8a901fa31ce64e09c0cebbf.json | Remove empty paragraphs and missing examples (#6677)
Fixes #6639 and incorrect heading IDs. | packages/next/README.md | @@ -131,7 +131,6 @@ So far, we get:
- Server rendering and indexing of `./pages`
- Static file serving. `./static/` is mapped to `/static/` (given you [create a `./static/` directory](#static-file-serving-eg-images) inside your project)
-To see how simple this is, check out the [sample app - nextgram](https://githu... | false |
Other | vercel | next.js | eaaeb2ecf5fdcf0edbd33e0c4cc91e6019f1b771.json | Add codeowners file (#6672) | .github/CODEOWNERS | @@ -0,0 +1,8 @@
+# Learn how to add code owners here:
+# https://help.github.com/en/articles/about-code-owners
+
+/packages/ @timneutkens @Timer @dav-is @ijjk
+/examples/ @kheruc @lfades
+/test/ @timneutkens @Timer @dav-is @ijjk
+/bench/ @timneutkens @d... | false |
Other | vercel | next.js | 83334f11108fdb23246a2d5b95d20fb50697ce92.json | Convert change/getRouteInfo to not use async (#6648)
More updates to the router coming. | packages/next-server/lib/router/router.ts | @@ -35,7 +35,7 @@ export default class Router implements IRouterInterface {
subscriptions: Set<Subscription>
componentLoadCancel: (() => void) | null
pageLoader: any
- _beforePopState: BeforePopStateCallback
+ _bps: BeforePopStateCallback | undefined
static events: MittEmitter = mitt()
@@ -65,7 +65,6 ... | false |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/active-class-name/components/Link.js | @@ -7,7 +7,9 @@ const ActiveLink = ({ router, children, ...props }) => {
let className = child.props.className || null
if (router.pathname === props.href && props.activeClassName) {
- className = `${className !== null ? className : ''} ${props.activeClassName}`.trim()
+ className = `${className !== null ?... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/analyze-bundles/pages/about.js | @@ -1,3 +1 @@
-export default () => (
- <div>About us</div>
-)
+export default () => <div>About us</div> | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/analyze-bundles/pages/contact.js | @@ -1,5 +1 @@
-export default () => (
- <div>
- This is the contact page.
- </div>
-)
+export default () => <div>This is the contact page.</div> | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/analyze-bundles/pages/index.js | @@ -21,7 +21,9 @@ export default class Index extends React.Component {
<h1>Home Page</h1>
<p>Welcome, {name}</p>
<div>
- <Link href='/about'><a>About Page</a></Link>
+ <Link href='/about'>
+ <a>About Page</a>
+ </Link>
</div>
</div>
) | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/basic-export/pages/about.js | @@ -1,3 +1 @@
-export default () => (
- <div>About us</div>
-)
+export default () => <div>About us</div> | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/basic-export/pages/about2.js | @@ -1,3 +1 @@
-export default () => (
- <div>About 2</div>
-)
+export default () => <div>About 2</div> | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/basic-export/pages/day/index.js | @@ -1,3 +1 @@
-export default () => (
- <div>Hello Day</div>
-)
+export default () => <div>Hello Day</div> | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/basic-export/pages/index.js | @@ -1,4 +1,9 @@
import Link from 'next/link'
export default () => (
- <div>Hello World. <Link href='/about'><a>About</a></Link></div>
+ <div>
+ Hello World.{' '}
+ <Link href='/about'>
+ <a>About</a>
+ </Link>
+ </div>
) | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-charset/server.js | @@ -7,15 +7,13 @@ const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
-app.prepare()
- .then(() => {
- createServer((req, res) => {
- const parsedUrl = parse(req.url, true)
- res.setHeader('Content-Type', 'text/html; charset=iso-8859-2')
-... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/actions/render.js | @@ -1,5 +1,5 @@
'use strict'
-const {Action, api} = require('actionhero')
+const { Action, api } = require('actionhero')
module.exports = class CreateChatRoom extends Action {
constructor () { | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/config/api.js | @@ -3,7 +3,7 @@
const path = require('path')
exports['default'] = {
- general: (api) => {
+ general: api => {
const packageJSON = require(api.projectRoot + path.sep + 'package.json')
return {
@@ -46,16 +46,16 @@ exports['default'] = {
cliIncludeInternal: true,
// configuration for your a... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/config/errors.js | @@ -2,38 +2,38 @@
// error messages can be strings of objects
exports['default'] = {
- errors: (api) => {
+ errors: api => {
return {
- '_toExpand': false,
+ _toExpand: false,
// ///////////////
// SERIALIZERS //
// ///////////////
serializers: {
servers: {
... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/config/i18n.js | @@ -1,5 +1,5 @@
exports['default'] = {
- i18n: (api) => {
+ i18n: api => {
return {
// visit https://github.com/mashpie/i18n-node to see all configuration options
// locale path can be configired from within ./config/api.js
@@ -28,7 +28,7 @@ exports['default'] = {
}
exports.test = {
- i18n: (... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/config/logger.js | @@ -4,16 +4,18 @@ const fs = require('fs')
const cluster = require('cluster')
exports['default'] = {
- logger: (api) => {
- let logger = {transports: []}
+ logger: api => {
+ let logger = { transports: [] }
// console logger
if (cluster.isMaster) {
logger.transports.push(function (api, wi... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/config/plugins.js | @@ -1,5 +1,5 @@
exports['default'] = {
- plugins: (api) => {
+ plugins: api => {
/*
If you want to use plugins in your application, include them here:
| true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/config/redis.js | @@ -11,15 +11,20 @@ if (process.env.REDIS_URL) {
}
exports['default'] = {
- redis: (api) => {
+ redis: api => {
// konstructor: The redis client constructor method. All redis methods must be promises
// args: The arguments to pass to the constructor
// buildNew: is it `new konstructor()` or just `... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/config/routes.js | @@ -1,9 +1,7 @@
exports['default'] = {
- routes: (api) => {
+ routes: api => {
return {
- get: [
- { path: '/', matchTrailingPathParts: true, action: 'render' }
- ]
+ get: [{ path: '/', matchTrailingPathParts: true, action: 'render' }]
}
}
} | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/config/servers/socket.js | @@ -2,9 +2,9 @@
exports['default'] = {
servers: {
- socket: (api) => {
+ socket: api => {
return {
- enabled: (process.env.ENABLE_TCP_SERVER !== undefined),
+ enabled: process.env.ENABLE_TCP_SERVER !== undefined,
// TCP or TLS?
secure: false,
// Passed to tls.... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/config/servers/web.js | @@ -4,7 +4,7 @@ const os = require('os')
exports['default'] = {
servers: {
- web: (api) => {
+ web: api => {
return {
enabled: true,
// HTTP or HTTPS?
@@ -13,7 +13,9 @@ exports['default'] = {
serverOptions: {},
// Should we redirect all traffic to the first host in... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/config/servers/websocket.js | @@ -4,7 +4,7 @@
exports['default'] = {
servers: {
- websocket: (api) => {
+ websocket: api => {
return {
enabled: true,
// you can pass a FQDN (string) here or 'window.location.origin'
@@ -55,7 +55,7 @@ exports['default'] = {
exports['test'] = {
servers: {
- websocket: (api... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/config/tasks.js | @@ -1,5 +1,5 @@
exports['default'] = {
- tasks: (api) => {
+ tasks: api => {
return {
// Should this node run a scheduler to promote delayed tasks?
scheduler: false,
@@ -52,7 +52,7 @@ exports['default'] = {
}
exports.test = {
- tasks: (api) => {
+ tasks: api => {
return {
timeout... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/initializers/next.js | @@ -1,5 +1,5 @@
'use strict'
-const {Initializer, api} = require('actionhero')
+const { Initializer, api } = require('actionhero')
const next = require('next')
module.exports = class NextInitializer extends Initializer {
@@ -10,18 +10,22 @@ module.exports = class NextInitializer extends Initializer {
async in... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-actionhero/pages/index.js | @@ -3,7 +3,15 @@ import Link from 'next/link'
export default () => (
<ul>
- <li><Link href='/b' as='/a'><a>a</a></Link></li>
- <li><Link href='/a' as='/b'><a>b</a></Link></li>
+ <li>
+ <Link href='/b' as='/a'>
+ <a>a</a>
+ </Link>
+ </li>
+ <li>
+ <Link href='/a' as='/b'>
+ ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-express/pages/index.js | @@ -3,13 +3,18 @@ import Link from 'next/link'
export default () => (
<ul>
- <li><Link href='/b' as='/a'><a>a</a></Link></li>
- <li><Link href='/a' as='/b'><a>b</a></Link></li>
<li>
- <Link
- href={{pathname: '/posts', query: { id: '2' }}}
- as='/posts/2'
- >
+ <Link href='... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-express/pages/posts.js | @@ -6,12 +6,14 @@ export default class extends Component {
}
render () {
- return <div>
- <h1>My blog post #{this.props.postId}</h1>
- <p>
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
- tempor incididunt ut labore et dolore magna aliqua.
- </p>
- <... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-express/server.js | @@ -6,28 +6,27 @@ const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
-app.prepare()
- .then(() => {
- const server = express()
+app.prepare().then(() => {
+ const server = express()
- server.get('/a', (req, res) => {
- return app.render(... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-fastify/pages/index.js | @@ -3,7 +3,15 @@ import Link from 'next/link'
export default () => (
<ul>
- <li><Link href='/b' as='/a'><a>a</a></Link></li>
- <li><Link href='/a' as='/b'><a>b</a></Link></li>
+ <li>
+ <Link href='/b' as='/a'>
+ <a>a</a>
+ </Link>
+ </li>
+ <li>
+ <Link href='/a' as='/b'>
+ ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-fastify/server.js | @@ -6,51 +6,47 @@ const dev = process.env.NODE_ENV !== 'production'
fastify.register((fastify, opts, next) => {
const app = Next({ dev })
- app.prepare()
+ app
+ .prepare()
.then(() => {
if (dev) {
fastify.get('/_next/*', (req, reply) => {
- return app.handleRequest(req.req, rep... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-hapi/next-wrapper.js | @@ -13,7 +13,13 @@ const defaultHandlerWrapper = app => async ({ raw: { req, res }, url }) => {
}
const pathWrapper = (app, pathName, opts) => async ({ raw, query, params }) => {
- return app.renderToHTML(raw.req, raw.res, pathName, { ...query, ...params }, opts)
+ return app.renderToHTML(
+ raw.req,
+ raw.... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-hapi/pages/index.js | @@ -3,7 +3,15 @@ import Link from 'next/link'
export default () => (
<ul>
- <li><Link href='/b' as='/a'><a>a</a></Link></li>
- <li><Link href='/a' as='/b'><a>b</a></Link></li>
+ <li>
+ <Link href='/b' as='/a'>
+ <a>a</a>
+ </Link>
+ </li>
+ <li>
+ <Link href='/a' as='/b'>
+ ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-hapi/server.js | @@ -1,6 +1,10 @@
const next = require('next')
const Hapi = require('hapi')
-const { pathWrapper, defaultHandlerWrapper, nextHandlerWrapper } = require('./next-wrapper')
+const {
+ pathWrapper,
+ defaultHandlerWrapper,
+ nextHandlerWrapper
+} = require('./next-wrapper')
const port = parseInt(process.env.PORT, 10... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-koa/pages/index.js | @@ -3,7 +3,15 @@ import Link from 'next/link'
export default () => (
<ul>
- <li><Link href='/b' as='/a'><a>a</a></Link></li>
- <li><Link href='/a' as='/b'><a>b</a></Link></li>
+ <li>
+ <Link href='/b' as='/a'>
+ <a>a</a>
+ </Link>
+ </li>
+ <li>
+ <Link href='/a' as='/b'>
+ ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-koa/server.js | @@ -7,33 +7,32 @@ const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
-app.prepare()
- .then(() => {
- const server = new Koa()
- const router = new Router()
+app.prepare().then(() => {
+ const server = new Koa()
+ const router = new Router()
... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-micro/pages/index.js | @@ -3,7 +3,15 @@ import Link from 'next/link'
export default () => (
<ul>
- <li><Link href='/b' as='/a'><a>a</a></Link></li>
- <li><Link href='/a' as='/b'><a>b</a></Link></li>
+ <li>
+ <Link href='/b' as='/a'>
+ <a>a</a>
+ </Link>
+ </li>
+ <li>
+ <Link href='/a' as='/b'>
+ ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-nodemon/pages/index.js | @@ -3,7 +3,15 @@ import Link from 'next/link'
export default () => (
<ul>
- <li><Link href='/b' as='/a'><a>a</a></Link></li>
- <li><Link href='/a' as='/b'><a>b</a></Link></li>
+ <li>
+ <Link href='/b' as='/a'>
+ <a>a</a>
+ </Link>
+ </li>
+ <li>
+ <Link href='/a' as='/b'>
+ ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server-nodemon/server/index.js | @@ -7,22 +7,20 @@ const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
-app.prepare()
- .then(() => {
- createServer((req, res) => {
- const parsedUrl = parse(req.url, true)
- const { pathname, query } = parsedUrl
+app.prepare().then(() => ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server/pages/index.js | @@ -3,7 +3,15 @@ import Link from 'next/link'
export default () => (
<ul>
- <li><Link href='/b' as='/a'><a>a</a></Link></li>
- <li><Link href='/a' as='/b'><a>b</a></Link></li>
+ <li>
+ <Link href='/b' as='/a'>
+ <a>a</a>
+ </Link>
+ </li>
+ <li>
+ <Link href='/a' as='/b'>
+ ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/custom-server/server.js | @@ -7,22 +7,20 @@ const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
-app.prepare()
- .then(() => {
- createServer((req, res) => {
- const parsedUrl = parse(req.url, true)
- const { pathname, query } = parsedUrl
+app.prepare().then(() => ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/data-fetch/pages/index.js | @@ -14,7 +14,9 @@ export default class Index extends React.Component {
return (
<div>
<p>Next.js has {this.props.stars} ⭐️</p>
- <Link prefetch href='/preact'><a>How about preact?</a></Link>
+ <Link prefetch href='/preact'>
+ <a>How about preact?</a>
+ </Link>
<... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/data-fetch/pages/preact.js | @@ -14,7 +14,9 @@ export default class Preact extends React.Component {
return (
<div>
<p>Preact has {this.props.stars} ⭐️</p>
- <Link prefetch href='/'><a>I bet next has more stars (?)</a></Link>
+ <Link prefetch href='/'>
+ <a>I bet next has more stars (?)</a>
+ </Li... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/form-handler/actions/formActionsCreators.js | @@ -1,5 +1,5 @@
import { INPUT_VALUE } from '../constants'
export const inputChange = (title, name, val) => dispatch => {
- return dispatch({type: INPUT_VALUE, title, name, val})
+ return dispatch({ type: INPUT_VALUE, title, name, val })
} | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/form-handler/components/DisplayForm.js | @@ -1,4 +1,4 @@
-import React, {Component} from 'react'
+import React, { Component } from 'react'
import { Col, Row } from 'react-bootstrap'
import { connect } from 'react-redux'
@@ -9,7 +9,7 @@ class DisplayForm extends Component {
<div>
<Row>
<Col lg={8} lgOffset={2}>
- <pre>... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/form-handler/components/Header.js | @@ -6,7 +6,7 @@ const Header = () => {
<Row style={{ marginTop: '10px' }}>
<Col lg={8} lgOffset={2}>
<Jumbotron style={{ borderRadius: '15px' }}>
- <h1 style={{textAlign: 'center'}}>Form Handler</h1>
+ <h1 style={{ textAlign: 'center' }}>Form Handler</h1>
</Ju... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/form-handler/components/UserForm.js | @@ -16,7 +16,12 @@ const UserForm = () => {
<Input controlLabel='Email' type='email' title='user' name='email' />
</Col>
<Col lg={8} lgOffset={4}>
- <Input controlLabel='Password' type='password' title='user' name='password' />
+ <Input
+ controlLabel='Password'... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/form-handler/components/index.js | @@ -1,4 +1,4 @@
-import React, {Component} from 'react'
+import React, { Component } from 'react'
import Head from 'next/head'
import { Col, Row } from 'react-bootstrap'
@@ -14,7 +14,10 @@ class Main extends Component {
<div>
<Head>
<title>Form Handler</title>
- <link rel='styles... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/form-handler/handlers/Input.js | @@ -1,12 +1,12 @@
-import React, {Component} from 'react'
+import React, { Component } from 'react'
import { FormGroup, ControlLabel, FormControl } from 'react-bootstrap'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { inputChange } from '../actions'
class Input extend... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/form-handler/reducers/formReducer.js | @@ -3,11 +3,9 @@ import { INPUT_VALUE } from '../constants'
export default (state = {}, action) => {
switch (action.type) {
case INPUT_VALUE:
- return { ...state,
- [action.title]:
- { ...state[action.title],
- [action.name]: action.val
- }
+ return {
+ ...state,
... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/form-handler/server.js | @@ -5,7 +5,8 @@ const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
-app.prepare()
+app
+ .prepare()
.then(() => {
const server = express()
@@ -17,12 +18,12 @@ app.prepare()
return handle(req, res)
})
- server.listen(3000, (e... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/gh-pages/.babelrc.js | @@ -1,10 +1,6 @@
const env = require('./env-config')
module.exports = {
- 'presets': [
- 'next/babel'
- ],
- 'plugins': [
- ['transform-define', env]
- ]
+ presets: ['next/babel'],
+ plugins: [['transform-define', env]]
} | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/gh-pages/pages/about.js | @@ -2,6 +2,11 @@ import Link from 'next/link'
export default () => (
<div>
<div>About us</div>
- <div>Back to <Link href='/' as={process.env.BACKEND_URL + '/'}><a>Home</a></Link></div>
+ <div>
+ Back to{' '}
+ <Link href='/' as={process.env.BACKEND_URL + '/'}>
+ <a>Home</a>
+ </Link... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/gh-pages/pages/index.js | @@ -1,4 +1,9 @@
import Link from 'next/link'
export default () => (
- <div>Hello World. <Link href='/about' as={process.env.BACKEND_URL + '/about'}><a>About</a></Link></div>
+ <div>
+ Hello World.{' '}
+ <Link href='/about' as={process.env.BACKEND_URL + '/about'}>
+ <a>About</a>
+ </Link>
+ </div>
) | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/hello-world/pages/about.js | @@ -1,3 +1 @@
-export default () => (
- <div>About us</div>
-)
+export default () => <div>About us</div> | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/hello-world/pages/day/index.js | @@ -1,3 +1 @@
-export default () => (
- <div>Hello Day</div>
-)
+export default () => <div>Hello Day</div> | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/hello-world/pages/index.js | @@ -1,4 +1,9 @@
import Link from 'next/link'
export default () => (
- <div>Hello World. <Link href='/about'><a>About</a></Link></div>
+ <div>
+ Hello World.{' '}
+ <Link href='/about'>
+ <a>About</a>
+ </Link>
+ </div>
) | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/layout-component/components/layout.js | @@ -4,22 +4,28 @@ import Head from 'next/head'
export default ({ children, title = 'This is the default title' }) => (
<div>
<Head>
- <title>{ title }</title>
+ <title>{title}</title>
<meta charSet='utf-8' />
<meta name='viewport' content='initial-scale=1.0, width=device-width' />
... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/nested-components/components/post.js | @@ -1,7 +1,7 @@
export default ({ title, children }) => (
<div className='main'>
- <h1>{ title }</h1>
- { children }
+ <h1>{title}</h1>
+ {children}
<style jsx>{`
.main {
font: 15px Helvetica, Arial; | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/nested-components/pages/index.js | @@ -37,7 +37,7 @@ export default () => (
}
hr::before {
- content: "***";
+ content: '***';
color: #ccc;
}
`}</style> | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/only-client-render-external-dependencies/components/BarChart.js | @@ -5,8 +5,9 @@ export default dynamic({
BarChart: import('recharts').then(({ BarChart }) => BarChart),
Bar: import('recharts').then(({ Bar }) => Bar)
}),
- render: (props, { BarChart, Bar }) =>
+ render: (props, { BarChart, Bar }) => (
<BarChart width={props.width} height={props.height} data={props... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/only-client-render-external-dependencies/components/LineChart.js | @@ -5,8 +5,9 @@ export default dynamic({
LineChart: import('recharts').then(({ LineChart }) => LineChart),
Line: import('recharts').then(({ Line }) => Line)
}),
- render: (props, { LineChart, Line }) =>
+ render: (props, { LineChart, Line }) => (
<LineChart width={props.width} height={props.height} ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/only-client-render-external-dependencies/pages/chart.js | @@ -2,13 +2,13 @@ import React from 'react'
import BarChart from '../components/BarChart'
const data = [
- {name: 'Page A', uv: 4000, pv: 2400, amt: 2400},
- {name: 'Page B', uv: 3000, pv: 1398, amt: 2210},
- {name: 'Page C', uv: 2000, pv: 9800, amt: 2290},
- {name: 'Page D', uv: 2780, pv: 3908, amt: 2000},
- ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/only-client-render-external-dependencies/pages/index.js | @@ -3,13 +3,13 @@ import Link from 'next/link'
import LineChart from '../components/LineChart'
const data = [
- {name: 'Page A', uv: 1000, pv: 2400, amt: 2400},
- {name: 'Page B', uv: 3000, pv: 1398, amt: 2210},
- {name: 'Page C', uv: 2000, pv: 9800, amt: 2290},
- {name: 'Page D', uv: 2780, pv: 3908, amt: 2000}... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/parameterized-routing/pages/blog.js | @@ -6,12 +6,14 @@ export default class extends React.Component {
}
render () {
- return <div>
- <h1>My {this.props.id} blog post</h1>
- <p>
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
- tempor incididunt ut labore et dolore magna aliqua.
- </p>
- ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/parameterized-routing/pages/index.js | @@ -2,8 +2,20 @@ import Link from 'next/link'
export default () => (
<ul>
- <li><Link href='/blog?id=first' as='/blog/first'><a>My first blog post</a></Link></li>
- <li><Link href='/blog?id=second' as='/blog/second'><a>My second blog post</a></Link></li>
- <li><Link href='/blog?id=last' as='/blog/last'><... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/parameterized-routing/server.js | @@ -10,22 +10,20 @@ const handle = app.getRequestHandler()
const route = pathMatch()
const match = route('/blog/:id')
-app.prepare()
- .then(() => {
- createServer((req, res) => {
- const { pathname, query } = parse(req.url, true)
- const params = match(pathname)
- if (params === false) {
- ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/pass-server-data/pages/index.js | @@ -3,6 +3,10 @@ import Link from 'next/link'
export default () => (
<ul>
- <li><Link href='/item'><a>View Item</a></Link></li>
+ <li>
+ <Link href='/item'>
+ <a>View Item</a>
+ </Link>
+ </li>
</ul>
) | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/pass-server-data/pages/item.js | @@ -1,4 +1,4 @@
-import {Component} from 'react'
+import { Component } from 'react'
import Link from 'next/link'
import fetch from 'isomorphic-unfetch'
@@ -15,7 +15,9 @@ export default class extends Component {
return { item: query.itemData }
} else {
// On the client, we should fetch the data re... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/pass-server-data/server.js | @@ -32,7 +32,7 @@ app.prepare().then(() => {
return handle(req, res)
})
- server.listen(3000, (err) => {
+ server.listen(3000, err => {
if (err) throw err
console.log('> Ready on http://localhost:3000')
}) | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/progressive-render/pages/index.js | @@ -5,9 +5,7 @@ import Loading from '../components/Loading'
export default () => (
<main>
<section>
- <h1>
- This section is server-side rendered.
- </h1>
+ <h1>This section is server-side rendered.</h1>
</section>
<NoSSR onSSR={<Loading />}> | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/root-static-files/pages/index.js | @@ -1,7 +1,13 @@
export default () => (
<ul>
- <li><a href='/robots.txt'>/robots.txt</a></li>
- <li><a href='/sitemap.xml'>/sitemap.xml</a></li>
- <li><a href='/favicon.ico'>/favicon.ico</a></li>
+ <li>
+ <a href='/robots.txt'>/robots.txt</a>
+ </li>
+ <li>
+ <a href='/sitemap.xml'>/site... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/root-static-files/server.js | @@ -8,24 +8,18 @@ const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
-app.prepare()
- .then(() => {
- createServer((req, res) => {
- const parsedUrl = parse(req.url, true)
- const rootStaticFiles = [
- '/robots.txt',
- '/sit... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/shared-modules/components/Header.js | @@ -3,11 +3,11 @@ import Link from 'next/link'
export default () => (
<div>
<Link href='/'>
- <a style={styles.a} >Home</a>
+ <a style={styles.a}>Home</a>
</Link>
<Link href='/about'>
- <a style={styles.a} >About</a>
+ <a style={styles.a}>About</a>
</Link>
</div>
) | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/ssr-caching/pages/blog.js | @@ -6,12 +6,14 @@ export default class extends React.Component {
}
render () {
- return <div>
- <h1>My {this.props.id} blog post</h1>
- <p>
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
- tempor incididunt ut labore et dolore magna aliqua.
- </p>
- ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/ssr-caching/pages/index.js | @@ -2,8 +2,20 @@ import Link from 'next/link'
export default () => (
<ul>
- <li><Link href='/blog?id=first' as='/blog/first'><a>My first blog post</a></Link></li>
- <li><Link href='/blog?id=second' as='/blog/second'><a>My second blog post</a></Link></li>
- <li><Link href='/blog?id=last' as='/blog/last'><... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/ssr-caching/server.js | @@ -16,29 +16,28 @@ const ssrCache = new LRUCache({
maxAge: 1000 * 60 * 60 // 1hour
})
-app.prepare()
- .then(() => {
- const server = express()
+app.prepare().then(() => {
+ const server = express()
- // Use the `renderAndCache` utility defined below to serve pages
- server.get('/', (req, res) => {
... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-inferno/next.config.js | @@ -7,7 +7,7 @@ module.exports = {
}
config.resolve.alias = {
- 'react': 'inferno-compat',
+ react: 'inferno-compat',
'react-dom': 'inferno-compat'
}
return config | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-inferno/pages/about.js | @@ -1,5 +1,3 @@
import React from 'react'
-export default () => (
- <div>About us</div>
-)
+export default () => <div>About us</div> | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-inferno/pages/index.js | @@ -2,5 +2,10 @@ import React from 'react'
import Link from 'next/link'
export default () => (
- <div>Hello World. <Link prefetch href='/about'><a>About</a></Link></div>
+ <div>
+ Hello World.{' '}
+ <Link prefetch href='/about'>
+ <a>About</a>
+ </Link>
+ </div>
) | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-inferno/server.js | @@ -17,14 +17,12 @@ const next = require('next')
const app = next({ dev })
const handle = app.getRequestHandler()
-app.prepare()
- .then(() => {
- createServer((req, res) => {
- const parsedUrl = parse(req.url, true)
- handle(req, res, parsedUrl)
- })
- .listen(port, (err) => {
- if (er... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-nerv/pages/about.js | @@ -1,5 +1,3 @@
import React from 'react'
-export default () => (
- <div>About us</div>
-)
+export default () => <div>About us</div> | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-nerv/pages/index.js | @@ -2,5 +2,10 @@ import React from 'react'
import Link from 'next/link'
export default () => (
- <div>Hello World. <Link href='/about'><a>About</a></Link></div>
+ <div>
+ Hello World.{' '}
+ <Link href='/about'>
+ <a>About</a>
+ </Link>
+ </div>
) | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-nerv/server.js | @@ -16,14 +16,12 @@ const next = require('next')
const app = next({ dev })
const handle = app.getRequestHandler()
-app.prepare()
- .then(() => {
- createServer((req, res) => {
- const parsedUrl = parse(req.url, true)
- handle(req, res, parsedUrl)
- })
- .listen(port, (err) => {
- if (er... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-preact/pages/about.js | @@ -1,5 +1,3 @@
import React from 'react'
-export default () => (
- <div>About us</div>
-)
+export default () => <div>About us</div> | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-preact/pages/index.js | @@ -2,5 +2,10 @@ import React from 'react'
import Link from 'next/link'
export default () => (
- <div>Hello World. <Link href='/about'><a>About</a></Link></div>
+ <div>
+ Hello World.{' '}
+ <Link href='/about'>
+ <a>About</a>
+ </Link>
+ </div>
) | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-preact/server.js | @@ -10,14 +10,12 @@ const next = require('next')
const app = next({ dev })
const handle = app.getRequestHandler()
-app.prepare()
- .then(() => {
- createServer((req, res) => {
- const parsedUrl = parse(req.url, true)
- handle(req, res, parsedUrl)
- })
- .listen(port, (err) => {
- if (er... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-router/components/Header.js | @@ -13,7 +13,7 @@ export default () => (
// and use it manually
function onClickHandler (href) {
- return (e) => {
+ return e => {
e.preventDefault()
Router.push(href)
} | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-router/pages/error.js | @@ -1,4 +1,4 @@
-import {Component} from 'react'
+import { Component } from 'react'
import Header from '../components/Header'
import Router from 'next/router'
| true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-with-router/components/ActiveLink.js | @@ -10,7 +10,7 @@ const ActiveLink = ({ children, router, href }) => {
color: router.pathname === href ? 'red' : 'black'
}
- const handleClick = (e) => {
+ const handleClick = e => {
e.preventDefault()
router.push(href)
} | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/using-with-router/pages/error.js | @@ -1,4 +1,4 @@
-import {Component} from 'react'
+import { Component } from 'react'
import Header from '../components/Header'
import Router from 'next/router'
| true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/with-algolia-react-instantsearch/components/app.js | @@ -10,7 +10,7 @@ import {
} from 'react-instantsearch/dom'
import { InstantSearch } from './instantsearch'
-const HitComponent = ({ hit }) =>
+const HitComponent = ({ hit }) => (
<div className='hit'>
<div>
<div className='hit-picture'>
@@ -20,12 +20,8 @@ const HitComponent = ({ hit }) =>
<div ... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/with-algolia-react-instantsearch/components/head.js | @@ -6,7 +6,7 @@ const defaultDescription = ''
const defaultOGURL = ''
const defaultOGImage = ''
-export const Head = props =>
+export const Head = props => (
<NextHead>
<meta charSet='UTF-8' />
<title>{props.title || ''}</title>
@@ -37,6 +37,7 @@ export const Head = props =>
/>
<link rel='sty... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/with-algolia-react-instantsearch/pages/index.js | @@ -13,7 +13,7 @@ export default class extends React.Component {
static propTypes = {
resultsState: PropTypes.object,
searchState: PropTypes.object
- };
+ }
constructor (props) {
super(props)
@@ -42,7 +42,7 @@ export default class extends React.Component {
})
}, updateAfter)
th... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/with-amp/components/Byline.js | @@ -1,5 +1 @@
-export default ({ author }) => (
- <div className='byline'>
- By {author}
- </div>
-)
+export default ({ author }) => <div className='byline'>By {author}</div> | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/with-amp/pages/_document.js | @@ -8,8 +8,14 @@ export default class MyDocument extends Document {
<Head>
<link rel='canonical' href='/' />
<meta name='viewport' content='width=device-width,minimum-scale=1' />
- <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Roboto' />
- <style a... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/with-amp/pages/dog.js | @@ -8,12 +8,76 @@ export default () => (
</Head>
<h1>The Dog</h1>
<Byline author='Meow Meow Fuzzyface' />
- <amp-img src='/static/dog.jpg' width='470' height='350' layout='responsive' alt='Woof' />
+ <amp-img
+ src='/static/dog.jpg'
+ width='470'
+ height='350'
+ layout='respons... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/with-amp/pages/index.js | @@ -8,12 +8,190 @@ export default () => (
</Head>
<h1>The Cat</h1>
<Byline author='Dan Zajdband' />
- <amp-img src='/static/cat.jpg' width='470' height='350' layout='responsive' alt='Meow' />
+ <amp-img
+ src='/static/cat.jpg'
+ width='470'
+ height='350'
+ layout='responsive'
+... | true |
Other | vercel | next.js | 9c4eefcdbf4058b65c8b88fe98387166acad127b.json | Add prettier for examples directory (#5909)
* Add prettier for examples directory
* Fix files
* Fix linting
* Add prettier script in case it has to be ran again | examples/with-ant-design-less/next.config.js | @@ -6,21 +6,17 @@ const path = require('path')
// Where your antd-custom.less file lives
const themeVariables = lessToJS(
- fs.readFileSync(
- path.resolve(__dirname, './assets/antd-custom.less'),
- 'utf8'
- )
+ fs.readFileSync(path.resolve(__dirname, './assets/antd-custom.less'), 'utf8')
)
// fix: pre... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.