Edit File by line
/home/barbar84/www/wp-inclu.../js/codemirr...
File: csslint.js
"use strict";
[9000] Fix | Delete
var rule = this,
[9001] Fix | Delete
count = 0;
[9002] Fix | Delete
[9003] Fix | Delete
[9004] Fix | Delete
parser.addListener("startfontface", function() {
[9005] Fix | Delete
count++;
[9006] Fix | Delete
});
[9007] Fix | Delete
[9008] Fix | Delete
parser.addListener("endstylesheet", function() {
[9009] Fix | Delete
if (count > 5) {
[9010] Fix | Delete
reporter.rollupWarn("Too many @font-face declarations (" + count + ").", rule);
[9011] Fix | Delete
}
[9012] Fix | Delete
});
[9013] Fix | Delete
}
[9014] Fix | Delete
[9015] Fix | Delete
});
[9016] Fix | Delete
[9017] Fix | Delete
/*
[9018] Fix | Delete
* Rule: You shouldn't need more than 9 font-size declarations.
[9019] Fix | Delete
*/
[9020] Fix | Delete
[9021] Fix | Delete
CSSLint.addRule({
[9022] Fix | Delete
[9023] Fix | Delete
// rule information
[9024] Fix | Delete
id: "font-sizes",
[9025] Fix | Delete
name: "Disallow too many font sizes",
[9026] Fix | Delete
desc: "Checks the number of font-size declarations.",
[9027] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Don%27t-use-too-many-font-size-declarations",
[9028] Fix | Delete
browsers: "All",
[9029] Fix | Delete
[9030] Fix | Delete
// initialization
[9031] Fix | Delete
init: function(parser, reporter) {
[9032] Fix | Delete
"use strict";
[9033] Fix | Delete
var rule = this,
[9034] Fix | Delete
count = 0;
[9035] Fix | Delete
[9036] Fix | Delete
// check for use of "font-size"
[9037] Fix | Delete
parser.addListener("property", function(event) {
[9038] Fix | Delete
if (event.property.toString() === "font-size") {
[9039] Fix | Delete
count++;
[9040] Fix | Delete
}
[9041] Fix | Delete
});
[9042] Fix | Delete
[9043] Fix | Delete
// report the results
[9044] Fix | Delete
parser.addListener("endstylesheet", function() {
[9045] Fix | Delete
reporter.stat("font-sizes", count);
[9046] Fix | Delete
if (count >= 10) {
[9047] Fix | Delete
reporter.rollupWarn("Too many font-size declarations (" + count + "), abstraction needed.", rule);
[9048] Fix | Delete
}
[9049] Fix | Delete
});
[9050] Fix | Delete
}
[9051] Fix | Delete
[9052] Fix | Delete
});
[9053] Fix | Delete
[9054] Fix | Delete
/*
[9055] Fix | Delete
* Rule: When using a vendor-prefixed gradient, make sure to use them all.
[9056] Fix | Delete
*/
[9057] Fix | Delete
[9058] Fix | Delete
CSSLint.addRule({
[9059] Fix | Delete
[9060] Fix | Delete
// rule information
[9061] Fix | Delete
id: "gradients",
[9062] Fix | Delete
name: "Require all gradient definitions",
[9063] Fix | Delete
desc: "When using a vendor-prefixed gradient, make sure to use them all.",
[9064] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Require-all-gradient-definitions",
[9065] Fix | Delete
browsers: "All",
[9066] Fix | Delete
[9067] Fix | Delete
// initialization
[9068] Fix | Delete
init: function(parser, reporter) {
[9069] Fix | Delete
"use strict";
[9070] Fix | Delete
var rule = this,
[9071] Fix | Delete
gradients;
[9072] Fix | Delete
[9073] Fix | Delete
parser.addListener("startrule", function() {
[9074] Fix | Delete
gradients = {
[9075] Fix | Delete
moz: 0,
[9076] Fix | Delete
webkit: 0,
[9077] Fix | Delete
oldWebkit: 0,
[9078] Fix | Delete
o: 0
[9079] Fix | Delete
};
[9080] Fix | Delete
});
[9081] Fix | Delete
[9082] Fix | Delete
parser.addListener("property", function(event) {
[9083] Fix | Delete
[9084] Fix | Delete
if (/\-(moz|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(event.value)) {
[9085] Fix | Delete
gradients[RegExp.$1] = 1;
[9086] Fix | Delete
} else if (/\-webkit\-gradient/i.test(event.value)) {
[9087] Fix | Delete
gradients.oldWebkit = 1;
[9088] Fix | Delete
}
[9089] Fix | Delete
[9090] Fix | Delete
});
[9091] Fix | Delete
[9092] Fix | Delete
parser.addListener("endrule", function(event) {
[9093] Fix | Delete
var missing = [];
[9094] Fix | Delete
[9095] Fix | Delete
if (!gradients.moz) {
[9096] Fix | Delete
missing.push("Firefox 3.6+");
[9097] Fix | Delete
}
[9098] Fix | Delete
[9099] Fix | Delete
if (!gradients.webkit) {
[9100] Fix | Delete
missing.push("Webkit (Safari 5+, Chrome)");
[9101] Fix | Delete
}
[9102] Fix | Delete
[9103] Fix | Delete
if (!gradients.oldWebkit) {
[9104] Fix | Delete
missing.push("Old Webkit (Safari 4+, Chrome)");
[9105] Fix | Delete
}
[9106] Fix | Delete
[9107] Fix | Delete
if (!gradients.o) {
[9108] Fix | Delete
missing.push("Opera 11.1+");
[9109] Fix | Delete
}
[9110] Fix | Delete
[9111] Fix | Delete
if (missing.length && missing.length < 4) {
[9112] Fix | Delete
reporter.report("Missing vendor-prefixed CSS gradients for " + missing.join(", ") + ".", event.selectors[0].line, event.selectors[0].col, rule);
[9113] Fix | Delete
}
[9114] Fix | Delete
[9115] Fix | Delete
});
[9116] Fix | Delete
[9117] Fix | Delete
}
[9118] Fix | Delete
[9119] Fix | Delete
});
[9120] Fix | Delete
[9121] Fix | Delete
/*
[9122] Fix | Delete
* Rule: Don't use IDs for selectors.
[9123] Fix | Delete
*/
[9124] Fix | Delete
[9125] Fix | Delete
CSSLint.addRule({
[9126] Fix | Delete
[9127] Fix | Delete
// rule information
[9128] Fix | Delete
id: "ids",
[9129] Fix | Delete
name: "Disallow IDs in selectors",
[9130] Fix | Delete
desc: "Selectors should not contain IDs.",
[9131] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Disallow-IDs-in-selectors",
[9132] Fix | Delete
browsers: "All",
[9133] Fix | Delete
[9134] Fix | Delete
// initialization
[9135] Fix | Delete
init: function(parser, reporter) {
[9136] Fix | Delete
"use strict";
[9137] Fix | Delete
var rule = this;
[9138] Fix | Delete
parser.addListener("startrule", function(event) {
[9139] Fix | Delete
var selectors = event.selectors,
[9140] Fix | Delete
selector,
[9141] Fix | Delete
part,
[9142] Fix | Delete
modifier,
[9143] Fix | Delete
idCount,
[9144] Fix | Delete
i, j, k;
[9145] Fix | Delete
[9146] Fix | Delete
for (i=0; i < selectors.length; i++) {
[9147] Fix | Delete
selector = selectors[i];
[9148] Fix | Delete
idCount = 0;
[9149] Fix | Delete
[9150] Fix | Delete
for (j=0; j < selector.parts.length; j++) {
[9151] Fix | Delete
part = selector.parts[j];
[9152] Fix | Delete
if (part.type === parser.SELECTOR_PART_TYPE) {
[9153] Fix | Delete
for (k=0; k < part.modifiers.length; k++) {
[9154] Fix | Delete
modifier = part.modifiers[k];
[9155] Fix | Delete
if (modifier.type === "id") {
[9156] Fix | Delete
idCount++;
[9157] Fix | Delete
}
[9158] Fix | Delete
}
[9159] Fix | Delete
}
[9160] Fix | Delete
}
[9161] Fix | Delete
[9162] Fix | Delete
if (idCount === 1) {
[9163] Fix | Delete
reporter.report("Don't use IDs in selectors.", selector.line, selector.col, rule);
[9164] Fix | Delete
} else if (idCount > 1) {
[9165] Fix | Delete
reporter.report(idCount + " IDs in the selector, really?", selector.line, selector.col, rule);
[9166] Fix | Delete
}
[9167] Fix | Delete
}
[9168] Fix | Delete
[9169] Fix | Delete
});
[9170] Fix | Delete
}
[9171] Fix | Delete
[9172] Fix | Delete
});
[9173] Fix | Delete
[9174] Fix | Delete
/*
[9175] Fix | Delete
* Rule: IE6-9 supports up to 31 stylesheet import.
[9176] Fix | Delete
* Reference:
[9177] Fix | Delete
* http://blogs.msdn.com/b/ieinternals/archive/2011/05/14/internet-explorer-stylesheet-rule-selector-import-sheet-limit-maximum.aspx
[9178] Fix | Delete
*/
[9179] Fix | Delete
[9180] Fix | Delete
CSSLint.addRule({
[9181] Fix | Delete
[9182] Fix | Delete
// rule information
[9183] Fix | Delete
id: "import-ie-limit",
[9184] Fix | Delete
name: "@import limit on IE6-IE9",
[9185] Fix | Delete
desc: "IE6-9 supports up to 31 @import per stylesheet",
[9186] Fix | Delete
browsers: "IE6, IE7, IE8, IE9",
[9187] Fix | Delete
[9188] Fix | Delete
// initialization
[9189] Fix | Delete
init: function(parser, reporter) {
[9190] Fix | Delete
"use strict";
[9191] Fix | Delete
var rule = this,
[9192] Fix | Delete
MAX_IMPORT_COUNT = 31,
[9193] Fix | Delete
count = 0;
[9194] Fix | Delete
[9195] Fix | Delete
function startPage() {
[9196] Fix | Delete
count = 0;
[9197] Fix | Delete
}
[9198] Fix | Delete
[9199] Fix | Delete
parser.addListener("startpage", startPage);
[9200] Fix | Delete
[9201] Fix | Delete
parser.addListener("import", function() {
[9202] Fix | Delete
count++;
[9203] Fix | Delete
});
[9204] Fix | Delete
[9205] Fix | Delete
parser.addListener("endstylesheet", function() {
[9206] Fix | Delete
if (count > MAX_IMPORT_COUNT) {
[9207] Fix | Delete
reporter.rollupError(
[9208] Fix | Delete
"Too many @import rules (" + count + "). IE6-9 supports up to 31 import per stylesheet.",
[9209] Fix | Delete
rule
[9210] Fix | Delete
);
[9211] Fix | Delete
}
[9212] Fix | Delete
});
[9213] Fix | Delete
}
[9214] Fix | Delete
[9215] Fix | Delete
});
[9216] Fix | Delete
[9217] Fix | Delete
/*
[9218] Fix | Delete
* Rule: Don't use @import, use <link> instead.
[9219] Fix | Delete
*/
[9220] Fix | Delete
[9221] Fix | Delete
CSSLint.addRule({
[9222] Fix | Delete
[9223] Fix | Delete
// rule information
[9224] Fix | Delete
id: "import",
[9225] Fix | Delete
name: "Disallow @import",
[9226] Fix | Delete
desc: "Don't use @import, use <link> instead.",
[9227] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Disallow-%40import",
[9228] Fix | Delete
browsers: "All",
[9229] Fix | Delete
[9230] Fix | Delete
// initialization
[9231] Fix | Delete
init: function(parser, reporter) {
[9232] Fix | Delete
"use strict";
[9233] Fix | Delete
var rule = this;
[9234] Fix | Delete
[9235] Fix | Delete
parser.addListener("import", function(event) {
[9236] Fix | Delete
reporter.report("@import prevents parallel downloads, use <link> instead.", event.line, event.col, rule);
[9237] Fix | Delete
});
[9238] Fix | Delete
[9239] Fix | Delete
}
[9240] Fix | Delete
[9241] Fix | Delete
});
[9242] Fix | Delete
[9243] Fix | Delete
/*
[9244] Fix | Delete
* Rule: Make sure !important is not overused, this could lead to specificity
[9245] Fix | Delete
* war. Display a warning on !important declarations, an error if it's
[9246] Fix | Delete
* used more at least 10 times.
[9247] Fix | Delete
*/
[9248] Fix | Delete
[9249] Fix | Delete
CSSLint.addRule({
[9250] Fix | Delete
[9251] Fix | Delete
// rule information
[9252] Fix | Delete
id: "important",
[9253] Fix | Delete
name: "Disallow !important",
[9254] Fix | Delete
desc: "Be careful when using !important declaration",
[9255] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Disallow-%21important",
[9256] Fix | Delete
browsers: "All",
[9257] Fix | Delete
[9258] Fix | Delete
// initialization
[9259] Fix | Delete
init: function(parser, reporter) {
[9260] Fix | Delete
"use strict";
[9261] Fix | Delete
var rule = this,
[9262] Fix | Delete
count = 0;
[9263] Fix | Delete
[9264] Fix | Delete
// warn that important is used and increment the declaration counter
[9265] Fix | Delete
parser.addListener("property", function(event) {
[9266] Fix | Delete
if (event.important === true) {
[9267] Fix | Delete
count++;
[9268] Fix | Delete
reporter.report("Use of !important", event.line, event.col, rule);
[9269] Fix | Delete
}
[9270] Fix | Delete
});
[9271] Fix | Delete
[9272] Fix | Delete
// if there are more than 10, show an error
[9273] Fix | Delete
parser.addListener("endstylesheet", function() {
[9274] Fix | Delete
reporter.stat("important", count);
[9275] Fix | Delete
if (count >= 10) {
[9276] Fix | Delete
reporter.rollupWarn("Too many !important declarations (" + count + "), try to use less than 10 to avoid specificity issues.", rule);
[9277] Fix | Delete
}
[9278] Fix | Delete
});
[9279] Fix | Delete
}
[9280] Fix | Delete
[9281] Fix | Delete
});
[9282] Fix | Delete
[9283] Fix | Delete
/*
[9284] Fix | Delete
* Rule: Properties should be known (listed in CSS3 specification) or
[9285] Fix | Delete
* be a vendor-prefixed property.
[9286] Fix | Delete
*/
[9287] Fix | Delete
[9288] Fix | Delete
CSSLint.addRule({
[9289] Fix | Delete
[9290] Fix | Delete
// rule information
[9291] Fix | Delete
id: "known-properties",
[9292] Fix | Delete
name: "Require use of known properties",
[9293] Fix | Delete
desc: "Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.",
[9294] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Require-use-of-known-properties",
[9295] Fix | Delete
browsers: "All",
[9296] Fix | Delete
[9297] Fix | Delete
// initialization
[9298] Fix | Delete
init: function(parser, reporter) {
[9299] Fix | Delete
"use strict";
[9300] Fix | Delete
var rule = this;
[9301] Fix | Delete
[9302] Fix | Delete
parser.addListener("property", function(event) {
[9303] Fix | Delete
[9304] Fix | Delete
// the check is handled entirely by the parser-lib (https://github.com/nzakas/parser-lib)
[9305] Fix | Delete
if (event.invalid) {
[9306] Fix | Delete
reporter.report(event.invalid.message, event.line, event.col, rule);
[9307] Fix | Delete
}
[9308] Fix | Delete
[9309] Fix | Delete
});
[9310] Fix | Delete
}
[9311] Fix | Delete
[9312] Fix | Delete
});
[9313] Fix | Delete
[9314] Fix | Delete
/*
[9315] Fix | Delete
* Rule: All properties should be in alphabetical order.
[9316] Fix | Delete
*/
[9317] Fix | Delete
[9318] Fix | Delete
CSSLint.addRule({
[9319] Fix | Delete
[9320] Fix | Delete
// rule information
[9321] Fix | Delete
id: "order-alphabetical",
[9322] Fix | Delete
name: "Alphabetical order",
[9323] Fix | Delete
desc: "Assure properties are in alphabetical order",
[9324] Fix | Delete
browsers: "All",
[9325] Fix | Delete
[9326] Fix | Delete
// initialization
[9327] Fix | Delete
init: function(parser, reporter) {
[9328] Fix | Delete
"use strict";
[9329] Fix | Delete
var rule = this,
[9330] Fix | Delete
properties;
[9331] Fix | Delete
[9332] Fix | Delete
var startRule = function () {
[9333] Fix | Delete
properties = [];
[9334] Fix | Delete
};
[9335] Fix | Delete
[9336] Fix | Delete
var endRule = function(event) {
[9337] Fix | Delete
var currentProperties = properties.join(","),
[9338] Fix | Delete
expectedProperties = properties.sort().join(",");
[9339] Fix | Delete
[9340] Fix | Delete
if (currentProperties !== expectedProperties) {
[9341] Fix | Delete
reporter.report("Rule doesn't have all its properties in alphabetical order.", event.line, event.col, rule);
[9342] Fix | Delete
}
[9343] Fix | Delete
};
[9344] Fix | Delete
[9345] Fix | Delete
parser.addListener("startrule", startRule);
[9346] Fix | Delete
parser.addListener("startfontface", startRule);
[9347] Fix | Delete
parser.addListener("startpage", startRule);
[9348] Fix | Delete
parser.addListener("startpagemargin", startRule);
[9349] Fix | Delete
parser.addListener("startkeyframerule", startRule);
[9350] Fix | Delete
parser.addListener("startviewport", startRule);
[9351] Fix | Delete
[9352] Fix | Delete
parser.addListener("property", function(event) {
[9353] Fix | Delete
var name = event.property.text,
[9354] Fix | Delete
lowerCasePrefixLessName = name.toLowerCase().replace(/^-.*?-/, "");
[9355] Fix | Delete
[9356] Fix | Delete
properties.push(lowerCasePrefixLessName);
[9357] Fix | Delete
});
[9358] Fix | Delete
[9359] Fix | Delete
parser.addListener("endrule", endRule);
[9360] Fix | Delete
parser.addListener("endfontface", endRule);
[9361] Fix | Delete
parser.addListener("endpage", endRule);
[9362] Fix | Delete
parser.addListener("endpagemargin", endRule);
[9363] Fix | Delete
parser.addListener("endkeyframerule", endRule);
[9364] Fix | Delete
parser.addListener("endviewport", endRule);
[9365] Fix | Delete
}
[9366] Fix | Delete
[9367] Fix | Delete
});
[9368] Fix | Delete
[9369] Fix | Delete
/*
[9370] Fix | Delete
* Rule: outline: none or outline: 0 should only be used in a :focus rule
[9371] Fix | Delete
* and only if there are other properties in the same rule.
[9372] Fix | Delete
*/
[9373] Fix | Delete
[9374] Fix | Delete
CSSLint.addRule({
[9375] Fix | Delete
[9376] Fix | Delete
// rule information
[9377] Fix | Delete
id: "outline-none",
[9378] Fix | Delete
name: "Disallow outline: none",
[9379] Fix | Delete
desc: "Use of outline: none or outline: 0 should be limited to :focus rules.",
[9380] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Disallow-outline%3Anone",
[9381] Fix | Delete
browsers: "All",
[9382] Fix | Delete
tags: ["Accessibility"],
[9383] Fix | Delete
[9384] Fix | Delete
// initialization
[9385] Fix | Delete
init: function(parser, reporter) {
[9386] Fix | Delete
"use strict";
[9387] Fix | Delete
var rule = this,
[9388] Fix | Delete
lastRule;
[9389] Fix | Delete
[9390] Fix | Delete
function startRule(event) {
[9391] Fix | Delete
if (event.selectors) {
[9392] Fix | Delete
lastRule = {
[9393] Fix | Delete
line: event.line,
[9394] Fix | Delete
col: event.col,
[9395] Fix | Delete
selectors: event.selectors,
[9396] Fix | Delete
propCount: 0,
[9397] Fix | Delete
outline: false
[9398] Fix | Delete
};
[9399] Fix | Delete
} else {
[9400] Fix | Delete
lastRule = null;
[9401] Fix | Delete
}
[9402] Fix | Delete
}
[9403] Fix | Delete
[9404] Fix | Delete
function endRule() {
[9405] Fix | Delete
if (lastRule) {
[9406] Fix | Delete
if (lastRule.outline) {
[9407] Fix | Delete
if (lastRule.selectors.toString().toLowerCase().indexOf(":focus") === -1) {
[9408] Fix | Delete
reporter.report("Outlines should only be modified using :focus.", lastRule.line, lastRule.col, rule);
[9409] Fix | Delete
} else if (lastRule.propCount === 1) {
[9410] Fix | Delete
reporter.report("Outlines shouldn't be hidden unless other visual changes are made.", lastRule.line, lastRule.col, rule);
[9411] Fix | Delete
}
[9412] Fix | Delete
}
[9413] Fix | Delete
}
[9414] Fix | Delete
}
[9415] Fix | Delete
[9416] Fix | Delete
parser.addListener("startrule", startRule);
[9417] Fix | Delete
parser.addListener("startfontface", startRule);
[9418] Fix | Delete
parser.addListener("startpage", startRule);
[9419] Fix | Delete
parser.addListener("startpagemargin", startRule);
[9420] Fix | Delete
parser.addListener("startkeyframerule", startRule);
[9421] Fix | Delete
parser.addListener("startviewport", startRule);
[9422] Fix | Delete
[9423] Fix | Delete
parser.addListener("property", function(event) {
[9424] Fix | Delete
var name = event.property.text.toLowerCase(),
[9425] Fix | Delete
value = event.value;
[9426] Fix | Delete
[9427] Fix | Delete
if (lastRule) {
[9428] Fix | Delete
lastRule.propCount++;
[9429] Fix | Delete
if (name === "outline" && (value.toString() === "none" || value.toString() === "0")) {
[9430] Fix | Delete
lastRule.outline = true;
[9431] Fix | Delete
}
[9432] Fix | Delete
}
[9433] Fix | Delete
[9434] Fix | Delete
});
[9435] Fix | Delete
[9436] Fix | Delete
parser.addListener("endrule", endRule);
[9437] Fix | Delete
parser.addListener("endfontface", endRule);
[9438] Fix | Delete
parser.addListener("endpage", endRule);
[9439] Fix | Delete
parser.addListener("endpagemargin", endRule);
[9440] Fix | Delete
parser.addListener("endkeyframerule", endRule);
[9441] Fix | Delete
parser.addListener("endviewport", endRule);
[9442] Fix | Delete
[9443] Fix | Delete
}
[9444] Fix | Delete
[9445] Fix | Delete
});
[9446] Fix | Delete
[9447] Fix | Delete
/*
[9448] Fix | Delete
* Rule: Don't use classes or IDs with elements (a.foo or a#foo).
[9449] Fix | Delete
*/
[9450] Fix | Delete
[9451] Fix | Delete
CSSLint.addRule({
[9452] Fix | Delete
[9453] Fix | Delete
// rule information
[9454] Fix | Delete
id: "overqualified-elements",
[9455] Fix | Delete
name: "Disallow overqualified elements",
[9456] Fix | Delete
desc: "Don't use classes or IDs with elements (a.foo or a#foo).",
[9457] Fix | Delete
url: "https://github.com/CSSLint/csslint/wiki/Disallow-overqualified-elements",
[9458] Fix | Delete
browsers: "All",
[9459] Fix | Delete
[9460] Fix | Delete
// initialization
[9461] Fix | Delete
init: function(parser, reporter) {
[9462] Fix | Delete
"use strict";
[9463] Fix | Delete
var rule = this,
[9464] Fix | Delete
classes = {};
[9465] Fix | Delete
[9466] Fix | Delete
parser.addListener("startrule", function(event) {
[9467] Fix | Delete
var selectors = event.selectors,
[9468] Fix | Delete
selector,
[9469] Fix | Delete
part,
[9470] Fix | Delete
modifier,
[9471] Fix | Delete
i, j, k;
[9472] Fix | Delete
[9473] Fix | Delete
for (i=0; i < selectors.length; i++) {
[9474] Fix | Delete
selector = selectors[i];
[9475] Fix | Delete
[9476] Fix | Delete
for (j=0; j < selector.parts.length; j++) {
[9477] Fix | Delete
part = selector.parts[j];
[9478] Fix | Delete
if (part.type === parser.SELECTOR_PART_TYPE) {
[9479] Fix | Delete
for (k=0; k < part.modifiers.length; k++) {
[9480] Fix | Delete
modifier = part.modifiers[k];
[9481] Fix | Delete
if (part.elementName && modifier.type === "id") {
[9482] Fix | Delete
reporter.report("Element (" + part + ") is overqualified, just use " + modifier + " without element name.", part.line, part.col, rule);
[9483] Fix | Delete
} else if (modifier.type === "class") {
[9484] Fix | Delete
[9485] Fix | Delete
if (!classes[modifier]) {
[9486] Fix | Delete
classes[modifier] = [];
[9487] Fix | Delete
}
[9488] Fix | Delete
classes[modifier].push({
[9489] Fix | Delete
modifier: modifier,
[9490] Fix | Delete
part: part
[9491] Fix | Delete
});
[9492] Fix | Delete
}
[9493] Fix | Delete
}
[9494] Fix | Delete
}
[9495] Fix | Delete
}
[9496] Fix | Delete
}
[9497] Fix | Delete
});
[9498] Fix | Delete
[9499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function