Skip to content

Commit 2ebc69e

Browse files
committed
feat(docs): Update deps & linting; fix some erroneous props in examples
1 parent fda413e commit 2ebc69e

Some content is hidden

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

53 files changed

+376
-353
lines changed

docs/.eslintrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module.exports = {
33

44
parserOptions: {
55
parser: 'babel-eslint',
6-
sourceType: 'module'
76
},
87

98
env: {
@@ -39,6 +38,9 @@ module.exports = {
3938
'one-var': 'off',
4039
'prefer-promise-reject-errors': 'off',
4140

41+
'no-void': 'off',
42+
'quotes': 'off',
43+
'array-bracket-spacing': ['error', 'always'],
4244
'brace-style': ['error', 'stroustrup'],
4345

4446
'import/first': 'off',

docs/package.json

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,23 @@
2323
},
2424
"devDependencies": {
2525
"@quasar/app": "^1.0.0",
26-
"@vue/eslint-config-standard": "^4.0.0",
26+
"@vue/eslint-config-standard": "^5.0.1",
2727
"babel-eslint": "^10.0.1",
28-
"eslint": "^5.10.0",
29-
"eslint-loader": "^2.1.1",
28+
"eslint": "^6.8.0",
29+
"eslint-loader": "^3.0.3",
30+
"eslint-plugin-import": "^2.19.1",
31+
"eslint-plugin-node": "^11.0.0",
32+
"eslint-plugin-promise": "^4.2.1",
3033
"eslint-plugin-quasar": "^1.0.0-alpha.16",
31-
"eslint-plugin-vue": "^5.0.0",
34+
"eslint-plugin-standard": "^4.0.1",
35+
"eslint-plugin-vue": "^6.1.1",
3236
"gray-matter": "^4.0.2",
33-
"markdown-it": "^8.4.2",
37+
"markdown-it": "^10.0.0",
3438
"markdown-it-container": "^2.0.0",
3539
"pug": "^2.0.3",
3640
"pug-plain-loader": "^1.0.0",
37-
"raw-loader": "^1.0.0",
38-
"toml": "^2.3.5"
41+
"raw-loader": "^4.0.0",
42+
"toml": "^3.0.0"
3943
},
4044
"engines": {
4145
"node": ">= 8.9.0",
@@ -44,5 +48,8 @@
4448
},
4549
"browserslist": [
4650
"last 1 version, not dead, ie >= 11"
47-
]
51+
],
52+
"resolutions": {
53+
"@babel/parser": "7.7.5"
54+
}
4855
}

