Skip to content

Commit 4529abe

Browse files
committed
chore(main): add warning message for 'ascii'
1 parent a69d090 commit 4529abe

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ const checkValue = (term, value, definition) => {
117117
errorMessages.push(`${term} should only ascii symbols.`)
118118
}
119119
break
120+
case 'ascii':
121+
console.log(`${colors.warning}[Deprecated Warning] 'ascii' rule renamed 'notAscii' (the meaning does not change).${colors.reset}`)
122+
if (!ruleSetting && /[\u30a0-\u30ff\u3040-\u309f\u3005-\u3006\u30e0-\u9fcf]/.test(value)) {
123+
errorMessages.push(`${term} should only ascii symbols.`)
124+
}
125+
break
120126
default:
121127
throw new Error(`${ruleName} is not defined.`)
122128
}

0 commit comments

Comments
 (0)