eslint 8.57 WIP:

* tweaking rules
* fixing issues
This commit is contained in:
John Livingston
2024-09-09 18:47:21 +02:00
parent 7b3d93b290
commit c010758164
42 changed files with 361 additions and 178 deletions

View File

@ -13,7 +13,7 @@ let singleton: BotConfiguration | undefined
type RoomConfCache =
null // already loaded, but file does not exist
| RoomConf // loaded, and contains the room conf
| RoomConf // loaded, and contains the room conf
type ChannelCommonRoomConf = Omit<RoomConf, 'local' | 'domain'>

View File

@ -187,8 +187,8 @@ function _getForbiddenWordsHandler (
} else {
// Here we must add word-breaks and escape entries.
// We join all entries in one Regexp (for the same reason as above).
rule.regexp = '(?:' +
forbiddenWords.entries.map(s => {
rule.regexp = '(?:' + forbiddenWords.entries.map(
s => {
s = _stringToWordRegexp(s)
// Must add the \b...
// ... but... won't work if the first (or last) char is an emoji.
@ -201,7 +201,8 @@ function _getForbiddenWordsHandler (
}
// FIXME: this solution wont work for non-latin charsets.
return s
}).join(')|(?:') + ')'
}
).join(')|(?:') + ')'
}
if (forbiddenWords.reason) {