- Delete old Vite+Svelte frontend - Initialize new SvelteKit project with TypeScript - Configure Tailwind CSS v4 + DaisyUI - Implement JWT authentication with auto-refresh - Create login page with form validation (Zod) - Add protected route guards - Update Docker configuration for single-stage build - Add E2E tests with Playwright (6/11 passing) - Fix Svelte 5 reactivity with $state() runes Known issues: - 5 E2E tests failing (timing/async issues) - Token refresh implementation needs debugging - Validation error display timing
28 lines
873 B
JavaScript
28 lines
873 B
JavaScript
import { createRule } from '../utils/index.js';
|
|
export default createRule('require-each-key', {
|
|
meta: {
|
|
docs: {
|
|
description: 'require keyed `{#each}` block',
|
|
category: 'Best Practices',
|
|
recommended: true
|
|
},
|
|
schema: [],
|
|
messages: { expectedKey: 'Each block should have a key' },
|
|
type: 'suggestion'
|
|
},
|
|
create(context) {
|
|
return {
|
|
SvelteEachBlock(node) {
|
|
// No need a `key` if an each blocks without an item
|
|
// see: https://svelte.dev/docs/svelte/each#Each-blocks-without-an-item
|
|
if (node.context != null && node.key == null) {
|
|
context.report({
|
|
node,
|
|
messageId: 'expectedKey'
|
|
});
|
|
}
|
|
}
|
|
};
|
|
}
|
|
});
|