1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Upgrade standard.js (#4064)

* Upgrade standard.js

# Conflicts:
#	yarn.lock

* Upgrade babel-eslint
This commit is contained in:
Tim Neutkens 2018-03-27 20:11:03 +02:00 committed by GitHub
parent 603b90ce02
commit ebf0c47c25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 1667 additions and 947 deletions

View file

@ -1,3 +1,4 @@
/* eslint-disable */
const withCss = require('@zeit/next-css') const withCss = require('@zeit/next-css')
// fix: prevents error when .css files are required by node // fix: prevents error when .css files are required by node

View file

@ -1,13 +1,11 @@
/* eslint no-extend-native: 0 */ /* eslint no-extend-native: 0 */
// Add your polyfills
// This files runs at the very beginning (even before React and Next.js core)
console.log('Load your polyfills')
// core-js comes with Next.js. So, you can import it like below // core-js comes with Next.js. So, you can import it like below
import includes from 'core-js/library/fn/string/virtual/includes' import includes from 'core-js/library/fn/string/virtual/includes'
import repeat from 'core-js/library/fn/string/virtual/repeat' import repeat from 'core-js/library/fn/string/virtual/repeat'
// Add your polyfills
// This files runs at the very beginning (even before React and Next.js core)
console.log('Load your polyfills')
String.prototype.includes = includes String.prototype.includes = includes
String.prototype.repeat = repeat String.prototype.repeat = repeat

View file

@ -39,5 +39,5 @@ export default connect(
character: state.character, character: state.character,
error: state.error, error: state.error,
isFetchedOnServer: state.isFetchedOnServer isFetchedOnServer: state.isFetchedOnServer
}), })
)(CharacterInfo) )(CharacterInfo)

View file

@ -46,5 +46,5 @@ export default withRedux(
{ {
startFetchingCharacters: actions.startFetchingCharacters, startFetchingCharacters: actions.startFetchingCharacters,
stopFetchingCharacters: actions.stopFetchingCharacters stopFetchingCharacters: actions.stopFetchingCharacters
}, }
)(Counter) )(Counter)

View file

@ -15,7 +15,7 @@ module.exports = {
query: { id: post.id } query: { id: post.id }
} }
}), }),
{}, {}
) )
// combine the map of post pages with the home // combine the map of post pages with the home

View file

@ -15,7 +15,7 @@ export default class EventEmitter {
emit (event, ...data) { emit (event, ...data) {
if (!this.listeners[event]) return if (!this.listeners[event]) return
this.listeners[event].forEach(cb => cb(...data)) this.listeners[event].forEach(cb => cb(...data)) // eslint-disable-line standard/no-callback-literal
} }
off (event, cb) { off (event, cb) {

View file

@ -355,7 +355,7 @@ export default class Router {
} }
async fetchRoute (route) { async fetchRoute (route) {
return await this.pageLoader.loadPage(route) return this.pageLoader.loadPage(route)
} }
abortComponentLoad (as) { abortComponentLoad (as) {

View file

@ -113,7 +113,7 @@
"@taskr/esnext": "1.1.0", "@taskr/esnext": "1.1.0",
"@taskr/watch": "1.1.0", "@taskr/watch": "1.1.0",
"@zeit/next-css": "0.0.7", "@zeit/next-css": "0.0.7",
"babel-eslint": "8.0.1", "babel-eslint": "8.2.2",
"babel-jest": "21.2.0", "babel-jest": "21.2.0",
"babel-plugin-istanbul": "4.1.5", "babel-plugin-istanbul": "4.1.5",
"babel-plugin-transform-remove-strict-mode": "0.0.2", "babel-plugin-transform-remove-strict-mode": "0.0.2",
@ -139,7 +139,7 @@
"react": "16.2.0", "react": "16.2.0",
"react-dom": "16.2.0", "react-dom": "16.2.0",
"rimraf": "2.6.2", "rimraf": "2.6.2",
"standard": "9.0.2", "standard": "11.0.1",
"taskr": "1.1.0", "taskr": "1.1.0",
"wd": "1.4.1" "wd": "1.4.1"
}, },

View file

@ -1,3 +1,4 @@
/* eslint-disable import/first, no-return-await */
require('@zeit/source-map-support').install() require('@zeit/source-map-support').install()
import { resolve, join, sep } from 'path' import { resolve, join, sep } from 'path'
import { parse as parseUrl } from 'url' import { parse as parseUrl } from 'url'

View file

@ -2,7 +2,7 @@ import React from 'react'
export default class AsyncProps extends React.Component { export default class AsyncProps extends React.Component {
static async getInitialProps () { static async getInitialProps () {
return await fetchData() return fetchData()
} }
render () { render () {

1568
yarn.lock

File diff suppressed because it is too large Load diff