diff --git a/src/lint/collect-spelling-diagnostics.ts b/src/lint/collect-spelling-diagnostics.ts index 56445fb8..bb322082 100644 --- a/src/lint/collect-spelling-diagnostics.ts +++ b/src/lint/collect-spelling-diagnostics.ts @@ -83,6 +83,10 @@ const matchers = [ pattern: /\b[Nn]onnegative\b/gu, message: 'prefer "non-negative"', }, + { + pattern: /[Nn]onempty/gu, + message: 'prefer "non-empty"', + }, { pattern: /\b[Nn]onzero\b/gu, message: 'prefer "non-zero"', diff --git a/test/lint-spelling.js b/test/lint-spelling.js index 20211118..d0dafc9d 100644 --- a/test/lint-spelling.js +++ b/test/lint-spelling.js @@ -286,6 +286,19 @@ describe('spelling', () => { ); }); + it('nonempty', async () => { + await assertLint( + positioned` +
a ${M}nonempty List
+ `, + { + ruleId: 'spelling', + nodeType: 'html', + message: 'prefer "non-empty"', + } + ); + }); + it('nonzero', async () => { await assertLint( positioned`