chore: Upgrade Babel, Jest, Eslint (#1437)

* chore: Upgrade Prettier 1.8 -> 2.0

* chore: Upgrade Babel 6 -> 7

* chore: Upgrade eslint plugins

* chore: Add eslint import/order rules

* chore: Update flow-typed deps
This commit is contained in:
Tom Moor
2020-08-08 22:53:59 -07:00
committed by GitHub
parent e312b264a6
commit 449dc55aaa
317 changed files with 16474 additions and 12183 deletions

View File

@@ -1,8 +1,8 @@
// @flow
import { difference } from "lodash";
import parseDocumentIds from "../../shared/utils/parseDocumentIds";
import type { DocumentEvent } from "../events";
import { Document, Revision, Backlink } from "../models";
import parseDocumentIds from "../../shared/utils/parseDocumentIds";
import slugify from "../utils/slugify";
export default class Backlinks {

View File

@@ -1,12 +1,12 @@
/* eslint-disable flowtype/require-valid-file-annotation */
import Backlink from "../models/Backlink";
import { buildDocument } from "../test/factories";
import { flushdb } from "../test/support";
import BacklinksService from "./backlinks";
import { buildDocument } from "../test/factories";
import Backlink from "../models/Backlink";
const Backlinks = new BacklinksService();
beforeEach(flushdb);
beforeEach(() => flushdb());
beforeEach(jest.resetAllMocks);
describe("documents.update", () => {

View File

@@ -1,7 +1,7 @@
// @flow
import path from "path";
import debug from "debug";
import fs from "fs-extra";
import path from "path";
const log = debug("services");
const services = {};

View File

@@ -1,6 +1,6 @@
// @flow
import { Op } from "../sequelize";
import type { DocumentEvent, CollectionEvent, Event } from "../events";
import mailer from "../mailer";
import {
Document,
Team,
@@ -8,7 +8,7 @@ import {
User,
NotificationSetting,
} from "../models";
import mailer from "../mailer";
import { Op } from "../sequelize";
export default class Notifications {
async on(event: Event) {

View File

@@ -1,4 +1,6 @@
// @flow
import subHours from "date-fns/sub_hours";
import { socketio } from "../";
import type { Event } from "../events";
import {
Document,
@@ -7,9 +9,7 @@ import {
CollectionGroup,
GroupUser,
} from "../models";
import { socketio } from "../";
import { Op } from "../sequelize";
import subHours from "date-fns/sub_hours";
export default class Websockets {
async on(event: Event) {