From 447bc873d8a9e4320ea845245da205e09518951f Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Thu, 16 Nov 2017 08:16:59 -0500 Subject: [PATCH] Prettier-ignore long error strings --- src/lib/substituteClassApplyAtRules.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/substituteClassApplyAtRules.js b/src/lib/substituteClassApplyAtRules.js index b4101aa60..5408e82f6 100644 --- a/src/lib/substituteClassApplyAtRules.js +++ b/src/lib/substituteClassApplyAtRules.js @@ -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.`) }