Update dev dependencies and fix linting errors (#10228)

* chore: Uppate dev dependencies

* chore: Fix lint errors

* chore: Format options.json files

* chore: Fix stupid flow errors

* Update test262 whitelist

Seems test262-stream was updated and now these tests work.
This commit is contained in:
Daniel Tschinder
2019-07-27 15:09:30 +02:00
committed by GitHub
parent 6a9d2538e0
commit 4f0840ab88
242 changed files with 2866 additions and 1719 deletions

View File

@@ -103,9 +103,7 @@ for (const type in t.NODE_FIELDS) {
}
for (let i = 0; i < t.TYPES.length; i++) {
let decl = `declare function is${
t.TYPES[i]
}(node: ?Object, opts?: ?Object): boolean`;
let decl = `declare function is${t.TYPES[i]}(node: ?Object, opts?: ?Object): boolean`;
if (t.NODE_FIELDS[t.TYPES[i]]) {
decl += ` %checks (node instanceof ${NODE_PREFIX}${t.TYPES[i]})`;

View File

@@ -18,7 +18,8 @@ import is from "../../validators/is";
function assert(type: string, node: Object, opts?: Object): void {
if (!is(type, node, opts)) {
throw new Error(
\`Expected type "\${type}" with option \${JSON.stringify(opts)}, but instead got "\${node.type}".\`,
\`Expected type "\${type}" with option \${JSON.stringify((opts: any))}, \` +
\`but instead got "\${node.type}".\`,
);
}
}\n\n`;

View File

@@ -104,9 +104,7 @@ for (const type in t.NODE_FIELDS) {
}
for (let i = 0; i < t.TYPES.length; i++) {
let decl = `export function is${
t.TYPES[i]
}(node: object | null | undefined, opts?: object | null): `;
let decl = `export function is${t.TYPES[i]}(node: object | null | undefined, opts?: object | null): `;
if (t.NODE_FIELDS[t.TYPES[i]]) {
decl += `node is ${t.TYPES[i]};`;