Skip to content

Commit afc157b

Browse files
committed
fix: Failing tests and linting issues for core.
1 parent 2126ba0 commit afc157b

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Diff for: packages/@css-blocks/core/src/Analyzer/Analysis.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ export class Analysis<K extends keyof TemplateTypes> {
469469
}
470470
element.seal();
471471
analysis.elements.set(elID, element);
472-
if(analysis.onElementAnalyzed) analysis.onElementAnalyzed(element);
472+
if (analysis.onElementAnalyzed) analysis.onElementAnalyzed(element);
473473
});
474474

475475
return analysis;

Diff for: packages/@css-blocks/core/src/Analyzer/ElementAnalysis.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ export class ElementAnalysis<BooleanExpression, StringExpression, TernaryExpress
769769

770770
serializeAnalyzedStyle(
771771
s: AnalyzedStyle<BooleanExpression, StringExpression, TernaryExpression>,
772-
indexOf: (s: Style) => number
772+
indexOf: (s: Style) => number,
773773
): SerializedAnalyzedStyle {
774774
let serialized: Partial<SerializedAnalyzedStyle> = {};
775775

@@ -809,7 +809,7 @@ export class ElementAnalysis<BooleanExpression, StringExpression, TernaryExpress
809809
analyzedStyle: SerializedAnalyzedStyle,
810810
styleRef: (n: number) => Style,
811811
classRef: (n: number) => BlockClass,
812-
attrValueRef: (n: number) => AttrValue
812+
attrValueRef: (n: number) => AttrValue,
813813
): void {
814814
if (isStaticClass(analyzedStyle)) {
815815
element.addStaticClass(<BlockClass>styleRef(analyzedStyle.klass));

Diff for: packages/@css-blocks/core/src/Analyzer/validations/attribute-group-validator.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { unionInto } from "@opticss/util";
22

33
import { Attribute, isAttrValue } from "../../BlockTree";
4-
import { isAttrGroup, hasAttrValue } from "../ElementAnalysis";
4+
import { hasAttrValue, isAttrGroup } from "../ElementAnalysis";
55

66
import { ErrorCallback, Validator } from "./Validator";
77

Diff for: packages/@css-blocks/core/test/block-definition-test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ export class BlockFactoryTests extends BEMProcessor {
235235
clean(`@block-syntax-version 1;
236236
@block foo from "./foo.css";
237237
@block bar, (bip, baz as zab) from "./bar.css";
238-
:scope { block-id: "${block.guid}"; block-name: "test-block"; composes: foo[oceanic]; block-class: test-block }
239-
.nav { composes: foo, bip.orange; block-class: test-block__nav }
240-
.nav[open] { composes: bar.lemon; block-class: test-block__nav--open }
241-
.nav[position="top"] { composes: foo[forrest]; block-class: test-block__nav--position-top }
238+
:scope { block-id: "${block.guid}"; block-name: "test-block"; composes: "foo[oceanic]"; block-class: test-block }
239+
.nav { composes: "foo", "bip.orange"; block-class: test-block__nav }
240+
.nav[open] { composes: "bar.lemon"; block-class: test-block__nav--open }
241+
.nav[position="top"] { composes: "foo[forrest]"; block-class: test-block__nav--position-top }
242242
.nav[position="top"][open] { composes: foo[oceanic], foo[forrest] }
243243
`));
244244
}

0 commit comments

Comments
 (0)