Skip to content

Commit

Permalink
add better jsdoc rules
Browse files Browse the repository at this point in the history
  • Loading branch information
bkendall committed Nov 7, 2019
1 parent 7df5864 commit 5123e1e
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@ module.exports = {
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:jsdoc/recommended",
"google",
"prettier",
"prettier/@typescript-eslint",
],
"rules": {
"jsdoc/newline-after-description": "off",
"prettier/prettier": "error",
"valid-jsdoc": "off", // This is deprecated but included in recommended configs.
"no-prototype-builtins": "warn", // TODO(bkendall): remove, allow to error.
"no-restricted-globals": ["error", "name", "length"],
"no-useless-escape": "warn", // TODO(bkendall): remove, allow to error.
"prefer-const": "warn", // TODO(bkendall): remove, allow to error.
"prefer-promise-reject-errors": "warn", // TODO(bkendall): remove, allow to error.
"require-jsdoc": "warn", // TODO(bkendall): remove, allow to error.
"valid-jsdoc": "warn", // TODO(bkendall): remove, allow to error.
},
"overrides": [
{
Expand All @@ -42,6 +44,8 @@ module.exports = {
"@typescript-eslint/require-await": "warn", // TODO(bkendall): remove, allow to error.
"@typescript-eslint/unbound-method": "warn", // TODO(bkendall): remove, allow to error.
"camelcase": "warn", // TODO(bkendall): remove, allow to error.
"jsdoc/require-param-type": "off",
"jsdoc/require-returns-type": "off",
"new-cap": "warn", // TODO(bkendall): remove, allow to error.
"no-case-declarations": "warn", // TODO(bkendall): remove, allow to error.
"no-constant-condition": "warn", // TODO(bkendall): remove, allow to error.
Expand Down Expand Up @@ -86,6 +90,14 @@ module.exports = {
"plugins": [
"prettier",
"@typescript-eslint",
"jsdoc",
],
"settings": {
"jsdoc": {
"tagNamePreference": {
"returns": "return"
}
}
},
"parser": "@typescript-eslint/parser",
};
55 changes: 55 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
"eslint": "^6.4.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^6.3.0",
"eslint-plugin-jsdoc": "^17.1.0",
"eslint-plugin-prettier": "^3.0.0",
"firebase": "^7.1.0",
"firebase-admin": "^8.6.1",
Expand Down

0 comments on commit 5123e1e

Please sign in to comment.