Commit 2f3b427
refactor(web): convert enums to as-const in subscription-list
Convert 7 TypeScript enums in the plugin-detail-panel/subscription-list
components to as-const objects with companion type aliases:
- SubscriptionListMode (types.ts)
- CreateButtonType (create/types.ts)
- AuthorizationStatusEnum, ClientTypeEnum (create/hooks/use-oauth-client-state.ts)
- ApiKeyStep (create/hooks/use-common-modal-state.ts)
- LogTypeEnum (log-viewer.tsx, file-local)
- EditStep (edit/apikey-edit-modal.tsx, file-local)
All consumers use EnumName.MEMBER as values or EnumName as types; no
runtime reflection, so the conversion preserves the public API. Drops
7 entries from web/eslint-suppressions.json for the erasable-syntax-only/enums
rule and removes file entries that became empty.
Partially addresses #27998.
Co-authored-by: Claude <noreply@anthropic.com>1 parent ee87289 commit 2f3b427
7 files changed
Lines changed: 37 additions & 56 deletions
File tree
- web
- app/components/plugins/plugin-detail-panel/subscription-list
- create
- hooks
- edit
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
Lines changed: 12 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6984 | 6984 | | |
6985 | 6985 | | |
6986 | 6986 | | |
6987 | | - | |
6988 | | - | |
6989 | | - | |
6990 | | - | |
6991 | | - | |
6992 | | - | |
6993 | | - | |
6994 | | - | |
6995 | | - | |
6996 | | - | |
6997 | 6987 | | |
6998 | 6988 | | |
6999 | 6989 | | |
| |||
7013 | 7003 | | |
7014 | 7004 | | |
7015 | 7005 | | |
7016 | | - | |
7017 | | - | |
7018 | | - | |
7019 | | - | |
7020 | | - | |
7021 | 7006 | | |
7022 | 7007 | | |
7023 | 7008 | | |
7024 | 7009 | | |
7025 | 7010 | | |
7026 | 7011 | | |
7027 | | - | |
7028 | | - | |
7029 | | - | |
7030 | 7012 | | |
7031 | 7013 | | |
7032 | 7014 | | |
| |||
7052 | 7034 | | |
7053 | 7035 | | |
7054 | 7036 | | |
7055 | | - | |
7056 | | - | |
7057 | | - | |
7058 | 7037 | | |
7059 | 7038 | | |
7060 | 7039 | | |
| |||
7086 | 7065 | | |
7087 | 7066 | | |
7088 | 7067 | | |
7089 | | - | |
7090 | | - | |
7091 | | - | |
7092 | | - | |
7093 | | - | |
7094 | 7068 | | |
7095 | 7069 | | |
7096 | 7070 | | |
| |||
0 commit comments