Skip to content

Commit 00e105f

Browse files
committed
build: use negative lookbehind and lookahead assertions to fix false spellcheck negatives
1 parent 8716bc6 commit 00e105f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

etc/eslint/rules/spellcheck.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ rules[ '@cspell/spellchecker' ] = [ 'warn', {
5858
'/\\/\\/ returns \'[^\']+\'/g', // ignore return value annotations
5959
'/setReadOnly\\( [.a-z0-9]+, \'[^\']+?\'/gi', // ignore namespace or prototype assignments
6060
'/```[\\s\\S]+?```/g', // ignore code blocks
61-
'/[^`]`[^`]+?`[^`]/g', // ignore inline code
61+
'/(?<!`)[^`]+?`(?!`)/g', // ignore inline code
6262
'/\\\\{2,2}\\([\\s\\S]+?\\\\{2,2}\\)/g', // ignore LaTeX math expressions
6363
'/\\[[^\\]]+\\]/g', // ignore character classes in regular expressions or markdown links
6464
'/\\/\\/ exports: \\{[^}]+\\}/g', // ignore export annotations
@@ -67,7 +67,7 @@ rules[ '@cspell/spellchecker' ] = [ 'warn', {
6767
'/[xy][a-z]+/g', // lowercase parameters starting with x or y (e.g., xbuf)
6868
'/[a-z]+[xy]/g', // lowercase parameters ending with x or y (e.g., meanx)
6969
'/([\'"`])(.*/.*?)\\1/g', // ignore file paths
70-
'/\'[-\\w]+\'/g' // ignore single-quoted strings containing only word characters or hyphens
70+
'/\'[-\\w]+?\'/g' // ignore single-quoted strings containing only word characters or hyphens
7171
],
7272
'words': [
7373
'BLAS',

0 commit comments

Comments
 (0)