tweak error messages

pull/12560/head
Simon Holthausen 2 years ago
parent 8ba8511ef2
commit 38e6147117

@ -8,35 +8,35 @@
## css_global_block_invalid_combinator ## css_global_block_invalid_combinator
> A :global {...} block cannot follow a %name% combinator > A `:global` selector cannot follow a `%name%` combinator
## css_global_block_invalid_declaration ## css_global_block_invalid_declaration
> A :global {...} block can only contain rules, not declarations > A `:global {...}` block can only contain rules, not declarations
## css_global_block_invalid_list ## css_global_block_invalid_list
> A :global {...} block cannot be part of a selector list with more than one item > A `:global` selector cannot be part of a selector list with more than one item
## css_global_block_invalid_modifier ## css_global_block_invalid_modifier
> A :global {...} block cannot modify an existing selector > A `:global` selector cannot modify an existing selector
## css_global_block_invalid_modifier_start ## css_global_block_invalid_modifier_start
> A :global {...} block at the very beginning cannot be modified by other selectors > A `:global` selector at the very beginning cannot be modified by other selectors
## css_global_invalid_placement ## css_global_invalid_placement
> :global(...) can be at the start or end of a selector sequence, but not in the middle > `:global(...)` can be at the start or end of a selector sequence, but not in the middle
## css_global_invalid_selector ## css_global_invalid_selector
> :global(...) must contain exactly one selector > `:global(...)` must contain exactly one selector
## css_global_invalid_selector_list ## css_global_invalid_selector_list
> :global(...) must not contain type or universal selectors when used in a compound selector > `:global(...)` must not contain type or universal selectors when used in a compound selector
## css_nesting_selector_invalid_placement ## css_nesting_selector_invalid_placement
@ -48,4 +48,4 @@
## css_type_selector_invalid_placement ## css_type_selector_invalid_placement
> :global(...) must not be followed with a type selector > `:global(...)` must not be followed with a type selector

