Skip to content

Commit 2d63885

Browse files
committed
chore: update devDeps and apply comma-dangle linting rule
1 parent bf95787 commit 2d63885

Some content is hidden

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

65 files changed

+2808
-2808
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
"@babel/plugin-transform-flow-strip-types": "^7.4.4",
2222
"@babel/preset-env": "^7.5.5",
2323
"@babel/register": "^7.5.5",
24-
"@typescript-eslint/parser": "^1.12.0",
24+
"@typescript-eslint/parser": "^1.13.0",
2525
"babel-eslint": "^10.0.2",
2626
"babel-plugin-add-module-exports": "^1.0.2",
27-
"babel-plugin-istanbul": "^5.1.4",
27+
"babel-plugin-istanbul": "^5.2.0",
2828
"chai": "^4.2.0",
29-
"eslint": "^6.0.1",
30-
"eslint-config-canonical": "^17.1.4",
29+
"eslint": "^6.1.0",
30+
"eslint-config-canonical": "^17.3.3",
3131
"gitdown": "^3.1.1",
3232
"glob": "^7.1.4",
33-
"husky": "^3.0.1",
33+
"husky": "^3.0.2",
3434
"mocha": "^6.2.0",
3535
"nyc": "^14.1.1",
36-
"semantic-release": "^15.13.18",
36+
"semantic-release": "^15.13.19",
3737
"typescript": "^3.5.3"
3838
},
3939
"engines": {

src/bin/generateReadme.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const getAssertions = () => {
6060

6161
return {
6262
invalid: _.map(codes.invalid, formatCodeSnippet),
63-
valid: _.map(codes.valid, formatCodeSnippet)
63+
valid: _.map(codes.valid, formatCodeSnippet),
6464
};
6565
});
6666

@@ -81,8 +81,8 @@ const generateReadme = async () => {
8181
gitdown.setConfig({
8282
gitinfo: {
8383
defaultBranchName: getSomeBranch() || 'master',
84-
gitPath: path.join(__dirname, '../../.git')
85-
}
84+
gitPath: path.join(__dirname, '../../.git'),
85+
},
8686
});
8787
let documentBody = await gitdown.get();
8888

src/exportParser.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const debug = debugModule('requireExportJsdoc');
44

55
const createNode = function () {
66
return {
7-
props: {}
7+
props: {},
88
};
99
};
1010

@@ -392,7 +392,7 @@ const parse = function (ast, node, opt) {
392392
ancestorsOnly: false,
393393
esm: true,
394394
initModuleExports: true,
395-
initWindow: true
395+
initWindow: true,
396396
};
397397

398398
const globalVars = createNode();
@@ -414,7 +414,7 @@ const parse = function (ast, node, opt) {
414414
}
415415

416416
return {
417-
globalVars
417+
globalVars,
418418
};
419419
};
420420

@@ -424,5 +424,5 @@ const isExported = function (node, parseResult, opt) {
424424

425425
export default {
426426
isExported,
427-
parse
427+
parse,
428428
};

src/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ export default {
5656
'jsdoc/require-returns-check': 'warn',
5757
'jsdoc/require-returns-description': 'warn',
5858
'jsdoc/require-returns-type': 'warn',
59-
'jsdoc/valid-types': 'warn'
60-
}
61-
}
59+
'jsdoc/valid-types': 'warn',
60+
},
61+
},
6262
},
6363
rules: {
6464
'check-alignment': checkAlignment,
@@ -86,6 +86,6 @@ export default {
8686
'require-returns-check': requireReturnsCheck,
8787
'require-returns-description': requireReturnsDescription,
8888
'require-returns-type': requireReturnsType,
89-
'valid-types': validTypes
90-
}
89+
'valid-types': validTypes,
90+
},
9191
};

src/iterateJsdoc.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ const parseComment = (commentNode, indent, trim = true) => {
4545
if (result) {
4646
return {
4747
data: {
48-
description: result[1] === undefined ? '' : result[1]
48+
description: result[1] === undefined ? '' : result[1],
4949
},
50-
source: result[0]
50+
source: result[0],
5151
};
5252
}
5353

5454
// Always has at least whitespace due to `indent` we've added
5555
/* istanbul ignore next */
5656
return null;
57-
}
57+
},
5858
],
59-
trim
59+
trim,
6060
})[0] || {};
6161
};
6262

