Remove duplicate rules in issue modal
This commit is contained in:
parent
17339e933b
commit
81d27288f2
|
@ -33,18 +33,18 @@ function createLinterHelpDialog(getIssues) {
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
headerLink = $createLink(baseUrl, 'stylelint');
|
headerLink = $createLink(baseUrl, 'stylelint');
|
||||||
template = ({rule}) =>
|
template = rule =>
|
||||||
$create('li',
|
$create('li',
|
||||||
rule === 'CssSyntaxError' ? rule : $createLink(baseUrl + rule, rule));
|
rule === 'CssSyntaxError' ? rule : $createLink(baseUrl + rule, rule));
|
||||||
}
|
}
|
||||||
const header = t('linterIssuesHelp', '\x01').split('\x01');
|
const header = t('linterIssuesHelp', '\x01').split('\x01');
|
||||||
const activeRules = getIssues();
|
const activeRules = new Set([...getIssues()].map(issue => issue.rule));
|
||||||
Promise.resolve(linter === 'csslint' && prepareCsslintRules())
|
Promise.resolve(linter === 'csslint' && prepareCsslintRules())
|
||||||
.then(() =>
|
.then(() =>
|
||||||
showHelp(t('linterIssues'),
|
showHelp(t('linterIssues'),
|
||||||
$create([
|
$create([
|
||||||
header[0], headerLink, header[1],
|
header[0], headerLink, header[1],
|
||||||
$create('ul.rules', [...activeRules.values()].map(template)),
|
$create('ul.rules', [...activeRules].map(template)),
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user