Skip to content

Commit 165a36d

Browse files
jalyn-leesamipe
authored andcommitted
Feat/rbcn2 (#113)
* feat: add env.example * tooling: add lint config files * feat: update pkgs & run lint format * chore: modify logo img file format * style: run lint format * migrate: move unused css files into old directory * style: add typo css * feat: add main sections components * tooling: add pkgs and update tsnconfigs * feat: update types with npm run codegen * feat: run lint for banner components * feat: update types * feat: update card components styles * enhance: add rules to i18config * rename: modify file name casing * feat: split isValidTicket(dateTime) * chore: sync renamed component import * feat: add views components * chore: add export index.ts * chore: cleanups * style: update vuetify config * feat: update contenful helper method and comment unused content * feat: add vitest setup * feat: update router index * feat: add infinite spinner component * feat: add ticket card component * migrate: static -> contentful template rendering * style: update navbar * style: update page section * style: remove old css imports * chore: cleanups * fix: sync import name * feat: update components index.ts * chore: modify file name casing * enhance: update genentries for contentful * chore: add fallback whitebg * chore: update components.d.ts * style: fix robocon icon color * chore: add ticketlink * enhance: click to router link & card bg update * style: add section title css * feat: bulk update for style changes * feat: bulk update for style changes * chore: run lint
1 parent 9134360 commit 165a36d

File tree

95 files changed

+8880
-2746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+8880
-2746
lines changed

.env.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
PUBLIC_APP_KEY=
2+
PRIVATE_APP_KEY=
3+
BASE_URL=https://api.contentful.com
4+
5+
# Required for setup script only
6+
CMA_TOKEN= # You can obtain this token from the contentful web app
7+
ORG_ID= # Your contentful organisation id
8+
SPACE_ID= # Your contentful space id
9+
ENVIRONMENT_ID= # Your contentul enviornment name
10+
HOSTED_APP_URL= # Where your app will be hosted

.eslintignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"overrides": [
3+
{
4+
"files": [ "src/**/*.{js,ts,vue}" ],
5+
"rules": {
6+
"quotes": [ 2, "single" ]
7+
}
8+
}
9+
]
10+
}

.eslintrc.js

