Update lint.mts

This commit is contained in:
freearhey 2025-02-08 07:05:35 +03:00
parent 378985f4cd
commit b0feab33ec

View file

@ -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) => {