qooxdoo / qooxdoo-compiler

Compiler for Qooxdoo, 100% javascript
MIT License
36 stars 23 forks source link

Provide jsdoc linting #441

Open cboulanger opened 5 years ago

cboulanger commented 5 years ago

Add jsdoc linting to qx lint via https://eslint.org/docs/rules/valid-jsdoc - It should only output warnings, not errors so that it won't break automatic testing.

hkollmann commented 5 years ago

https://eslint.org/docs/rules/valid-jsdoc is deprecated - we should use eslint-plugin-jsdoc: https://github.com/gajus/eslint-plugin-jsdoc

see https://eslint.org/blog/2018/11/jsdoc-end-of-life

cboulanger commented 5 years ago

Here are the settings that I found useful for qooxdoo code at this point:

  "extends": [
    "@qooxdoo/qx"
  ],
  "plugins": ["jsdoc"],
  "rules": {
    "jsdoc/check-param-names": 1,
    "jsdoc/check-types": "off", // for example, "Boolean -> boolean"
    "jsdoc/require-jsdoc": 1,
    "jsdoc/require-param": 1,
    "jsdoc/require-param-description": "off",
    "jsdoc/require-param-name": 1,
    "jsdoc/require-param-type": "off",
    "jsdoc/require-returns-type": 1,
    "jsdoc/valid-types": 1
  },

This won't complain about @param varname {Type} which is not valid JSDoc, but required by the generator and the current APIViewer.