diff --git a/examples/with-firebase-hosting-and-docker/next.config.js b/examples/with-firebase-hosting-and-docker/next.config.js index d58ad066..c86aca0b 100644 --- a/examples/with-firebase-hosting-and-docker/next.config.js +++ b/examples/with-firebase-hosting-and-docker/next.config.js @@ -1,3 +1,3 @@ module.exports = { - distDir: '../../dist/functions/next', -}; + distDir: '../../dist/functions/next' +} diff --git a/examples/with-firebase-hosting-and-docker/src/app/components/App.js b/examples/with-firebase-hosting-and-docker/src/app/components/App.js index 7dbf0244..06dd2aaf 100644 --- a/examples/with-firebase-hosting-and-docker/src/app/components/App.js +++ b/examples/with-firebase-hosting-and-docker/src/app/components/App.js @@ -1,18 +1,18 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import Header from './Header'; +import React from 'react' +import PropTypes from 'prop-types' +import Header from './Header' const propTypes = { - children: PropTypes.element, -}; + children: PropTypes.element +} const App = ({ children }) => (
{children}
-); +) -App.propTypes = propTypes; +App.propTypes = propTypes -export default App; +export default App diff --git a/examples/with-firebase-hosting-and-docker/src/app/components/Header.js b/examples/with-firebase-hosting-and-docker/src/app/components/Header.js index d6309d60..73e3cd20 100644 --- a/examples/with-firebase-hosting-and-docker/src/app/components/Header.js +++ b/examples/with-firebase-hosting-and-docker/src/app/components/Header.js @@ -1,23 +1,23 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import Link from 'next/link'; +import React from 'react' +import PropTypes from 'prop-types' +import Link from 'next/link' const propTypes = { - pathname: PropTypes.String, -}; + pathname: PropTypes.String +} const Header = ({ pathname }) => (
- + Home - - + About
-); +) -Header.propTypes = propTypes; +Header.propTypes = propTypes -export default Header; +export default Header diff --git a/examples/with-firebase-hosting-and-docker/src/app/pages/about.js b/examples/with-firebase-hosting-and-docker/src/app/pages/about.js index c30a5ef4..6bba5901 100644 --- a/examples/with-firebase-hosting-and-docker/src/app/pages/about.js +++ b/examples/with-firebase-hosting-and-docker/src/app/pages/about.js @@ -1,8 +1,8 @@ -import * as React from 'react'; -import App from '../components/App'; +import * as React from 'react' +import App from '../components/App' export default () => (

About Page

-); +) diff --git a/examples/with-firebase-hosting-and-docker/src/app/pages/index.js b/examples/with-firebase-hosting-and-docker/src/app/pages/index.js index 0a570f67..25908f65 100644 --- a/examples/with-firebase-hosting-and-docker/src/app/pages/index.js +++ b/examples/with-firebase-hosting-and-docker/src/app/pages/index.js @@ -1,8 +1,8 @@ -import * as React from 'react'; -import App from '../components/App'; +import * as React from 'react' +import App from '../components/App' export default () => (

Index Page

-); +) diff --git a/examples/with-firebase-hosting-and-docker/src/functions/index.js b/examples/with-firebase-hosting-and-docker/src/functions/index.js index bf26a864..8edf1ed9 100644 --- a/examples/with-firebase-hosting-and-docker/src/functions/index.js +++ b/examples/with-firebase-hosting-and-docker/src/functions/index.js @@ -1,28 +1,28 @@ /* eslint-disable import/no-unresolved,import/extensions */ -import next from 'next'; -import express from 'express'; -import compression from 'compression'; -import helmet from 'helmet'; -import cors from 'cors'; -import bodyParser from 'body-parser'; -import { functions } from './lib/firebase'; +import next from 'next' +import express from 'express' +import compression from 'compression' +import helmet from 'helmet' +import cors from 'cors' +import bodyParser from 'body-parser' +import { functions } from './lib/firebase' -const nextApp = next({ dev: false, conf: { distDir: 'next' } }); -const handle = nextApp.getRequestHandler(); +const nextApp = next({ dev: false, conf: { distDir: 'next' } }) +const handle = nextApp.getRequestHandler() -const server = express(); -server.disable('x-powered-by'); -server.use(cors()); -server.use(bodyParser.json()); -server.set('trust proxy', 1); -server.use(compression()); -server.use(helmet()); +const server = express() +server.disable('x-powered-by') +server.use(cors()) +server.use(bodyParser.json()) +server.set('trust proxy', 1) +server.use(compression()) +server.use(helmet()) -server.get('*', (req, res) => handle(req, res)); +server.get('*', (req, res) => handle(req, res)) const app = functions.https.onRequest(async (req, res) => { - await nextApp.prepare(); - return server(req, res); -}); + await nextApp.prepare() + return server(req, res) +}) -export { app }; +export { app } diff --git a/examples/with-firebase-hosting-and-docker/src/functions/lib/firebase.js b/examples/with-firebase-hosting-and-docker/src/functions/lib/firebase.js index cb040266..a1e5f541 100644 --- a/examples/with-firebase-hosting-and-docker/src/functions/lib/firebase.js +++ b/examples/with-firebase-hosting-and-docker/src/functions/lib/firebase.js @@ -1,5 +1,5 @@ -import admin from 'firebase-admin'; -import * as functions from 'firebase-functions'; +import admin from 'firebase-admin' +import * as functions from 'firebase-functions' -export { functions }; -export const firebase = admin.initializeApp(); +export { functions } +export const firebase = admin.initializeApp() diff --git a/examples/with-relay-modern-server-express/lib/createRelayEnvironment.js b/examples/with-relay-modern-server-express/lib/createRelayEnvironment.js index ecc739bf..e737a401 100644 --- a/examples/with-relay-modern-server-express/lib/createRelayEnvironment.js +++ b/examples/with-relay-modern-server-express/lib/createRelayEnvironment.js @@ -9,7 +9,7 @@ function fetchQuery ( operation, variables, cacheConfig, - uploadables, + uploadables ) { // Because we implement the graphql server, the client must to point to the same host const relayServer = process.browser ? '' : process.env.RELAY_SERVER diff --git a/package.json b/package.json index 3f80a4de..bacd81b6 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "test": "npm run testall || npm run testall", "coveralls": "cat ./test/coverage/lcov.info | coveralls", "lint": "lerna run typescript && standard && standard --parser typescript-eslint-parser --plugin typescript packages/**/*.ts", + "lint-fix": "standard --fix && standard --fix --parser typescript-eslint-parser --plugin typescript packages/**/*.ts", "typescript": "lerna run typescript", "prepublish": "lerna run prepublish", "publish-canary": "lerna version prerelease --preid canary --force-publish",