diff --git a/.eslintrc b/.eslintrc
index 2db5dd1e7ddfe..a388f57560c66 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -2,6 +2,7 @@
'plugins': [
'babel',
'promise',
+ 'jsdoc',
],
'env': {
'browser': true,
@@ -191,7 +192,6 @@
'property': 'str',
'message': 'Use AMD module "core/str" or M.util.get_string()'
}],
-
},
overrides: [
{
@@ -200,7 +200,23 @@
rules: {
'no-undef': 'off',
'no-unused-vars': 'off',
- 'no-unused-expressions': 'off'
+ 'no-unused-expressions': 'off',
+
+ // === JSDocs ===
+ "jsdoc/check-access": 'off',
+ "jsdoc/check-alignment": 'off',
+ "jsdoc/check-param-names": 'off',
+ "jsdoc/check-property-names": 'off',
+ "jsdoc/empty-tags": 'off',
+ "jsdoc/implements-on-classes": 'off',
+ "jsdoc/multiline-blocks": 'off',
+ "jsdoc/require-jsdoc": 'off',
+ "jsdoc/require-param": 'off',
+ "jsdoc/require-param-name": 'off',
+ "jsdoc/require-param-type": 'off',
+ "jsdoc/require-property": 'off',
+ "jsdoc/require-property-name": 'off',
+ "jsdoc/require-property-type": 'off',
}
},
{
@@ -238,7 +254,49 @@
// === Promises ===
// We have Promise now that we're using ES6.
'promise/no-native': 'off',
- 'promise/avoid-new': 'off'
+ 'promise/avoid-new': 'off',
+
+ // === JSDocs ===
+ "jsdoc/check-access": [
+ 'error',
+ ],
+ "jsdoc/check-alignment": 1, // Recommended.
+ "jsdoc/check-param-names": [
+ 'error',
+ ],
+ "jsdoc/check-property-names": [
+ 'error',
+ ],
+ "jsdoc/empty-tags": [
+ 'error',
+ ],
+ "jsdoc/implements-on-classes": [
+ 'error',
+ ],
+ "jsdoc/multiline-blocks": [
+ 'error',
+ ],
+ "jsdoc/require-jsdoc": [
+ 'error',
+ ],
+ "jsdoc/require-param": [
+ 'error',
+ ],
+ "jsdoc/require-param-name": [
+ 'error',
+ ],
+ "jsdoc/require-param-type": [
+ 'error',
+ ],
+ "jsdoc/require-property": [
+ 'error',
+ ],
+ "jsdoc/require-property-name": [
+ 'error',
+ ],
+ "jsdoc/require-property-type": [
+ 'error',
+ ],
},
parserOptions: {
'ecmaVersion': 9,
diff --git a/admin/tool/lp/amd/build/competency_rule.min.js.map b/admin/tool/lp/amd/build/competency_rule.min.js.map
index c3ec4debeb38f..1ca5191e83602 100644
--- a/admin/tool/lp/amd/build/competency_rule.min.js.map
+++ b/admin/tool/lp/amd/build/competency_rule.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["../src/competency_rule.js"],"names":["define","$","Rule","tree","_eventNode","_ready","Deferred","_tree","prototype","_competency","canConfig","hasChildren","id","getConfig","getType","Error","init","_load","injectTemplate","reject","promise","isValid","when","on","type","handler","setTargetCompetency","competency","_trigger","data","trigger","_triggerChange"],"mappings":"AAuBAA,OAAM,2BAAC,CAAC,QAAD,CAAD,CAAa,SAASC,CAAT,CAAY,CAa3B,GAAIC,CAAAA,CAAI,CAAG,SAASC,CAAT,CAAe,CACtB,KAAKC,UAAL,CAAkBH,CAAC,CAAC,OAAD,CAAnB,CACA,KAAKI,MAAL,CAAcJ,CAAC,CAACK,QAAF,EAAd,CACA,KAAKC,KAAL,CAAaJ,CAChB,CAJD,CAOAD,CAAI,CAACM,SAAL,CAAeC,WAAf,CAA6B,IAA7B,CAEAP,CAAI,CAACM,SAAL,CAAeJ,UAAf,CAA4B,IAA5B,CAEAF,CAAI,CAACM,SAAL,CAAeH,MAAf,CAAwB,IAAxB,CAEAH,CAAI,CAACM,SAAL,CAAeD,KAAf,CAAuB,IAAvB,CAQAL,CAAI,CAACM,SAAL,CAAeE,SAAf,CAA2B,UAAW,CAClC,MAAO,MAAKH,KAAL,CAAWI,WAAX,CAAuB,KAAKF,WAAL,CAAiBG,EAAxC,CACV,CAFD,CAYAV,CAAI,CAACM,SAAL,CAAeK,SAAf,CAA2B,UAAW,CAClC,MAAO,KACV,CAFD,CAYAX,CAAI,CAACM,SAAL,CAAeM,OAAf,CAAyB,UAAW,CAChC,KAAM,IAAIC,CAAAA,KAAJ,CAAU,iBAAV,CACT,CAFD,CAYAb,CAAI,CAACM,SAAL,CAAeQ,IAAf,CAAsB,UAAW,CAC7B,MAAO,MAAKC,KAAL,EACV,CAFD,CAWAf,CAAI,CAACM,SAAL,CAAeU,cAAf,CAAgC,UAAW,CACvC,MAAOjB,CAAAA,CAAC,CAACK,QAAF,GAAaa,MAAb,GAAsBC,OAAtB,EACV,CAFD,CAYAlB,CAAI,CAACM,SAAL,CAAea,OAAf,CAAyB,UAAW,CAChC,QACH,CAFD,CAWAnB,CAAI,CAACM,SAAL,CAAeS,KAAf,CAAuB,UAAW,CAC9B,MAAOhB,CAAAA,CAAC,CAACqB,IAAF,EACV,CAFD,CAWApB,CAAI,CAACM,SAAL,CAAee,EAAf,CAAoB,SAASC,CAAT,CAAeC,CAAf,CAAwB,CACxC,KAAKrB,UAAL,CAAgBmB,EAAhB,CAAmBC,CAAnB,CAAyBC,CAAzB,CACH,CAFD,CAUAvB,CAAI,CAACM,SAAL,CAAekB,mBAAf,CAAqC,SAASC,CAAT,CAAqB,CACtD,KAAKlB,WAAL,CAAmBkB,CACtB,CAFD,CAYAzB,CAAI,CAACM,SAAL,CAAeoB,QAAf,CAA0B,SAASJ,CAAT,CAAeK,CAAf,CAAqB,CAC3C,KAAKzB,UAAL,CAAgB0B,OAAhB,CAAwBN,CAAxB,CAA8B,CAACK,CAAD,CAA9B,CACH,CAFD,CAUA3B,CAAI,CAACM,SAAL,CAAeuB,cAAf,CAAgC,UAAW,CACvC,KAAKH,QAAL,CAAc,QAAd,CAAwB,IAAxB,CACH,CAFD,CAIA,MAAoD1B,CAAAA,CAEvD,CAzJK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see