docs/src/components/ApiRows.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export default {
154154

155155
if (prop.definition !== void 0) {
156156
const nodes = []
157-
for (let propName in prop.definition) {
157+
for (const propName in prop.definition) {
158158
nodes.push(
159159
this.getProp(h, prop.definition[propName], propName, 2)
160160
)
@@ -178,7 +178,7 @@ export default {
178178
nodes = [],
179179
newLevel = (level + 1) % NAME_PROP_COLOR.length
180180

181-
for (let propName in prop.params) {
181+
for (const propName in prop.params) {
182182
nodes.push(
183183
this.getProp(h, prop.params[propName], propName, newLevel)
184184
)
@@ -213,7 +213,7 @@ export default {
213213

214214
if (prop.scope !== void 0) {
215215
const nodes = []
216-
for (let propName in prop.scope) {
216+
for (const propName in prop.scope) {
217217
nodes.push(
218218
this.getProp(h, prop.scope[propName], propName, 1)
219219
)
@@ -256,7 +256,7 @@ export default {
256256
props (h, props) {
257257
const child = []
258258

259-
for (let propName in props) {
259+
for (const propName in props) {
260260
child.push(
261261
this.getProp(h, props[propName], propName, 0)
262262
)
@@ -268,7 +268,7 @@ export default {
268268
slots (h, slots) {
269269
const child = []
270270

271-
for (let slot in slots) {
271+
for (const slot in slots) {
272272
child.push(
273273
h('div', { staticClass: 'api-row row' }, [
274274
this.getDiv(h, 12, 'Name', h('q-badge', {
@@ -291,7 +291,7 @@ export default {
291291
scopedSlots (h, scopedSlots) {
292292
const child = []
293293

294-
for (let slot in scopedSlots) {
294+
for (const slot in scopedSlots) {
295295
child.push(
296296
this.getProp(h, scopedSlots[slot], slot, 0)
297297
)
@@ -315,12 +315,12 @@ export default {
315315
return child
316316
}
317317

318-
for (let eventName in events) {
318+
for (const eventName in events) {
319319
const event = events[eventName]
320320
const params = []
321321

322322
if (event.params !== void 0) {
323-
for (let paramName in event.params) {
323+
for (const paramName in event.params) {
324324
params.push(
325325
this.getProp(h, event.params[paramName], paramName, 1)
326326
)
@@ -363,7 +363,7 @@ export default {
363363
methods (h, methods) {
364364
const child = []
365365

366-
for (let methodName in methods) {
366+
for (const methodName in methods) {
367367
const method = methods[methodName]
368368

369369
const nodes = [
@@ -381,7 +381,7 @@ export default {
381381

382382
if (method.params !== void 0) {
383383
const props = []
384-
for (let paramName in method.params) {
384+
for (const paramName in method.params) {
385385
props.push(
386386
this.getProp(h, method.params[paramName], paramName, 1)
387387
)
@@ -439,7 +439,7 @@ export default {
439439
modifiers (h, modifiers) {
440440
const child = []
441441

442-
for (let modifierName in modifiers) {
442+
for (const modifierName in modifiers) {
443443
const modifier = modifiers[modifierName]
444444

445445
child.push(
@@ -472,7 +472,7 @@ export default {
472472
quasarConfOptions (h, conf) {
473473
const child = []
474474

475-
for (let def in conf.definition) {
475+
for (const def in conf.definition) {
476476
child.push(
477477
this.getProp(h, conf.definition[def], def, 0)
478478
)

docs/src/components/DocApi.vue

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,12 @@ const { pad } = format
8383
const groupBy = (list, groupKey, defaultGroupKeyValue) => {
8484
const res = {}
8585
86-
for (let key in list) {
87-
if (list.hasOwnProperty(key)) {
88-
let value = list[key]
89-
let groupKeyValue = (value[groupKey] || defaultGroupKeyValue).split('|')
90-
for (let groupKeyV of groupKeyValue) {
86+
for (const key in list) {
87+
if (list[key] !== void 0) {
88+
const value = list[key]
89+
const groupKeyValue = (value[groupKey] || defaultGroupKeyValue).split('|')
90+
91+
for (const groupKeyV of groupKeyValue) {
9192
if (res[groupKeyV] === void 0) {
9293
res[groupKeyV] = {}
9394
}
@@ -164,16 +165,16 @@ export default {
164165
if (this.aggregationModel[tab]) {
165166
api[tab] = {}
166167
167-
for (let group in this.api[tab]) {
168-
if (this.api[tab].hasOwnProperty(group)) {
168+
for (const group in this.api[tab]) {
169+
if (this.api[tab][group] !== void 0) {
169170
api[tab][group] = filterApi(this.api[tab][group])
170171
}
171172
}
172173
173174
if (this.currentTab === tab) {
174175
let apiWithResultsCount = 0,
175176
lastFoundApiWithResults = null
176-
for (let group in this.api[tab]) {
177+
for (const group in this.api[tab]) {
177178
if (Object.keys(api[tab][group]).length > 0) {
178179
apiWithResultsCount++
179180
lastFoundApiWithResults = group
@@ -202,7 +203,7 @@ export default {
202203
this.aggregationModel = {}
203204
204205
if (type === 'component' && api.props !== void 0) {
205-
for (let apiGroup of ['props']) {
206+
for (const apiGroup of [ 'props' ]) {
206207
api[apiGroup] = groupBy(api[apiGroup], 'category', 'general')
207208
this.currentInnerTab[apiGroup] = this.apiTabs(apiGroup, api)[0]
208209
this.aggregationModel[apiGroup] = true
@@ -258,7 +259,7 @@ export default {
258259
return total
259260
}
260261
261-
if (['value', 'arg', 'quasarConfOptions', 'injection'].includes(tab)) {
262+
if ([ 'value', 'arg', 'quasarConfOptions', 'injection' ].includes(tab)) {
262263
return 1
263264
}
264265
@@ -278,8 +279,8 @@ export default {
278279
currentTabMaxCategoryPropCount () {
279280
if (this.aggregationModel[this.currentTab]) {
280281
let max = -1
281-
for (let category in this.filteredApi[this.currentTab]) {
282-
let count = this.apiInnerCount(this.currentTab, category)
282+
for (const category in this.filteredApi[this.currentTab]) {
283+
const count = this.apiInnerCount(this.currentTab, category)
283284
if (count > max) {
284285
max = count
285286
}

docs/src/components/DocExample.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export default {
138138
script,
139139
style
140140
}
141-
this.tabs = ['template', 'script', 'style'].filter(type => this.parts[type])
141+
this.tabs = [ 'template', 'script', 'style' ].filter(type => this.parts[type])
142142
},
143143
144144
parseTemplate (target, template) {

docs/src/components/DocInstallation.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ export default {
3232
},
3333
3434
props: {
35-
components: [Array, String],
36-
directives: [Array, String],
37-
plugins: [Array, String],
35+
components: [ Array, String ],
36+
directives: [ Array, String ],
37+
plugins: [ Array, String ],
3838
config: Object // TODO
3939
},
4040
@@ -65,7 +65,7 @@ export default {
6565
QuasarCli () {
6666
const parts = []
6767
68-
;['components', 'directives'].forEach(type => {
68+
;[ 'components', 'directives' ].forEach(type => {
6969
if (this[type] !== void 0) {
7070
parts.push(`// NOT needed if using auto-import feature:
7171
${type}: [
@@ -117,7 +117,7 @@ window.quasarConfig = {
117117
VueCli () {
118118
const types = [], imports = []
119119
120-
;['components', 'directives', 'plugins'].forEach(type => {
120+
;[ 'components', 'directives', 'plugins' ].forEach(type => {
121121
if (this[type] !== void 0) {
122122
imports.push(this.nameAsString(this[type], 2, false))
123123
types.push(`${type}: {

docs/src/components/page-parts/color-palette/ColorList.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
export default {
2525
data () {
2626
return {
27-
colors: ['red', 'pink', 'purple', 'deep-purple', 'indigo', 'blue', 'light-blue', 'cyan', 'teal', 'green', 'light-green', 'lime', 'yellow', 'amber', 'orange', 'deep-orange', 'brown', 'grey', 'blue-grey']
27+
colors: [ 'red', 'pink', 'purple', 'deep-purple', 'indigo', 'blue', 'light-blue', 'cyan', 'teal', 'green', 'light-green', 'lime', 'yellow', 'amber', 'orange', 'deep-orange', 'brown', 'grey', 'blue-grey' ]
2828
}
2929
}
3030
}

docs/src/components/page-parts/layout/grid/FlexPlayground.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export default {
163163
164164
mounted () {
165165
const query = this.$route.query
166-
for (let param in queryParams) {
166+
for (const param in queryParams) {
167167
if (param in query) {
168168
const paramType = queryParams[param]
169169
switch (paramType) {
@@ -213,7 +213,7 @@ export default {
213213
},
214214
onChange (index) {
215215
this.selectedIndex = index
216-
let child = this.$refs['child' + index][0]
216+
const child = this.$refs['child' + index][0]
217217
this.childClasses = child.classes
218218
this.childStyles = child.styles
219219
},
@@ -223,9 +223,9 @@ export default {
223223
playgroudUrl = playgroudUrl.substring(0, playgroudUrl.indexOf('?'))
224224
}
225225
let queryString = '',
226-
index = 0,
227-
paramsCount = Object.keys(queryParams).length
228-
for (let param in queryParams) {
226+
index = 0
227+
const paramsCount = Object.keys(queryParams).length
228+
for (const param in queryParams) {
229229
const paramType = queryParams[param]
230230
let value
231231
switch (paramType) {

docs/src/components/page-parts/releases/QuasarReleases.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ export default {
6666
}
6767
6868
const vIndex = release.name.indexOf('-v'),
69-
packageName = ['v1.0.0', 'v1.0.0-beta.5'].includes(release.name) ? 'quasar' : release.name.substring(0, vIndex),
69+
packageName = [ 'v1.0.0', 'v1.0.0-beta.5' ].includes(release.name)
70+
? 'quasar'
71+
: release.name.substring(0, vIndex),
7072
version = release.name.substring(vIndex + 2)
7173
7274
if (version.startsWith('0')) {

0 commit comments

Comments
 (0)