Add missing Flow tags

This commit is contained in:
Niklas von Hertzen 2017-08-01 18:51:59 +08:00
parent 4f48bc9b0c
commit 7a3bad2fcb
6 changed files with 16 additions and 2 deletions

View File

@ -1,9 +1,16 @@
{
"parser": "babel-eslint",
"plugins": [
"flowtype",
"prettier"
],
"rules": {
"flowtype/boolean-style": [
2,
"boolean"
],
"flowtype/no-weak-types": 2,
"flowtype/delimiter-dangle": 2,
"prettier/prettier": ["error", {
"singleQuote": true,
"bracketSpacing": false,

View File

@ -28,7 +28,8 @@
"babel-preset-flow": "6.23.0",
"base64-arraybuffer": "0.1.5",
"eslint": "4.2.0",
"eslint-plugin-prettier": "^2.1.2",
"eslint-plugin-flowtype": "2.35.0",
"eslint-plugin-prettier": "2.1.2",
"flow-bin": "0.50.0",
"prettier": "1.5.3",
"rimraf": "2.6.1",

View File

@ -1,3 +1,5 @@
/* @flow */
'use strict';
import Vector from './Vector';
export default class BezierCurve {

View File

@ -1,3 +1,6 @@
/* @flow */
'use strict';
const testRangeBounds = document => {
const TEST_HEIGHT = 123;
@ -23,6 +26,7 @@ const testRangeBounds = document => {
};
const FEATURES = {
// $FlowFixMe - get/set properties not yet supported
get SUPPORT_RANGE_BOUNDS() {
'use strict';
const value = testRangeBounds(document);

View File

@ -8,6 +8,7 @@ export default class Logger {
this.start = Date.now();
}
// eslint-disable-next-line flowtype/no-weak-types
log(...args: any) {
Function.prototype.bind
.call(window.console.log, window.console)

View File

@ -10,7 +10,6 @@ import Color from './Color';
export type Options = {
async: boolean,
imageTimeout: number,
renderer: Function,
proxy: string,
canvas: HTMLCanvasElement,
allowTaint: true