Skip to main content

avoid-non-ascii-symbols

added in: 1.6.0 warning

Warns when a string literal contains non ascii characters. This might indicate that the string was not localized.

Example

Bad:

final chinese = 'hello 汉字'; // LINT
final russian = 'hello привет'; // LINT
final withSomeNonAsciiSymbols = '#!$_&- éè ;∞¥₤€'; // LINT
final misspelling = 'inform@tiv€'; // LINT

Good:

final english = 'hello';
final someGenericSymbols ='!@#$%^';