This repository was archived by the owner on Nov 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 14 files changed +113
-78
lines changed Expand file tree Collapse file tree 14 files changed +113
-78
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ module.exports = {
88 '@groupher/eslint-config-web' ,
99 'eslint:recommended' ,
1010 'plugin:@typescript-eslint/recommended' ,
11+ // see: https://stackoverflow.com/a/56696478/4050784
12+ 'plugin:import/typescript' ,
1113 ] ,
1214 // extends: ['@groupher/eslint-config-web'],
1315 settings : {
Original file line number Diff line number Diff line change 161161 "shelljs" : " 0.8.4" ,
162162 "standard-version" : " ^8.0.1" ,
163163 "start-server-and-test" : " 1.12.1" ,
164+ "type-fest" : " ^2.12.2" ,
164165 "typescript" : " ^4.2.3"
165166 }
166167}
Original file line number Diff line number Diff line change @@ -210,6 +210,7 @@ export type TUpvoteLayout =
210210 | 'comment'
211211 | 'article'
212212 | 'post-list'
213+ | 'blog-list'
213214 | 'works-article'
214215 | 'works-card'
215216 | 'guide-list'
Original file line number Diff line number Diff line change 1+ // see: https://github.com/sindresorhus/type-fest#template-literal-types
2+ export type { ScreamingSnakeCase as SnakeUpperCase } from 'type-fest'
3+ export type holder = 1
Original file line number Diff line number Diff line change 11import type { TRootStore as RootStoreType } from '@/stores/RootStore'
2+
23import type { TArticle } from './article'
34import type { TCommunity } from './community'
45
6+ export type { SnakeUpperCase } from './enhance'
7+
58export type { TMetric } from './metric'
69export type {
710 TSIZE ,
Original file line number Diff line number Diff line change @@ -96,7 +96,11 @@ export type TTabItem = {
9696
9797export type TResState = 'LOADING' | 'DONE' | 'EMPTY'
9898
99- export type TPaymentUsage = 'SENIOR' | 'GirlsCodeTooPlan' | 'DONATE' | 'SPONSOR'
99+ export type TPaymentUsage =
100+ | 'SENIOR'
101+ | 'GIRLS_CODE_TOO_PLAN'
102+ | 'DONATE'
103+ | 'SPONSOR'
100104export type TPaymentMethod = 'ALIPAY' | 'WECHAT'
101105
102106export type TFlexRule =
@@ -183,7 +187,7 @@ export type TModelineType =
183187 | 'search'
184188 | 'more'
185189
186- export type TGtdType = 'BUG' | 'FEATURE' | null
187- export type TGtdState = 'TODO' | 'WIP' | 'DONE' | null
190+ export type TGtdType = 'BUG' | 'FEATURE' | 'DEFAULT'
191+ export type TGtdState = 'TODO' | 'WIP' | 'DONE' | 'DEFAULT'
188192
189193export type TTagMode = 'default' | 'label'
Original file line number Diff line number Diff line change 11import type { TGtdType , TGtdState } from '@/spec'
22
33export const GTD_TYPE = {
4- FEATURE : 'FEATURE' as TGtdType ,
5- BUG : 'BUG' as TGtdType ,
6- DEFAULT : null as TGtdType ,
7- }
4+ FEATURE : 'FEATURE' ,
5+ BUG : 'BUG' ,
6+ DEFAULT : 'DEFAULT' ,
7+ } as Record < Uppercase < TGtdType > , Uppercase < TGtdType > >
88
99export const GTD_STATE = {
10- TODO : 'TODO' as TGtdState ,
11- WIP : 'WIP' as TGtdState ,
12- DONE : 'DONE' as TGtdState ,
13- DEFAULT : null as TGtdState ,
14- }
10+ TODO : 'TODO' ,
11+ WIP : 'WIP' ,
12+ DONE : 'DONE' ,
13+ DEFAULT : 'DEFAULT' ,
14+ } as Record < Uppercase < TGtdState > , Uppercase < TGtdState > >
Original file line number Diff line number Diff line change 11import type { TEmotionType } from '@/spec'
22
33const EMOTION = {
4- DOWNVOTE : 'downvote' as TEmotionType ,
5- BEER : 'beer' as TEmotionType ,
6- HEART : 'heart' as TEmotionType ,
7- CONFUSED : 'confused' as TEmotionType ,
8- POPCORN : 'popcorn' as TEmotionType ,
9- PILL : 'pill' as TEmotionType ,
10- }
4+ DOWNVOTE : 'downvote' ,
5+ BEER : 'beer' ,
6+ HEART : 'heart' ,
7+ CONFUSED : 'confused' ,
8+ POPCORN : 'popcorn' ,
9+ PILL : 'pill' ,
10+ } as Record < Uppercase < TEmotionType > , TEmotionType >
1111
1212export default EMOTION
Original file line number Diff line number Diff line change 1- import type { TUpvoteLayout } from '@/spec'
1+ import type { TUpvoteLayout , SnakeUpperCase } from '@/spec'
22
33export const UPVOTE_LAYOUT = {
4- DEFAULT : 'default' as TUpvoteLayout ,
5- COMMENT : 'comment' as TUpvoteLayout ,
6- ARTICLE : 'article' as TUpvoteLayout ,
7- POST_LIST : 'post-list' as TUpvoteLayout ,
8- BLOG_LIST : 'blog-list' as TUpvoteLayout ,
9- WORKS_ARTICLE : 'works-article' as TUpvoteLayout ,
10- WORKS_CARD : 'works-card' as TUpvoteLayout ,
11- GUIDE_LIST : 'guide-list' as TUpvoteLayout ,
12- }
4+ DEFAULT : 'default' ,
5+ COMMENT : 'comment' ,
6+ ARTICLE : 'article' ,
7+ POST_LIST : 'post-list' ,
8+ BLOG_LIST : 'blog-list' ,
9+ WORKS_ARTICLE : 'works-article' ,
10+ WORKS_CARD : 'works-card' ,
11+ GUIDE_LIST : 'guide-list' ,
12+ } as Record < SnakeUpperCase < TUpvoteLayout > , TUpvoteLayout >
1313
1414export const holder = 1
You can’t perform that action at this time.
0 commit comments