Skip to content

Commit

Permalink
Jsdoc Comments (#26)
Browse files Browse the repository at this point in the history
* Update eslint package to fix warning message

* Add exit survey pacakge

* exit survey

* se survey_function to format survey text

* edit exit survey question titles and descriptions

* change question names and MC values to match EFP names

* add withdrawal and feedback questions

* Change package name, exit survey parameters

* Added privacy and databrary params

* Get study to add to withdraw copu

* disable the video sharing questions if video withdrawal is true

* Add MD link

* Add global data store

* fix withdrawal question value in data and logic for enabling/disabling the other video-related questions

* add validation for child birthdate: cannot be a future date

* Update root package

* Update survey to use new data structure

* First pass at tests

* Add data finish function

* Update tests

* Update versions of deps

* freeze loaded data

* Add s3 from EFP

* Add s3 class

* Update linters to support jsdoc comments

* First pass at code documentation

* Change functions to arrow functions

* Fix tests

* fix typos

* minor edits to JSdoc comments

* Format and comment changes

* Test updates

* Moved user function to run first

* A few rebase errors

---------

Co-authored-by: Becky Gilbert <[email protected]>
  • Loading branch information
okaycj and becky-gilbert committed May 22, 2024
1 parent 30a2b1d commit 920be3e
Show file tree
Hide file tree
Showing 19 changed files with 1,494 additions and 361 deletions.
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"plugins": [
"prettier-plugin-packagejson",
"prettier-plugin-sort-json",
"prettier-plugin-organize-imports"
"prettier-plugin-organize-imports",
"prettier-plugin-jsdoc"
]
}
30 changes: 29 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,44 @@
import pluginJs from "@eslint/js";
import prettierConfig from "eslint-config-prettier";
import jsdoc from "eslint-plugin-jsdoc";
import globals from "globals";
import tseslint from "typescript-eslint";

export default [
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
jsdoc.configs["flat/recommended-typescript-error"],
{
rules: {
"require-await": "error",
"@typescript-eslint/explicit-member-accessibility": "error",
"prefer-arrow-callback": ["error", { allowNamedFunctions: true }],
"func-style": ["error", "expression", { allowArrowFunctions: true }],
},
ignores: ["packages/data/src/s3/**"],
},
{
plugins: {
jsdoc,
},
rules: {
"jsdoc/tag-lines": "off",
"jsdoc/require-description-complete-sentence": "error",
"jsdoc/require-description": "error",
"jsdoc/require-hyphen-before-param-description": "error",
"jsdoc/require-jsdoc": [
"error",
{
require: {
FunctionDeclaration: true,
MethodDefinition: true,
ClassDeclaration: true,
ArrowFunctionExpression: true,
FunctionExpression: true,
},
},
],
},
},
prettierConfig,
];
Loading

0 comments on commit 920be3e

Please sign in to comment.