From 337144249a4d6190d906b3f95caff03d975475da Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Sun, 15 Nov 2026 21:18:25 +0100 Subject: [PATCH] Lint: losse tekst in JSX en tekstattributen is nu een fout (merknaam, jaartallen en decoratie toegestaan) Co-Authored-By: Claude Sonnet 5.5 --- eslint.config.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index ed2a79e..cf8e1d8 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -38,12 +38,14 @@ export default tseslint.config( 'src/test/**', '**/*rivacy*', '**/*rivacy*/**', + // Developer-only Sentry test control, never shown to visitors + '**/SentryTestButton.tsx', ], plugins: { react }, rules: { // Text in attributes that people read or hear (labels, alt text) 'no-restricted-syntax': [ - 'warn', + 'error', { selector: "JSXAttribute[name.name=/^(aria-label|aria-description|alt|title|placeholder|label)$/][value.type='Literal']", @@ -51,7 +53,7 @@ export default tseslint.config( }, ], 'react/jsx-no-literals': [ - 'warn', + 'error', { noStrings: false, ignoreProps: true, @@ -73,6 +75,18 @@ export default tseslint.config( ')', '&', '©', + // Brand name, era years, brackets and decoration (data, not language) + 'SLP', + 'Software', + '[', + ']', + '[1989]', + '1998', + '2006', + '2013', + '2026', + '100%', + 'slp.Bouw(uwIdee);', ], }, ],