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 | 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-ioc/__tests__/blog.page_with_provide.test.js | @@ -21,14 +21,14 @@ import App from '../pages/blog.js'
describe('With Enzyme', () => {
it('Blog renders components', () => {
- const app = shallow(<App post={{title: 'Hi There!'}} />).dive()
+ const app = shallow(<App post={{ title: 'Hi There!' }} />).dive()
expect(app.find('h1').text()).toEqual('Hi 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-ioc/__tests__/endpoint.component_with_inject.test.js | @@ -23,13 +23,25 @@ describe('With Enzyme', () => {
const injected = shallow(<Component Link={() => {}} />)
const component = injected.dive()
expect(component.find('h3').text()).toEqual('Endpoint')
- expect(component.find('Link').first().find('a').text()).toEqual('About: foo baz')
+ expect(
+ ... | 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-ioc/__tests__/index.page_without_provide.test.js | @@ -13,7 +13,12 @@ import App from '../pages/index.js'
describe('With Enzyme', () => {
it('App shows "Menu"', () => {
const app = shallow(<App />)
- expect(app.find('li a').first().text()).toEqual('Blog: Hello world')
+ expect(
+ app
+ .find('li a')
+ .first()
+ .text()
+ ).t... | 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-ioc/components/component1.js | @@ -2,7 +2,9 @@ import React from 'react'
import Component2 from './component2'
export default () => (
- <div style={{ marginTop: '5px', border: '1px dotted #ff0000', padding: '10px' }}>
+ <div
+ style={{ marginTop: '5px', border: '1px dotted #ff0000', padding: '10px' }}
+ >
<h3>Component1</h3>
Know... | 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-ioc/components/component2.js | @@ -3,7 +3,9 @@ import Endpoint from './endpoint'
import EndButton from './endbutton'
export default () => (
- <div style={{ marginTop: '5px', border: '1px dashed #0000ff', padding: '10px' }}>
+ <div
+ style={{ marginTop: '5px', border: '1px dashed #0000ff', padding: '10px' }}
+ >
<h3>Component2</h3>
... | 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-ioc/components/endbutton.js | @@ -6,15 +6,23 @@ import PropTypes from 'prop-types'
Router: PropTypes.object
})
export default class extends React.Component {
- render () {
+ render() {
const { Router } = this.props
return (
- <div style={{ marginTop: '5px', border: '1px dashed #00ff00', padding: '10px' }}>
+ <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-ioc/components/endpoint.js | @@ -12,17 +12,27 @@ export default class extends React.Component {
Link: PropTypes.func.isRequired
}
- render () {
+ render() {
const { Link } = this.props
return (
- <div style={{ marginTop: '5px', border: '1px dashed #00ff00', padding: '10px' }}>
+ <div
+ style={{
+ m... | 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-ioc/pages/about.js | @@ -1 +1,3 @@
-export default props => <h1>About foo – no `Link` ({typeof props.Link}) available here</h1>
+export default props => (
+ <h1>About foo – no `Link` ({typeof props.Link}) available here</h1>
+) | 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-ioc/pages/blog.js | @@ -16,7 +16,7 @@ const posts = [
Router
})
export default class extends React.Component {
- static async getInitialProps ({ query, res }) {
+ static async getInitialProps({ query, res }) {
const post = posts.find(post => post.slug === query.slug)
if (!post && res) {
@@ -26,7 +26,7 @@ export default ... | 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-ioc/pages/index.js | @@ -2,10 +2,30 @@ import { Link, Router } from '../routes'
export default () => (
<ul>
- <li><Link route='blog' params={{ slug: 'hello-world' }}><a>Blog: Hello world</a></Link></li>
- <li><Link route='blog' params={{ slug: 'another-blog-post' }}><a>Blog: Another blog post</a></Link></li>
- <li><Link rout... | 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-ioc/routes.js | @@ -1,5 +1,5 @@
const nextRoutes = require('next-routes')
-const routes = module.exports = nextRoutes()
+const routes = (module.exports = nextRoutes())
routes.add('blog', '/blog/:slug')
routes.add('about', '/about-us/:foo(bar|baz)') | 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-ioc/server.js | @@ -7,11 +7,9 @@ const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handler = routes.getRequestHandler(app)
-app.prepare()
- .then(() => {
- createServer(handler)
- .listen(port, (err) => {
- if (err) throw err
- console.log(`> Ready on http://localhost:${port}`... | 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-jest-typescript/jest.config.js | @@ -6,11 +6,7 @@ module.exports = {
transform: {
'^.+\\.tsx?$': 'babel-jest'
},
- testPathIgnorePatterns: [
- '<rootDir>/.next/', '<rootDir>/node_modules/'
- ],
- moduleFileExtensions: [
- 'ts', 'tsx', 'js', 'jsx'
- ],
+ testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'],
+ m... | 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-jest-typescript/jest.setup.js | @@ -1,4 +1,4 @@
const Enzyme = require('enzyme')
const Adapter = require('enzyme-adapter-react-16')
-Enzyme.configure({adapter: new Adapter()})
+Enzyme.configure({ adapter: new Adapter() }) | 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-kea/pages/_app.js | @@ -6,12 +6,14 @@ import { initStore } from '../store'
@withRedux(initStore, { debug: process.env.NODE_ENV === 'development' })
export default class MyApp extends App {
- static async getInitialProps ({Component, ctx}) {
- const pageProps = Component.getInitialProps ? await Component.getInitialProps(ctx) : {}
+... | 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-kea/pages/index.js | @@ -26,14 +26,17 @@ import { kea } from 'kea'
]
})
})
-
export default class App extends React.Component {
- render () {
+ render() {
return (
<div>
<p>Double Counter: {this.props.doubleCounter}</p>
- <button type='button' onClick={() => this.actions.increment(1)}>Increment</butt... | 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-kea/store.js | @@ -11,8 +11,5 @@ const reduxDevTools =
: f => f
export const initStore = () => {
- return createStore(
- reducers,
- compose(reduxDevTools)
- )
+ return createStore(reducers, compose(reduxDevTools))
} | 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-loading/pages/_app.js | @@ -1,5 +1,5 @@
import React from 'react'
-import App, {Container} from 'next/app'
+import App, { Container } from 'next/app'
import Link from 'next/link'
import NProgress from 'nprogress'
import Router from 'next/router'
@@ -8,7 +8,7 @@ const linkStyle = {
margin: '0 10px 0 0'
}
-Router.events.on('routeChang... | 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-loading/pages/about.js | @@ -3,7 +3,7 @@ import React, { Component } from 'react'
export default class About extends Component {
// Add some delay
static async getInitialProps () {
- await new Promise((resolve) => {
+ await new Promise(resolve => {
setTimeout(resolve, 500)
})
return {} | 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-loading/pages/forever.js | @@ -3,7 +3,7 @@ import React, { Component } from 'react'
export default class Forever extends Component {
// Add some delay
static async getInitialProps () {
- await new Promise((resolve) => {
+ await new Promise(resolve => {
setTimeout(resolve, 3000)
})
return {} | 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-markdown/next.config.js | @@ -3,10 +3,7 @@ const emoji = require('remark-emoji')
const withMDX = require('@zeit/next-mdx')({
options: {
- mdPlugins: [
- images,
- emoji
- ]
+ mdPlugins: [images, emoji]
}
})
| 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-markdown/pages/index.js | @@ -2,8 +2,14 @@ import React from 'react'
import Document from '../md/markdown.mdx'
const H1 = props => <h1 style={{ color: 'tomato' }} {...props} />
-const InlineCode = props => <code id='codes' style={{ color: 'purple' }} {...props} />
+const InlineCode = props => (
+ <code id='codes' style={{ color: 'purple' }... | 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-mdx/components/button.js | @@ -1,12 +1,14 @@
export default ({ children }) => (
- <button style={{
- borderRadius: '3px',
- border: '1px solid black',
- color: 'black',
- padding: '0.5em 1em',
- cursor: 'pointer',
- fontSize: '1.1em'
- }}>
+ <button
+ style={{
+ borderRadius: '3px',
+ border: '1px solid black',... | 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-mobx-state-tree/components/Clock.js | @@ -1,11 +1,11 @@
-export default (props) => {
+export default props => {
return (
<div className={props.light ? 'light' : ''}>
{format(new Date(props.lastUpdate))}
<style jsx>{`
div {
padding: 15px;
- color: #82FA58;
+ color: #82fa58;
display: inli... | 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-mobx-state-tree/components/SampleComponent.js | @@ -18,9 +18,14 @@ class SampleComponent extends React.Component {
return (
<div>
<h1>{this.props.title}</h1>
- <Clock lastUpdate={this.props.store.lastUpdate} light={this.props.store.light} />
+ <Clock
+ lastUpdate={this.props.store.lastUpdate}
+ light={this.props.s... | 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-mobx-state-tree/pages/_app.js | @@ -10,7 +10,7 @@ export default class MyApp extends App {
// Use getInitialProps as a step in the lifecycle when
// we can initialize our store
//
- const isServer = (typeof window === 'undefined')
+ const isServer = typeof window === 'undefined'
const store = initializeStore(isServer)
/... | 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-mobx-state-tree/pages/index.js | @@ -2,7 +2,5 @@ import React from 'react'
import SampleComponent from '../components/SampleComponent'
export default () => {
- return (
- <SampleComponent title='Index Page' linkTo='/other' />
- )
+ return <SampleComponent title='Index Page' linkTo='/other' />
} | 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-mobx-state-tree/pages/other.js | @@ -2,7 +2,5 @@ import React from 'react'
import SampleComponent from '../components/SampleComponent'
export default () => {
- return (
- <SampleComponent title={'Other Page'} linkTo='/' />
- )
+ return <SampleComponent title={'Other Page'} linkTo='/' />
} | 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-mobx-state-tree/stores/store.js | @@ -7,7 +7,7 @@ const Store = types
lastUpdate: types.Date,
light: false
})
- .actions((self) => {
+ .actions(self => {
let timer
function start () {
timer = setInterval(() => { | 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-mobx/components/Clock.js | @@ -1,11 +1,11 @@
-export default (props) => {
+export default props => {
return (
<div className={props.light ? 'light' : ''}>
{format(new Date(props.lastUpdate))}
<style jsx>{`
div {
padding: 15px;
- color: #82FA58;
+ color: #82fa58;
display: inli... | 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-mobx/components/Page.js | @@ -3,23 +3,29 @@ import Link from 'next/link'
import { inject, observer } from 'mobx-react'
import Clock from './Clock'
-@inject('store') @observer
+@inject('store')
+@observer
class Page extends React.Component {
- componentDidMount () {
+ componentDidMount() {
this.props.store.start()
}
- component... | 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-mobx/pages/_app.js | @@ -1,41 +1,41 @@
-import App, {Container} from 'next/app'
+import App, { Container } from 'next/app'
import React from 'react'
import { initializeStore } from '../store'
import { Provider } from 'mobx-react'
class MyMobxApp extends App {
- static async getInitialProps(appContext) {
- // Get or Create t... | 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-mobx/pages/index.js | @@ -2,9 +2,7 @@ import React from 'react'
import Page from '../components/Page'
export default class Counter extends React.Component {
- render () {
- return (
- <Page title='Index Page' linkTo='/other' />
- )
+ render() {
+ return <Page title="Index Page" linkTo="/other" />
}
} | 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-mobx/pages/other.js | @@ -2,9 +2,7 @@ import React from 'react'
import Page from '../components/Page'
export default class Counter extends React.Component {
- render () {
- return (
- <Page title='Other Page' linkTo='/' />
- )
+ render() {
+ return <Page title="Other Page" linkTo="/" />
}
} | 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-mobx/store.js | @@ -8,8 +8,9 @@ class Store {
@observable lastUpdate = 0
@observable light = false
- constructor (isServer, initialData = {}) {
- this.lastUpdate = initialData.lastUpdate != null ? initialData.lastUpdate : Date.now()
+ constructor(isServer, initialData = {}) {
+ this.lastUpdate =
+ initialData.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/with-next-css/pages/index.js | @@ -1,4 +1,3 @@
-
/* Without CSS Modules, maybe with PostCSS */
import '../style.css' | 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-next-routes/pages/about.js | @@ -1,5 +1,5 @@
import { withRouter } from 'next/router'
-const About = ({router}) => <h1>About foo {router.query.foo}</h1>
+const About = ({ router }) => <h1>About foo {router.query.foo}</h1>
export default withRouter(About) | 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-next-routes/pages/index.js | @@ -2,10 +2,30 @@ import { Link, Router } from '../routes'
export default () => (
<ul>
- <li><Link route='blog' params={{ slug: 'hello-world' }}><a>Blog: Hello world</a></Link></li>
- <li><Link route='blog' params={{ slug: 'another-blog-post' }}><a>Blog: Another blog post</a></Link></li>
- <li><Link rout... | 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-next-routes/routes.js | @@ -1,5 +1,5 @@
const nextRoutes = require('next-routes')
-const routes = module.exports = nextRoutes()
+const routes = (module.exports = nextRoutes())
routes.add('blog', '/blog/:slug')
routes.add('about', '/about-us/:foo(bar|baz)') | 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-next-routes/server.js | @@ -7,11 +7,9 @@ const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handler = routes.getRequestHandler(app)
-app.prepare()
- .then(() => {
- createServer(handler)
- .listen(port, (err) => {
- if (err) throw err
- console.log(`> Ready on http://localhost:${port}`... | 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-next-sass/pages/index.js | @@ -1,6 +1,3 @@
import '../styles/style.scss'
-export default () =>
- <div className='example'>
- Hello World!
- </div>
+export default () => <div className='example'>Hello World!</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-noscript/next.config.js | @@ -2,7 +2,9 @@ module.exports = {
webpack: (config, { dev }) => {
if (!dev) {
config.resolve.alias = {
- 'react-dom/server': require.resolve('react-dom/umd/react-dom-server.browser.production.min.js')
+ 'react-dom/server': require.resolve(
+ 'react-dom/umd/react-dom-server.browser... | 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-noscript/pages/index.js | @@ -17,18 +17,16 @@ class Index extends React.Component {
render () {
return (
<div style={{ textAlign: 'center' }}>
- {
- images.map((item, index) =>
- <div key={index}>
- <LazyLoad height={700} offset={100}>
- <img width={700} height={700} src={ite... | 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-pkg/pages/index.js | @@ -1,2 +1 @@
-export default () =>
- <h1>Home page</h1>
+export default () => <h1>Home page</h1> | 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-pkg/server.js | @@ -7,11 +7,11 @@ const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev, dir: __dirname })
const handle = app.getRequestHandler()
-app.prepare()
- .then(() => {
- createServer((req, res) => handle(req, res, parse(req.url, true).pathname))
- .listen(port, (err) => {
- if (err) thro... | 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-polyfills/next.config.js | @@ -4,7 +4,10 @@ module.exports = {
cfg.entry = async () => {
const entries = await originalEntry()
- if (entries['main.js'] && !entries['main.js'].includes('./client/polyfills.js')) {
+ if (
+ entries['main.js'] &&
+ !entries['main.js'].includes('./client/polyfills.js')
+ ) {... | 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-polyfills/pages/index.js | @@ -1,7 +1,3 @@
console.log('Inside the /index.js page')
-export default () => (
- <div>
- Hello World
- </div>
-)
+export default () => <div>Hello World</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-prefetching/components/Header.js | @@ -3,7 +3,7 @@ import Link from 'next/link'
export default () => (
<div>
- { /* Prefetch using the declarative API */ }
+ {/* Prefetch using the declarative API */}
<Link prefetch href='/'>
<a>Home</a>
</Link>
@@ -12,13 +12,22 @@ export default () => (
<a>Features</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/with-prefetching/pages/_app.js | @@ -1,4 +1,4 @@
-import App, {Container} from 'next/app'
+import App, { Container } from 'next/app'
import React from 'react'
import Header from '../components/Header'
@@ -10,11 +10,11 @@ export default class MyApp extends App {
pageProps = await Component.getInitialProps(ctx)
}
- return {pageProps... | 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-pretty-url-routing/pages/greeting.js | @@ -1,28 +1,30 @@
import React from 'react'
import PropTypes from 'prop-types'
-import {Link} from 'next-url-prettifier'
-import {Router} from '../routes'
+import { Link } from 'next-url-prettifier'
+import { Router } from '../routes'
export default class GreetingPage extends React.Component {
- static getInitial... | 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-pretty-url-routing/routes.js | @@ -7,11 +7,11 @@ const routes = [
},
{
page: 'greeting',
- prettyUrl: ({lang = '', name = ''}) =>
- (lang === 'fr' ? `/bonjour/${name}` : `/hello/${name}`),
+ prettyUrl: ({ lang = '', name = '' }) =>
+ lang === 'fr' ? `/bonjour/${name}` : `/hello/${name}`,
prettyUrlPatterns: [
- {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/with-pretty-url-routing/server.js | @@ -7,14 +7,20 @@ 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()
- Router.forEachPattern((page, pattern, defaultParams) => se... | 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-react-ga/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/with-react-helmet/pages/_document.js | @@ -27,26 +27,30 @@ export default class extends Document {
}
get helmetJsx () {
- return (<Helmet
- htmlAttributes={{lang: 'en'}}
- title='Hello next.js!'
- meta={[
- { name: 'viewport', content: 'width=device-width, initial-scale=1' },
- { property: 'og:title', content: 'Hello ... | 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-react-helmet/pages/index.js | @@ -1,3 +1 @@
-export default () => (<div>
- Hello World!
-</div>)
+export default () => <div>Hello World!</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-react-intl/components/Layout.js | @@ -1,5 +1,5 @@
import React from 'react'
-import {defineMessages, injectIntl} from 'react-intl'
+import { defineMessages, injectIntl } from 'react-intl'
import Head from 'next/head'
import Nav from './Nav'
@@ -10,7 +10,7 @@ const messages = defineMessages({
}
})
-export default injectIntl(({intl, title, chi... | 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-react-intl/components/Nav.js | @@ -1,17 +1,21 @@
import React from 'react'
-import {FormattedMessage} from 'react-intl'
+import { FormattedMessage } from 'react-intl'
import Link from 'next/link'
export default () => (
<nav>
<li>
<Link href='/'>
- <a><FormattedMessage id='nav.home' defaultMessage='Home' /></a>
+ <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-react-intl/lib/withIntl.js | @@ -1,7 +1,7 @@
import hoistNonReactStatics from 'hoist-non-react-statics'
import { injectIntl } from 'react-intl'
-export const hoistStatics = (higherOrderComponent) => (BaseComponent) => {
+export const hoistStatics = higherOrderComponent => BaseComponent => {
const NewComponent = higherOrderComponent(BaseComp... | 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-react-intl/pages/_app.js | @@ -6,7 +6,7 @@ import { IntlProvider, addLocaleData } from 'react-intl'
// locale data was added to the page by `pages/_document.js`. This only happens
// once, on initial page load in the browser.
if (typeof window !== 'undefined' && window.ReactIntlLocaleData) {
- Object.keys(window.ReactIntlLocaleData).forEach(... | 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-react-intl/pages/_document.js | @@ -1,11 +1,13 @@
-import Document, {Head, Main, NextScript} from 'next/document'
+import Document, { Head, Main, NextScript } from 'next/document'
// The document (which is SSR-only) needs to be customized to expose the locale
// data for the user's locale for React Intl to work in the browser.
export default cla... | 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-react-intl/pages/about.js | @@ -1,10 +1,10 @@
-import React, {Component} from 'react'
-import {FormattedRelative} from 'react-intl'
+import React, { Component } from 'react'
+import { FormattedRelative } from 'react-intl'
import Layout from '../components/Layout'
class About extends Component {
- static async getInitialProps ({req}) {
- r... | 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-react-intl/scripts/default-lang.js | @@ -1,12 +1,13 @@
-const {readFileSync, writeFileSync} = require('fs')
-const {resolve} = require('path')
+const { readFileSync, writeFileSync } = require('fs')
+const { resolve } = require('path')
const glob = require('glob')
-const defaultMessages = glob.sync('./lang/.messages/**/*.json')
- .map((filename) => rea... | 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-react-intl/server.js | @@ -4,25 +4,27 @@ const IntlPolyfill = require('intl')
Intl.NumberFormat = IntlPolyfill.NumberFormat
Intl.DateTimeFormat = IntlPolyfill.DateTimeFormat
-const {readFileSync} = require('fs')
-const {basename} = require('path')
-const {createServer} = require('http')
+const { readFileSync } = require('fs')
+const { ba... | 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-react-jss/pages/_document.js | @@ -1,9 +1,6 @@
import React from 'react'
import Document, { Head, Main, NextScript } from 'next/document'
-import {
- SheetsRegistry,
- JssProvider
-} from 'react-jss'
+import { SheetsRegistry, JssProvider } from 'react-jss'
export default class JssDocument extends Document {
static getInitialProps (ctx) { | 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-react-md/pages/index.js | @@ -10,15 +10,21 @@ import ListItem from 'react-md/lib/Lists/ListItem'
import NavigationDrawer from 'react-md/lib/NavigationDrawers'
import SelectField from 'react-md/lib/SelectFields'
-const avatarSrc = 'https://cloud.githubusercontent.com/assets/13041/19686250/971bf7f8-9ac0-11e6-975c-188defd82df1.png'
+const avat... | 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-react-native-web/next.config.js | @@ -2,7 +2,7 @@ const withTM = require('next-plugin-transpile-modules')
module.exports = withTM({
transpileModules: ['react-native-web'],
- webpack: (config) => {
+ webpack: config => {
// Alias all `react-native` imports to `react-native-web`
config.resolve.alias = {
'react-native$': 'react-na... | 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-react-relay-network-modern/components/BlogPostPreview.js | @@ -2,16 +2,14 @@ import React from 'react'
import { createFragmentContainer, graphql } from 'react-relay'
const BlogPostPreview = props => {
- return (
- <div key={props.post.id}>{props.post.title}</div>
- )
+ return <div key={props.post.id}>{props.post.title}</div>
}
export default createFragmentContain... | 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-react-relay-network-modern/components/BlogPosts.js | @@ -6,24 +6,24 @@ const BlogPosts = props => {
return (
<div>
<h1>Blog posts</h1>
- {props.viewer.allBlogPosts.edges.map(({ node }) =>
- <BlogPostPreview key={node.id}post={node} />
- )}
+ {props.viewer.allBlogPosts.edges.map(({ node }) => (
+ <BlogPostPreview key={node.id} 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/with-react-relay-network-modern/lib/createEnvironment/server.js | @@ -1,4 +1,7 @@
-import { RelayNetworkLayer, urlMiddleware } from 'react-relay-network-modern/node8'
+import {
+ RelayNetworkLayer,
+ urlMiddleware
+} from 'react-relay-network-modern/node8'
import RelaySSR from 'react-relay-network-modern-ssr/node8/server'
import { Network, Environment, RecordSource, Store } from ... | 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-react-relay-network-modern/pages/_app.js | @@ -2,14 +2,13 @@ import React from 'react'
import { QueryRenderer, fetchQuery } from 'react-relay'
import NextApp, { Container } from 'next/app'
-import {
- initEnvironment,
- createEnvironment
-} from '../lib/createEnvironment'
+import { initEnvironment, createEnvironment } from '../lib/createEnvironment'
ex... | 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-react-relay-network-modern/pages/index.js | @@ -19,7 +19,7 @@ export default class Index extends Component {
...BlogPosts_viewer
}
}
- `;
+ `
render () {
return ( | 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-react-toolbox/pages/index.js | @@ -10,7 +10,9 @@ export default () => (
<link href='/static/theme.css' rel='stylesheet' />
</Head>
<ThemeProvider theme={theme}>
- <Button raised primary>Hello</Button>
+ <Button raised primary>
+ Hello
+ </Button>
</ThemeProvider>
</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-react-toolbox/static/theme.js | @@ -1 +1,86 @@
-module.exports = {'RTButton': {'button': '_2Agdx', 'rippleWrapper': '_3AVBi', 'squared': '_2GH_L', 'icon': '_3aBSX', 'solid': '_1ZxqC', 'raised': '_221ic _2Agdx _2GH_L _1ZxqC', 'flat': '_1jWAQ _2Agdx _2GH_L', 'floating': '_3IRMZ _2Agdx _1ZxqC', 'mini': '_2DCN-', 'toggle': 'hC5Z2 _2Agdx', 'primary': '_3t... | 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-react-useragent/pages/_app.js | @@ -1,6 +1,6 @@
import React from 'react'
-import App, {Container} from 'next/app'
-import {UserAgentProvider} from '@quentin-sommer/react-useragent'
+import App, { Container } from 'next/app'
+import { UserAgentProvider } from '@quentin-sommer/react-useragent'
const PageWrapper = Comp =>
class extends React.Com... | 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-react-useragent/pages/index.js | @@ -1,5 +1,5 @@
-import React, {Component} from 'react'
-import {UserAgent} from '@quentin-sommer/react-useragent'
+import React, { Component } from 'react'
+import { UserAgent } from '@quentin-sommer/react-useragent'
class Index extends Component {
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/with-react-uwp/components/ThemeWrapper.js | @@ -5,7 +5,10 @@ export class ThemeWrapper extends Component {
render () {
const { children, style, ...props } = this.props
return (
- <Theme {...props} style={(props && props.theme) ? props.theme.prepareStyles(style) : void 0}>
+ <Theme
+ {...props}
+ style={props && props.theme ? ... | 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-react-uwp/pages/_document.js | @@ -4,20 +4,26 @@ import Document, { Head, Main, NextScript } from 'next/document'
export default class MyDocument extends Document {
static getInitialProps ({ renderPage }) {
- const {html, head, errorHtml, chunks} = renderPage()
+ const { html, head, errorHtml, chunks } = renderPage()
return { html, ... | 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-react-uwp/pages/index.js | @@ -4,12 +4,7 @@ import PropTypes from 'prop-types'
import ThemeWrapper from '../components/ThemeWrapper'
import getTheme from 'react-uwp/styles/getTheme'
-import {
- Button,
- ColorPicker,
- DatePicker,
- ProgressRing
-} from 'react-uwp'
+import { Button, ColorPicker, DatePicker, ProgressRing } from 'react-uwp... | 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-react-with-styles/pages/_document.js | @@ -27,7 +27,10 @@ export default class MyDocument extends Document {
return (
<html>
<Head>
- <style data-aphrodite dangerouslySetInnerHTML={{ __html: this.props.css.content }} />
+ <style
+ data-aphrodite
+ dangerouslySetInnerHTML={{ __html: this.props.css.... | 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-rebass/pages/_document.js | @@ -9,13 +9,9 @@ export default class MyDocument extends Document {
return (
<html>
- <Head>
- {styleTags}
- </Head>
+ <Head>{styleTags}</Head>
<body>
- <div className='root'>
- {main}
- </div>
+ <div className='root'>{main}</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-rebass/pages/index.js | @@ -16,7 +16,9 @@ function HomePage () {
<Container>
<Toolbar bg='black'>
- <NavLink href='https://github.com/zeit/next.js/' target='_blank'>Next.js</NavLink>
+ <NavLink href='https://github.com/zeit/next.js/' target='_blank'>
+ Next.js
+ </NavLink>
<Na... | 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-recompose/pages/index.js | @@ -4,22 +4,15 @@ import { compose, withState, setStatic } from 'recompose'
// it needs to be at the top of the compose
const enhance = compose(
// set the static async method getInitialProps
- setStatic(
- 'getInitialProps',
- async ({ req }) => {
- const isServer = !!req
- // log if we're server... | 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-redux-code-splitting/config/redux.js | @@ -5,8 +5,11 @@ import withRedux from 'next-redux-wrapper'
import { rootReducer } from 'fast-redux'
export const initStore = (initialState = {}) => {
- return createStore(rootReducer, initialState,
- composeWithDevTools(applyMiddleware(thunkMiddleware)))
+ return createStore(
+ rootReducer,
+ initialSta... | 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-redux-code-splitting/containers/about.js | @@ -1,23 +1,30 @@
import React from 'react'
-import {bindActionCreators} from 'redux'
-import {connect} from 'react-redux'
-import {namespaceConfig} from 'fast-redux'
+import { bindActionCreators } from 'redux'
+import { connect } from 'react-redux'
+import { namespaceConfig } from 'fast-redux'
import Link from 'next... | 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-redux-code-splitting/containers/homepage.js | @@ -1,23 +1,30 @@
import React from 'react'
-import {bindActionCreators} from 'redux'
-import {connect} from 'react-redux'
-import {namespaceConfig} from 'fast-redux'
+import { bindActionCreators } from 'redux'
+import { connect } from 'react-redux'
+import { namespaceConfig } from 'fast-redux'
import Link from 'next... | 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-redux-code-splitting/pages/about.js | @@ -1,4 +1,4 @@
-import {reduxPage} from '../config/redux'
+import { reduxPage } from '../config/redux'
import About from '../containers/about'
export default reduxPage(About) | 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-redux-code-splitting/pages/index.js | @@ -1,4 +1,4 @@
-import {reduxPage} from '../config/redux'
+import { reduxPage } from '../config/redux'
import Homepage from '../containers/homepage'
export default reduxPage(Homepage) | 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-redux-observable/components/CharacterInfo.js | @@ -1,26 +1,30 @@
import React from 'react'
import { connect } from 'react-redux'
-const CharacterInfo = ({ character, error, fetchCharacter, isFetchedOnServer = false }) => (
+const CharacterInfo = ({
+ character,
+ error,
+ fetchCharacter,
+ isFetchedOnServer = false
+}) => (
<div className='CharacterInfo'... | 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-redux-observable/pages/index.js | @@ -34,7 +34,9 @@ class Counter extends React.Component {
<CharacterInfo />
<br />
<nav>
- <Link href='/other'><a>Navigate to "/other"</a></Link>
+ <Link href='/other'>
+ <a>Navigate to "/other"</a>
+ </Link>
</nav>
</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-redux-observable/redux/epics.js | @@ -12,10 +12,12 @@ export const fetchUserEpic = (action$, state$) =>
mergeMap(action => {
return interval(3000).pipe(
map(x => actions.fetchCharacter()),
- takeUntil(action$.ofType(
- types.STOP_FETCHING_CHARACTERS,
- types.FETCH_CHARACTER_FAILURE
- ))
+ take... | 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-redux-observable/redux/index.js | @@ -13,4 +13,4 @@ export default function initStore (initialState) {
epicMiddleware.run(rootEpic)
return store
-};
+} | 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-redux-observable/redux/reducer.js | @@ -17,7 +17,11 @@ export default function reducer (state = INITIAL_STATE, { type, payload }) {
nextCharacterId: state.nextCharacterId + 1
}
case types.FETCH_CHARACTER_FAILURE:
- return { ...state, error: payload.error, isFetchedOnServer: payload.isServer }
+ 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/with-redux-reselect-recompose/actions/index.js | @@ -4,6 +4,8 @@ export const addCount = () => ({ type: ADD })
export const setClock = (light, ts) => ({ type: TICK, light, ts })
-export const serverRenderClock = isServer => dispatch => dispatch(setClock(!isServer, Date.now()))
+export const serverRenderClock = isServer => dispatch =>
+ dispatch(setClock(!isServ... | 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-redux-reselect-recompose/components/addCount.js | @@ -2,16 +2,19 @@ import React from 'react'
import PropTypes from 'prop-types'
import { compose, setDisplayName, pure, setPropTypes } from 'recompose'
-const AddCount = ({ count, addCount }) =>
+const AddCount = ({ count, addCount }) => (
<div>
<style jsx>{`
div {
padding: 0 0 20px 0;
... | 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-redux-reselect-recompose/components/clock.js | @@ -2,18 +2,19 @@ import React from 'react'
import PropTypes from 'prop-types'
import { compose, pure, setDisplayName, setPropTypes } from 'recompose'
-const format = t => `${pad(t.getUTCHours())}:${pad(t.getUTCMinutes())}:${pad(t.getUTCSeconds())}`
+const format = t =>
+ `${pad(t.getUTCHours())}:${pad(t.getUTCMin... | 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-redux-reselect-recompose/components/page.js | @@ -5,15 +5,18 @@ import { compose, setDisplayName, pure, setPropTypes } from 'recompose'
import Clock from './clock'
import AddCount from './addCount'
-const Page = ({ title, linkTo, light, lastUpdate, count, addCount }) =>
+const Page = ({ title, linkTo, light, lastUpdate, count, addCount }) => (
<div>
<h... | 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-redux-reselect-recompose/containers/page.js | @@ -7,11 +7,14 @@ import Page from 'components/page'
export default compose(
setDisplayName('PageContainer'),
- connect(createSelector(
- selectLight(),
- selectLastUpdate(),
- selectCount(),
- (light, lastUpdate, count) => ({ light, lastUpdate, count })
- ), { addCount }),
+ connect(
+ createSe... | 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-redux-reselect-recompose/selectors/index.js | @@ -2,17 +2,20 @@ import { createSelector } from 'reselect'
export const selectState = () => state => state.count
-export const selectCount = () => createSelector(
- selectState(),
- count => count.count
-)
+export const selectCount = () =>
+ createSelector(
+ selectState(),
+ count => count.count
+ )
... | 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-redux-reselect-recompose/store.js | @@ -5,9 +5,5 @@ import reducer, { initialState } from 'reducers'
export default (state = initialState) => {
const middlewares = [thunkMiddleware, createLogger()]
- return createStore(
- reducer,
- state,
- compose(applyMiddleware(...middlewares))
- )
+ return createStore(reducer, state, compose(applyM... | 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-redux-saga/actions.js | @@ -17,19 +17,19 @@ export function failure (error) {
}
export function increment () {
- return {type: actionTypes.INCREMENT}
+ return { type: actionTypes.INCREMENT }
}
export function decrement () {
- return {type: actionTypes.DECREMENT}
+ return { type: actionTypes.DECREMENT }
}
export function reset ... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.