Skip to content

Commit

Permalink
fix(eslint-plugin): [naming-convention] support unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
octogonz committed Jun 24, 2020
1 parent a2202c7 commit 0e9d848
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/eslint-plugin/src/rules/naming-convention.ts
Expand Up @@ -1213,7 +1213,7 @@ function normalizeOption(option: Selector): NormalizedSelector {
format: option.format ? option.format.map(f => PredefinedFormats[f]) : null,
custom: option.custom
? {
regex: new RegExp(option.custom.regex),
regex: new RegExp(option.custom.regex, 'u'),
match: option.custom.match,
}
: null,
Expand All @@ -1236,9 +1236,9 @@ function normalizeOption(option: Selector): NormalizedSelector {
filter:
option.filter !== undefined
? typeof option.filter === 'string'
? { regex: new RegExp(option.filter), match: true }
? { regex: new RegExp(option.filter, 'u'), match: true }
: {
regex: new RegExp(option.filter.regex),
regex: new RegExp(option.filter.regex, 'u'),
match: option.filter.match,
}
: null,
Expand Down

0 comments on commit 0e9d848

Please sign in to comment.