| 85 | } |
| 86 | |
| 87 | detectProblem(err) { |
| 88 | if (err.formatted) { |
| 89 | if ( |
| 90 | err.formatted.includes( |
| 91 | 'Error: Import directives may not be used within control directives or mixins', |
| 92 | ) |
| 93 | ) { |
| 94 | return CONDITIONAL_IMPORT; |
| 95 | } |
| 96 | if ( |
| 97 | err.formatted.includes( |
| 98 | "Base-level rules cannot contain the parent-selector-referencing character '&'", |
| 99 | ) |
| 100 | ) { |
| 101 | return BASE_LEVEL_RULES; |
| 102 | } |
| 103 | if ( |
| 104 | err.formatted.includes('Invalid CSS after') && |
| 105 | err.formatted.includes('expected selector, was ",') |
| 106 | ) { |
| 107 | return POSSIBLE_WRONG_COMMA; |
| 108 | } |
| 109 | if (err.formatted.includes('Undefined variable')) { |
| 110 | return UNDEFINED_VARIABLE; |
| 111 | } |
| 112 | } |
| 113 | return null; |
| 114 | } |
| 115 | |
| 116 | parseChangedFiles(files) { |
| 117 | for (const file of files) { |