@ -434,76 +434,76 @@ export function css_expected_identifier(node) {
} }
/** /**
* A :global {...} block cannot follow a %name% combinator * A `:global` selector cannot follow a `%name%` combinator
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node
* @param {string} name * @param {string} name
* @returns {never} * @returns {never}
*/ */
export function css_global_block_invalid_combinator(node, name) { export function css_global_block_invalid_combinator(node, name) {
e(node, "css_global_block_invalid_combinator", `A :global {...} block cannot follow a ${name} combinator`); e(node, "css_global_block_invalid_combinator", `A \`:global\` selector cannot follow a \`${name}\` combinator`);
} }
/** /**
* A :global {...} block can only contain rules, not declarations * A `:global {...}` block can only contain rules, not declarations
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node
* @returns {never} * @returns {never}
*/ */
export function css_global_block_invalid_declaration(node) { export function css_global_block_invalid_declaration(node) {
e(node, "css_global_block_invalid_declaration", "A :global {...} block can only contain rules, not declarations"); e(node, "css_global_block_invalid_declaration", "A `:global {...}` block can only contain rules, not declarations");
} }
/** /**
* A :global {...} block cannot be part of a selector list with more than one item * A `:global` selector cannot be part of a selector list with more than one item
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node
* @returns {never} * @returns {never}
*/ */
export function css_global_block_invalid_list(node) { export function css_global_block_invalid_list(node) {
e(node, "css_global_block_invalid_list", "A :global {...} block cannot be part of a selector list with more than one item"); e(node, "css_global_block_invalid_list", "A `:global` selector cannot be part of a selector list with more than one item");
} }
/** /**
* A :global {...} block cannot modify an existing selector * A `:global` selector cannot modify an existing selector
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node
* @returns {never} * @returns {never}
*/ */
export function css_global_block_invalid_modifier(node) { export function css_global_block_invalid_modifier(node) {
e(node, "css_global_block_invalid_modifier", "A :global {...} block cannot modify an existing selector"); e(node, "css_global_block_invalid_modifier", "A `:global` selector cannot modify an existing selector");
} }
/** /**
* A :global {...} block at the very beginning cannot be modified by other selectors * A `:global` selector at the very beginning cannot be modified by other selectors
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node
* @returns {never} * @returns {never}
*/ */
export function css_global_block_invalid_modifier_start(node) { export function css_global_block_invalid_modifier_start(node) {
e(node, "css_global_block_invalid_modifier_start", "A :global {...} block at the very beginning cannot be modified by other selectors"); e(node, "css_global_block_invalid_modifier_start", "A `:global` selector at the very beginning cannot be modified by other selectors");
} }
/** /**
* :global(...) can be at the start or end of a selector sequence, but not in the middle * `:global(...)` can be at the start or end of a selector sequence, but not in the middle
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node
* @returns {never} * @returns {never}
*/ */
export function css_global_invalid_placement(node) { export function css_global_invalid_placement(node) {
e(node, "css_global_invalid_placement", ":global(...) can be at the start or end of a selector sequence, but not in the middle"); e(node, "css_global_invalid_placement", "`:global(...)` can be at the start or end of a selector sequence, but not in the middle");
} }
/** /**
* :global(...) must contain exactly one selector * `:global(...)` must contain exactly one selector
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node
* @returns {never} * @returns {never}
*/ */
export function css_global_invalid_selector(node) { export function css_global_invalid_selector(node) {
e(node, "css_global_invalid_selector", ":global(...) must contain exactly one selector"); e(node, "css_global_invalid_selector", "`:global(...)` must contain exactly one selector");
} }
/** /**
* :global(...) must not contain type or universal selectors when used in a compound selector * `:global(...)` must not contain type or universal selectors when used in a compound selector
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node
* @returns {never} * @returns {never}
*/ */
export function css_global_invalid_selector_list(node) { export function css_global_invalid_selector_list(node) {
e(node, "css_global_invalid_selector_list", ":global(...) must not contain type or universal selectors when used in a compound selector"); e(node, "css_global_invalid_selector_list", "`:global(...)` must not contain type or universal selectors when used in a compound selector");
} }
/** /**
@ -525,12 +525,12 @@ export function css_selector_invalid(node) {
} }
/** /**
* :global(...) must not be followed with a type selector * `:global(...)` must not be followed with a type selector
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node
* @returns {never} * @returns {never}
*/ */
export function css_type_selector_invalid_placement(node) { export function css_type_selector_invalid_placement(node) {
e(node, "css_type_selector_invalid_placement", ":global(...) must not be followed with a type selector"); e(node, "css_type_selector_invalid_placement", "`:global(...)` must not be followed with a type selector");
} }
/** /**

@ -3,7 +3,7 @@ import { test } from '../../test';
export default test({ export default test({
error: { error: {
code: 'css_global_block_invalid_combinator', code: 'css_global_block_invalid_combinator',
message: 'A :global {...} block cannot follow a > combinator', message: 'A `:global` selector cannot follow a `>` combinator',
position: [79, 88] position: [79, 88]
} }
}); });

@ -3,7 +3,7 @@ import { test } from '../../test';
export default test({ export default test({
error: { error: {
code: 'css_global_block_invalid_combinator', code: 'css_global_block_invalid_combinator',
message: 'A :global {...} block cannot follow a > combinator', message: 'A `:global` selector cannot follow a `>` combinator',
position: [54, 63] position: [54, 63]
} }
}); });

@ -3,7 +3,7 @@ import { test } from '../../test';
export default test({ export default test({
error: { error: {
code: 'css_global_block_invalid_declaration', code: 'css_global_block_invalid_declaration',
message: 'A :global {...} block can only contain rules, not declarations', message: 'A `:global {...}` block can only contain rules, not declarations',
position: [109, 119] position: [109, 119]
} }
}); });

@ -3,7 +3,7 @@ import { test } from '../../test';
export default test({ export default test({
error: { error: {
code: 'css_global_block_invalid_list', code: 'css_global_block_invalid_list',
message: 'A :global {...} block cannot be part of a selector list with more than one item', message: 'A `:global` selector cannot be part of a selector list with more than one item',
position: [9, 31] position: [9, 31]
} }
}); });

@ -3,7 +3,7 @@ import { test } from '../../test';
export default test({ export default test({
error: { error: {
code: 'css_global_block_invalid_modifier_start', code: 'css_global_block_invalid_modifier_start',
message: 'A :global {...} block at the very beginning cannot be modified by other selectors', message: 'A `:global` selector at the very beginning cannot be modified by other selectors',
position: [75, 77] position: [75, 77]
} }
}); });

@ -3,7 +3,7 @@ import { test } from '../../test';
export default test({ export default test({
error: { error: {
code: 'css_global_block_invalid_modifier_start', code: 'css_global_block_invalid_modifier_start',
message: 'A :global {...} block at the very beginning cannot be modified by other selectors', message: 'A `:global` selector at the very beginning cannot be modified by other selectors',
position: [147, 148] position: [147, 148]
} }
}); });

@ -3,7 +3,7 @@ import { test } from '../../test';
export default test({ export default test({
error: { error: {
code: 'css_global_block_invalid_modifier', code: 'css_global_block_invalid_modifier',
message: 'A :global {...} block cannot modify an existing selector', message: 'A `:global` selector cannot modify an existing selector',
position: [70, 77] position: [70, 77]
} }
}); });

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_global_invalid_placement", "code": "css_global_invalid_placement",
"message": ":global(...) can be at the start or end of a selector sequence, but not in the middle", "message": "`:global(...)` can be at the start or end of a selector sequence, but not in the middle",
"start": { "start": {
"line": 8, "line": 8,
"column": 6 "column": 6

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_global_invalid_placement", "code": "css_global_invalid_placement",
"message": ":global(...) can be at the start or end of a selector sequence, but not in the middle", "message": "`:global(...)` can be at the start or end of a selector sequence, but not in the middle",
"start": { "start": {
"line": 5, "line": 5,
"column": 6 "column": 6

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_global_invalid_selector_list", "code": "css_global_invalid_selector_list",
"message": ":global(...) must not contain type or universal selectors when used in a compound selector", "message": "`:global(...)` must not contain type or universal selectors when used in a compound selector",
"start": { "start": {
"line": 2, "line": 2,
"column": 5 "column": 5

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_global_invalid_selector_list", "code": "css_global_invalid_selector_list",
"message": ":global(...) must not contain type or universal selectors when used in a compound selector", "message": "`:global(...)` must not contain type or universal selectors when used in a compound selector",
"start": { "start": {
"line": 2, "line": 2,
"column": 5 "column": 5

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_global_invalid_selector_list", "code": "css_global_invalid_selector_list",
"message": ":global(...) must not contain type or universal selectors when used in a compound selector", "message": "`:global(...)` must not contain type or universal selectors when used in a compound selector",
"start": { "start": {
"line": 5, "line": 5,
"column": 5 "column": 5

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_global_invalid_placement", "code": "css_global_invalid_placement",
"message": ":global(...) can be at the start or end of a selector sequence, but not in the middle", "message": "`:global(...)` can be at the start or end of a selector sequence, but not in the middle",
"start": { "start": {
"line": 2, "line": 2,
"column": 6 "column": 6

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_global_invalid_selector", "code": "css_global_invalid_selector",
"message": ":global(...) must contain exactly one selector", "message": "`:global(...)` must contain exactly one selector",
"start": { "start": {
"line": 11, "line": 11,
"column": 5 "column": 5

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_global_invalid_selector", "code": "css_global_invalid_selector",
"message": ":global(...) must contain exactly one selector", "message": "`:global(...)` must contain exactly one selector",
"start": { "start": {
"line": 5, "line": 5,
"column": 5 "column": 5

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_global_invalid_selector", "code": "css_global_invalid_selector",
"message": ":global(...) must contain exactly one selector", "message": "`:global(...)` must contain exactly one selector",
"start": { "start": {
"line": 2, "line": 2,
"column": 5 "column": 5

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_global_invalid_selector", "code": "css_global_invalid_selector",
"message": ":global(...) must contain exactly one selector", "message": "`:global(...)` must contain exactly one selector",
"start": { "start": {
"line": 5, "line": 5,
"column": 1 "column": 1

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_global_invalid_selector", "code": "css_global_invalid_selector",
"message": ":global(...) must contain exactly one selector", "message": "`:global(...)` must contain exactly one selector",
"start": { "start": {
"line": 5, "line": 5,
"column": 1 "column": 1

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_global_invalid_selector_list", "code": "css_global_invalid_selector_list",
"message": ":global(...) must not contain type or universal selectors when used in a compound selector", "message": "`:global(...)` must not contain type or universal selectors when used in a compound selector",
"start": { "start": {
"line": 20, "line": 20,
"column": 6 "column": 6

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_global_invalid_selector", "code": "css_global_invalid_selector",
"message": ":global(...) must contain exactly one selector", "message": "`:global(...)` must contain exactly one selector",
"start": { "start": {
"line": 11, "line": 11,
"column": 5 "column": 5

@ -1,7 +1,7 @@
[ [
{ {
"code": "css_type_selector_invalid_placement", "code": "css_type_selector_invalid_placement",
"message": ":global(...) must not be followed with a type selector", "message": "`:global(...)` must not be followed with a type selector",
"start": { "start": {
"line": 17, "line": 17,
"column": 14 "column": 14

Loading…
Cancel
Save