avoid_ escaping_ inner_ quotes
Learn about the avoid_escaping_inner_quotes linter rule.
Avoid escaping inner quotes by converting surrounding quotes.
Details
#Avoid escaping inner quotes by converting surrounding quotes.
BAD:
var s = 'It\'s not fun';
GOOD:
var s = "It's not fun";
Enable
#
To enable the avoid_escaping_inner_quotes rule,
add avoid_escaping_inner_quotes
under
linter > rules in your
analysis_options.yaml
file:
linter:
rules:
- avoid_escaping_inner_quotes
If you're instead using the YAML map syntax to configure
linter rules, add
avoid_escaping_inner_quotes: true under
linter > rules:
linter:
rules:
avoid_escaping_inner_quotes: true
除非另有说明,文档之所提及适用于 Dart 3.12.2 版本报告页面问题.