Skip to content

Commit b16f3dc

Browse files
committed
fix: Clarify error message.
1 parent 8a3cade commit b16f3dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: packages/@css-blocks/core/src/BlockParser/features/composes-block.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export async function composeBlock(configuration: Configuration, root: postcss.R
4141

4242
for (let sel of parsedSel) {
4343
if (sel.selector.next) {
44-
block.addError(new errors.InvalidBlockSyntax(`Style composition is not allowed in rule sets with a scope selector.`, sourceRange(configuration, root, sourceFile, decl)));
44+
block.addError(new errors.InvalidBlockSyntax(`Style composition is not allowed in rule sets with a context selector.`, sourceRange(configuration, root, sourceFile, decl)));
4545
}
4646
let foundStyles = getStyleTargets(block, sel.selector);
4747
for (let blockClass of foundStyles.blockClasses) {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class BlockNames extends BEMProcessor {
8787
return assertMultipleErrorsRejection(
8888
[{
8989
type: InvalidBlockSyntax,
90-
message: `Style composition is not allowed in rule sets with a scope selector. (foo/bar/test-block.css:2:44)`}],
90+
message: `Style composition is not allowed in rule sets with a context selector. (foo/bar/test-block.css:2:44)`}],
9191
this.process(filename, inputCSS, {importer: imports.importer()}));
9292
}
9393

0 commit comments

Comments
 (0)