UNPKG

333 BJavaScriptView Raw
1"use strict";
2
3/**
4 * @param { import("../lib/css-analyzer") } analyzer
5 */
6function rule(analyzer) {
7 analyzer.setMetric("imports");
8
9 analyzer.on("import", function (url) {
10 analyzer.incrMetric("imports");
11 analyzer.addOffender("imports", url);
12 });
13}
14
15rule.description = "Number of @import rules";
16module.exports = rule;