Skip to content

Commit 801630e

Browse files
committed
Feed linter
1 parent 3bfe439 commit 801630e

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/js/script.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -289,34 +289,31 @@ function checkBemForElem (elem) {
289289

290290
if (isClassExistsOnParents && !hasPrefixOnSameElement) {
291291
prefixCorrect = true;
292-
}
293-
else {
292+
} else {
294293
hasBemWarning = true;
295294
}
296295

297296
elem.classList.validBem[classItem] = prefixCorrect;
298297
}
299298

300299
// Check first part of class with -- or _ (modificators)
301-
let modifPrefix = '';
300+
let modifPrefix = ``;
302301
let modifPrefixCorrect = false;
303302

304303
if (hasDashesDelimiter) {
305304
modifPrefix = classItem.split(`--`)[0];
306-
}
307-
else if (matchSingleUnderline) {
308-
modifPrefix = classItem.slice(0, matchSingleUnderline.index + 1)
305+
} else if (matchSingleUnderline) {
306+
modifPrefix = classItem.slice(0, matchSingleUnderline.index + 1);
309307
}
310308

311309
if (modifPrefix) {
312310
if (elem.classList.contains(modifPrefix)) {
313311
modifPrefixCorrect = true;
314-
}
315-
else {
312+
} else {
316313
hasBemWarning = true;
317314
}
318315

319-
if (!modifPrefixCorrect){
316+
if (!modifPrefixCorrect) {
320317
elem.classList.validBem[classItem] = modifPrefixCorrect;
321318
}
322319
}

0 commit comments

Comments
 (0)