summaryrefslogtreecommitdiff
path: root/modules/script
diff options
context:
space:
mode:
authorEvan Welsh <noreply@evanwelsh.com>2020-10-28 18:45:42 -0500
committerPhilip Chimento <philip.chimento@gmail.com>2020-11-20 14:34:06 -0800
commit156cbb8909828c3333b13bc21a101d0dc075ab5b (patch)
tree616f3490da41f97bb1cec2e470c4903fd5f91409 /modules/script
parent869e41ed0595160dae47de7e1eabde861dd4aac2 (diff)
downloadgjs-156cbb8909828c3333b13bc21a101d0dc075ab5b.tar.gz
lint: Switch to eslint-plugin-jsdoc and remove lint-condo.
ESLint has deprecated jsdoc and instead recommends eslint-plugin-jsdoc. lint-condo does not have eslint-plugin-jsdoc. We only use lint-condo for eslint currently and it is simpler to instead use yarn to install and manage eslint. Some module files had JSDoc comments which violated the jsdoc plugin's more stringent rules.
Diffstat (limited to 'modules/script')
-rw-r--r--modules/script/.eslintrc.yml5
-rw-r--r--modules/script/_bootstrap/.eslintrc.yml3
-rw-r--r--modules/script/_legacy.js1
-rw-r--r--modules/script/lang.js5
-rw-r--r--modules/script/package.js5
-rw-r--r--modules/script/tweener/.eslintrc.yml10
-rw-r--r--modules/script/tweener/equations.js2
7 files changed, 26 insertions, 5 deletions
diff --git a/modules/script/.eslintrc.yml b/modules/script/.eslintrc.yml
new file mode 100644
index 00000000..f0c02d69
--- /dev/null
+++ b/modules/script/.eslintrc.yml
@@ -0,0 +1,5 @@
+---
+# SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
+# SPDX-FileCopyrightText: 2020 Evan Welsh <noreply@evanwelsh.com>
+rules:
+ jsdoc/require-jsdoc: 'off'
diff --git a/modules/script/_bootstrap/.eslintrc.yml b/modules/script/_bootstrap/.eslintrc.yml
index 420f17ab..4c8d6831 100644
--- a/modules/script/_bootstrap/.eslintrc.yml
+++ b/modules/script/_bootstrap/.eslintrc.yml
@@ -1,6 +1,7 @@
---
# SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
-extends: "../../../.eslintrc.yml"
+rules:
+ require-jsdoc: "off"
globals:
log: "off"
logError: "off"
diff --git a/modules/script/_legacy.js b/modules/script/_legacy.js
index 656696af..135d2517 100644
--- a/modules/script/_legacy.js
+++ b/modules/script/_legacy.js
@@ -162,6 +162,7 @@ Class.prototype._construct = function (params, ...otherArgs) {
/**
* Check whether this class conforms to the interface "iface".
+ *
* @param {object} iface a Lang.Interface
* @returns {boolean} whether this class implements iface
*/
diff --git a/modules/script/lang.js b/modules/script/lang.js
index 6f429ffc..98082995 100644
--- a/modules/script/lang.js
+++ b/modules/script/lang.js
@@ -43,10 +43,11 @@ function copyPublicProperties(source, dest) {
/**
* Binds obj to callback. Makes it possible to refer to "obj"
* using this within the callback.
+ *
* @param {object} obj the object to bind
- * @param {function} callback callback to bind obj in
+ * @param {Function} callback callback to bind obj in
* @param {*} bindArguments additional arguments to the callback
- * @returns {function} a new callback
+ * @returns {Function} a new callback
*/
function bind(obj, callback, ...bindArguments) {
if (typeof obj !== 'object') {
diff --git a/modules/script/package.js b/modules/script/package.js
index 25aacdb8..28cfe542 100644
--- a/modules/script/package.js
+++ b/modules/script/package.js
@@ -182,6 +182,7 @@ function init(params) {
* single entry point.
* You must define a main(ARGV) function inside a main.js
* module in moduledir.
+ *
* @param {object} params see init()
*/
function start(params) {
@@ -211,6 +212,7 @@ function run(module) {
* `libs` must be an object whose keys are a typelib name,
* and values are the respective version. The empty string
* indicates any version.
+ *
* @param {object} libs the external dependencies to import
*/
function require(libs) {
@@ -221,6 +223,7 @@ function require(libs) {
/**
* As checkSymbol(), but exit with an error if the
* dependency cannot be satisfied.
+ *
* @param {string} lib an external dependency to import
* @param {string} [ver] version of the dependency
* @param {string} [symbol] symbol to check for
@@ -248,7 +251,7 @@ function requireSymbol(lib, ver, symbol) {
* @param {string} lib an external dependency to import
* @param {string} [ver] version of the dependency
* @param {string} [symbol] symbol to check for
- * @return {boolean} true if `lib` can be imported and provides `symbol`, false
+ * @returns {boolean} true if `lib` can be imported and provides `symbol`, false
* otherwise
*/
function checkSymbol(lib, ver, symbol) {
diff --git a/modules/script/tweener/.eslintrc.yml b/modules/script/tweener/.eslintrc.yml
new file mode 100644
index 00000000..7126b2f7
--- /dev/null
+++ b/modules/script/tweener/.eslintrc.yml
@@ -0,0 +1,10 @@
+---
+# SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
+# SPDX-FileCopyrightText: 2020 Evan Welsh <noreply@evanwelsh.com>
+rules:
+ jsdoc/require-param: 'off'
+ jsdoc/require-param-type: 'off'
+ jsdoc/require-returns: 'off'
+ jsdoc/require-jsdoc: 'off'
+ jsdoc/check-tag-names: 'off'
+ jsdoc/check-param-names: 'off'
diff --git a/modules/script/tweener/equations.js b/modules/script/tweener/equations.js
index 22838a14..c2003c87 100644
--- a/modules/script/tweener/equations.js
+++ b/modules/script/tweener/equations.js
@@ -1,5 +1,5 @@
/* -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil; -*- */
-/* eslint-disable no-unused-vars, valid-jsdoc */
+/* eslint-disable no-unused-vars */
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: 2008 litl, LLC.
// SPDX-FileCopyrightText: 2001 Robert Penner