@@ -70,7 +70,7 @@ const getUtils = (
7070
implementsReplacesDocs,
7171
augmentsExtendsReplacesDocs,
7272
maxLines,
73-
minLines
73+
minLines,
7474
},
7575
report,
7676
context
@@ -132,7 +132,7 @@ const getUtils = (
132132
if (skipReportingBlockedTag) {
133133
return {
134134
blocked: true,
135-
tagName
135+
tagName,
136136
};
137137
}
138138
const message = isObject && ret.message || defaultMessage;
@@ -248,7 +248,7 @@ const getUtils = (
248248
const classNode = utils.getClassNode();
249249
const classJsdocNode = getJSDocComment(sourceCode, classNode, {
250250
maxLines,
251-
minLines
251+
minLines,
252252
});
253253

254254
if (classJsdocNode) {
@@ -269,15 +269,15 @@ const getUtils = (
269269
utils.forEachPreferredTag = (tagName, arrayHandler, skipReportingBlockedTag = false) => {
270270
const targetTagName = utils.getPreferredTagName({
271271
skipReportingBlockedTag,
272-
tagName
272+
tagName,
273273
});
274274
if (!targetTagName ||
275275
skipReportingBlockedTag && targetTagName && typeof targetTagName === 'object'
276276
) {
277277
return;
278278
}
279279
const matchingJsdocTags = _.filter(jsdoc.tags || [], {
280-
tag: targetTagName
280+
tag: targetTagName,
281281
});
282282

283283
matchingJsdocTags.forEach((matchingJsdocTag) => {
@@ -290,10 +290,10 @@ const getUtils = (
290290
loc: {
291291
start: {
292292
column: 1,
293-
line: 1
294-
}
293+
line: 1,
294+
},
295295
},
296-
message
296+
message,
297297
});
298298
};
299299

@@ -337,7 +337,7 @@ const makeReport = (context, commentNode) => {
337337

338338
loc = {
339339
end: {line: lineNumber},
340-
start: {line: lineNumber}
340+
start: {line: lineNumber},
341341
};
342342
if (jsdocLoc.column) {
343343
const colNumber = commentNode.loc.start.column + jsdocLoc.column;
@@ -352,7 +352,7 @@ const makeReport = (context, commentNode) => {
352352
fix,
353353
loc,
354354
message,
355-
node: commentNode
355+
node: commentNode,
356356
});
357357
};
358358

@@ -412,19 +412,19 @@ const iterateAllJsdocs = (iterator, ruleConfig) => {
412412
report,
413413
settings,
414414
sourceCode,
415-
utils: getUtils(null, jsdoc, jsdocNode, settings, report, context)
415+
utils: getUtils(null, jsdoc, jsdocNode, settings, report, context),
416416
});
417417
});
418-
}
418+
},
419419
};
420420
},
421-
meta: ruleConfig.meta
421+
meta: ruleConfig.meta,
422422
};
423423
};
424424

425425
export {
426426
getSettings,
427-
parseComment
427+
parseComment,
428428
};
429429

