Lint: losse tekst in JSX en tekstattributen is nu een fout (merknaam, jaartallen en decoratie toegestaan)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 21:18:25 +01:00
co-authored by Claude Sonnet 5.5
parent c0e1393816
commit 337144249a
+16 -2
View File
@@ -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);',
],
},
],