Skip to content

Commit

Permalink
chore(main): add warning message for 'ascii'
Browse files Browse the repository at this point in the history
  • Loading branch information
isuke committed Mar 7, 2018
1 parent a69d090 commit 4529abe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ const checkValue = (term, value, definition) => {
errorMessages.push(`${term} should only ascii symbols.`)
}
break
case 'ascii':
console.log(`${colors.warning}[Deprecated Warning] 'ascii' rule renamed 'notAscii' (the meaning does not change).${colors.reset}`)
if (!ruleSetting && /[\u30a0-\u30ff\u3040-\u309f\u3005-\u3006\u30e0-\u9fcf]/.test(value)) {
errorMessages.push(`${term} should only ascii symbols.`)
}
break
default:
throw new Error(`${ruleName} is not defined.`)
}
Expand Down

0 comments on commit 4529abe

Please sign in to comment.