Skip to content

Commit 668271d

Browse files
committed
task: linting and textual updates
1 parent abd55f7 commit 668271d

File tree

10 files changed

+146
-172
lines changed

10 files changed

+146
-172
lines changed
File renamed without changes.

docs/.eslintrc.js

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ module.exports = {
88
parser: '@babel/eslint-parser',
99
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
1010
sourceType: 'module', // Allows for the use of imports
11-
requireConfigFile: false
11+
requireConfigFile: false,
1212
},
1313

1414
env: {
1515
browser: true,
16-
es6: true
16+
es6: true,
1717
},
1818

1919
// Rules order is important, please avoid shuffling them
@@ -26,13 +26,13 @@ module.exports = {
2626
// See https://eslint.vuejs.org/rules/#available-rules
2727
// 'plugin:vue/vue3-essential' // Priority A: Essential (Error Prevention)
2828
// 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
29-
'plugin:vue/vue3-recommended' // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
29+
'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
3030
],
3131

3232
plugins: [
3333
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file
3434
// required to lint *.vue files
35-
'vue'
35+
'vue',
3636
],
3737

3838
globals: {
@@ -52,7 +52,7 @@ module.exports = {
5252

5353
// add your custom rules here
5454
rules: {
55-
'brace-style': [ 'error', 'stroustrup', { allowSingleLine: true } ],
55+
// 'brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
5656
'prefer-const': 'error',
5757
'prefer-promise-reject-errors': 'off',
5858
'multiline-ternary': 'off',
@@ -64,18 +64,18 @@ module.exports = {
6464
'one-var': 'off',
6565
'no-void': 'off',
6666
'no-lone-blocks': 'error',
67-
'no-unused-expressions': [ 'error', { allowTernary: true, "allowShortCircuit": true } ],
67+
'no-unused-expressions': ['error', { allowTernary: true, allowShortCircuit: true }],
6868
'no-useless-concat': 'error',
6969
'no-useless-return': 'error',
7070
'no-unneeded-ternary': 'error',
71-
'no-confusing-arrow': [ 'error', { allowParens: true } ],
72-
'operator-linebreak': [ 'error', 'before' ],
71+
'no-confusing-arrow': ['error', { allowParens: true }],
72+
// 'operator-linebreak': [ 'error', 'before' ],
7373
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
7474

75-
'array-bracket-spacing': [ 'error', 'always', { singleValue: false } ],
76-
'object-curly-spacing': [ 'error', 'always' ],
77-
'computed-property-spacing': [ 'error', 'always' ],
78-
'template-curly-spacing': [ 'error', 'always' ],
75+
// 'array-bracket-spacing': ['error', 'always', { singleValue: false }],
76+
'object-curly-spacing': ['error', 'always'],
77+
'computed-property-spacing': ['error', 'always'],
78+
'template-curly-spacing': ['error', 'always'],
7979

8080
'import/first': 'off',
8181
// 'import/named': 'error',
@@ -95,9 +95,14 @@ module.exports = {
9595
'vue/no-v-html': 'off',
9696
'vue/require-prop-types': 'off',
9797
'vue/valid-v-slot': 'off',
98+
'vue/max-attributes-per-line': 'off',
99+
'vue/html-closing-bracket-newline': 'off',
100+
'vue/multiline-html-element-content-newline': 'off',
101+
'vue/html-self-closing': 'off',
102+
'vue/html-indent': 'off',
98103

99104
// allow console.log during production for demo purposes
100105
// 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
101-
'no-console': 'off'
102-
}
106+
'no-console': 'off',
107+
},
103108
}

docs/src/boot/register.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
import { boot } from 'quasar/wrappers'
23
import JsonApiViewer from 'quasar-ui-json-api-viewer/src/components/JsonApiViewer'
34
import MarkdownPage from '../components/MarkdownPage.vue'
@@ -6,15 +7,16 @@ import ExampleViewer, { setDefaults } from 'quasar-ui-example-viewer/src'
67
import { version } from '@quasar/quasar-ui-qmarkdown/src/version.js'
78
// import { useQMarkdownGlobalProps } from '@quasar/quasar-ui-qmarkdown/src/QMarkdown.js'
89

9-
1010
setDefaults({
11-
locationUrl: 'https://github.com/quasarframework/quasar-ui-qmarkdown/tree/next/docs/src/examples',
12-
jsPaths: [`https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qmarkdown@${ version }/dist/index.umd.min.js`],
11+
locationUrl: 'https://github.com/quasarframework/quasar-ui-qmarkdown/tree/dev/docs/src/examples',
12+
jsPaths: [
13+
`https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qmarkdown@${version}/dist/index.umd.min.js`,
14+
],
1315
cssPaths: [
14-
`https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qmarkdown@${ version }/dist/index.min.css`,
15-
'https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.css'
16+
`https://cdn.jsdelivr.net/npm/@quasar/quasar-ui-qmarkdown@${version}/dist/index.min.css`,
17+
'https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.css',
1618
],
17-
noEdit: true
19+
noEdit: true,
1820
})
1921

2022
// defaults for QMarkdown - test

docs/src/components/MarkdownFooter.vue

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,52 @@
11
<template>
2-
<div class="markdown-page__footer--icons q-mt-md full-width row justify-center items-center q-gutter-sm">
2+
<div
3+
class="markdown-page__footer--icons q-mt-md full-width row justify-center items-center q-gutter-sm"
4+
>
5+
<a href="https://github.com/hawkeye64" target="_blank" rel="noopener"
6+
><q-avatar size="28px"><img src="~assets/profile.png" /></q-avatar
7+
></a>
38
<a
4-
href="https://github.com/hawkeye64"
9+
href="https://github.com/quasarframework/quasar-ui-qmarkdown/tree/dev"
510
target="_blank"
611
rel="noopener"
7-
><q-avatar size="28px"><img src="~assets/profile.png"></q-avatar></a>
8-
<a
9-
href="https://github.com/quasarframework/quasar-ui-qmarkdown/tree/next"
10-
target="_blank"
11-
rel="noopener"
12-
><q-icon :name="fabGithub" /></a>
13-
<a
14-
href="https://twitter.com/jgalbraith64"
15-
target="_blank"
16-
rel="noopener"
17-
><q-icon :name="fabTwitter" /></a>
18-
<a
19-
href="https://github.com/sponsors/hawkeye64"
20-
target="_blank"
21-
rel="noopener"
22-
><q-icon :name="mdiCharity" /></a>
12+
><q-icon :name="fabGithub"
13+
/></a>
14+
<a href="https://twitter.com/jgalbraith64" target="_blank" rel="noopener"
15+
><q-icon :name="fabTwitter"
16+
/></a>
17+
<a href="https://github.com/sponsors/hawkeye64" target="_blank" rel="noopener"
18+
><q-icon :name="mdiCharity"
19+
/></a>
2320
</div>
2421
<div class="full-width row justify-center items-center q-my-sm">
25-
<p class="markdown-copyright">CC-BY / MIT License | Copyright &copy; 2018 - {{ year }} Jeff Galbraith</p>
22+
<p class="markdown-copyright">
23+
CC-BY / MIT License | Copyright &copy; 2018 - {{ year }} Jeff Galbraith
24+
</p>
2625
</div>
2726
</template>
2827

2928
<script>
30-
import {
31-
fabGithub,
32-
fabTwitter
33-
} from '@quasar/extras/fontawesome-v5'
29+
import { fabGithub, fabTwitter } from '@quasar/extras/fontawesome-v5'
3430
35-
import {
36-
mdiCharity
37-
} from '@quasar/extras/mdi-v6'
31+
import { mdiCharity } from '@quasar/extras/mdi-v6'
3832
39-
const year = (new Date()).getFullYear()
33+
const year = new Date().getFullYear()
4034
4135
export default {
4236
name: 'MarkdownFooter',
4337
4438
props: {
45-
to: String
39+
to: String,
4640
},
4741
48-
setup (props) {
42+
setup(props) {
4943
return {
5044
year,
5145
fabGithub,
5246
fabTwitter,
53-
mdiCharity
47+
mdiCharity,
5448
}
55-
}
49+
},
5650
}
5751
</script>
5852
<style lang="sass">

docs/src/components/MarkdownPage.vue

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
<template>
22
<div :class="'markdown ' + (path !== '/' ? ($q.platform.is.mobile ? '' : 'q-mx-xl') : '')">
3-
<markdown-nav-bar
4-
v-if="path !== '/' && nav && nav.length > 0"
5-
:title="title"
6-
:nav="nav"
7-
/>
3+
<markdown-nav-bar v-if="path !== '/' && nav && nav.length > 0" :title="title" :nav="nav" />
84

95
<div :class="$route.path !== '/' ? 'q-ma-xs' : ''">
106
<slot />
117

12-
<div
13-
v-if="related !== undefined"
14-
class="full-width"
15-
>
8+
<div v-if="related !== undefined" class="full-width">
169
<h5 class="q-ma-none q-mt-lg">Related</h5>
1710
<q-separator />
1811
<div class="q-gutter-md flex flex-center q-mt-md markdown-page__related">
@@ -27,23 +20,23 @@
2720
<div class="markdown-page__nav--cat">{{ link.category || 'Docs' }}</div>
2821
<div class="markdown-page__nav--name text-weight-bold">{{ link.name }}</div>
2922
</div>
30-
<q-icon
31-
:name="biBoxArrowUpRight"
32-
class="q-ml-lg"
33-
/>
23+
<q-icon :name="biBoxArrowUpRight" class="q-ml-lg" />
3424
</div>
3525
</router-link>
3626
</div>
3727
</div>
3828

39-
4029
<div class="markdown-page__footer">
4130
<q-separator class="q-mb-lg" />
4231
<div v-if="path && noEdit !== true">
4332
<div class="full-width row justify-center items-center">
4433
Found an error on this page or feel it could be improved?
4534
<markdown-link
46-
:to="'https://github.com/quasarframework/quasar-ui-qmarkdown/edit/next/docs/src/pages' + path + '.md'"
35+
:to="
36+
'https://github.com/quasarframework/quasar-ui-qmarkdown/edit/dev/docs/src/pages' +
37+
path +
38+
'.md'
39+
"
4740
>
4841
&nbsp; Edit this page on GitHub
4942
</markdown-link>
@@ -63,7 +56,7 @@
6356
<img
6457
src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg"
6558
alt="Deploys by Netlify"
66-
>
59+
/>
6760
</a>
6861
</div>
6962
</div>
@@ -89,7 +82,7 @@ export default {
8982
9083
components: {
9184
MarkdownFooter,
92-
MarkdownNavBar
85+
MarkdownNavBar,
9386
},
9487
9588
props: {
@@ -100,10 +93,10 @@ export default {
10093
badge: String,
10194
metaTitle: String,
10295
metaDesc: String,
103-
toc: Array
96+
toc: Array,
10497
},
10598
106-
setup (props) {
99+
setup(props) {
107100
// TODO: remove
108101
console.log('props', props)
109102
@@ -112,11 +105,14 @@ export default {
112105
113106
useMeta(
114107
props.metaDesc !== void 0
115-
? { title: props.metaTitle, meta: getMeta(props.metaTitle + ' » QMarkdown', props.metaDesc) }
108+
? {
109+
title: props.metaTitle,
110+
meta: getMeta(props.metaTitle + ' » QMarkdown', props.metaDesc),
111+
}
116112
: { title: props.metaTitle }
117113
)
118114
119-
function getTitle () {
115+
function getTitle() {
120116
return props.metaTitle
121117
}
122118
@@ -126,9 +122,9 @@ export default {
126122
127123
return {
128124
path,
129-
biBoxArrowUpRight
125+
biBoxArrowUpRight,
130126
}
131-
}
127+
},
132128
}
133129
</script>
134130

docs/src/components/ToolbarContents.vue

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,12 @@
99
@click="leftDrawerButtonFunc"
1010
/>
1111

12-
<q-btn
13-
flat
14-
no-caps
15-
to="/"
16-
>
17-
<div
18-
v-if="$q.screen.width > 500"
19-
class="text-weight-bold"
20-
>
21-
<span style="font-size: 20px;">
22-
QMarkdown &nbsp;
23-
</span>
24-
<span style="font-size: 12px;">
25-
v{{ version }}
26-
</span>
27-
</div>
28-
<div v-else>
29-
Home
12+
<q-btn flat no-caps to="/">
13+
<div v-if="$q.screen.width > 500" class="text-weight-bold">
14+
<span style="font-size: 20px"> QMarkdown &nbsp; </span>
15+
<span style="font-size: 12px"> v{{ version }} </span>
3016
</div>
17+
<div v-else>Home</div>
3118
</q-btn>
3219

3320
<q-space />
@@ -40,11 +27,8 @@
4027
@click="$q.dark.toggle()"
4128
/>
4229

43-
<div
44-
v-if="$q.screen.width > 500"
45-
class="text-weight-bold"
46-
>
47-
Quasar <span style="font-size: 12px;">v{{ $q.version }}</span>
30+
<div v-if="$q.screen.width > 500" class="text-weight-bold">
31+
Quasar <span style="font-size: 12px">v{{ $q.version }}</span>
4832
</div>
4933

5034
<q-btn
@@ -60,24 +44,24 @@
6044

6145
<script>
6246
import { defineComponent } from 'vue'
63-
import { version } from '@quasar/quasar-ui-qmarkdown/src/version.js'
47+
import { version } from '@quasar/quasar-ui-qmarkdown'
6448
6549
export default defineComponent({
6650
name: 'ToolbarContents',
6751
props: {
6852
title: {
6953
type: String,
70-
default: 'Inline markdown for your Quasar apps'
54+
default: 'Inline markdown for your Quasar apps',
7155
},
7256
leftDrawerButton: Boolean,
7357
rightDrawerButton: Boolean,
7458
leftDrawerButtonFunc: Function,
75-
rightDrawerButtonFunc: Function
59+
rightDrawerButtonFunc: Function,
7660
},
77-
setup () {
61+
setup() {
7862
return {
79-
version
63+
version,
8064
}
81-
}
65+
},
8266
})
8367
</script>

0 commit comments

Comments
 (0)