430430
/**
@@ -447,7 +447,7 @@ export default function iterateJsdoc (iterator, ruleConfig) {
447447
if (ruleConfig.iterateAllJsdocs) {
448448
return iterateAllJsdocs(iterator, {
449449
meta: ruleConfig.meta,
450-
noTrim: ruleConfig.noTrim
450+
noTrim: ruleConfig.noTrim,
451451
});
452452
}
453453

@@ -504,7 +504,7 @@ export default function iterateJsdoc (iterator, ruleConfig) {
504504
report,
505505
settings,
506506
sourceCode,
507-
utils
507+
utils,
508508
});
509509
};
510510

@@ -517,9 +517,9 @@ export default function iterateJsdoc (iterator, ruleConfig) {
517517
return {
518518
ArrowFunctionExpression: checkJsdoc,
519519
FunctionDeclaration: checkJsdoc,
520-
FunctionExpression: checkJsdoc
520+
FunctionExpression: checkJsdoc,
521521
};
522522
},
523-
meta: ruleConfig.meta
523+
meta: ruleConfig.meta,
524524
};
525525
}

src/jsdocUtils.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const getJsdocParameterNamesDeep = (jsdoc : Object, targetTagName : string) : Ar
4040
let jsdocParameterNames;
4141

4242
jsdocParameterNames = _.filter(jsdoc.tags, {
43-
tag: targetTagName
43+
tag: targetTagName,
4444
});
4545

4646
jsdocParameterNames = _.map(jsdocParameterNames, 'name');
@@ -144,7 +144,7 @@ const namepathDefiningTags = [
144144
'interface',
145145
'member', 'var',
146146
'mixin',
147-
'namespace'
147+
'namespace',
148148
];
149149

150150
const namepathPointingTags = [
@@ -163,7 +163,7 @@ const namepathPointingTags = [
163163
// MAY BE USEFUL WITHOUT NAMEPATH
164164
'emits',
165165
'fires',
166-
'listens'
166+
'listens',
167167
];
168168

169169
const isNamepathDefiningTag = (tagName) => {
@@ -192,7 +192,7 @@ const potentiallyEmptyNamepathTags = [
192192
'member', 'var',
193193
'mixin',
194194
'namespace',
195-
'listens', 'fires', 'emits'
195+
'listens', 'fires', 'emits',
196196
];
197197

198198
const isPotentiallyEmptyNamepathTag = (tag) => {
@@ -213,11 +213,11 @@ let tagsWithTypes = [
213213
'throws',
214214
'type',
215215
'typedef',
216-
'yields'
216+
'yields',
217217
];
218218

219219
const closureTagsWithTypes = [
220-
'package', 'private', 'protected', 'public', 'static'
220+
'package', 'private', 'protected', 'public', 'static',
221221
];
222222

223223
const tagsWithTypesAliases = [
@@ -229,7 +229,7 @@ const tagsWithTypesAliases = [
229229
'prop',
230230
'return',
231231
'exception',
232-
'yield'
232+
'yield',
233233
];
234234

235235
tagsWithTypes = tagsWithTypes.concat(tagsWithTypesAliases, closureTagsWithTypes);
@@ -335,8 +335,8 @@ const enforcedContexts = (context, defaultContexts) => {
335335
contexts = defaultContexts === true ? [
336336
'ArrowFunctionExpression',
337337
'FunctionDeclaration',
338-
'FunctionExpression'
339-
] : defaultContexts
338+
'FunctionExpression',
339+
] : defaultContexts,
340340
} = context.options[0] || {};
341341

342342
return contexts;
@@ -362,7 +362,7 @@ const tagsWithNamesAndDescriptions = [
362362
'param', 'arg', 'argument', 'property', 'prop',
363363

364364
// These two are parsed by our custom parser as though having a `name`
365-
'returns', 'return'
365+
'returns', 'return',
366366
];
367367

368368
const getTagsByType = (tags, tagPreference) => {
@@ -380,7 +380,7 @@ const getTagsByType = (tags, tagPreference) => {
380380

381381
return {
382382
tagsWithNames,
383-
tagsWithoutNames
383+
tagsWithoutNames,
384384
};
385385
};
386386

@@ -424,5 +424,5 @@ export default {
424424
isPotentiallyEmptyNamepathTag,
425425
isTagWithType,
426426
isValidTag,
427-
parseClosureTemplateTag
427+
parseClosureTemplateTag,
428428
};

src/rules/checkAlignment.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default iterateJsdoc(({
55
sourceCode,
66
jsdocNode,
77
report,
8-
indent
8+
indent,
99
}) => {
1010
// `indent` is whitespace from line 1 (`/**`), so slice and account for "/".
1111
const indentLevel = indent.length + 1;
@@ -34,7 +34,7 @@ export default iterateJsdoc(({
3434
sourceLines.some((line, lineNum) => {
3535
if (line.length !== indentLevel) {
3636
report('Expected JSDoc block to be aligned.', fix, {
37-
line: lineNum + 1
37+
line: lineNum + 1,
3838
});
3939

4040
return true;
@@ -46,6 +46,6 @@ export default iterateJsdoc(({
4646
iterateAllJsdocs: true,
4747
meta: {
4848
fixable: 'code',
49-
type: 'layout'
50-
}
49+
type: 'layout',
50+
},
5151
});

0 commit comments

Comments
 (0)