mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Improve lint vars output messaging (#25049)
This commit is contained in:
parent
57083c3042
commit
dd621e5511
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ function findUnusedVars(dir) {
|
||||||
// Array of all Sass variables
|
// Array of all Sass variables
|
||||||
const variables = sassFilesString.match(/(^\$[a-zA-Z0-9_-]+[^:])/gm)
|
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
|
// Loop through each variable
|
||||||
variables.forEach((variable) => {
|
variables.forEach((variable) => {
|
||||||
|
@ -52,7 +52,7 @@ function findUnusedVars(dir) {
|
||||||
const count = (sassFilesString.match(re) || []).length
|
const count = (sassFilesString.match(re) || []).length
|
||||||
|
|
||||||
if (count === 1) {
|
if (count === 1) {
|
||||||
console.log(`Variable "${variable}" is only used once!`)
|
console.log(`Variable "${variable}" is not being used.`)
|
||||||
unusedVarsFound = true
|
unusedVarsFound = true
|
||||||
globalSuccess = false
|
globalSuccess = false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue