Commit 005bbce
authored
Migrate to oxlint and oxfmt (#696)
<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->
### Description
Migrates from eslint and prettier to oxlint and oxfmt + some rule
hardening and - some rules that don't exist in oxlint, but I decided it
probably wasn't worth running both in parallel just for a few rules.
Notably, got rid of many "as any"s and swapped to .toSorted() for safer
stuff and "type" in imports. Added comments to all the existing lint
issues (console logging and the alert for app updates) and the few
places "as any" was justified (test cases) and some message object
whatnots.
Also notably, fmt now takes a second or two, and linting now takes no
more than a few seconds. Yay!
Recommended vscode plugins, workflows, and configs should all be updated
assuming I didn't miss anything.
<!-- Please include a summary of the change. Please also include
relevant motivation and context. List any dependencies that are required
for this change. -->
#### Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change - breaking I guess since not all rules exist? I
don't really know exactly what I uh... didn't include.
- [ ] This change requires a documentation update
### Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
### AI disclosure:
- [x] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
I deployed a swarm of silly AIs to fix many of the simpler as any casts
and subsequent typechecks because there were hundreds and I'm not doing
that manually :p. I did review it, mostly just seamless swapping to the
correct cast type instead of as any, nothing particularly complicated.616 files changed
Lines changed: 5596 additions & 5934 deletions
File tree
- .vscode
- scripts
- utils
- src
- app
- components
- Pdf-viewer
- code-highlight
- create-room
- cutout-card
- editor
- autocomplete
- emoji-board
- components
- event-history
- event-readers
- image-editor
- image-pack-view
- info-card
- invite-user-prompt
- join-address-prompt
- knock-room-prompt
- leave-room-prompt
- leave-space-prompt
- media
- member-tile
- message
- attachment
- content
- layout
- modals
- placeholder
- notification-banner
- page
- password-input
- power
- presence
- room-avatar
- room-card
- room-intro
- scroll-top-container
- sequence-card
- setting-tile
- sidebar
- splash-screen
- stacked-avatar
- telemetry-consent
- text-viewer
- time-date
- uia-stages
- unread-badge
- upload-board
- upload-card
- url-preview
- user-avatar
- user-profile
- virtualizer
- features
- add-existing
- bug-report
- call-status
- call
- common-settings
- cosmetics
- developer-tools
- emojis-stickers
- general
- members
- permissions
- create-chat
- create-room
- create-space
- lobby
- message-search
- room-settings
- abbreviations
- permissions
- room
- jump-to-time
- message
- reaction-viewer
- schedule-send
- search
- settings
- Persona
- about
- account
- cosmetics
- developer-tools
- devices
- emojis-stickers
- general
- notifications
- space-settings
- permissions
- widgets
- hooks
- media
- timeline
- pages
- auth
- login
- register
- reset-password
- client
- direct
- explore
- home
- inbox
- sidebar
- space
- plugins
- arborium
- call
- custom-emoji
- markdown
- block
- inline
- pluralkit-handler
- text-area
- mods
- voice-recorder-kit
- state
- hooks
- room-list
- room
- utils
- styles
- utils
- client
- sw
- types
- matrix
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 | | |
3 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | 10 | | |
6 | | - | |
| 11 | + | |
7 | 12 | | |
8 | 13 | | |
9 | | - | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| |||
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
67 | | - | |
68 | | - | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
99 | | - | |
100 | | - | |
101 | 98 | | |
102 | 99 | | |
103 | 100 | | |
| |||
118 | 115 | | |
119 | 116 | | |
120 | 117 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | 118 | | |
127 | 119 | | |
128 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
129 | 123 | | |
130 | 124 | | |
131 | 125 | | |
| |||
0 commit comments