eslint-plugin-jsdoc
Advanced tools
Comparing version
@@ -48,3 +48,3 @@ 'use strict'; | ||
lastLineEndsSentence = /\.$/.test(line); | ||
lastLineEndsSentence = /[.:?!]$/.test(line); | ||
@@ -63,3 +63,3 @@ return false; | ||
var validateDescription = function validateDescription(description, report, jsdocNode, sourceCode) { | ||
var validateDescription = function validateDescription(description, report, jsdocNode, sourceCode, tag) { | ||
if (!description) { | ||
@@ -80,5 +80,19 @@ return false; | ||
text = text.replace(line, line + '.'); | ||
text = text.replace(new RegExp(line + '$', 'm'), line + '.'); | ||
} | ||
var _loop = function _loop(sentence) { | ||
var beginning = sentence.split('\n')[0]; | ||
if (tag) { | ||
var reg = new RegExp('(@' + tag + '.*)' + _lodash2.default.escapeRegExp(beginning)); | ||
text = text.replace(reg, function ($0, $1) { | ||
return $1 + capitalize(beginning); | ||
}); | ||
} else { | ||
text = text.replace(beginning, capitalize(beginning)); | ||
} | ||
}; | ||
var _iteratorNormalCompletion = true; | ||
@@ -94,5 +108,3 @@ var _didIteratorError = false; | ||
var beginning = sentence.split('\n')[0]; | ||
text = text.replace(beginning, capitalize(beginning)); | ||
_loop(sentence); | ||
} | ||
@@ -156,3 +168,3 @@ } catch (err) { | ||
return validateDescription(description, report, jsdocNode, sourceCode); | ||
return validateDescription(description, report, jsdocNode, sourceCode, tag.tag); | ||
}); | ||
@@ -159,0 +171,0 @@ }); |
@@ -1,1 +0,1 @@ | ||
{"author":{"email":"gajus@gajus.com","name":"Gajus Kuizinas","url":"http://gajus.com"},"dependencies":{"comment-parser":"^0.4.2","lodash":"^4.17.4"},"description":"JSDoc linting rules for ESLint.","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-flow-strip-types":"^6.22.0","babel-preset-env":"^1.6.0","babel-preset-es2015":"^6.24.1","babel-register":"^6.26.0","chai":"^4.1.2","eslint":"^4.7.2","eslint-config-canonical":"^9.3.1","gitdown":"^2.5.1","globby":"^6.1.0","mocha":"^3.5.3","semantic-release":"^8.0.3"},"engines":{"node":">=4"},"keywords":["eslint","plugin","jsdoc"],"license":"BSD-3-Clause","main":"./dist/index.js","name":"eslint-plugin-jsdoc","peerDependencies":{"eslint":">=0.8.0"},"repository":{"type":"git","url":"https://github.com/gajus/eslint-plugin-jsdoc"},"scripts":{"add-assertions":"babel-node --presets es2015 ./bin/readme-assertions","build":"NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps","generate-readme":"gitdown ./.README/README.md --output-file ./README.md && npm run add-assertions","lint":"eslint ./src ./test","test":"mocha --recursive --compilers js:babel-register"},"version":"3.4.0"} | ||
{"author":{"email":"gajus@gajus.com","name":"Gajus Kuizinas","url":"http://gajus.com"},"dependencies":{"comment-parser":"^0.4.2","lodash":"^4.17.4"},"description":"JSDoc linting rules for ESLint.","devDependencies":{"babel-cli":"^6.26.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-flow-strip-types":"^6.22.0","babel-preset-env":"^1.6.0","babel-preset-es2015":"^6.24.1","babel-register":"^6.26.0","chai":"^4.1.2","eslint":"^4.7.2","eslint-config-canonical":"^9.3.1","gitdown":"^2.5.1","globby":"^6.1.0","mocha":"^3.5.3","semantic-release":"^8.0.3"},"engines":{"node":">=4"},"keywords":["eslint","plugin","jsdoc"],"license":"BSD-3-Clause","main":"./dist/index.js","name":"eslint-plugin-jsdoc","peerDependencies":{"eslint":">=0.8.0"},"repository":{"type":"git","url":"https://github.com/gajus/eslint-plugin-jsdoc"},"scripts":{"add-assertions":"babel-node --presets es2015 ./bin/readme-assertions","build":"NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps","generate-readme":"gitdown ./.README/README.md --output-file ./README.md && npm run add-assertions","lint":"eslint ./src ./test","test":"mocha --recursive --compilers js:babel-register"},"version":"3.4.1"} |
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
111382
0.99%862
1.17%