[READ-ONLY] Mirror of https://github.com/danielroe/ripple-framework. Ripple is the presentation layer for building websites on the DPC Single Digital Presence platform.
0

Configure Feed

Select the types of activity you want to include in your feed.

build: :wrench: update eslint config to handle both ts and vue files, fix violations

+36 -38
+11 -4
.eslintrc.js
··· 1 1 module.exports = { 2 2 root: true, 3 - parser: '@typescript-eslint/parser', 4 - plugins: [ 5 - '@typescript-eslint', 6 - ], 3 + parser: 'vue-eslint-parser', 4 + parserOptions: { 5 + parser: '@typescript-eslint/parser' 6 + }, 7 + env: { 8 + browser: true, 9 + node: true, 10 + 'vue/setup-compiler-macros': true 11 + }, 7 12 extends: [ 8 13 'eslint:recommended', 9 14 'plugin:vue/vue3-recommended', 10 15 'plugin:@typescript-eslint/recommended', 16 + 'prettier' 11 17 ], 18 + plugins: ['@typescript-eslint'], 12 19 rules: { 13 20 // override/add rules settings here, such as: 14 21 // 'vue/no-unused-vars': 'error'
+4
.husky/pre-commit
··· 1 + #!/bin/sh 2 + . "$(dirname "$0")/_/husky.sh" 3 + 4 + yarn lint
-1
examples/reference/app.vue
··· 1 1 <template> 2 2 <div> 3 - <test></test> 4 3 <RplButton label="tests" :theme="'secondary'" /> 5 4 <RplAccordion title="test" :panels="panels"></RplAccordion> 6 5 <NuxtWelcome />
-14
examples/reference/components/test.vue
··· 1 - <template> 2 - <div class="test"> 3 - <div class="test__child">one</div> 4 - <div class="test__child">two</div> 5 - </div> 6 - </template> 7 - 8 - <style> 9 - .test { 10 - &__child { 11 - border: 2px solid red; 12 - } 13 - } 14 - </style>
-1
examples/reference/nuxt.config.ts
··· 1 1 import 'dotenv/config' 2 2 import { defineNuxtConfig } from 'nuxt3' 3 - import { resolve } from 'path' 4 3 5 4 export default defineNuxtConfig({ 6 5 privateRuntimeConfig: {
-7
examples/reference/server/api/page.ts
··· 1 - import { TideApi } from '@dpc-sdp/ripple-tide-api' 2 - 3 - const tideApi = new TideApi({ site: 4 }) 4 - 5 - export default (req, res) => { 6 - return `test ${tideApi.get('/test')}` 7 - }
examples/reference/server/api/schema.ts

This is a binary file and will not be displayed.

examples/reference/server/api/site.ts

This is a binary file and will not be displayed.

+3 -2
package.json
··· 14 14 "postinstall": "husky install", 15 15 "release:dev": "lerna publish --canary minor --preid alpha --no-git-tag-version --registry $NPM_REGISTRY --dist-tag next", 16 16 "release:prod": "lerna publish --conventional-commits --create-release github", 17 - "lint": "eslint . --ext .js,.ts,.vue" 17 + "lint": "eslint . --ext .ts,.vue" 18 18 }, 19 19 "devDependencies": { 20 20 "@babel/core": "^7.16.0", ··· 27 27 "@typescript-eslint/eslint-plugin": "^5.12.0", 28 28 "@typescript-eslint/parser": "^5.12.0", 29 29 "babel-loader": "^8.2.3", 30 - "husky": "^7.0.4", 31 30 "eslint": "^8.9.0", 31 + "eslint-config-prettier": "^8.3.0", 32 32 "eslint-plugin-vue": "^8.4.1", 33 + "husky": "^7.0.4", 33 34 "lerna": "^4.0.0", 34 35 "storybook-builder-vite": "^0.1.15", 35 36 "typescript": "^4.4.4",
+1 -1
packages/ripple-tide-api/src/services/http-client.ts
··· 1 1 export default class HttpClient { 2 - siteId: Number 2 + siteId: number 3 3 constructor(config) { 4 4 this.siteId = config.site 5 5 }
+1 -1
packages/ripple-tide-api/src/services/tide-api.ts
··· 4 4 constructor(config) { 5 5 super(config) 6 6 } 7 - get(path: String) { 7 + get(path: string) { 8 8 return `${this.siteId} ${path}` 9 9 } 10 10 }
+1 -1
packages/ripple-tide-api/src/services/tide-page.ts
··· 4 4 constructor(config) { 5 5 super(config) 6 6 } 7 - get(path: String) { 7 + get(path: string) { 8 8 return `${this.siteId} ${path}` 9 9 } 10 10 }
+8 -6
packages/ripple-ui-core/src/components/accordion/index.vue
··· 2 2 export type Panel = { 3 3 id: number 4 4 title: string 5 - isOpen: Boolean 6 - content: String 5 + isOpen: boolean 6 + content: string 7 7 } 8 8 </script> 9 9 10 10 <script setup lang="ts"> 11 11 interface Props { 12 12 panels: Panel[] 13 - title: String 13 + title: string 14 14 } 15 15 const props = defineProps<Props>() 16 16 ··· 21 21 return props.panels[idx].isOpen 22 22 } 23 23 const accordionClick = (idx) => { 24 + /* eslint-disable-next-line vue/no-mutating-props */ 24 25 props.panels[idx].isOpen = !props.panels[idx].isOpen 25 26 } 26 27 ··· 31 32 <div class="rpl-accordion"> 32 33 <ul class="rpl-accordion__list"> 33 34 <li 34 - class="rpl-accordion__list-item" 35 35 v-for="(accordion, index) in panels" 36 36 :key="index" 37 + class="rpl-accordion__list-item" 37 38 :class="{ 38 39 'rpl-accordion__list-item--expanded': accordionIsOpen(index) 39 40 }" ··· 43 44 :class="{ 'rpl-accordion__title--expanded': accordionIsOpen(index) }" 44 45 > 45 46 <button 46 - @click="accordionClick(index)" 47 47 class="rpl-accordion__button" 48 48 :class="{ 49 49 'rpl-accordion__button--expanded': accordionIsOpen(index) 50 50 }" 51 51 :aria-expanded="accordionIsOpen(index).toString()" 52 52 :aria-controls="accordionId(index)" 53 + @click="accordionClick(index)" 53 54 > 54 55 <span 55 56 class="rpl-accordion__button-text" ··· 59 60 </button> 60 61 </h2> 61 62 <div 62 - class="rpl-accordion__content" 63 63 :id="accordionId(index)" 64 64 :ref="accordionId(index)" 65 + class="rpl-accordion__content" 65 66 > 67 + <!-- eslint-disable vue/no-v-html --> 66 68 <div 67 69 class="rpl-accordion__content-inner" 68 70 v-html="accordion.content"
+1
packages/ripple-ui-core/tsconfig.json
··· 13 13 "sourceMap": true, 14 14 "resolveJsonModule": true, 15 15 "esModuleInterop": true, 16 + "types": ["vite/client"], 16 17 "paths": { 17 18 "@/*": ["src/*"] 18 19 },
+1
tsconfig.build.json
··· 2 2 "compilerOptions": { 3 3 "target": "esnext", 4 4 "module": "esnext", 5 + "moduleResolution": "node", 5 6 "outDir": "./dist", 6 7 "strict": true, 7 8 "allowSyntheticDefaultImports": true,
+5
yarn.lock
··· 7611 7611 optionalDependencies: 7612 7612 source-map "~0.6.1" 7613 7613 7614 + eslint-config-prettier@^8.3.0: 7615 + version "8.3.0" 7616 + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" 7617 + integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== 7618 + 7614 7619 eslint-plugin-vue@^8.4.1: 7615 7620 version "8.4.1" 7616 7621 resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-8.4.1.tgz#0a25493bbfee6baa21614e637e3fd390617c0bb4"