Permalink
Browse files

Add JSDoc lint to ESLint

  • Loading branch information...
1 parent 9434289 commit a98d979380d73526f6e0e080313b094d427a7f93 @ai ai committed Jun 18, 2016
Showing with 5 additions and 4 deletions.
  1. +1 −0 .eslintrc
  2. +4 −4 lib/warning.es6
View
@@ -3,6 +3,7 @@
"extends": "eslint-config-postcss",
"rules": {
"consistent-return": [0],
+ "valid-jsdoc": [2],
"complexity": [0]
},
"env": {
View
@@ -9,8 +9,8 @@
class Warning {
/**
- * @param {string} text - warning message
- * @param {Object} opts - warning options
+ * @param {string} text - warning message
+ * @param {Object} [opts] - warning options
* @param {Node} opts.node - CSS node that caused the warning
* @param {string} opts.word - word in CSS source that caused the warning
* @param {number} opts.index - index in CSS node string that caused
@@ -49,12 +49,12 @@ class Warning {
}
/**
- * Returns a string with the error position and message.
+ * Returns a warning position and message.
*
* @example
* warning.toString() //=> 'postcss-lint:a.css:10:14: Avoid !important'
*
- * @return {string}
+ * @return {string} warning position and message
*/
toString() {
if ( this.node ) {

0 comments on commit a98d979

Please sign in to comment.