Resolved a critical parsing error in leads_view_lead.svelte due to incorrect Svelte class directive syntax.
Addressed multiple svelte/no-at-html-tags linting errors across the following files to mitigate potential XSS vulnerabilities and improve code safety:
- src/routes/events_leads/exhibit/[slug]/leads_add_scan.svelte
- src/routes/events_leads/exhibit/[slug]/leads_manage.svelte
- src/routes/events_leads/exhibit/[slug]/leads_view_lead.svelte
Replaced {@html} blocks with safer Svelte conditional rendering ({#if}) and direct interpolation ({value}) for static and dynamic content where appropriate. Removed commented-out {@html} tags that were still triggering linting errors.
39 lines
693 B
JavaScript
39 lines
693 B
JavaScript
// @ts-check
|
|
|
|
import eslint from '@eslint/js';
|
|
import tseslint from 'typescript-eslint';
|
|
import svelte from 'eslint-plugin-svelte';
|
|
import prettier from 'eslint-config-prettier';
|
|
import globals from 'globals';
|
|
|
|
export default tseslint.config(
|
|
eslint.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
svelte.configs['flat/recommended'],
|
|
prettier,
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node
|
|
}
|
|
}
|
|
},
|
|
{
|
|
files: ['**/*.svelte'],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
parser: tseslint.parser
|
|
}
|
|
}
|
|
},
|
|
{
|
|
ignores: ['build/', '.svelte-kit/', 'node_modules/']
|
|
},
|
|
{
|
|
rules: {
|
|
'@typescript-eslint/no-unused-vars': 'warn'
|
|
}
|
|
}
|
|
);
|