diff --git a/.eslintrc.js b/.eslintrc.js index ce9e190af8..9670ee74a4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -34,8 +34,6 @@ module.exports = { "import/named": "error", "prettier/prettier": ["error", { singleQuote: true, trailingComma: "es5" }], - "flowtype/no-types-missing-file-annotation": "off", // wait for https://github.com/gajus/eslint-plugin-flowtype/issues/248 - // overriding recommended rules "no-constant-condition": ["error", { checkLoops: false }], "no-console": [ "error", { allow: ["log", "warn", "error"] } ], diff --git a/package.json b/package.json index 328e29db17..189d880ebb 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "eslint": "^3.10.2", "eslint-config-google": "^0.6.0", "eslint-config-prettier": "^2.2.0", - "eslint-plugin-flowtype": "^2.30.0", + "eslint-plugin-flowtype": "^2.34.1", "eslint-plugin-import": "^2.6.1", "eslint-plugin-prettier": "^2.1.2", "eslint-plugin-react": "^6.4.0", diff --git a/src/profile-logic/range-filters.js b/src/profile-logic/range-filters.js index 33fcd4ffd7..8c159bc655 100644 --- a/src/profile-logic/range-filters.js +++ b/src/profile-logic/range-filters.js @@ -25,7 +25,7 @@ export function stringifyRangeFilters(arrayValue = []) { .join('~'); } -export function getFormattedTimeLength(length: number) { +export function getFormattedTimeLength(length) { if (length >= 10000) { return `${(length / 1000).toFixed(0)} sec`; } diff --git a/src/profile-logic/symbolication.js b/src/profile-logic/symbolication.js index 17f93b773a..8c9f4fda2e 100644 --- a/src/profile-logic/symbolication.js +++ b/src/profile-logic/symbolication.js @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +/* eslint-disable flowtype/no-types-missing-file-annotation */ + import bisection from 'bisection'; import { resourceTypes } from './profile-data'; import type { Thread, IndexIntoFuncTable } from '../types/profile'; diff --git a/src/test/fixtures/example-symbol-table.js b/src/test/fixtures/example-symbol-table.js index 7328530a0d..6366b02be0 100644 --- a/src/test/fixtures/example-symbol-table.js +++ b/src/test/fixtures/example-symbol-table.js @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// @flow + import { TextEncoder } from 'text-encoding'; import type { SymbolTableAsTuple } from '../../profile-logic/symbol-store-db'; diff --git a/src/types/indexeddb.js b/src/types/indexeddb.js index 12ea3bf8ec..0982af2cb7 100644 --- a/src/types/indexeddb.js +++ b/src/types/indexeddb.js @@ -5,6 +5,8 @@ // Fixed the interfaces, especially added some genericity, // and changed so that it can be simply `import`ed. +// @flow + // Implemented by window & worker export interface IDBEnvironment { indexedDB: IDBFactory, diff --git a/yarn.lock b/yarn.lock index f413fabc46..6268790590 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2277,7 +2277,7 @@ eslint-module-utils@^2.0.0: debug "^2.6.8" pkg-dir "^1.0.0" -eslint-plugin-flowtype@^2.30.0: +eslint-plugin-flowtype@^2.34.1: version "2.34.1" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.34.1.tgz#ea109175645b05d37baeac53b9b65066d79b9446" dependencies: