Skip to content
Permalink
Browse files

Upgrade: doctrine version to 1.1.0 (fixes #4854)

  • Loading branch information...
tschaub committed Jan 7, 2016
1 parent 2ccbc01 commit 7c97201fdf10af4c0f06d3b9a7616da7927be123
Showing with 47 additions and 1 deletion.
  1. +1 −1 package.json
  2. +46 −0 tests/lib/rules/valid-jsdoc.js
@@ -38,7 +38,7 @@
"chalk": "^1.0.0",
"concat-stream": "^1.4.6",
"debug": "^2.1.1",
"doctrine": "^0.7.1",
"doctrine": "^1.1.0",
"es6-map": "^0.1.3",
"escape-string-regexp": "^1.0.2",
"escope": "^3.3.0",
@@ -203,6 +203,26 @@ ruleTester.run("valid-jsdoc", rule, {
parserOptions: {
ecmaVersion: 6
}
},


{
code:
"/**\n" +
" * Use of this with a 'namepath'.\n" +
" * @this some.name\n" +
" */\n" +
"function foo() {}",
options: [{requireReturn: false}]
},
{
code:
"/**\n" +
" * Use of this with a type expression.\n" +
" * @this {some.name}\n" +
" */\n" +
"function foo() {}",
options: [{requireReturn: false}]
}
],

@@ -561,6 +581,32 @@ ruleTester.run("valid-jsdoc", rule, {
parserOptions: {
ecmaVersion: 6
}
},
{
code:
"/**\n" +
" * Use of this with an invalid type expression\n" +
" * @this {not.a.valid.type.expression\n" +
" */\n" +
"function foo() {}",
options: [{requireReturn: false}],
errors: [{
message: "JSDoc type missing brace.",
type: "Block"
}]
},
{
code:
"/**\n" +
" * Use of this with a type that is not a member expression\n" +
" * @this {Array<string>}\n" +
" */\n" +
"function foo() {}",
options: [{requireReturn: false}],
errors: [{
message: "JSDoc syntax error.",
type: "Block"
}]
}
]
});

0 comments on commit 7c97201

Please sign in to comment.
You can’t perform that action at this time.