mirror of
https://github.com/iptv-org/epg
synced 2026-09-17 14:36:24 -04:00
Update lint.mts
This commit is contained in:
@@ -76,6 +76,18 @@ async function main() {
|
|||||||
localErrors = localErrors.concat(error.details)
|
localErrors = localErrors.concat(error.details)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xml.split('\n').forEach((line: string, lineIndex: number) => {
|
||||||
|
const found = line.match(/='/)
|
||||||
|
if (found) {
|
||||||
|
const colIndex = found.index || 0
|
||||||
|
localErrors.push({
|
||||||
|
line: lineIndex + 1,
|
||||||
|
col: colIndex + 1,
|
||||||
|
message: 'Single quotes cannot be used in attributes'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
if (localErrors.length) {
|
if (localErrors.length) {
|
||||||
console.log(`\n${chalk.underline(filepath)}`)
|
console.log(`\n${chalk.underline(filepath)}`)
|
||||||
localErrors.forEach((error: ErrorDetail) => {
|
localErrors.forEach((error: ErrorDetail) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user