Lines changed: 64 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,80 @@
11
module.exports = {
2-
root: true,
3-
env: {
4-
node: true
2+
"root": true,
3+
"env": {
4+
"node": true
55
},
6-
extends: [
7-
'plugin:vue/vue3-essential',
8-
'eslint:recommended',
9-
'@vue/typescript/recommended'
6+
"plugins": [
7+
"sonarjs",
8+
"unused-imports",
9+
"sort-exports"
1010
],
11-
parserOptions: {
12-
ecmaVersion: 2020
11+
"extends": [
12+
"plugin:vue/vue3-essential",
13+
"eslint:recommended",
14+
"@vue/typescript/recommended"
15+
],
16+
"parserOptions": {
17+
"ecmaVersion": 2020
1318
},
14-
rules: {
15-
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
16-
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
17-
'vue/no-unused-components': 'warn',
18-
'vue/no-multiple-template-root': 'off',
19-
'no-unused-vars': 'warn',
20-
'space-before-function-paren': ['warn', 'never'],
21-
indent: [2, 2],
19+
"rules": {
20+
"@typescript-eslint/no-explicit-any": "off",
21+
"vue/no-unused-components": "warn",
22+
"vue/no-multiple-template-root": "off",
23+
"no-unused-vars": "warn",
24+
"vue/multi-word-component-names": [
25+
"error",
26+
{
27+
"ignores": [
28+
"default"
29+
]
30+
}
31+
],
32+
"space-before-function-paren": [
33+
"warn",
34+
"never"
35+
],
36+
"indent": [
37+
2,
38+
2
39+
],
2240
"sort-exports/sort-exports": [
2341
"error",
24-
{ "sortDir": "asc", "ignoreCase": true, "sortExportKindFirst": "type" }
42+
{
43+
"sortDir": "asc",
44+
"ignoreCase": true,
45+
"sortExportKindFirst": "type"
46+
}
2547
],
2648
"sort-imports": [
2749
"error",
2850
{
2951
"ignoreCase": false,
3052
"ignoreDeclarationSort": true,
3153
"ignoreMemberSort": false,
32-
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
54+
"memberSyntaxSortOrder": [
55+
"none",
56+
"all",
57+
"multiple",
58+
"single"
59+
],
3360
"allowSeparatedGroups": true
3461
}
3562
],
36-
}
37-
}
63+
},
64+
"settings": {
65+
"import/parsers": {
66+
"@typescript-eslint/parser": [
67+
".ts",
68+
".vue",
69+
".js"
70+
]
71+
},
72+
"import/resolver": {
73+
"typescript": {
74+
"alwaysTryTypes": true,
75+
// use a glob pattern
76+
"project": "packages/*/tsconfig.json"
77+
}
78+
}
79+
},
80+
}

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
src/assets
2+
.d.ts
3+
registerServiceWorker.js

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "none",
4+
"prettier.semi": false
5+
}

components.d.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,38 @@ export {}
77
/* prettier-ignore */
88
declare module 'vue' {
99
export interface GlobalComponents {
10-
Banner: typeof import('./src/components/banners/Banner.vue')['default']
11-
Banner404: typeof import('./src/components/banners/Banner404.vue')['default']
12-
BannerComingSoon: typeof import('./src/components/banners/BannerComingSoon.vue')['default']
13-
BannerTwo: typeof import('./src/components/banners/BannerTwo.vue')['default']
10+
BaseBanner: typeof import('./src/components/banners/custom/BaseBanner.vue')['default']
1411
BaseIcon: typeof import('./src/components/icons/BaseIcon.vue')['default']
1512
ChevronIcon: typeof import('./src/components/icons/ChevronIcon.vue')['default']
1613
ComingSoonBanner: typeof import('./src/components/banners/ComingSoonBanner.vue')['default']
17-
copy: typeof import('./src/components/cards/EventCards copy.vue')['default']
1814
EventCard: typeof import('./src/components/cards/EventCard.vue')['default']
19-
EventCards: typeof import('./src/components/cards/EventCards.vue')['default']
2015
GlobeIcon: typeof import('./src/components/icons/GlobeIcon.vue')['default']
2116
GlobeRBCN: typeof import('./src/components/icons/GlobeRBCN.vue')['default']
17+
InfiniteSpinner: typeof import('./src/components/spinners/InfiniteSpinner.vue')['default']
2218
LinkIcon: typeof import('./src/components/icons/LinkIcon.vue')['default']
23-
LocaleToggler: typeof import('./src/components/blocks/LocaleToggler.vue')['default']
2419
Logo: typeof import('./src/components/blocks/Logo.vue')['default']
2520
MainBanner: typeof import('./src/components/banners/custom/MainBanner.vue')['default']
2621
Navbar: typeof import('./src/components/navigation/Navbar.vue')['default']
27-
NavMobile: typeof import('./src/components/NavMobile.vue')['default']
2822
NewsBanner: typeof import('./src/components/NewsBanner.vue')['default']
2923
NewTabIcon: typeof import('./src/components/icons/NewTabIcon.vue')['default']
3024
NotFoundBanner: typeof import('./src/components/banners/NotFoundBanner.vue')['default']
31-
NotFouondBanner: typeof import('./src/components/banners/NotFouondBanner.vue')['default']
3225
PageFooter: typeof import('./src/components/footer/PageFooter.vue')['default']
3326
PageSection: typeof import('./src/components/sections/PageSection.vue')['default']
3427
PreviousTalks: typeof import('./src/components/PreviousTalks.vue')['default']
3528
RobotIcon: typeof import('./src/components/icons/RobotIcon.vue')['default']
3629
RouterLink: typeof import('vue-router')['RouterLink']
3730
RouterView: typeof import('vue-router')['RouterView']
38-
Settings: typeof import('./src/components/blocks/Settings.vue')['default']
3931
SpeakerCards: typeof import('./src/components/cards/SpeakerCards.vue')['default']
40-
SponsorCards: typeof import('./src/components/cards/SponsorCards.vue')['default']
41-
SponsorGrid: typeof import('./src/components/cards/SponsorGrid.vue')['default']
32+
SponsorCard: typeof import('./src/components/cards/SponsorCard.vue')['default']
4233
SponsorItem: typeof import('./src/components/SponsorItem.vue')['default']
4334
Sponsors: typeof import('./src/components/Sponsors.vue')['default']
4435
TabBox: typeof import('./src/components/TabBox.vue')['default']
4536
Talks: typeof import('./src/components/Talks.vue')['default']
4637
Talks2023: typeof import('./src/components/Talks2023.vue')['default']
4738
Talks24: typeof import('./src/components/Talks24.vue')['default']
48-
ThemeToggler: typeof import('./src/components/blocks/ThemeToggler.vue')['default']
39+
TicketCard: typeof import('./src/components/tickets/TicketCard.vue')['default']
4940
TicketItem: typeof import('./src/components/TicketItem.vue')['default']
5041
Timeline: typeof import('./src/components/Timeline.vue')['default']
51-
ToggleDirection: typeof import('./src/components/blocks/ToggleDirection.vue')['default']
5242
Tutorials24: typeof import('./src/components/Tutorials24.vue')['default']
5343
Workshops24: typeof import('./src/components/Workshops24.vue')['default']
5444
}

getContentfulEnvironment.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { strict as assert } from "assert";
2+
import { createClient, type Environment } from "contentful-management";
3+
import { config } from "dotenv";
4+
5+
config({ path: ".env.local" });
6+
7+
const {
8+
VITE_CONTENTFUL_ACCESS_TOKEN,
9+
VITE_CONTENTFUL_SPACE_ID,
10+
VITE_CONTENTFUL_ENVIRONMENT_ID,
11+
} = process.env;
12+
13+
assert(VITE_CONTENTFUL_ACCESS_TOKEN);
14+
assert(VITE_CONTENTFUL_SPACE_ID);
15+
assert(VITE_CONTENTFUL_ENVIRONMENT_ID);
16+
17+
const getContentfulEnvironment = (): Promise<Environment> => {
18+
const contentfulClient = createClient({
19+
accessToken: VITE_CONTENTFUL_ACCESS_TOKEN,
20+
});
21+
22+
return contentfulClient
23+
.getSpace(VITE_CONTENTFUL_SPACE_ID)
24+
.then((space) => space.getEnvironment(VITE_CONTENTFUL_ENVIRONMENT_ID));
25+
};
26+
27+
module.exports = getContentfulEnvironment;

lint-staged.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
'*.{js,jsx,vue,ts,tsx}': 'vue-cli-service lint'
3-
}
2+
"{src,test}/**/*.ts": ["prettier --write"],
3+
};

0 commit comments

Comments
 (0)