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:
@@ -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]})`;
|
||||
|
||||
@@ -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`;
|
||||
|
||||
@@ -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]};`;
|
||||
|
||||
Reference in New Issue
Block a user