Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
jscs-jsdoc
Advanced tools
jsdoc
plugin for jscs.
jscs-jsdoc
can be installed using npm
.
Install it globally if you are using globally installed jscs
npm -g install jscs-jsdoc
But better install it into your project
npm install jscs-jsdoc --save-dev
To use plugin you should add it to configuration file .jscsrc
:
{
"additionalRules": [
"node_modules/jscs-jsdoc/lib/rules/*.js"
],
"jsDoc": {
}
}
Enables JsDoc validation.
Type: Object
Values:
_underscored
function names"jsDoc": {
"checkParamNames": true,
"checkRedundantParams": true,
"requireParamTypes": true,
"checkReturnTypes": true,
"requireReturnTypes": true,
"checkTypes": true,
"checkRedundantReturns": true,
"checkRedundantAccess": true,
"leadingUnderscoreAccess": "private",
"enforceExistence": true
}
/**
* Adds style error to the list
*
* @private
* @param {String} message
* @param {Number|Object} line
* @param {Number} [column]
* @returns {String[]}
*/
_add: function(message, line, column) {
return ['foo', 'bar'];
}
/**
* Adds style error to the list
*
* @protected
* @param {String} message
* @param {Number,Object} line
* @param {Number} [column]
* @returns {String}
*/
_add: function() {
if (true) {
return false;
}
return 15;
}
NOT SUPPORTED ATM. SORRY.
File jscs-jsdoc-browser.js contains browser-compatible version of jscs-jsdoc
.
Download and include jscs-jsdoc-browser.js
into your page just after jscs-browser.js
.
<script src="jscs-browser.js"></script>
<script src="jscs-jsdoc-browser.js"></script>
<script>
var checker = new JscsStringChecker();
checker.registerDefaultRules();
checker.configure({'jsDoc': {/* ... */}});
var errors = checker.checkString('var x, y = 1;');
errors.getErrorList().forEach(function (error) {
console.log(errors.explainError(error));
});
</script>
[v0.0.17] - 2014-11-10
5c963e0142
] - checkRedundantReturns: add test for issue #34 (Alexej Yaroshevich)e794e86a31
] - checkReturnTypes: add 'class' as valid custom object (Alexej Yaroshevich)f74570c608
] - checkTypes: split rule logic and add checkin for other typed tags (Alexej Yaroshevich)593053c50d
] - split returns to separated rules (Alexej Yaroshevich)a3ecd830b7
] - fix location issues in jsdoc and split param rules (Alexej Yaroshevich)9ef4bcbf37
] - split param tests to separated files (for simplicity) (Alexej Yaroshevich)db9c731a8a
] - reworking jsdoc-helpers, introducing jsdoctypeparser (Alexej Yaroshevich)d360309965
] - rules api refactoring (Alexej Yaroshevich)165ed20dc4
] - basic return rules: refactor tests (Alexej Yaroshevich)d846a5b1da
] - tests: fix linting directories to lib and test (Alexej Yaroshevich)FAQs
JSCS jsdoc plugin
The npm package jscs-jsdoc receives a total of 30,015 weekly downloads. As such, jscs-jsdoc popularity was classified as popular.
We found that jscs-jsdoc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.