This change fixes a few issues with the TickTick import:
1. BOM (Byte Order Mark) Handling: Added stripBOM() function to properly handle UTF-8 BOM at the beginning of CSV files
2. Multi-line Status Section: Updated header detection to handle the multi-line status description in real TickTick exports
3. CSV Parser Configuration: Made the CSV parser more lenient with variable field counts and quote handling
4. Test Infrastructure: Added missing logger initialization for tests
5. Field Mapping: Fixed the core issue where CSV fields weren't being mapped to struct fields correctly
The main problem was in the newLineSkipDecoder function where:
- Header detection calculated line skip count on BOM-stripped content
- CSV decoder was also stripping BOM and applying the same skip count
- This caused inconsistent positioning and empty field mapping
Rewrote the decoder to use a scanner-based approach with consistent BOM handling.
Resolves https://github.com/go-vikunja/vikunja/issues/1870
- Add type filters for label and project arrays to remove undefined values
- Add @ts-expect-error for projectId parameter in getAll call
- Add type assertion for userService.getAll empty object parameter
- Add default value for prefix in destructuring
- Add null check for match.index
- Add type assertions for union type property access (username/title)
- Add null check for autocompleteContext
- Fix Selection.near call with @ts-expect-error comment
- Add optional chaining for array access that could be undefined
- Import Editor and Range types from @tiptap/core
- Add TranslateFunction type for t parameter
- Add SuggestionProps interface for props parameter
- Add type annotations for all command callbacks
- Add null check for document.getElementById result
- Add null check for props.event in onKeyDown
- Import Editor and Range types from @tiptap/core
- Add CommandProps interface for command callback
- Add type annotations for command callback parameters
- Add null check for DataTransferItem from items array
- Add undefined checks for check.children[1] before accessing
- Extract secondChild variable for safer access
- Add Event type for triggerImageInput and addImage
- Add MouseEvent type for setLink and clickTasklistCheckbox
- Add KeyboardEvent type for setFocusToEditor
- Add type assertions for event.target as HTMLElement
- Add proper null check for clipboardData.items before accessing length
- Replace for...of loop with indexed for loop to avoid iterator issue with DataTransferItemList
- Remove BaseButtonProps extension to avoid complex union type
- Use @ts-expect-error to suppress TS2590 error caused by IconProp
- Add computed properties for variant, shadow, and wrap with proper defaults
- Add null check for multiselectRoot before passing to closeWhenClickedOutside
- Add early return for null object in select function
- Add type guards for string vs object in setSelectedObject
- Add type guards for focus method in preSelect function
- Remove invalid length check on Element type
- Add 'extends string' constraint to generic type T
- Add null check for model.value with nullish coalescing
- Add null check for scroller before accessing properties
- Add instanceof check for HTMLElement before accessing offsetTop
- Add null to date ref type to match props.modelValue type
- Convert Date to string before passing to parseDateOrString
- Add null coalescing for flatpickrDate assignment
Create mutable copy of currentProject from Pinia store to satisfy type
requirements. The readonly deep object from the store has readonly tasks
array which is incompatible with IProject type.
Fixes TypeScript errors on lines 25 and 40 where readonly project was
passed to getProjectTitle() and ProjectSettingsDropdown component.
Related to issue #29 from TYPECHECK_ISSUES.md
Cast readonly project arrays from Pinia store to mutable IProject[] type.
The arrays are not actually mutated by the component, so the cast is safe.
Fixes TypeScript errors on lines 86, 97, 105 where readonly arrays were
incompatible with ProjectsNavigation component props.
Related to issue #28 from TYPECHECK_ISSUES.md