Skip to content

Commit 92d18fe

Browse files
committed
tools: eslint rule to disallow Unicode quotes
Fixes: #11209
1 parent f89ee06 commit 92d18fe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.eslintrc.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,12 @@ rules:
147147
}, {
148148
selector: "ThrowStatement > CallExpression[callee.name=/Error$/]",
149149
message: "Use new keyword when throwing an Error."
150+
}, {
151+
selector: "Literal[value=/\u2019/]",
152+
message: "use an ASCII single quote (`'`) instead of a Unicode quote (`\u2019`)"
153+
}, {
154+
selector: "Literal[value=/[“”«»]/]",
155+
message: "use an ASCII double quote (`\"`) instead of a Unicode double quote (`“`, `”`, `«`, `»`)"
150156
}]
151157
no-tabs: error
152158
no-trailing-spaces: error

0 commit comments

Comments
 (0)