diff --git a/.eslintrc.js b/.eslintrc.js index e89bf9e03a..4ea7dcd668 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,18 +3,21 @@ module.exports = { env: { browser: true, node: true, + 'jest/globals': true, }, parserOptions: { - parser: 'babel-eslint', + requireConfigFile: false, + parser: '@babel/eslint-parser', }, extends: [ - '@nuxtjs', + '@nuxtjs/eslint-config', 'prettier', - 'prettier/vue', 'plugin:prettier/recommended', 'plugin:nuxt/recommended', ], - plugins: ['prettier'], + plugins: ['prettier', 'jest'], // add your custom rules here - rules: {}, + rules: { + 'vue/multi-word-component-names': 'off', + }, } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8dc1943d5c..758fd71993 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,36 +11,40 @@ on: - master jobs: - ci: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ ubuntu-latest ] - node: [ 14 ] - + build: + name: โš™๏ธ Build + runs-on: ubuntu-latest steps: + - name: ๐Ÿ›‘ Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.11.0 + - name: Checkout ๐Ÿ›Ž uses: actions/checkout@master - - name: Setup node env ๐Ÿ— - uses: actions/setup-node@v2.1.2 + - name: โŽ” Setup node ๐Ÿ— + uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version-file: ".nvmrc" + cache: "yarn" + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - name: Cache node_modules ๐Ÿ“ฆ - uses: actions/cache@v2 + uses: actions/cache@v3 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | - ${{ runner.os }}-node- + ${{ runner.os }}-yarn-e- - - name: Install dependencies ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป - run: npm ci + - name: Install deps ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป + run: yarn --frozen-lockfile - name: Run linter ๐Ÿ‘€ - run: npm run lint + run: yarn lint - name: Run tests ๐Ÿงช - run: npm run test + run: yarn test diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000000..b1215e8764 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v18.16.0 \ No newline at end of file diff --git a/components/bulletins/BulletinCardCollection.vue b/components/bulletins/BulletinCardCollection.vue index bae9e808a6..2db7935602 100644 --- a/components/bulletins/BulletinCardCollection.vue +++ b/components/bulletins/BulletinCardCollection.vue @@ -19,9 +19,9 @@