// Array of all Sass variables
const variables = sassFilesString.match(/(^\$[a-zA-Z0-9_-]+[^:])/gm)
- console.log(`There's a total of ${variables.length} variables.`)
+ console.log(`Found ${variables.length} total variables.`)
// Loop through each variable
variables.forEach((variable) => {
const count = (sassFilesString.match(re) || []).length
if (count === 1) {
- console.log(`Variable "${variable}" is only used once!`)
+ console.log(`Variable "${variable}" is not being used.`)
unusedVarsFound = true
globalSuccess = false
}