Skip to content

Commit be7c484

Browse files
committed
chore: update eslint and test and ci
1 parent 2a1784e commit be7c484

File tree

15 files changed

+1991
-168
lines changed

15 files changed

+1991
-168
lines changed

.eslintrc.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@ module.exports = {
33
env: {
44
browser: true,
55
node: true,
6+
'jest/globals': true,
67
},
78
parserOptions: {
8-
parser: 'babel-eslint',
9+
requireConfigFile: false,
10+
parser: '@babel/eslint-parser',
911
},
1012
extends: [
11-
'@nuxtjs',
13+
'@nuxtjs/eslint-config',
1214
'prettier',
13-
'prettier/vue',
1415
'plugin:prettier/recommended',
1516
'plugin:nuxt/recommended',
1617
],
17-
plugins: ['prettier'],
18+
plugins: ['prettier', 'jest'],
1819
// add your custom rules here
19-
rules: {},
20+
rules: {
21+
'vue/multi-word-component-names': 'off',
22+
},
2023
}

.github/workflows/ci.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,35 @@ jobs:
1717
strategy:
1818
matrix:
1919
os: [ ubuntu-latest ]
20-
node: [ 14 ]
2120

2221
steps:
2322
- name: Checkout 🛎
2423
uses: actions/checkout@master
2524

26-
- name: Setup node env 🏗
27-
uses: actions/setup-node@v2.1.2
25+
- name: Setup node 🏗
26+
uses: actions/setup-node@v3
2827
with:
29-
node-version: ${{ matrix.node }}
28+
node-version-file: ".nvmrc"
29+
cache: "yarn"
30+
31+
- name: Get yarn cache directory path
32+
id: yarn-cache-dir-path
33+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
3034

3135
- name: Cache node_modules 📦
32-
uses: actions/cache@v2
36+
- uses: actions/cache@v3
37+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
3338
with:
34-
path: ~/.npm
35-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
39+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
40+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
3641
restore-keys: |
37-
${{ runner.os }}-node-
42+
${{ runner.os }}-yarn-e-
3843

39-
- name: Install dependencies 👨🏻‍💻
40-
run: npm ci
44+
- name: Install deps 👨🏻‍💻
45+
run: yarn --frozen-lockfile
4146

4247
- name: Run linter 👀
43-
run: npm run lint
48+
run: yarn lint
4449

4550
- name: Run tests 🧪
46-
run: npm run test
51+
run: yarn test

components/bulletins/BulletinCardCollection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
</template>
2020

2121
<script>
22-
import { landingBulletinsConfig } from '@/configs/pageLanding'
2322
import BulletinCard from './BulletinCard.vue'
2423
import i18n from './BulletinCard.i18n'
24+
import { landingBulletinsConfig } from '@/configs/pageLanding'
2525
2626
export default {
2727
i18n,

components/core/buttons/TextButton.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ export default {
186186
.core-button.--bordered {
187187
& > a {
188188
@apply z-10 text-primary-100;
189-
background: linear-gradient(#121023, #121023) padding-box,
189+
background:
190+
linear-gradient(#121023, #121023) padding-box,
190191
linear-gradient(
191192
276.15deg,
192193
#61c8a4 0.74%,
@@ -243,7 +244,8 @@ export default {
243244
@apply z-20 opacity-0;
244245
border-radius: inherit;
245246
content: '';
246-
background: linear-gradient(#121023, #121023) padding-box,
247+
background:
248+
linear-gradient(#121023, #121023) padding-box,
247249
linear-gradient(
248250
96.26deg,
249251
#5fbeab 5.5%,

components/core/footer/FooterHistory.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
</template>
2222

2323
<script>
24+
import i18n from './Footer.i18n'
2425
import { landingFooterHistoryConfig } from '@/configs/pageLanding'
2526
import ExtLink from '@/components/core/links/ExtLink'
26-
import i18n from './Footer.i18n'
2727
2828
export default {
2929
i18n,

components/core/header/nav-bar/NavBar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@
7373
</template>
7474

7575
<script>
76-
import navBarItems from '@/components/core/header/nav-bar/nav-bar-items'
77-
import { ExtLink, LocaleLink } from '@/components/core/links'
7876
import NavBarItemDropdown from './NavBarItemDropdown'
7977
import i18n from './NavBar.i18n'
78+
import navBarItems from '@/components/core/header/nav-bar/nav-bar-items'
79+
import { ExtLink, LocaleLink } from '@/components/core/links'
8080
8181
export default {
8282
i18n,

components/core/header/nav-bar/NavBarHamburger.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@
9191
</template>
9292

9393
<script>
94+
import i18n from './NavBar.i18n'
95+
import navBarItems from './nav-bar-items'
9496
import IconHamburgerMenuIcon from '@/components/core/icons/IconHamburgerMenuIcon'
9597
import NavBarItemAccordion from '@/components/core/header/nav-bar/NavBarItemAccordion'
9698
import { ExtLink, LocaleLink } from '@/components/core/links'
97-
import i18n from './NavBar.i18n'
98-
import navBarItems from './nav-bar-items'
9999
100100
export default {
101101
i18n,

components/core/links/LocaleLink.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default {
3535
return {
3636
'core-localeLink': true,
3737
highlight: this.highlight,
38-
'underline': this.underline,
38+
underline: this.underline,
3939
'--customized': this.customized,
4040
}
4141
},

components/core/markdown/MarkdownRenderer.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ export default {
4444
}
4545
.markdown code {
4646
@apply rounded-md px-1 py-0.5;
47-
font-family: Source Sans Pro, -apple-system, Roboto, Helvetica Neue,
47+
font-family:
48+
Source Sans Pro,
49+
-apple-system,
50+
Roboto,
51+
Helvetica Neue,
4852
sans-serif !important;
4953
background-color: rgba(110, 118, 129, 0.4);
5054
}

components/events/RelatedCardCollection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
</template>
3838

3939
<script>
40+
import { Swiper, SwiperSlide } from 'vue-awesome-swiper'
4041
import i18n from '@/i18n/conference/speeches.i18n'
4142
import SpeechCard from '@/components/events/SpeechCard'
42-
import { Swiper, SwiperSlide } from 'vue-awesome-swiper'
4343
export default {
4444
i18n,
4545
name: 'RelatedCardCollection',

0 commit comments

Comments
 (0)