mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Prettier-ignore long error strings
This commit is contained in:
parent
538a854a73
commit
447bc873d8
@ -14,9 +14,8 @@ function findMixin(css, mixin, onError) {
|
||||
css.walkRules(rule => {
|
||||
if (rule.selectors.includes(mixin)) {
|
||||
if (rule.parent.type !== 'root') {
|
||||
onError(
|
||||
`\`@apply\` cannot be used with ${mixin} because ${mixin} is nested inside of an at-rule (@${rule.parent.name}).`
|
||||
)
|
||||
// prettier-ignore
|
||||
onError(`\`@apply\` cannot be used with ${mixin} because ${mixin} is nested inside of an at-rule (@${rule.parent.name}).`)
|
||||
}
|
||||
|
||||
matches.push(rule)
|
||||
@ -24,10 +23,12 @@ function findMixin(css, mixin, onError) {
|
||||
})
|
||||
|
||||
if (_.isEmpty(matches)) {
|
||||
// prettier-ignore
|
||||
onError(`\`@apply\` cannot be used with ${mixin} because ${mixin} either does not exist, or it's actual definition includes a pseudo-class like :hover, :active, etc.`)
|
||||
}
|
||||
|
||||
if (matches.length > 1) {
|
||||
// prettier-ignore
|
||||
onError(`\`@apply\` cannot be used with ${mixin} because ${mixin} is included in multiple rulesets.`)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user