chore: enable flowcheck on CI (#11945)
* chore: enable flowcheck on CI * fix: flow errors
This commit is contained in:
parent
00b974298b
commit
a3893129ec
3
Makefile
3
Makefile
@ -85,8 +85,7 @@ watch: build-no-bundle
|
||||
BABEL_ENV=development $(YARN) gulp watch
|
||||
|
||||
code-quality-ci: build-no-bundle-ci
|
||||
$(MAKE) flowcheck-ci & $(MAKE) lint-ci
|
||||
|
||||
$(MAKE) flowcheck-ci lint-ci
|
||||
|
||||
flowcheck-ci:
|
||||
$(MAKE) flow
|
||||
|
||||
@ -639,7 +639,7 @@ export default class StatementParser extends ExpressionParser {
|
||||
return this.finishNode(node, "ThrowStatement");
|
||||
}
|
||||
|
||||
parseCatchClauseParam(): N.Identifier {
|
||||
parseCatchClauseParam(): N.Pattern {
|
||||
const param = this.parseBindingAtom();
|
||||
|
||||
const simple = param.type === "Identifier";
|
||||
@ -1199,7 +1199,7 @@ export default class StatementParser extends ExpressionParser {
|
||||
// https://tc39.es/ecma262/#prod-ClassBody
|
||||
parseClassBody(
|
||||
constructorAllowsSuper: boolean,
|
||||
oldStrict?: boolean,
|
||||
oldStrict: boolean,
|
||||
): N.ClassBody {
|
||||
this.classScope.enter();
|
||||
|
||||
|
||||
@ -45,7 +45,6 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
||||
|
||||
estreeParseDecimalLiteral(value: any): N.Node {
|
||||
// https://github.com/estree/estree/blob/master/experimental/decimal.md
|
||||
// $FlowIgnore
|
||||
// todo: use BigDecimal when node supports it.
|
||||
const decimal = null;
|
||||
const node = this.estreeParseLiteral(decimal);
|
||||
|
||||
@ -203,6 +203,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
||||
|
||||
this.next();
|
||||
this.takeDecorators(node);
|
||||
const oldStrict = this.state.strict;
|
||||
|
||||
const placeholder = this.parsePlaceholder("Identifier");
|
||||
if (placeholder) {
|
||||
@ -226,7 +227,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
||||
this.parseClassSuper(node);
|
||||
node.body =
|
||||
this.parsePlaceholder("ClassBody") ||
|
||||
this.parseClassBody(!!node.superClass);
|
||||
this.parseClassBody(!!node.superClass, oldStrict);
|
||||
return this.finishNode(node, type);
|
||||
}
|
||||
|
||||
|
||||
@ -2727,7 +2727,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
||||
return hasContextParam ? baseCount + 1 : baseCount;
|
||||
}
|
||||
|
||||
parseCatchClauseParam(): N.Identifier {
|
||||
parseCatchClauseParam(): N.Pattern {
|
||||
const param = super.parseCatchClauseParam();
|
||||
const type = this.tsTryParseTypeAnnotation();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user