From 48b77fa342e0a2be1d2b89b2dd7dfedc640be1fe Mon Sep 17 00:00:00 2001 From: George Raduta Date: Wed, 24 Jul 2024 16:13:40 +0200 Subject: [PATCH 1/3] Add new eslint configuration for migration to major v9 --- .eslintrc | 257 ------------ eslint.config.js | 306 ++++++++++++++ package-lock.json | 1014 ++++++++++++++++++++++++++++++++------------- package.json | 12 +- 4 files changed, 1048 insertions(+), 541 deletions(-) delete mode 100644 .eslintrc create mode 100644 eslint.config.js diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 5540787ec2..0000000000 --- a/.eslintrc +++ /dev/null @@ -1,257 +0,0 @@ -{ - "root": true, - "env": { - "es2020": true, - "node": true, - "browser": true - }, - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "module" - }, - "extends": [ - "eslint:recommended" - ], - "ignorePatterns": [ - "node_modules/", - "database/data/", - "lib/public/assets/", - "cpp-api-client/", - "tmp/" - ], - "rules": { - "array-bracket-newline": [ - "error", - { - "multiline": true - } - ], - "array-bracket-spacing": [ - "error", - "never", - { - "singleValue": false - } - ], - "array-element-newline": [ - "error", - "consistent" - ], - "arrow-body-style": [ - "error", - "as-needed" - ], - "arrow-parens": [ - "error", - "always" - ], - "brace-style": [ - "error", - "1tbs", - { - "allowSingleLine": false - } - ], - "capitalized-comments": [ - "error", - "always" - ], - "comma-dangle": [ - "error", - "always-multiline" - ], - "comma-spacing": [ - "error", - { - "before": false, - "after": true - } - ], - "comma-style": [ - "error", - "last" - ], - "computed-property-spacing": "error", - "curly": "error", - "dot-location": [ - "error", - "property" - ], - "eol-last": [ - "error", - "always" - ], - "function-call-argument-newline": [ - "error", - "consistent" - ], - "function-paren-newline": [ - "error", - "multiline" - ], - "indent": [ - "error", - 4, - { - "SwitchCase": 1 - } - ], - "init-declarations": "off", - "key-spacing": "error", - "keyword-spacing": "error", - "linebreak-style": "off", - "lines-around-comment": [ - "error", - { - "allowBlockStart": true, - "allowClassStart": true, - "beforeBlockComment": true - } - ], - "lines-between-class-members": [ - "error", - "always" - ], - "max-len": [ - "error", - { - "code": 145 - } - ], - "multiline-comment-style": [ - "error", - "starred-block" - ], - "no-console": "error", - "no-extra-parens": "error", - "no-implicit-coercion": "error", - "no-magic-numbers": "off", - "no-multi-spaces": "error", - "no-multiple-empty-lines": [ - "error", - { - "max": 1, - "maxBOF": 0, - "maxEOF": 0 - } - ], - "no-return-assign": "error", - "no-unused-vars": [ - "error", - { - "argsIgnorePattern": "^(_|((request|response|next)$))" - } - ], - "no-var": "error", - "no-trailing-spaces": "error", - "object-curly-spacing": [ - "error", - "always" - ], - "object-property-newline": [ - "error", - { - "allowAllPropertiesOnSameLine": true - } - ], - "one-var": [ - "error", - "never" - ], - "padded-blocks": [ - "error", - "never" - ], - "padding-line-between-statements": [ - "error", - { - "blankLine": "always", - "prev": "cjs-import", - "next": "*" - }, - { - "blankLine": "any", - "prev": "cjs-import", - "next": "cjs-import" - }, - { - "blankLine": "always", - "prev": "*", - "next": "cjs-export" - } - ], - "prefer-arrow-callback": [ - "error", - { - "allowUnboundThis": true - } - ], - "prefer-const": "error", - "prefer-destructuring": "error", - "prefer-object-spread": "error", - "prefer-template": "error", - "quote-props": [ - "error", - "as-needed" - ], - "quotes": [ - "error", - "single", - { - "avoidEscape": true - } - ], - "radix": "error", - "require-jsdoc": [ - "error", - { - "require": { - "FunctionDeclaration": true, - "MethodDefinition": true, - "ClassDeclaration": true, - "ArrowFunctionExpression": true, - "FunctionExpression": true - } - } - ], - "semi": "error", - "semi-style": [ - "error", - "last" - ], - "space-before-blocks": [ - "error", - { - "functions": "always", - "keywords": "always", - "classes": "always" - } - ], - "space-before-function-paren": [ - "error", - { - "anonymous": "always", - "named": "never", - "asyncArrow": "always" - } - ], - "space-infix-ops": "error", - "space-in-parens": [ - "error", - "never" - ], - "sort-keys": "off", - "sort-imports": "off", - "sort-vars": "off", - "template-curly-spacing": [ - "error", - "never" - ], - "valid-jsdoc": [ - "error", - { - "matchDescription": ".+" - } - ] - } -} diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000000..42dede4cd2 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,306 @@ +/** + * @license + * Copyright 2019-2020 CERN and copyright holders of ALICE O2. + * See http://alice-o2.web.cern.ch/copyright for details of the copyright holders. + * All rights not expressly granted are reserved. + * + * This software is distributed under the terms of the GNU General Public + * License v3 (GPL Version 3), copied verbatim in the file "COPYING". + * + * In applying this license CERN does not waive the privileges and immunities + * granted to it by virtue of its status as an Intergovernmental Organization + * or submit itself to any jurisdiction. + */ + +const globals = require('globals'); +const pluginJs = require('@eslint/js'); +const jsdoc = require('eslint-plugin-jsdoc'); +const stylisticJs = require('@stylistic/eslint-plugin-js'); + +module.exports = [ + { + ignores: [ + 'test/', + 'node_modules/', + 'database/data/', + 'lib/public/assets/', + 'cpp-api-client/', + 'tmp/', + '.nyc_output/', + ], + }, + jsdoc.configs['flat/recommended'], + pluginJs.configs.recommended, + { + plugins: { + jsdoc, + '@stylistic/js': stylisticJs, + }, + languageOptions: { + parserOptions: { + sourceType: 'module', + }, + globals: { + ...globals.browser, + ...globals.node, + ...globals.mocha, + process: 'readonly', + Model: 'readonly', + vnode: 'readonly', + Express: 'readonly', + setImmediate: 'readonly', + }, + }, + settings: { + jsdoc: { + tagNamePreference: { + returns: 'return', + }, + }, + }, + rules: { + 'arrow-body-style': ['error', 'as-needed'], + curly: 'error', + 'init-declarations': 'off', + 'no-console': 'error', + 'no-implicit-coercion': 'error', + 'no-return-assign': 'error', + 'no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^(_|((request|response|next)$))', + }, + ], + 'no-var': 'error', + 'one-var': [ + 'error', + 'never', + ], + 'prefer-arrow-callback': [ + 'error', + { + allowUnboundThis: true, + }, + ], + 'prefer-const': 'error', + 'prefer-destructuring': 'error', + 'prefer-object-spread': 'error', + 'prefer-template': 'error', + radix: 'error', + 'capitalized-comments': [ + 'error', + 'always', + ], + 'jsdoc/require-description': ['error'], + 'jsdoc/require-returns': [0], // TODO + 'jsdoc/require-jsdoc': [ + 'error', + { + require: { + FunctionDeclaration: true, + MethodDefinition: true, + ClassDeclaration: true, + ArrowFunctionExpression: false, // TODO + FunctionExpression: true, + }, + }, + ], + 'jsdoc/check-tag-names': ['off'], // TODO + 'jsdoc/check-values': ['off'], + 'jsdoc/check-types': ['off'], // TODO + 'jsdoc/require-property-description': ['off'], // TODO + 'jsdoc/no-multi-asterisks': ['off'], + 'jsdoc/no-undefined-types': ['off'], + 'jsdoc/no-defaults': ['off'], + // 'jsdoc/tag-lines': ['error', 'any', { startLines: 1 }], + 'jsdoc/tag-lines': ['off'], // TODO with above 0 or 1 + '@stylistic/js/array-bracket-newline': [ + 'error', + { + multiline: true, + }, + ], + '@stylistic/js/array-bracket-spacing': [ + 'error', + 'never', + { + singleValue: false, + }, + ], + '@stylistic/js/array-element-newline': [ + 'error', + 'consistent', + ], + '@stylistic/js/arrow-parens': [ + 'error', + 'always', + ], + '@stylistic/js/brace-style': [ + 'error', + '1tbs', + { + allowSingleLine: false, + }, + ], + '@stylistic/js/comma-dangle': [ + 'error', + 'always-multiline', + ], + '@stylistic/js/comma-spacing': [ + 'error', + { + before: false, + after: true, + }, + ], + '@stylistic/js/comma-style': [ + 'error', + 'last', + ], + '@stylistic/js/computed-property-spacing': 'error', + '@stylistic/js/dot-location': [ + 'error', + 'property', + ], + '@stylistic/js/eol-last': [ + 'error', + 'always', + ], + '@stylistic/js/function-call-argument-newline': [ + 'error', + 'consistent', + ], + '@stylistic/js/function-paren-newline': [ + 'error', + 'multiline', + ], + '@stylistic/js/indent': [ + 'error', + 4, + { + SwitchCase: 1, + }, + ], + '@stylistic/js/key-spacing': 'error', + '@stylistic/js/keyword-spacing': 'error', + '@stylistic/js/linebreak-style': 'off', + '@stylistic/js/lines-around-comment': [ + 'error', + { + allowBlockStart: true, + allowClassStart: true, + beforeBlockComment: true, + }, + ], + '@stylistic/js/lines-between-class-members': [ + 'error', + 'always', + ], + '@stylistic/js/max-len': [ + 'error', + { + code: 145, + }, + ], + '@stylistic/js/multiline-comment-style': [ + 'error', + 'starred-block', + ], + '@stylistic/js/no-extra-parens': [ + 'error', + 'all', + { + conditionalAssign: false, + ternaryOperandBinaryExpressions: false, + }, + ], + '@stylistic/js/no-multi-spaces': 'error', + '@stylistic/js/no-multiple-empty-lines': [ + 'error', + { + max: 1, + maxBOF: 0, + maxEOF: 0, + }, + ], + '@stylistic/js/no-trailing-spaces': 'error', + '@stylistic/js/object-curly-spacing': [ + 'error', + 'always', + ], + '@stylistic/js/object-property-newline': [ + 'error', + { + allowAllPropertiesOnSameLine: true, + }, + ], + '@stylistic/js/padded-blocks': [ + 'error', + 'never', + ], + '@stylistic/js/padding-line-between-statements': [ + 'error', + { + blankLine: 'always', + prev: 'cjs-import', + next: '*', + }, + { + blankLine: 'any', + prev: 'cjs-import', + next: 'cjs-import', + }, + { + blankLine: 'always', + prev: '*', + next: 'cjs-export', + }, + ], + '@stylistic/js/quote-props': [ + 'error', + 'as-needed', + ], + '@stylistic/js/quotes': [ + 'error', + 'single', + { + avoidEscape: true, + }, + ], + '@stylistic/js/semi': 'error', + '@stylistic/js/semi-style': [ + 'error', + 'last', + ], + '@stylistic/js/space-before-blocks': [ + 'error', + { + functions: 'always', + keywords: 'always', + classes: 'always', + }, + ], + '@stylistic/js/space-before-function-paren': [ + 'error', + { + anonymous: 'always', + named: 'never', + asyncArrow: 'always', + }, + ], + '@stylistic/js/space-infix-ops': 'error', + '@stylistic/js/space-in-parens': [ + 'error', + 'never', + ], + '@stylistic/js/template-curly-spacing': [ + 'error', + 'never', + ], + 'no-magic-numbers': 'off', // TODO: enable + 'sort-keys': 'off', + 'sort-imports': 'off', + 'sort-vars': 'off', + }, + }, +]; diff --git a/package-lock.json b/package-lock.json index f70d6da026..7b4a0e8bc8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,10 +38,14 @@ "umzug": "3.8.0" }, "devDependencies": { + "@eslint/js": "^9.7.0", + "@stylistic/eslint-plugin-js": "^2.3.0", "@types/d3": "7.4.0", "chai": "4.4.1", "date-and-time": "3.4.0", - "eslint": "8.57.0", + "eslint": "^9.7.0", + "eslint-plugin-jsdoc": "^48.7.0", + "globals": "^15.8.0", "js-yaml": "4.1.0", "mocha": "10.7.0", "nodemon": "3.1.3", @@ -531,6 +535,20 @@ "kuler": "^2.0.0" } }, + "node_modules/@es-joy/jsdoccomment": { + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.46.0.tgz", + "integrity": "sha512-C3Axuq1xd/9VqFZpW4YAzOx5O9q/LP46uIQy/iNDpHG3fmPa6TBtvfglMCs3RBiBxAIi0Go97r8+jvTt55XMyQ==", + "dev": true, + "dependencies": { + "comment-parser": "1.4.1", + "esquery": "^1.6.0", + "jsdoc-type-pratt-parser": "~4.0.0" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.2.0.tgz", @@ -547,24 +565,61 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.17.1.tgz", + "integrity": "sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==", + "dev": true, + "dependencies": { + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@eslint/config-array/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -572,16 +627,16 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/@eslint/eslintrc/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -595,6 +650,18 @@ } } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/eslintrc/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -602,12 +669,21 @@ "dev": true }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "9.7.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.7.0.tgz", + "integrity": "sha512-ChuWDQenef8OSFnvuxv0TCVxEwmu3+hPNKvM9B34qpM0rDRbjL8t5QkQeHHeAfsKQjuH9wS82WeCi1J/owatng==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/@grpc/grpc-js": { @@ -731,43 +807,6 @@ "@hapi/hoek": "^9.0.0" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "dev": true, - "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@humanwhocodes/config-array/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -781,11 +820,18 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "dev": true + "node_modules/@humanwhocodes/retry": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", + "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "dev": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", @@ -979,6 +1025,18 @@ "node": ">= 8" } }, + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -1227,6 +1285,36 @@ "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, + "node_modules/@stylistic/eslint-plugin-js": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.3.0.tgz", + "integrity": "sha512-lQwoiYb0Fs6Yc5QS3uT8+T9CPKK2Eoxc3H8EnYJgM26v/DgtW+1lvy2WNgyBflU+ThShZaHm3a6CdD9QeKx23w==", + "dev": true, + "dependencies": { + "@types/eslint": "^8.56.10", + "acorn": "^8.11.3", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, + "node_modules/@stylistic/eslint-plugin-js/node_modules/eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", @@ -1507,12 +1595,34 @@ "@types/ms": "*" } }, + "node_modules/@types/eslint": { + "version": "8.56.11", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.11.tgz", + "integrity": "sha512-sVBpJMf7UPo/wGecYOpk2aQya2VUGeHhe38WG7/mN5FufNSubf5VT9Uh9Uyp8/eLJpu1/tuhJ/qTo4mhSB4V4Q==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, "node_modules/@types/geojson": { "version": "7946.0.8", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.8.tgz", "integrity": "sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA==", "inBundle": true }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "node_modules/@types/long": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", @@ -1553,12 +1663,6 @@ "@types/node": "*" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -1579,9 +1683,9 @@ } }, "node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1730,6 +1834,15 @@ "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", "dev": true }, + "node_modules/are-docs-informative": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", + "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", + "dev": true, + "engines": { + "node": ">=14" + } + }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -2405,6 +2518,15 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, + "node_modules/comment-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", + "dev": true, + "engines": { + "node": ">= 12.0.0" + } + }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -3154,18 +3276,6 @@ "node": ">=0.3.1" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dotenv": { "version": "16.4.5", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", @@ -3311,6 +3421,12 @@ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true + }, "node_modules/es5-ext": { "version": "0.10.62", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", @@ -3411,41 +3527,37 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "9.7.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.7.0.tgz", + "integrity": "sha512-FzJ9D/0nGiCGBf8UXO/IGLTgLVzIxze1zpfA8Ton2mjLovXdAPlYDv+MQDcqj3TmrhAGYfOpz9RfR+ent0AgAw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.17.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.7.0", "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.3.0", "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.0.2", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.1.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", @@ -3459,23 +3571,94 @@ "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + } + }, + "node_modules/eslint-plugin-jsdoc": { + "version": "48.8.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.8.3.tgz", + "integrity": "sha512-AtIvwwW9D17MRkM0Z0y3/xZYaa9mdAvJrkY6fU/HNUwGbmMtHVvK4qRM9CDixGVtfNrQitb8c6zQtdh6cTOvLg==", + "dev": true, + "dependencies": { + "@es-joy/jsdoccomment": "~0.46.0", + "are-docs-informative": "^0.0.2", + "comment-parser": "1.4.1", + "debug": "^4.3.5", + "escape-string-regexp": "^4.0.0", + "esquery": "^1.6.0", + "parse-imports": "^2.1.1", + "semver": "^7.6.3", + "spdx-expression-parse": "^4.0.0", + "synckit": "^0.9.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/eslint-plugin-jsdoc/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", + "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -3522,6 +3705,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -3553,17 +3748,29 @@ "dev": true }, "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", + "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", "dev": true, "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.12.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.0.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -3583,9 +3790,9 @@ } }, "node_modules/esquery": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", - "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -3857,15 +4064,15 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -3941,22 +4148,22 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" + "flatted": "^3.2.9", + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", - "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "node_modules/fn.name": { @@ -4256,27 +4463,12 @@ } }, "node_modules/globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globals/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "version": "15.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.8.0.tgz", + "integrity": "sha512-VZAJ4cewHTExBWDHR6yptdIBlx9YSSZuwojj9Nt5mBRXQzrKakDsVKQ1J63sklLvzAJm0X5+RpO4i3Y2hcOnFw==", "dev": true, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4288,12 +4480,6 @@ "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", "dev": true }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -4494,9 +4680,9 @@ ] }, "node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -5023,6 +5209,15 @@ "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", "dev": true }, + "node_modules/jsdoc-type-pratt-parser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", + "integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==", + "dev": true, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -5035,6 +5230,12 @@ "node": ">=4" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -5150,6 +5351,15 @@ "node": ">=14.0.0" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kuler": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", @@ -6331,6 +6541,19 @@ "node": ">=6" } }, + "node_modules/parse-imports": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/parse-imports/-/parse-imports-2.1.1.tgz", + "integrity": "sha512-TDT4HqzUiTMO1wJRwg/t/hYk8Wdp3iF/ToMIlAoVQfL1Xs/sTxq1dKWSMjMbQmIarfWKymOyly40+zmPHXMqCA==", + "dev": true, + "dependencies": { + "es-module-lexer": "^1.5.3", + "slashes": "^3.0.12" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -7520,6 +7743,12 @@ "node": ">=8" } }, + "node_modules/slashes": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/slashes/-/slashes-3.0.12.tgz", + "integrity": "sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==", + "dev": true + }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -7607,6 +7836,28 @@ "node": ">=8" } }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", + "dev": true + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -7826,6 +8077,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/synckit": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", + "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==", + "dev": true, + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/tar-fs": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", @@ -8863,6 +9130,17 @@ "kuler": "^2.0.0" } }, + "@es-joy/jsdoccomment": { + "version": "0.46.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.46.0.tgz", + "integrity": "sha512-C3Axuq1xd/9VqFZpW4YAzOx5O9q/LP46uIQy/iNDpHG3fmPa6TBtvfglMCs3RBiBxAIi0Go97r8+jvTt55XMyQ==", + "dev": true, + "requires": { + "comment-parser": "1.4.1", + "esquery": "^1.6.0", + "jsdoc-type-pratt-parser": "~4.0.0" + } + }, "@eslint-community/eslint-utils": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.2.0.tgz", @@ -8873,21 +9151,49 @@ } }, "@eslint-community/regexpp": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", "dev": true }, + "@eslint/config-array": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.17.1.tgz", + "integrity": "sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==", + "dev": true, + "requires": { + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "dependencies": { + "debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -8896,14 +9202,20 @@ }, "dependencies": { "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, "requires": { "ms": "2.1.2" } }, + "globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -8913,9 +9225,15 @@ } }, "@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "9.7.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.7.0.tgz", + "integrity": "sha512-ChuWDQenef8OSFnvuxv0TCVxEwmu3+hPNKvM9B34qpM0rDRbjL8t5QkQeHHeAfsKQjuH9wS82WeCi1J/owatng==", + "dev": true + }, + "@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", "dev": true }, "@grpc/grpc-js": { @@ -9004,44 +9322,16 @@ "@hapi/hoek": "^9.0.0" } }, - "@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" - }, - "dependencies": { - "debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, "@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true }, - "@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "@humanwhocodes/retry": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", + "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", "dev": true }, "@istanbuljs/load-nyc-config": { @@ -9185,6 +9475,12 @@ "fastq": "^1.6.0" } }, + "@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -9391,6 +9687,26 @@ "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, + "@stylistic/eslint-plugin-js": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.3.0.tgz", + "integrity": "sha512-lQwoiYb0Fs6Yc5QS3uT8+T9CPKK2Eoxc3H8EnYJgM26v/DgtW+1lvy2WNgyBflU+ThShZaHm3a6CdD9QeKx23w==", + "dev": true, + "requires": { + "@types/eslint": "^8.56.10", + "acorn": "^8.11.3", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.0.1" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "dev": true + } + } + }, "@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", @@ -9669,11 +9985,33 @@ "@types/ms": "*" } }, + "@types/eslint": { + "version": "8.56.11", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.11.tgz", + "integrity": "sha512-sVBpJMf7UPo/wGecYOpk2aQya2VUGeHhe38WG7/mN5FufNSubf5VT9Uh9Uyp8/eLJpu1/tuhJ/qTo4mhSB4V4Q==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, "@types/geojson": { "version": "7946.0.8", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.8.tgz", "integrity": "sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA==" }, + "@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "@types/long": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", @@ -9709,12 +10047,6 @@ "@types/node": "*" } }, - "@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true - }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -9731,9 +10063,9 @@ } }, "acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true }, "acorn-jsx": { @@ -9841,6 +10173,12 @@ "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", "dev": true }, + "are-docs-informative": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", + "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", + "dev": true + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -10328,6 +10666,12 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, + "comment-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", + "dev": true + }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -10841,15 +11185,6 @@ "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, "dotenv": { "version": "16.4.5", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", @@ -10969,6 +11304,12 @@ } } }, + "es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true + }, "es5-ext": { "version": "0.10.62", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", @@ -11048,41 +11389,37 @@ } }, "eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "9.7.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.7.0.tgz", + "integrity": "sha512-FzJ9D/0nGiCGBf8UXO/IGLTgLVzIxze1zpfA8Ton2mjLovXdAPlYDv+MQDcqj3TmrhAGYfOpz9RfR+ent0AgAw==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.17.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.7.0", "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.3.0", "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.0.2", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.1.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", @@ -11108,6 +11445,12 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, + "eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "dev": true + }, "glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -11136,10 +11479,57 @@ } } }, + "eslint-plugin-jsdoc": { + "version": "48.8.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.8.3.tgz", + "integrity": "sha512-AtIvwwW9D17MRkM0Z0y3/xZYaa9mdAvJrkY6fU/HNUwGbmMtHVvK4qRM9CDixGVtfNrQitb8c6zQtdh6cTOvLg==", + "dev": true, + "requires": { + "@es-joy/jsdoccomment": "~0.46.0", + "are-docs-informative": "^0.0.2", + "comment-parser": "1.4.1", + "debug": "^4.3.5", + "escape-string-regexp": "^4.0.0", + "esquery": "^1.6.0", + "parse-imports": "^2.1.1", + "semver": "^7.6.3", + "spdx-expression-parse": "^4.0.0", + "synckit": "^0.9.1" + }, + "dependencies": { + "debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true + } + } + }, "eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", + "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -11153,14 +11543,22 @@ "dev": true }, "espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", + "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", "dev": true, "requires": { - "acorn": "^8.9.0", + "acorn": "^8.12.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.0.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "dev": true + } } }, "esprima": { @@ -11170,9 +11568,9 @@ "dev": true }, "esquery": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz", - "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -11379,12 +11777,12 @@ } }, "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "requires": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" } }, "fill-range": { @@ -11437,19 +11835,19 @@ "dev": true }, "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" + "flatted": "^3.2.9", + "keyv": "^4.5.4" } }, "flatted": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", - "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "fn.name": { @@ -11654,21 +12052,10 @@ } }, "globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - }, - "dependencies": { - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - } - } + "version": "15.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.8.0.tgz", + "integrity": "sha512-VZAJ4cewHTExBWDHR6yptdIBlx9YSSZuwojj9Nt5mBRXQzrKakDsVKQ1J63sklLvzAJm0X5+RpO4i3Y2hcOnFw==", + "dev": true }, "graceful-fs": { "version": "4.2.4", @@ -11676,12 +12063,6 @@ "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", "dev": true }, - "graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -11815,9 +12196,9 @@ "dev": true }, "ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true }, "ignore-by-default": { @@ -12217,12 +12598,24 @@ "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", "dev": true }, + "jsdoc-type-pratt-parser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", + "integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==", + "dev": true + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -12313,6 +12706,15 @@ "resolved": "https://registry.npmjs.org/kafkajs/-/kafkajs-2.2.3.tgz", "integrity": "sha512-JmzIiLHE/TdQ7b4I2B/DNMtfhTh66fmEaEg7gGkyQXBC6f1A7I2jSjeUsVIJfC8d9YcEIURyBjtOEKBO5OHVhg==" }, + "keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "requires": { + "json-buffer": "3.0.1" + } + }, "kuler": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", @@ -13180,6 +13582,16 @@ "callsites": "^3.0.0" } }, + "parse-imports": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/parse-imports/-/parse-imports-2.1.1.tgz", + "integrity": "sha512-TDT4HqzUiTMO1wJRwg/t/hYk8Wdp3iF/ToMIlAoVQfL1Xs/sTxq1dKWSMjMbQmIarfWKymOyly40+zmPHXMqCA==", + "dev": true, + "requires": { + "es-module-lexer": "^1.5.3", + "slashes": "^3.0.12" + } + }, "parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -14036,6 +14448,12 @@ } } }, + "slashes": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/slashes/-/slashes-3.0.12.tgz", + "integrity": "sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==", + "dev": true + }, "smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -14100,6 +14518,28 @@ "which": "^2.0.1" } }, + "spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "spdx-expression-parse": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", + "dev": true + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -14250,6 +14690,16 @@ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, + "synckit": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", + "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==", + "dev": true, + "requires": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + } + }, "tar-fs": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", diff --git a/package.json b/package.json index 1f88228f40..83920462b5 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,11 @@ "scripts": { "coverage": "nyc npm test && npm run coverage:report", "coverage:report": "nyc report --reporter=html --reporter=json", - "lint": "eslint . --ext .js", + + + "lint": "eslint --config eslint.config.js ", + + "lint:fix": "npm run lint -- --fix", "sequelize": "sequelize-cli", "start:dev": "nodemon --ignore 'lib/public/**/*.js' lib/main.js", @@ -46,7 +50,11 @@ "@types/d3": "7.4.0", "chai": "4.4.1", "date-and-time": "3.4.0", - "eslint": "8.57.0", + "@eslint/js": "^9.7.0", + "@stylistic/eslint-plugin-js": "^2.3.0", + "eslint": "^9.7.0", + "eslint-plugin-jsdoc": "^48.7.0", + "globals": "^15.8.0", "js-yaml": "4.1.0", "mocha": "10.7.0", "nodemon": "3.1.3", From 5cca1d010cea148524e87d39515205abe3cae4a8 Mon Sep 17 00:00:00 2001 From: George Raduta Date: Wed, 24 Jul 2024 16:13:54 +0200 Subject: [PATCH 2/3] Adapt code base to new eslint rules conventions --- lib/database/adapters/LogRunsAdapter.js | 10 +- lib/database/adapters/LogTagsAdapter.js | 10 +- lib/database/adapters/RunDetectorsAdapter.js | 11 +- .../migrations/20200505214213-create-run.js | 2 +- .../migrations/20220125151025-create-tag.js | 1 - .../migrations/20220309132744-create-tag.js | 1 - ...0220404093143-create-environments-table.js | 1 - ...20511102048-update-run-detectors-column.js | 3 +- ...20220513075839-create-reason-type-table.js | 1 - .../20220513153414-crete-eor-reason-table.js | 1 - ...convert-run-detectors-to-separate-table.js | 4 +- .../20230120160345-add-environment-history.js | 115 ++++++++---------- ...30213082905-run-quality-unknown-to-null.js | 14 +-- .../20230411123947-add-tag-description.js | 14 +-- .../20230424121312-add-dpl-process.js | 16 +-- ...020-add-qc-flag-effective-periods-table.js | 6 + lib/database/models/qcFlagType.js | 5 +- lib/database/models/run.js | 9 +- lib/database/models/tag.js | 5 +- lib/database/models/typedefs/SequelizeRun.js | 1 - .../QcFlagEffectivePeriodRepository.js | 1 + lib/database/utilities/QueryBuilder.js | 1 + lib/domain/entities/Log.js | 3 +- lib/presentation/log/toTreeView.js | 1 - .../AliceL3AndDipoleFilteringModel.js | 1 - .../common/filters/TimeRangeInputModel.js | 13 +- .../Filters/common/filters/amountFilter.js | 1 - lib/public/components/NavBar/index.js | 6 +- .../components/Pagination/PaginationModel.js | 1 - .../Pagination/paginationComponent.js | 9 +- .../components/common/StatefulComponent.js | 1 - .../chart/barChart/barChartComponent.js | 2 - .../chart/lineChart/lineChartComponent.js | 8 +- .../chart/rendering/BarChartRenderer.js | 2 - .../common/chart/rendering/ChartRenderer.js | 1 - .../chart/rendering/LineChartRenderer.js | 2 - .../rendering/axis/BottomAxisRenderer.js | 5 - .../chart/rendering/axis/LeftAxisRenderer.js | 6 - .../form/inputs/DateTimeInputComponent.js | 9 +- .../common/form/inputs/DateTimeInputModel.js | 2 +- .../form/inputs/TimestampInputComponent.js | 4 +- ...aliceMagnetsConfigurationsSnapshotsForm.js | 1 - .../components/common/markdown/markdown.js | 12 +- .../components/common/navigation/frontLink.js | 1 - .../common/panel/LabelPanelHeaderComponent.js | 19 ++- .../components/common/panel/PanelComponent.js | 6 +- .../common/popover/PopoverEngine.js | 4 +- .../common/popover/overflowBalloon.js | 8 +- .../components/common/popover/popover.js | 16 +-- .../popover/popoverPreConfigurations.js | 12 +- .../dropdown/SelectionDropdownModel.js | 1 - .../selection/dropdown/selectionDropdown.js | 15 ++- lib/public/components/common/spinner.js | 7 +- .../components/common/table/SortModel.js | 1 - .../components/common/table/profiles.js | 2 +- lib/public/components/common/table/table.js | 5 +- lib/public/components/modal/ModalModel.js | 4 +- .../qcFlagTypesSelectionDropdownModel.js | 2 - .../components/qcFlags/qcFlagsBreadcrumbs.js | 10 +- .../components/qcFlags/qcFlagsPagesButtons.js | 5 +- .../RunTypesSelectionDropdownModel.js | 1 - .../tag/TagSelectionDropdownModel.js | 1 - lib/public/components/tag/tagBadge.js | 8 +- lib/public/models/CreationModel.js | 1 - lib/public/models/UserRoleSelectionModel.js | 2 - .../lhcFill/LhcFillStatisticsExtractor.js | 1 - lib/public/utilities/ObservableData.js | 1 - lib/public/utilities/createPortal.js | 8 +- lib/public/utilities/durationUtils.mjs | 7 +- lib/public/utilities/export.js | 6 +- .../fetch/PaginatedRemoteDataSource.js | 3 +- .../utilities/formatting/formatDuration.mjs | 1 - .../utilities/formatting/formatFloat.js | 1 + lib/public/utilities/removeElement.js | 1 - lib/public/utilities/scrollTo.js | 2 - lib/public/utilities/targetURL.js | 1 - lib/public/views/About/Overview/index.js | 6 +- .../views/DataPasses/DataPassesModel.js | 2 + .../DataPassesPerLhcPeriodOverviewModel.js | 2 - ...ataPassesPerSimulationPassOverviewModel.js | 4 +- .../Details/EnvironmentDetailsModel.js | 1 - .../create/EosReportCreationModel.js | 2 - .../typeSpecific/eosFormEcsSpecificPart.js | 2 + .../typeSpecific/eosFormQcPdpSpecificPart.js | 1 + .../eosFormShiftLeaderSpecificPart.js | 2 + lib/public/views/Flps/Details/index.js | 4 +- lib/public/views/Home/Overview/HomePage.js | 4 + .../LhcFills/Detail/LhcFillDetailsModel.js | 1 - .../Overview/LhcFillsOverviewModel.js | 3 - .../views/Logs/Create/LogCreationModel.js | 1 - .../Logs/Create/TemplatedLogCreationModel.js | 4 - .../Create/panels/LogCreationContentPanel.js | 1 - .../Logs/Details/logTreeViewComponent.js | 1 - .../FilePreview/attachmentPreviewComponent.js | 2 +- .../Logs/FilePreview/filePreviewComponent.js | 20 +-- .../views/Logs/Overview/LogsOverviewModel.js | 6 +- .../Create/QcFlagTypeCreationModel.js | 3 - .../Overview/QcFlagTypesOverviewModel.js | 1 - .../QcFlags/Create/QcFlagCreationModel.js | 3 - .../QcFlagCreationForDataPassModel.js | 3 +- .../QcFlagCreationForSimulationPassModel.js | 3 +- .../QcFlags/Create/qcFlagCreationComponent.js | 1 - .../QcFlagsForDataPassOverviewModel.js | 2 - .../QcFlagsForSimulationPassOverviewModel.js | 2 - .../QcFlags/Overview/QcFlagsOverviewModel.js | 1 - lib/public/views/QcFlags/QcFlagsModel.js | 32 ++++- .../QcFlags/details/QcFlagDetailsModel.js | 7 +- .../QcFlagDetailsForDataPassModel.js | 6 +- .../QcFlagDetailsForSimulationPassModel.js | 6 +- lib/public/views/RunTypes/RunTypeModel.js | 1 - .../runDetectorsAsyncQcActiveColumns.js | 1 + .../Runs/ActiveColumns/runsActiveColumns.js | 2 +- .../views/Runs/Details/RunDetailsModel.js | 7 +- .../Runs/Details/runDetailsConfiguration.js | 2 +- .../views/Runs/Overview/RunsOverviewModel.js | 7 +- .../Overview/exportRunsTriggerAndModal.js | 1 - .../RunsPerDataPassOverviewModel.js | 2 - .../RunsPerLhcPeriodOverviewModel.js | 2 - lib/public/views/Runs/RunsModel.js | 7 ++ .../RunsPerSimulationPassOverviewModel.js | 4 +- .../views/Runs/format/editRunEorReasons.js | 1 - .../views/Runs/format/formatEditableNumber.js | 5 +- .../AnchoredSimulationPassesOverviewModel.js | 2 - ...mulationPassesPerLhcPeriodOverviewModel.js | 2 - .../SimulationPasses/SimulationPassesModel.js | 2 + .../views/Statistics/StatisticsPageModel.js | 6 - .../views/Tags/Create/TagCreationModel.js | 3 - .../views/Tags/Details/TagDetailsModel.js | 1 - .../views/Tags/Overview/TagsOverviewModel.js | 5 +- .../Overview/LhcPeriodsOverviewModel.js | 3 +- .../format/formatDistinctLhcBeamEnergies.js | 3 +- lib/server/GRPCServer.js | 1 - lib/server/WebUiServer.js | 2 +- .../controllers/configuration.controller.js | 4 +- .../controllers/dataPasses.controller.js | 6 +- .../controllers/dplDetectors.controller.js | 2 +- .../controllers/dplProcess.controller.js | 6 +- .../controllers/environments.controller.js | 2 +- .../controllers/eosReport.controller.js | 2 +- .../gRPC/GRPCDplProcessExecutionController.js | 2 +- .../gRPC/GRPCEnvironmentController.js | 4 +- .../controllers/gRPC/GRPCFlpRoleController.js | 6 +- .../controllers/gRPC/GRPCLhcFIllController.js | 2 +- .../controllers/gRPC/GRPCLogController.js | 2 +- .../controllers/gRPC/GRPCQcFlagController.js | 6 +- .../controllers/gRPC/GRPCRunController.js | 6 +- .../gRPC/GRPCTriggerCountersController.js | 2 +- lib/server/controllers/lhcFill.controller.js | 4 +- .../lhcPeriodStatistics.controller.js | 4 +- lib/server/controllers/logs.controller.js | 4 +- lib/server/controllers/qcFlag.controller.js | 10 +- .../controllers/qcFlagTypes.controller.js | 6 +- lib/server/controllers/runTypes.controller.js | 2 - lib/server/controllers/runs.controller.js | 8 +- lib/server/controllers/shift.controller.js | 2 +- .../simulationPasses.controller.js | 4 +- .../controllers/statistics.controller.js | 14 +-- lib/server/controllers/tags.controller.js | 4 - .../controllers/triggerCounters.controller.js | 2 +- .../protoParsing/extractFieldsConverters.js | 2 + .../MonAlisaClient.js | 1 + .../services/dataPasses/DataPassService.js | 10 +- lib/server/services/flp/createFlpRole.js | 1 - lib/server/services/log/createLog.js | 2 +- .../qualityControlFlag/QcFlagService.js | 7 +- .../qualityControlFlag/QcFlagTypeService.js | 20 +-- lib/server/services/run/getRun.js | 1 - lib/server/services/run/getRunDefinition.js | 1 - lib/server/services/shift/ShiftService.js | 1 - .../services/shift/getShiftFromTimestamp.js | 1 - lib/server/utilities/appendPath.js | 2 - .../utilities/countedItemsToHttpView.js | 4 +- lib/server/utilities/dtoValidator.js | 9 +- lib/usecases/run/GetAllRunsUseCase.js | 8 +- lib/usecases/run/StartRunUseCase.js | 2 +- scripts/update-dockerfile.js | 1 - test/api/runs.test.js | 2 +- test/gRPC/serviceImplementation.test.js | 2 +- .../server/middleware/rbac.middleware.test.js | 2 +- .../MonAlisaSynchronizer.test.js | 4 +- .../qualityControlFlag/QcFlagService.test.js | 8 +- .../QcFlagTypeService.test.js | 2 +- .../lib/usecases/run/UpdateRunUseCase.test.js | 4 +- test/lib/utilities/cacheAsyncFunction.test.js | 6 +- test/mocks/mock-dcs-eos-report.js | 2 +- test/mocks/mock-ecs-eos-report.js | 2 +- test/mocks/mock-qc-pdp-eos-report.js | 2 +- test/mocks/mock-slimos-eos-report.js | 2 +- test/public/envs/overview.test.js | 2 +- test/public/lhcFills/detail.test.js | 2 +- test/public/qcFlagTypes/creation.test.js | 2 +- .../qcFlags/forDataPassOverview.test.js | 2 +- .../qcFlags/forSimulationPassOverview.test.js | 2 +- 193 files changed, 412 insertions(+), 521 deletions(-) diff --git a/lib/database/adapters/LogRunsAdapter.js b/lib/database/adapters/LogRunsAdapter.js index 87b02a95fa..b6243ccb96 100644 --- a/lib/database/adapters/LogRunsAdapter.js +++ b/lib/database/adapters/LogRunsAdapter.js @@ -26,8 +26,10 @@ class LogRunsAdapter { /** * Converts the given database object to an entity object. * - * @param {Object} databaseObject Object to convert. - * @returns {Object} Converted entity object. + * @param {object} databaseObject Object to convert. + * @param {number} databaseObject.logId id of the log to convert. + * @param {number} databaseObject.runId id of the run to convert. + * @returns {object} Converted entity object. */ toEntity({ logId, runId }) { return { logId, runId }; @@ -36,8 +38,8 @@ class LogRunsAdapter { /** * Converts the given entity object to a database object. * - * @param {Object} entityObject Object to convert. - * @returns {Promise} Promise with the converted database object. + * @param {object} entityObject Object to convert. + * @returns {Promise} Promise with the converted database object. */ toDatabase(entityObject) { return entityObject; diff --git a/lib/database/adapters/LogTagsAdapter.js b/lib/database/adapters/LogTagsAdapter.js index 86531e57c2..cf285645cb 100644 --- a/lib/database/adapters/LogTagsAdapter.js +++ b/lib/database/adapters/LogTagsAdapter.js @@ -26,8 +26,10 @@ class LogTagsAdapter { /** * Converts the given database object to an entity object. * - * @param {Object} databaseObject Object to convert. - * @returns {Object} Converted entity object. + * @param {object} databaseObject Object to convert. + * @param {number} databaseObject.logId id of the log to convert. + * @param {number} databaseObject.tagId id of the tag to convert. + * @returns {object} Converted entity object. */ toEntity({ logId, tagId }) { return { logId, tagId }; @@ -36,8 +38,8 @@ class LogTagsAdapter { /** * Converts the given entity object to a database object. * - * @param {Object} entityObject Object to convert. - * @returns {Object} Converted database object. + * @param {object} entityObject Object to convert. + * @returns {object} Converted database object. */ toDatabase(entityObject) { return entityObject; diff --git a/lib/database/adapters/RunDetectorsAdapter.js b/lib/database/adapters/RunDetectorsAdapter.js index 9b16463586..bc45882108 100644 --- a/lib/database/adapters/RunDetectorsAdapter.js +++ b/lib/database/adapters/RunDetectorsAdapter.js @@ -26,8 +26,11 @@ class RunDetectorsAdapter { /** * Converts the given database object to an entity object. * - * @param {Object} databaseObject Object to convert. - * @returns {Object} Converted entity object. + * @param {object} databaseObject Object to convert. + * @param {number} databaseObject.runNumber runNumber of the run to convert. + * @param {number} databaseObject.detectorId id of the detector to convert. + * @param {string} databaseObject.quality quality to convert. + * @returns {object} Converted entity object. */ toEntity({ runNumber, detectorId, quality }) { return { runNumber, detectorId, quality }; @@ -36,8 +39,8 @@ class RunDetectorsAdapter { /** * Converts the given entity object to a database object. * - * @param {Object} entityObject Object to convert. - * @returns {Object} Converted database object. + * @param {object} entityObject Object to convert. + * @returns {object} Converted database object. */ toDatabase(entityObject) { return { diff --git a/lib/database/migrations/20200505214213-create-run.js b/lib/database/migrations/20200505214213-create-run.js index 53f9d1f661..6fdf6aaed0 100644 --- a/lib/database/migrations/20200505214213-create-run.js +++ b/lib/database/migrations/20200505214213-create-run.js @@ -71,7 +71,7 @@ module.exports = { type: Sequelize.CHAR, }, detectors: { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len type: Sequelize.ENUM('CPV', 'EMC', 'FDD', 'FT0', 'FV0', 'HMP', 'ITS', 'MCH', 'MFT', 'MID', 'PHS', 'TOF', 'TPC', 'TRD', 'TST', 'ZDC'), }, created_at: { diff --git a/lib/database/migrations/20220125151025-create-tag.js b/lib/database/migrations/20220125151025-create-tag.js index 1413384f9f..b5814e5b3a 100644 --- a/lib/database/migrations/20220125151025-create-tag.js +++ b/lib/database/migrations/20220125151025-create-tag.js @@ -12,7 +12,6 @@ */ 'use strict'; -/* eslint-disable valid-jsdoc */ module.exports = { diff --git a/lib/database/migrations/20220309132744-create-tag.js b/lib/database/migrations/20220309132744-create-tag.js index ab71107ed5..f62a0c9070 100644 --- a/lib/database/migrations/20220309132744-create-tag.js +++ b/lib/database/migrations/20220309132744-create-tag.js @@ -12,7 +12,6 @@ */ 'use strict'; -/* eslint-disable valid-jsdoc */ module.exports = { diff --git a/lib/database/migrations/20220404093143-create-environments-table.js b/lib/database/migrations/20220404093143-create-environments-table.js index d432f2a72d..0dab7ddaef 100644 --- a/lib/database/migrations/20220404093143-create-environments-table.js +++ b/lib/database/migrations/20220404093143-create-environments-table.js @@ -12,7 +12,6 @@ */ 'use strict'; -/* eslint-disable valid-jsdoc */ module.exports = { up: async (queryInterface, Sequelize) => diff --git a/lib/database/migrations/20220511102048-update-run-detectors-column.js b/lib/database/migrations/20220511102048-update-run-detectors-column.js index f9cc71423b..937e66a332 100644 --- a/lib/database/migrations/20220511102048-update-run-detectors-column.js +++ b/lib/database/migrations/20220511102048-update-run-detectors-column.js @@ -12,7 +12,6 @@ */ 'use strict'; -/* eslint-disable valid-jsdoc */ module.exports = { @@ -28,7 +27,7 @@ module.exports = { queryInterface.sequelize.transaction((transaction) => Promise.all([ queryInterface.changeColumn('runs', 'detectors', { - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len type: Sequelize.ENUM('CPV', 'EMC', 'FDD', 'FT0', 'FV0', 'HMP', 'ITS', 'MCH', 'MFT', 'MID', 'PHS', 'TOF', 'TPC', 'TRD', 'TST', 'ZDC'), }, { transaction }), ])), diff --git a/lib/database/migrations/20220513075839-create-reason-type-table.js b/lib/database/migrations/20220513075839-create-reason-type-table.js index 5c876e5c7d..e508116af1 100644 --- a/lib/database/migrations/20220513075839-create-reason-type-table.js +++ b/lib/database/migrations/20220513075839-create-reason-type-table.js @@ -12,7 +12,6 @@ */ 'use strict'; -/* eslint-disable valid-jsdoc */ module.exports = { diff --git a/lib/database/migrations/20220513153414-crete-eor-reason-table.js b/lib/database/migrations/20220513153414-crete-eor-reason-table.js index b2bc3fce73..22658241cf 100644 --- a/lib/database/migrations/20220513153414-crete-eor-reason-table.js +++ b/lib/database/migrations/20220513153414-crete-eor-reason-table.js @@ -12,7 +12,6 @@ */ 'use strict'; -/* eslint-disable valid-jsdoc */ module.exports = { diff --git a/lib/database/migrations/20221010120629-convert-run-detectors-to-separate-table.js b/lib/database/migrations/20221010120629-convert-run-detectors-to-separate-table.js index 1417c2e849..85fe6d77a7 100644 --- a/lib/database/migrations/20221010120629-convert-run-detectors-to-separate-table.js +++ b/lib/database/migrations/20221010120629-convert-run-detectors-to-separate-table.js @@ -31,7 +31,7 @@ const DETECTORS_RELATION_TABLE_TO_COLUMN = 'UPDATE runs\n' + 'SET runs.detectors = detectors_list.detectors'; module.exports = { - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async up(queryInterface) { return queryInterface.sequelize.transaction(async () => { /** @@ -55,7 +55,7 @@ module.exports = { }); }, - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async down(queryInterface) { /** * Add reverting commands here. diff --git a/lib/database/migrations/20230120160345-add-environment-history.js b/lib/database/migrations/20230120160345-add-environment-history.js index 6316a43600..df2863e0f5 100644 --- a/lib/database/migrations/20230120160345-add-environment-history.js +++ b/lib/database/migrations/20230120160345-add-environment-history.js @@ -1,79 +1,73 @@ 'use strict'; -/** @type {import('sequelize-cli').Migration} */ module.exports = { - // eslint-disable-next-line require-jsdoc - async up(queryInterface, Sequelize) { - return queryInterface.sequelize.transaction(async () => { - await queryInterface.createTable('environments_history_items', { - id: { - allowNull: false, - autoIncrement: true, - primaryKey: true, - type: Sequelize.INTEGER, - }, - environment_id: { - type: Sequelize.CHAR(32), - }, - status: { - allowNull: false, - type: Sequelize.STRING, - }, - status_message: { - type: Sequelize.TEXT, - }, - created_at: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'), - }, - updated_at: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.literal('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'), - }, - }, { - timestamps: true, - }); + up: async (queryInterface, Sequelize) => queryInterface.sequelize.transaction(async () => { + await queryInterface.createTable('environments_history_items', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER, + }, + environment_id: { + type: Sequelize.CHAR(32), + }, + status: { + allowNull: false, + type: Sequelize.STRING, + }, + status_message: { + type: Sequelize.TEXT, + }, + created_at: { + allowNull: false, + type: Sequelize.DATE, + defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'), + }, + updated_at: { + allowNull: false, + type: Sequelize.DATE, + defaultValue: Sequelize.literal('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'), + }, + }, { + timestamps: true, + }); - // Convert status and status message to the new history table + // Convert status and status message to the new history table - // Use created at to define the standby history item - await queryInterface.sequelize.query(` + // Use created at to define the standby history item + await queryInterface.sequelize.query(` INSERT INTO environments_history_items(environment_id, status, created_at, updated_at) SELECT id, "STANDBY", created_at, created_at FROM environments e WHERE created_at <> updated_at `); - // Use updated at to define the current history item - await queryInterface.sequelize.query(` + // Use updated at to define the current history item + await queryInterface.sequelize.query(` INSERT INTO environments_history_items(environment_id, status, status_message, created_at, updated_at) SELECT id, status, status_message, updated_at, updated_at FROM environments; `); - await Promise.all([ - queryInterface.removeColumn('environments', 'status'), - queryInterface.removeColumn('environments', 'status_message'), - ]); - }); - }, + await Promise.all([ + queryInterface.removeColumn('environments', 'status'), + queryInterface.removeColumn('environments', 'status_message'), + ]); + }), - // eslint-disable-next-line require-jsdoc - async down(queryInterface, Sequelize) { - return queryInterface.sequelize.transaction(async () => { - await Promise.all([ - queryInterface.addColumn('environments', 'status', { - allowNull: false, - type: Sequelize.STRING, - }), - queryInterface.addColumn('environments', 'status_message', { - type: Sequelize.TEXT, - }), - ]); + down: async (queryInterface, Sequelize) => queryInterface.sequelize.transaction(async () => { + await Promise.all([ + queryInterface.addColumn('environments', 'status', { + allowNull: false, + type: Sequelize.STRING, + }), + queryInterface.addColumn('environments', 'status_message', { + type: Sequelize.TEXT, + }), + ]); - await queryInterface.sequelize.query(` + await queryInterface.sequelize.query(` UPDATE environments e INNER JOIN environments_history_items h ON h.environment_id = e.id @@ -81,7 +75,6 @@ module.exports = { ORDER BY h.updated_at DESC `); - await queryInterface.dropTable('environments_history_items'); - }); - }, + await queryInterface.dropTable('environments_history_items'); + }), }; diff --git a/lib/database/migrations/20230213082905-run-quality-unknown-to-null.js b/lib/database/migrations/20230213082905-run-quality-unknown-to-null.js index ba5187ecb5..2bbc879928 100644 --- a/lib/database/migrations/20230213082905-run-quality-unknown-to-null.js +++ b/lib/database/migrations/20230213082905-run-quality-unknown-to-null.js @@ -4,9 +4,8 @@ const { Op } = require('sequelize'); /** @type {import('sequelize-cli').Migration} */ module.exports = { - // eslint-disable-next-line require-jsdoc - async up(queryInterface, Sequelize) { - return queryInterface.sequelize.transaction(async (transaction) => { + up: async (queryInterface, Sequelize) => + queryInterface.sequelize.transaction(async (transaction) => { await queryInterface.changeColumn('runs', 'run_quality', { type: Sequelize.ENUM('good', 'bad', 'test', 'unknown', 'none'), defaultValue: 'none', @@ -28,11 +27,9 @@ module.exports = { defaultValue: 'none', allowNull: false, }, { transaction }); - }); - }, + }), - // eslint-disable-next-line require-jsdoc - async down(queryInterface, Sequelize) { + down: async (queryInterface, Sequelize) => queryInterface.sequelize.transaction(async (transaction) => { await queryInterface.changeColumn('runs', 'run_quality', { type: Sequelize.ENUM('good', 'bad', 'test', 'unknown', 'none'), @@ -48,6 +45,5 @@ module.exports = { defaultValue: 'test', allowNull: true, }, { transaction }); - }); - }, + }), }; diff --git a/lib/database/migrations/20230411123947-add-tag-description.js b/lib/database/migrations/20230411123947-add-tag-description.js index 62ad5c8b3d..cf423d9bab 100644 --- a/lib/database/migrations/20230411123947-add-tag-description.js +++ b/lib/database/migrations/20230411123947-add-tag-description.js @@ -2,15 +2,11 @@ /** @type {import('sequelize-cli').Migration} */ module.exports = { - // eslint-disable-next-line require-jsdoc - async up(queryInterface, Sequelize) { - return queryInterface.addColumn('tags', 'description', { + up: async (queryInterface, Sequelize) => + queryInterface.addColumn('tags', 'description', { allowNull: true, type: Sequelize.TEXT, - }); - }, - // eslint-disable-next-line require-jsdoc - async down(queryInterface) { - return queryInterface.removeColumn('tags', 'description'); - }, + }), + down: async (queryInterface) => + queryInterface.removeColumn('tags', 'description'), }; diff --git a/lib/database/migrations/20230424121312-add-dpl-process.js b/lib/database/migrations/20230424121312-add-dpl-process.js index 21e52108aa..a92e2216d0 100644 --- a/lib/database/migrations/20230424121312-add-dpl-process.js +++ b/lib/database/migrations/20230424121312-add-dpl-process.js @@ -2,9 +2,8 @@ /** @type {import('sequelize-cli').Migration} */ module.exports = { - // eslint-disable-next-line require-jsdoc - async up(queryInterface, Sequelize) { - return queryInterface.sequelize.transaction(async () => { + up: async (queryInterface, Sequelize) => + queryInterface.sequelize.transaction(async () => { // DPL Hosts await queryInterface.createTable('hosts', { id: { @@ -185,17 +184,14 @@ module.exports = { }, { timestamps: true, }); - }); - }, + }), - // eslint-disable-next-line require-jsdoc - async down(queryInterface) { - return queryInterface.sequelize.transaction(async () => { + down: async (queryInterface) => + queryInterface.sequelize.transaction(async () => { await queryInterface.dropTable('dpl_processes_executions'); await queryInterface.dropTable('dpl_processes'); await queryInterface.dropTable('dpl_processes_types'); await queryInterface.dropTable('dpl_detectors'); await queryInterface.dropTable('hosts'); - }); - }, + }), }; diff --git a/lib/database/migrations/20240424092020-add-qc-flag-effective-periods-table.js b/lib/database/migrations/20240424092020-add-qc-flag-effective-periods-table.js index 4df3c1ec9b..7e88603104 100644 --- a/lib/database/migrations/20240424092020-add-qc-flag-effective-periods-table.js +++ b/lib/database/migrations/20240424092020-add-qc-flag-effective-periods-table.js @@ -25,6 +25,8 @@ const { timestampToMysql } = require('../../server/utilities/timestampToMysql'); * @param {number} [scope.simulationPassId] simulation pass id - exclusive with dataPassId * @param {number} scope.createdAt creation timestamp of discarding period, * only effective periods of QC flags created before this timestamp will be updated + * @param {Sequalize} sequalize sequalize instance + * @param {Sequalize.Transaction} sequalize.transaction transaction to use * @return {Promise} resolve once all periods were updated */ const _updateEffectivePeriodForScopeAndPeriod = async ( @@ -124,6 +126,8 @@ const _updateEffectivePeriodForScopeAndPeriod = async ( /** * Assign appropriate effectivePeriods to all QC flags * @param {QueryInterface} queryInterface sequelize interface + * @param {Sequalize} sequalize sequalize instance + * @param {Sequalize.Transaction} sequalize.transaction transaction to use * @return {Promise} resolve once all QC flags have proper effective periods assigned */ const _reconstructQcFlagsEffectivePeriods = async (queryInterface, { transaction }) => { @@ -194,6 +198,8 @@ const _reconstructQcFlagsEffectivePeriods = async (queryInterface, { transaction /** * Create effective period for every existing QC flag over its whole period * @param {QueryInterface} queryInterface sequelize interface + * @param {Sequalize} sequalize sequalize instance + * @param {Sequalize.Transaction} sequalize.transaction transaction to use * @return {Promise} resolve once all QC flags has initial effective periods assigned */ const _populateQcFlagEffectivePeriod = async (queryInterface, { transaction }) => { diff --git a/lib/database/models/qcFlagType.js b/lib/database/models/qcFlagType.js index 14093fb9dd..892e76ecf4 100644 --- a/lib/database/models/qcFlagType.js +++ b/lib/database/models/qcFlagType.js @@ -51,10 +51,7 @@ module.exports = (sequelize) => { archived: { type: Sequelize.VIRTUAL, defaultValue: null, - // eslint-disable-next-line require-jsdoc - get() { - return Boolean(this.getDataValue('archivedAt')); - }, + get: ()=> Boolean(this.getDataValue('archivedAt')), }, }, { tableName: 'quality_control_flag_types' }, diff --git a/lib/database/models/run.js b/lib/database/models/run.js index 3173bd32fa..6055a74d69 100644 --- a/lib/database/models/run.js +++ b/lib/database/models/run.js @@ -35,8 +35,7 @@ module.exports = (sequelize) => { }, startTime: { type: Sequelize.VIRTUAL, - // eslint-disable-next-line require-jsdoc - get() { + get: () => { const timeTrgStart = this.getDataValue('timeTrgStart'); const timeO2Start = this.getDataValue('timeO2Start'); const runStartString = timeTrgStart ?? timeO2Start; @@ -45,8 +44,7 @@ module.exports = (sequelize) => { }, endTime: { type: Sequelize.VIRTUAL, - // eslint-disable-next-line require-jsdoc - get() { + get: () => { if (this.getDataValue('start') === null) { return null; } @@ -61,8 +59,7 @@ module.exports = (sequelize) => { }, runDuration: { type: Sequelize.VIRTUAL, - // eslint-disable-next-line require-jsdoc - get() { + get: () => { const { startTime, endTime } = this; if (!startTime) { return null; diff --git a/lib/database/models/tag.js b/lib/database/models/tag.js index df074a632b..fbb4cf51f5 100644 --- a/lib/database/models/tag.js +++ b/lib/database/models/tag.js @@ -49,10 +49,7 @@ module.exports = (sequelize) => { type: Sequelize.VIRTUAL, allowNull: true, defaultValue: null, - // eslint-disable-next-line require-jsdoc - get() { - return Boolean(this.getDataValue('archivedAt')); - }, + get: ()=> Boolean(this.getDataValue('archivedAt')), }, }, { indexes: [ diff --git a/lib/database/models/typedefs/SequelizeRun.js b/lib/database/models/typedefs/SequelizeRun.js index 550531a532..63877db381 100644 --- a/lib/database/models/typedefs/SequelizeRun.js +++ b/lib/database/models/typedefs/SequelizeRun.js @@ -34,7 +34,6 @@ * @property {boolean|null} dcs * @property {boolean|null} epn * @property {string|null} epnTopology - * @property {string|null} detectors * @property {number} runNumber * @property {string|null} envId * @property {number|null} fillNumber diff --git a/lib/database/repositories/QcFlagEffectivePeriodRepository.js b/lib/database/repositories/QcFlagEffectivePeriodRepository.js index d82b3fd7e4..beb92c464d 100644 --- a/lib/database/repositories/QcFlagEffectivePeriodRepository.js +++ b/lib/database/repositories/QcFlagEffectivePeriodRepository.js @@ -32,6 +32,7 @@ class QcFlagEffectivePeriodRepository extends Repository { * * @param {Period} period period which effective periods must overlap with * @param {number|Date} createdAtUpperLimit upper limit of QC flags creation timestamp which effective periods are to be found + * @param {object} monalisaProduction scope of QC flags * @param {number} [monalisaProduction.dataPassId] id of data pass, which the QC flag belongs to * @param {number} [monalisaProduction.simulationPassId] id of simulation pass, which the QC flags belongs to * @param {number} monalisaProduction.runNumber runNumber of run, which the QC flags belongs to diff --git a/lib/database/utilities/QueryBuilder.js b/lib/database/utilities/QueryBuilder.js index 2db7cf2519..22cd3860aa 100644 --- a/lib/database/utilities/QueryBuilder.js +++ b/lib/database/utilities/QueryBuilder.js @@ -464,6 +464,7 @@ class QueryBuilder { /** * Add new attribute to result + * @param {object} attributeDefinition attribute definition * @param {string|function} [attributeDefinition.query] sql definition of attribute, e.g. function or subquery * @param {string} [attributeDefinition.alias] alias for the attribute * @return {QueryBuilder} this diff --git a/lib/domain/entities/Log.js b/lib/domain/entities/Log.js index 66bf1b5dfd..dba3120b09 100644 --- a/lib/domain/entities/Log.js +++ b/lib/domain/entities/Log.js @@ -21,14 +21,13 @@ * @property {string} origin * @property {string} announcementValidUntil * @property {number} rootLogId - * @property {number} rootLogId * @property {number|null} replies * @property {string} createdAt * @property {string} updatedAt * @property {User|null} author * @property {SequelizeRun[]|null} runs * @property {SequelizeTag[]|null} tags - * @property {SequelizeEnvironment[]||null} environments + * @property {SequelizeEnvironment[]|null} environments * @property {SequelizeSubsystem[]|null} subsystems * @property {SequelizeAttachment[]|null} attachments */ diff --git a/lib/presentation/log/toTreeView.js b/lib/presentation/log/toTreeView.js index 47aac9f1c8..598d005cd6 100644 --- a/lib/presentation/log/toTreeView.js +++ b/lib/presentation/log/toTreeView.js @@ -19,7 +19,6 @@ * @returns {Object} The Log tree. */ const toTreeView = (root, children) => { - // eslint-disable-next-line require-jsdoc const traverse = (obj, id) => { if (obj.id === id) { return obj; diff --git a/lib/public/components/Filters/RunsFilter/AliceL3AndDipoleFilteringModel.js b/lib/public/components/Filters/RunsFilter/AliceL3AndDipoleFilteringModel.js index a5ba1b62b7..278fe8bf25 100644 --- a/lib/public/components/Filters/RunsFilter/AliceL3AndDipoleFilteringModel.js +++ b/lib/public/components/Filters/RunsFilter/AliceL3AndDipoleFilteringModel.js @@ -26,7 +26,6 @@ export class AliceL3AndDipoleFilteringModel extends SelectionDropdownModel { super({ multiple: false }); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/components/Filters/common/filters/TimeRangeInputModel.js b/lib/public/components/Filters/common/filters/TimeRangeInputModel.js index 0aa78df8f5..62b51e3b5c 100644 --- a/lib/public/components/Filters/common/filters/TimeRangeInputModel.js +++ b/lib/public/components/Filters/common/filters/TimeRangeInputModel.js @@ -31,13 +31,15 @@ export class TimeRangeInputModel extends FilterModel { * @param {Partial} [value] the initial value of the filter * @param {string|null} [periodLabel] the label of the initial value if it applies (eg. current month) * @param {object} [configuration] the inputs configuration - * @param {(boolean|{from: boolean, to: boolean})} [configuration.required] defines if the from/to dates are required (true means both are - * required) - * @property {boolean} [configuration.seconds=false] states if the input has granularity up to seconds (if not, granularity is minutes) */ constructor(value, periodLabel, configuration) { super(); + /** + * @param {(boolean|{from: boolean, to: boolean})} [configuration.required] defines if the from/to dates are required + * (true means both are required) + * @param {boolean} [configuration.seconds=false] states if the input has granularity up to seconds (if not, granularity is minutes) + */ const { required = false, seconds } = configuration || {}; this._required = required; @@ -116,7 +118,6 @@ export class TimeRangeInputModel extends FilterModel { return this._periodLabel; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc * @override @@ -126,7 +127,6 @@ export class TimeRangeInputModel extends FilterModel { this._toTimeInputModel.clear(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc * @override @@ -135,11 +135,10 @@ export class TimeRangeInputModel extends FilterModel { return this._fromTimeInputModel.value === null && this._toTimeInputModel.value === null; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc * @override - * @return {Partial} + * @return {Partial} the normalized value of the filter */ get normalized() { return { diff --git a/lib/public/components/Filters/common/filters/amountFilter.js b/lib/public/components/Filters/common/filters/amountFilter.js index bc9a0fec4c..4240a4e5a5 100644 --- a/lib/public/components/Filters/common/filters/amountFilter.js +++ b/lib/public/components/Filters/common/filters/amountFilter.js @@ -35,7 +35,6 @@ export const amountFilter = (currentValue, onChange, options) => { const { operator, limit } = currentValue || { operator: '=', limit: null }; const { operatorAttributes = {}, limitAttributes = {} } = options; - // eslint-disable-next-line require-jsdoc const updateFilter = ({ newOperator, newLimit }) => { onChange({ operator: newOperator || operator, diff --git a/lib/public/components/NavBar/index.js b/lib/public/components/NavBar/index.js index 707e29189f..2710f51ac2 100644 --- a/lib/public/components/NavBar/index.js +++ b/lib/public/components/NavBar/index.js @@ -95,9 +95,10 @@ const btnGroupsDelimiter = h('.mh1', { style: { 'border-left': '1px solid var(-- * @param {boolean} isOpened if true dropdown will be opened * @param {Function} onclick the html element onclick function * @param {Component[]} entries entries of the menu + * @param {object} options options of the dropdown menu * @param {object} [options.menuAttributes] attributes of dropdown menu * @param {boolean} [options.isSelected] informe whether dropdown should be styled as selected - * @param {string} [options.id] id of the dropdown button + * @param {string} [options.dropdownAttributes] attributes of dropdown button * @return {Component} dropdown menu */ const dropdownSubMenu = (dropdownButtonContent, isOpened, onclick, entries, { menuAttributes, isSelected, dropdownAttributes } = {}) => @@ -116,11 +117,8 @@ const dropdownSubMenu = (dropdownButtonContent, isOpened, onclick, entries, { me */ function navBar(model) { const { page: currentPage } = model.router.params; - // eslint-disable-next-line require-jsdoc const pageTab = (page, content) => basePageTab(page, content, () => model.clearDropdownMenu(), currentPage === page); - // eslint-disable-next-line require-jsdoc const pageMenuLink = (content, page) => basePageMenuLink(content, page, () => model.clearDropdownMenu(), currentPage === page); - // eslint-disable-next-line require-jsdoc const absoluteMenuLink = (content, page) => baseAbsoluteMenuLink(content, page, () => model.clearDropdownMenu()); return h('.flex-row.justify-between.items-center.p2.shadow-level2.level2.bg-gray-light', [ diff --git a/lib/public/components/Pagination/PaginationModel.js b/lib/public/components/Pagination/PaginationModel.js index 77767bcf72..a304dc78f1 100644 --- a/lib/public/components/Pagination/PaginationModel.js +++ b/lib/public/components/Pagination/PaginationModel.js @@ -57,7 +57,6 @@ export class PaginationModel extends Observable { * Define the default items per page to use if there is not one already defined * * @param {number} defaultItemsPerPage the value to use as default items per page if none has been defined yet - * @param {number} maxItemsPerPage the value to use as maximum items per page * * @return {void} */ diff --git a/lib/public/components/Pagination/paginationComponent.js b/lib/public/components/Pagination/paginationComponent.js index 096a39bb32..0ef2e6826d 100644 --- a/lib/public/components/Pagination/paginationComponent.js +++ b/lib/public/components/Pagination/paginationComponent.js @@ -82,23 +82,20 @@ export const paginationComponent = (pagination) => { return h( '.flex-row.justify-between.pv3', { - // eslint-disable-next-line require-jsdoc - oncreate: function () { + oncreate: () => { this.oldScrollListener = scrollListener; if (isInfiniteScrollEnabled) { window.addEventListener('scroll', scrollListener); } }, - // eslint-disable-next-line require-jsdoc - onupdate: function () { + onupdate: () => { window.removeEventListener('scroll', this.oldScrollListener); this.oldScrollListener = scrollListener; if (isInfiniteScrollEnabled) { window.addEventListener('scroll', scrollListener); } }, - // eslint-disable-next-line require-jsdoc - onremove: function () { + onremove: () => { window.removeEventListener('scroll', this.oldScrollListener); }, }, diff --git a/lib/public/components/common/StatefulComponent.js b/lib/public/components/common/StatefulComponent.js index eb4f9b5b09..e04963546c 100644 --- a/lib/public/components/common/StatefulComponent.js +++ b/lib/public/components/common/StatefulComponent.js @@ -34,7 +34,6 @@ export class StatefulComponent extends Observable { _renderer = renderer; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/components/common/chart/barChart/barChartComponent.js b/lib/public/components/common/chart/barChart/barChartComponent.js index 111c00882f..263db8aef8 100644 --- a/lib/public/components/common/chart/barChart/barChartComponent.js +++ b/lib/public/components/common/chart/barChart/barChartComponent.js @@ -54,11 +54,9 @@ class BarChartClassComponent { */ view() { return h('svg.w-100.h-100', { - // eslint-disable-next-line require-jsdoc oncreate: (vnode) => { this.render(vnode.dom); }, - // eslint-disable-next-line require-jsdoc onupdate: (vnode) => { this.render(vnode.dom); }, diff --git a/lib/public/components/common/chart/lineChart/lineChartComponent.js b/lib/public/components/common/chart/lineChart/lineChartComponent.js index 2fd5385b1a..7f324a0b85 100644 --- a/lib/public/components/common/chart/lineChart/lineChartComponent.js +++ b/lib/public/components/common/chart/lineChart/lineChartComponent.js @@ -56,19 +56,19 @@ class LineChartClassComponent { this.svgNode = null; } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc oncreate() { window.addEventListener('mousemove', this.handleMouseMove); } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc onupdate({ attrs: { points, configuration } }) { this.configuration = configuration; this._chartRenderer = new LineChartRenderer(configuration.chartConfiguration, points); } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc onremove() { window.removeEventListener('mousemove', this.handleMouseMove); } @@ -197,11 +197,9 @@ class LineChartClassComponent { this.hoveredPointCoordinates ? this.configuration.tooltip(this.hoveredPointCoordinates) : null, )), h('svg.w-100.h-100', { - // eslint-disable-next-line require-jsdoc oncreate: (vnode) => { this.svgNode = vnode.dom; }, - // eslint-disable-next-line require-jsdoc onupdate: (vnode) => { this.svgNode = vnode.dom; }, diff --git a/lib/public/components/common/chart/rendering/BarChartRenderer.js b/lib/public/components/common/chart/rendering/BarChartRenderer.js index cfb424dc74..2fbc17011b 100644 --- a/lib/public/components/common/chart/rendering/BarChartRenderer.js +++ b/lib/public/components/common/chart/rendering/BarChartRenderer.js @@ -41,7 +41,6 @@ export class BarChartRenderer extends ChartRenderer { } } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -65,7 +64,6 @@ export class BarChartRenderer extends ChartRenderer { ); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/components/common/chart/rendering/ChartRenderer.js b/lib/public/components/common/chart/rendering/ChartRenderer.js index 393995dd33..3e9f676680 100644 --- a/lib/public/components/common/chart/rendering/ChartRenderer.js +++ b/lib/public/components/common/chart/rendering/ChartRenderer.js @@ -217,7 +217,6 @@ export class ChartRenderer { /** * States if the points are rendered as points or bars - * @return {boolean} true if points */ get isPoint() { throw new Error('Abstract function call'); diff --git a/lib/public/components/common/chart/rendering/LineChartRenderer.js b/lib/public/components/common/chart/rendering/LineChartRenderer.js index cd02690f2b..256fa3cc62 100644 --- a/lib/public/components/common/chart/rendering/LineChartRenderer.js +++ b/lib/public/components/common/chart/rendering/LineChartRenderer.js @@ -50,7 +50,6 @@ export class LineChartRenderer extends ChartRenderer { this._computeHoveredPoint = new Array(this._datasets.length).fill(0); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -58,7 +57,6 @@ export class LineChartRenderer extends ChartRenderer { return true; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/components/common/chart/rendering/axis/BottomAxisRenderer.js b/lib/public/components/common/chart/rendering/axis/BottomAxisRenderer.js index 182af2a243..6bfc9b730b 100644 --- a/lib/public/components/common/chart/rendering/axis/BottomAxisRenderer.js +++ b/lib/public/components/common/chart/rendering/axis/BottomAxisRenderer.js @@ -18,7 +18,6 @@ import { axisBottom } from '/assets/d3.min.js'; * Implementation of {@see AxisRenderer} to display a vertical axis at the left of a chart */ export class BottomAxisRenderer extends AxisRenderer { - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -26,7 +25,6 @@ export class BottomAxisRenderer extends AxisRenderer { return axisBottom(scale); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -34,7 +32,6 @@ export class BottomAxisRenderer extends AxisRenderer { return { x: 0, y: chartDrawingZone.top + chartDrawingZone.height }; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -42,7 +39,6 @@ export class BottomAxisRenderer extends AxisRenderer { return dimensions.width; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -53,7 +49,6 @@ export class BottomAxisRenderer extends AxisRenderer { return { x: labelX, y: labelY }; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/components/common/chart/rendering/axis/LeftAxisRenderer.js b/lib/public/components/common/chart/rendering/axis/LeftAxisRenderer.js index 4f662ab8de..24706cb6a5 100644 --- a/lib/public/components/common/chart/rendering/axis/LeftAxisRenderer.js +++ b/lib/public/components/common/chart/rendering/axis/LeftAxisRenderer.js @@ -18,7 +18,6 @@ import { axisLeft } from '/assets/d3.min.js'; * Implementation of {@see AxisRenderer} to display a vertical axis at the left of a chart */ export class LeftAxisRenderer extends AxisRenderer { - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -26,7 +25,6 @@ export class LeftAxisRenderer extends AxisRenderer { return axisLeft(scale); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -34,7 +32,6 @@ export class LeftAxisRenderer extends AxisRenderer { return { x: chartDrawingZone.left, y: 0 }; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -42,7 +39,6 @@ export class LeftAxisRenderer extends AxisRenderer { return dimensions.height; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -53,7 +49,6 @@ export class LeftAxisRenderer extends AxisRenderer { return { x: labelX, y: labelY }; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -61,7 +56,6 @@ export class LeftAxisRenderer extends AxisRenderer { return 'text-after-edge'; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/components/common/form/inputs/DateTimeInputComponent.js b/lib/public/components/common/form/inputs/DateTimeInputComponent.js index fac8acab2e..248c7be17c 100644 --- a/lib/public/components/common/form/inputs/DateTimeInputComponent.js +++ b/lib/public/components/common/form/inputs/DateTimeInputComponent.js @@ -38,7 +38,8 @@ import { StatefulComponent } from '../../StatefulComponent.js'; export class DateTimeInputComponent extends StatefulComponent { /** * Constructor - * @property {DateTimeInputComponentVnode} vnode the component's vnode + * @param {DateTimeInputComponentVnode} vnode the component's vnode + * @param {DateTimeInputComponentAttrs} vnode.attrs the component's attributes */ constructor({ attrs }) { super(); @@ -47,7 +48,8 @@ export class DateTimeInputComponent extends StatefulComponent { /** * On-create lifecycle event - * @property {DateTimeInputComponentVnode} vnode the component's vnode + * @param {DateTimeInputComponentVnode} vnode the component's vnode + * @param {DateTimeInputComponentAttrs} vnode.attrs the component's attributes * @return {void} */ oncreate({ attrs }) { @@ -56,7 +58,8 @@ export class DateTimeInputComponent extends StatefulComponent { /** * On-update lifecycle event - * @property {DateTimeInputComponentVnode} vnode the component's vnode + * @param {DateTimeInputComponentVnode} vnode the component's vnode + * @param {DateTimeInputComponentAttrs} vnode.attrs the component's attributes * @return {void} */ onupdate({ attrs }) { diff --git a/lib/public/components/common/form/inputs/DateTimeInputModel.js b/lib/public/components/common/form/inputs/DateTimeInputModel.js index 0ff6aeef8f..6db8432560 100644 --- a/lib/public/components/common/form/inputs/DateTimeInputModel.js +++ b/lib/public/components/common/form/inputs/DateTimeInputModel.js @@ -67,7 +67,7 @@ export class DateTimeInputModel extends Observable { this._raw = raw; try { this._value = raw.date && raw.time ? extractTimestampFromDateTimeInput(raw, { seconds: this._seconds }) : null; - } catch (_) { + } catch { this._value = null; } diff --git a/lib/public/components/common/form/inputs/TimestampInputComponent.js b/lib/public/components/common/form/inputs/TimestampInputComponent.js index bbfd67f934..a8fcfc5fdd 100644 --- a/lib/public/components/common/form/inputs/TimestampInputComponent.js +++ b/lib/public/components/common/form/inputs/TimestampInputComponent.js @@ -56,6 +56,8 @@ export class TimestampInputComponent extends StatefulComponent { /** * Render the component + * @param {object} vnode the component's vnode + * @param {TimestampInputComponentAttrs} vnode.attrs the component's attributes * @return {vnode} the component */ view({ attrs }) { @@ -83,7 +85,7 @@ export class TimestampInputComponent extends StatefulComponent { let value; try { value = raw.date && raw.time ? extractTimestampFromDateTimeInput(raw) : null; - } catch (_) { + } catch { value = null; } diff --git a/lib/public/components/common/form/magnetsConfiguration/aliceMagnetsConfigurationsSnapshotsForm.js b/lib/public/components/common/form/magnetsConfiguration/aliceMagnetsConfigurationsSnapshotsForm.js index 5912d48ffb..4d577bd61c 100644 --- a/lib/public/components/common/form/magnetsConfiguration/aliceMagnetsConfigurationsSnapshotsForm.js +++ b/lib/public/components/common/form/magnetsConfiguration/aliceMagnetsConfigurationsSnapshotsForm.js @@ -83,7 +83,6 @@ export const aliceMagnetsConfigurationsSnapshotsForm = (configurationSnapshotsFo }, [ aliceMagnetsConfigurationSnapshotForm(magnetsConfigurationSnapshot), - // eslint-disable-next-line no-return-assign h('.btn.btn-danger', { onclick: () => configurationSnapshotsFormModel.dropSnapshot(Number(key)) }, iconTrash()), ], )), diff --git a/lib/public/components/common/markdown/markdown.js b/lib/public/components/common/markdown/markdown.js index ecef54bf82..a10a15ff49 100644 --- a/lib/public/components/common/markdown/markdown.js +++ b/lib/public/components/common/markdown/markdown.js @@ -40,8 +40,7 @@ export const markdownInput = (content, attributes, size) => { 'textarea', { ...attributes, - // eslint-disable-next-line require-jsdoc - oncreate: function (node) { + oncreate: (node) => { cleanCodeMirror(this.textarea); markdownInputFromTextarea( node.dom, @@ -50,8 +49,7 @@ export const markdownInput = (content, attributes, size) => { ); this.textarea = node.dom; }, - // eslint-disable-next-line require-jsdoc - onremove: function () { + onremove: () => { cleanCodeMirror(this.textarea); this.textarea = null; }, @@ -75,14 +73,12 @@ export const markdownDisplay = (content, attributes, size) => h( 'textarea', { ...attributes, - // eslint-disable-next-line require-jsdoc - oncreate: function (node) { + oncreate: (node) => { cleanCodeMirror(this.textarea); markdownFromTextarea(node.dom, true, size); this.textarea = node.dom; }, - // eslint-disable-next-line require-jsdoc - onremove: function () { + onremove: () => { cleanCodeMirror(this.textarea); this.textarea = null; }, diff --git a/lib/public/components/common/navigation/frontLink.js b/lib/public/components/common/navigation/frontLink.js index 8239b31be9..65ad249f82 100644 --- a/lib/public/components/common/navigation/frontLink.js +++ b/lib/public/components/common/navigation/frontLink.js @@ -15,7 +15,6 @@ import { absoluteFrontLink } from './absoluteFrontLink.js'; const PAGE_KEY = 'page'; -// eslint-disable-next-line require-jsdoc const formatParameter = (key, value) => `${key}=${value}`; /** diff --git a/lib/public/components/common/panel/LabelPanelHeaderComponent.js b/lib/public/components/common/panel/LabelPanelHeaderComponent.js index bfc6d0be4d..2ddd55a700 100644 --- a/lib/public/components/common/panel/LabelPanelHeaderComponent.js +++ b/lib/public/components/common/panel/LabelPanelHeaderComponent.js @@ -17,15 +17,12 @@ import { h } from '/js/src/index.js'; * Panel header component formed by a label */ export const LabelPanelHeaderComponent = { - // eslint-disable-next-line require-jsdoc - view: function ({ children, attrs: { required, ...attrs } }) { - return h( - 'label.label.form-check-label.panel-header', - { - ...required ? { title: 'This field is mandatory' } : {}, - ...attrs, - }, - required ? h('span.flex-row.g1', [children, h('.danger', '*')]) : children, - ); - }, + view: ({ children, attrs: { required, ...attrs } }) => h( + 'label.label.form-check-label.panel-header', + { + ...required ? { title: 'This field is mandatory' } : {}, + ...attrs, + }, + required ? h('span.flex-row.g1', [children, h('.danger', '*')]) : children, + ), }; diff --git a/lib/public/components/common/panel/PanelComponent.js b/lib/public/components/common/panel/PanelComponent.js index cf9a14637a..ec8866a683 100644 --- a/lib/public/components/common/panel/PanelComponent.js +++ b/lib/public/components/common/panel/PanelComponent.js @@ -17,8 +17,6 @@ import { h } from '/js/src/index.js'; * Panel component */ export const PanelComponent = { - // eslint-disable-next-line require-jsdoc - view: function ({ children, attrs: { class: classNames = '', ...attrs } }) { - return h('', { ...attrs, class: ['panel', ...classNames.split(' ')].join(' ') }, children); - }, + view: ({ children, attrs: { class: classNames = '', ...attrs } }) => + h('', { ...attrs, class: ['panel', ...classNames.split(' ')].join(' ') }, children), }; diff --git a/lib/public/components/common/popover/PopoverEngine.js b/lib/public/components/common/popover/PopoverEngine.js index 47478f8314..42b95cab17 100644 --- a/lib/public/components/common/popover/PopoverEngine.js +++ b/lib/public/components/common/popover/PopoverEngine.js @@ -26,7 +26,7 @@ */ /** - * @type BoundingBoxProjector + * @type {BoundingBoxProjector} */ const verticalProjector = Object.freeze({ getPosition: (subject) => 'top' in subject ? subject.top : subject.y, @@ -51,7 +51,7 @@ const verticalProjector = Object.freeze({ }); /** - * @type BoundingBoxProjector + * @type {BoundingBoxProjector} */ const horizontalProjector = Object.freeze({ getPosition: (subject) => 'left' in subject ? subject.left : subject.x, diff --git a/lib/public/components/common/popover/overflowBalloon.js b/lib/public/components/common/popover/overflowBalloon.js index 451068d965..58b9788953 100644 --- a/lib/public/components/common/popover/overflowBalloon.js +++ b/lib/public/components/common/popover/overflowBalloon.js @@ -47,8 +47,7 @@ export const overflowBalloon = (content, options = null) => { { anchor: PopoverAnchors.TOP_MIDDLE, popoverClass: ['no-events', 'p2'], - // eslint-disable-next-line require-jsdoc - onTriggerNodeChange: function (previousTriggerNode, newTriggerNode) { + onTriggerNodeChange: (previousTriggerNode, newTriggerNode) => { if (previousTriggerNode) { const node = stretch ? previousTriggerNode.parentNode : previousTriggerNode; @@ -63,10 +62,7 @@ export const overflowBalloon = (content, options = null) => { node.addEventListener('mouseleave', this.hidePopover); } }, - // eslint-disable-next-line require-jsdoc - showCondition: function () { - return doesElementOverflow(this.triggerNode.querySelector('.w-wrapped')); - }, + showCondition: () => doesElementOverflow(this.triggerNode.querySelector('.w-wrapped')), }, ); }; diff --git a/lib/public/components/common/popover/popover.js b/lib/public/components/common/popover/popover.js index bb9812ecc8..383c65935f 100644 --- a/lib/public/components/common/popover/popover.js +++ b/lib/public/components/common/popover/popover.js @@ -27,7 +27,7 @@ const DEFAULT_DISPLAY_ZONE_MARGIN = { left: 15, top: 15 }; /** * @callback onTriggerNodeChange Function called when the trigger node change (this bound to the popover component instance) * - * @this PopoverComponent + * @type {PopoverComponent} * * @param {HTMLElement|null} previousTriggerNode the previous trigger node if it exists (null if the node is created) * @param {HTMLElement|null} newTriggerNode the new trigger node if it exists (null if the node is removed) @@ -37,7 +37,7 @@ const DEFAULT_DISPLAY_ZONE_MARGIN = { left: 15, top: 15 }; /** * @callback onPopoverNodeChange Function called when the popover node change (this bound to the popover component instance) * - * @this PopoverComponent + * @type {PopoverComponent} * * @param {HTMLElement|null} previousPopoverNode the previous popover node if it exists (null if the node is created) * @param {HTMLElement|null} newPopoverNode the new popover node if it exists (null if the node is removed) @@ -47,7 +47,7 @@ const DEFAULT_DISPLAY_ZONE_MARGIN = { left: 15, top: 15 }; /** * @callback popoverShowConditionCallback Function called before displaying the popover to eventually prevent the display * - * @this PopoverComponent + * @type {PopoverComponent} * * @return {boolean} if false, popover will not be displayed */ @@ -79,9 +79,11 @@ class PopoverComponent extends StatefulComponent { /** * Constructor * - * @param {Component} trigger the trigger component - * @param {Component} content the popover component - * @param {PopoverConfiguration} configuration the popover options + * @param {object} parameters the component parameters + * @param {object} parameters.attrs the component attributes + * @param {Component} parameters.attrs.trigger the trigger component + * @param {Component} parameters.attrs.content the popover component + * @param {PopoverConfiguration} parameters.attrs.configuration the popover options */ constructor({ attrs: { trigger, content, configuration } }) { super(); @@ -106,7 +108,7 @@ class PopoverComponent extends StatefulComponent { this.togglePopover = this.togglePopover.bind(this); } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc onbeforeupdate({ attrs: { trigger, content, configuration } }) { this._triggerComponent = trigger; this._contentCompoenent = content; diff --git a/lib/public/components/common/popover/popoverPreConfigurations.js b/lib/public/components/common/popover/popoverPreConfigurations.js index 12869ec392..37dd8b6865 100644 --- a/lib/public/components/common/popover/popoverPreConfigurations.js +++ b/lib/public/components/common/popover/popoverPreConfigurations.js @@ -14,11 +14,8 @@ import { documentClickTaggedEventRegistry } from '../../../utilities/documentCli export const PopoverTriggerPreConfiguration = Object.freeze({ click: Object.freeze({ - // eslint-disable-next-line require-jsdoc - onTriggerNodeChange: function (previousTriggerNode, newTriggerNode) { - // eslint-disable-next-line require-jsdoc + onTriggerNodeChange: (previousTriggerNode, newTriggerNode) => { const hideDropdownOnEscape = (e) => e.key === 'Escape' && this.hidePopover(); - // eslint-disable-next-line require-jsdoc const handleClick = (e) => { documentClickTaggedEventRegistry.tagEvent(e, this.key); this.togglePopover(); @@ -36,9 +33,7 @@ export const PopoverTriggerPreConfiguration = Object.freeze({ window.addEventListener('keyup', hideDropdownOnEscape); } }, - // eslint-disable-next-line require-jsdoc - onPopoverNodeChange: function (previousPopoverNode, newPopoverNode) { - // eslint-disable-next-line require-jsdoc + onPopoverNodeChange: (previousPopoverNode, newPopoverNode) => { const handleClick = (e) => documentClickTaggedEventRegistry.tagEvent(e, this.key); if (previousPopoverNode) { @@ -57,8 +52,7 @@ export const PopoverTriggerPreConfiguration = Object.freeze({ * @type {Readonly>} */ hover: Object.freeze({ - // eslint-disable-next-line require-jsdoc - onTriggerNodeChange: function (previousTriggerNode, newTriggerNode) { + onTriggerNodeChange: (previousTriggerNode, newTriggerNode) => { if (previousTriggerNode) { previousTriggerNode.removeEventListener('mouseenter', this.showPopover); previousTriggerNode.removeEventListener('mouseleave', this.hidePopover); diff --git a/lib/public/components/common/selection/dropdown/SelectionDropdownModel.js b/lib/public/components/common/selection/dropdown/SelectionDropdownModel.js index e77f5207f4..0d58b124a1 100644 --- a/lib/public/components/common/selection/dropdown/SelectionDropdownModel.js +++ b/lib/public/components/common/selection/dropdown/SelectionDropdownModel.js @@ -34,7 +34,6 @@ export class SelectionDropdownModel extends SelectionModel { this._initialize(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/components/common/selection/dropdown/selectionDropdown.js b/lib/public/components/common/selection/dropdown/selectionDropdown.js index 9e0bce66a1..1319259f64 100644 --- a/lib/public/components/common/selection/dropdown/selectionDropdown.js +++ b/lib/public/components/common/selection/dropdown/selectionDropdown.js @@ -39,11 +39,10 @@ import { dropdown } from '../../popover/dropdown.js'; * @param {SelectionDropdownModel} dropdownModel the dropdown model * @param {string} selectorPrefix the prefix used to generate DOM selectors * @param {DisplayDropdownOption} displayOption function used to display a given option - * @param {Observable} openingObservable observable notified when the options list is openened + * @param {Observable} openingObservable observable notified when the options list is opened * @return {Component} the dropdown options component */ const dropdownOptions = (dropdownModel, selectorPrefix, displayOption, openingObservable) => { - // eslint-disable-next-line require-jsdoc const onSelectionChange = (option, state) => { state ? dropdownModel.select(option) : dropdownModel.deselect(option); }; @@ -80,19 +79,19 @@ const dropdownOptions = (dropdownModel, selectorPrefix, displayOption, openingOb oninput: (e) => { dropdownModel.searchInputContent = e.target.value; }, - // eslint-disable-next-line require-jsdoc - oncreate: function ({ dom }) { + + oncreate: ({ dom }) => { this.onOpen = () => dom.focus(); openingObservable.observe(this.onOpen); }, - // eslint-disable-next-line require-jsdoc - onupdate: function ({ dom }) { + + onupdate: ({ dom }) => { openingObservable.unobserve(this.onOpen); this.onOpen = () => dom.focus(); openingObservable.observe(this.onOpen); }, - // eslint-disable-next-line require-jsdoc - onremove: function () { + + onremove: () => { openingObservable.unobserve(this.onOpen); delete this.onOpen; }, diff --git a/lib/public/components/common/spinner.js b/lib/public/components/common/spinner.js index c124ffcbd8..c6e586b26b 100644 --- a/lib/public/components/common/spinner.js +++ b/lib/public/components/common/spinner.js @@ -16,9 +16,10 @@ import { h, switchCase } from '/js/src/index.js'; /** * Generic page loading placeholder. * - * @param {number} [size] The size of the spinner. - * @param {'left'|'start'|'center'|'right'|'end'} [justify] the alignment of the icon - * @param {boolean} [absolute] true so the spinner will be vertically centered in the container + * @param {object} [options] The options for + * @param {number} [options.size] The size of the spinner. + * @param {'left'|'start'|'center'|'right'|'end'} [options.justify] the alignment of the icon + * @param {boolean} [options.absolute] true so the spinner will be vertically centered in the container * @return {Component} The spinner. */ const spinner = ({ size = 10, justify = 'center', absolute = true } = {}) => h(`.w-100.flex-row.justify-${switchCase(justify, { diff --git a/lib/public/components/common/table/SortModel.js b/lib/public/components/common/table/SortModel.js index fceb64c998..a58e087820 100644 --- a/lib/public/components/common/table/SortModel.js +++ b/lib/public/components/common/table/SortModel.js @@ -24,7 +24,6 @@ export class SortModel extends Observable { constructor() { super(); - // eslint-disable-next-line prefer-destructuring this._appliedDirection = this.defaultOrder; this._appliedOn = null; diff --git a/lib/public/components/common/table/profiles.js b/lib/public/components/common/table/profiles.js index 2f057c78d7..078e6c51fb 100644 --- a/lib/public/components/common/table/profiles.js +++ b/lib/public/components/common/table/profiles.js @@ -14,7 +14,7 @@ /** * Provides constants for common profiles * - * @type {Object} + * @type {object} - profile constants */ export const profiles = { diff --git a/lib/public/components/common/table/table.js b/lib/public/components/common/table/table.js index 97dcddaecd..1962efc374 100644 --- a/lib/public/components/common/table/table.js +++ b/lib/public/components/common/table/table.js @@ -22,9 +22,6 @@ import { remoteDataTableBody } from './remoteDataTableBody.js'; * @typedef Column description of a table column * @property {string} key the key under which the column data is stored in the data array * @property {Object} name the text displayed as column header - * @property {Array|string|Object} [profiles] the list of profiles (or the single profile) to which the column is - * restricted to. If this is an object, the object's properties define configuration override (property's value) - * under specific profiles (property's key) * @property {string|Object} [information] extra information given to the header of the column * @property {boolean} [visible] false to hide the column * @property {string|Symbol|Array|Object} [profiles] may be one of the following (note that if the table has no explicit profile, it will be @@ -43,7 +40,7 @@ import { remoteDataTableBody } from './remoteDataTableBody.js'; * extract the popover text from the cell's data * @property {Object} [size] alias for classes, **deprecated** * @property {Object} [classes] css classes to apply on each row (head and body) - * @property {function(*, Object)|null} [format] function to apply on cell's data to obtain cell's content (the function + * @property {((data: any, row: Object) => any) | null} [format] function to apply on cell's data to obtain cell's content (the function * can optionally take the full row's content as second parameter). As a default, display data as is * @property {Object} [inlineFilter] configuration of the inline filter to apply on the column * @property {Object} [sortable] diff --git a/lib/public/components/modal/ModalModel.js b/lib/public/components/modal/ModalModel.js index 5c8c4ba4fa..6bc1569a6a 100644 --- a/lib/public/components/modal/ModalModel.js +++ b/lib/public/components/modal/ModalModel.js @@ -26,7 +26,9 @@ import { Observable } from '/js/src/index.js'; * dismissed, the previous one will then be displayed until it is displayed, and so on */ export class ModalModel extends Observable { - // eslint-disable-next-line require-jsdoc + /** + * Constructor for the model of the modal + */ constructor() { super(); diff --git a/lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js b/lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js index 2a85370099..9d1f940570 100644 --- a/lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js +++ b/lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js @@ -20,7 +20,6 @@ import { qcFlagTypeColoredBadge } from './qcFlagTypeColoredBadge.js'; * Model storing state of a selection of QC flag types picked from the list of all the existing types */ export class QcFlagTypesSelectionDropdownModel extends SelectionDropdownModel { - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -31,7 +30,6 @@ export class QcFlagTypesSelectionDropdownModel extends SelectionDropdownModel { }); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/components/qcFlags/qcFlagsBreadcrumbs.js b/lib/public/components/qcFlags/qcFlagsBreadcrumbs.js index 97d5f6ceb4..f78b2af385 100644 --- a/lib/public/components/qcFlags/qcFlagsBreadcrumbs.js +++ b/lib/public/components/qcFlags/qcFlagsBreadcrumbs.js @@ -8,11 +8,11 @@ import spinner from '../common/spinner.js'; /** * Render QC flag(-s) breadcrumbs * - * @param {object} qcBreacrumbsElements breadcrumbs elements - * @param {Run} remoteRun run remote data - * @param {number} [remoteDataPass] data pass remote data -- exclusive with `remoteSimulationPass` - * @param {object} [remoteSimulationPass] simulation pass remote data -- exclusive with `remotedataPass` - * @param {number} remoteDplDetector dpl detector remote data + * @param {object} qcBreadcrumbsElements breadcrumbs elements + * @param {RemoteData} [qcBreadcrumbsElements.remoteDataPass] data pass remote data - exclusive with `remoteSimulationPass` + * @param {RemoteData} [qcBreadcrumbsElements.remoteSimulationPass] simulation pass remote data - exclusive with `remotedataPass` + * @param {RemoteData} qcBreadcrumbsElements.remoteRun run remote data + * @param {RemoteData} qcBreadcrumbsElements.remoteDplDetector dpl detector remote data * @return {Component} breadcrumbs */ export const qcFlagsBreadcrumbs = ({ remoteDataPass, remoteSimulationPass, remoteRun, remoteDplDetector }) => { diff --git a/lib/public/components/qcFlags/qcFlagsPagesButtons.js b/lib/public/components/qcFlags/qcFlagsPagesButtons.js index e483c493ca..ba33381818 100644 --- a/lib/public/components/qcFlags/qcFlagsPagesButtons.js +++ b/lib/public/components/qcFlags/qcFlagsPagesButtons.js @@ -24,9 +24,9 @@ import { h, iconPlus, iconWarning } from '/js/src/index.js'; * @param {RemoteData} remoteRun run remote data * @param {number} dplDetectorId DPL detector id * @param {RemoteData} remoteDplDetectorsUserHasAccessTo dpl detectors list remote data - * @param {objcet} [options] display options + * @param {object} [options] display options * @param {Component} [options.noPermissionContent] a display in case user has no permission to manage QC flags for given detector - * @property {string[]} [linkClasses] css classes to apply to the link (in addition to the default ones) + * @param {string[]} [options.linkClasses] css classes to apply to the link (in addition to the default ones) * @return {Component} link */ export const qcFlagCreationPanelLink = ( @@ -85,6 +85,7 @@ export const qcFlagCreationPanelLink = ( /** * Render link to QC flag overview page * @param {*} content content to display + * @param {object} scope object with dataPassId or simulationPassId * @param {number} [scope.dataPassId] data pass id - exclusive with simulationPassId parameter * @param {number} [scope.simulationPassId] simulation pass id - exclusive with dataPassId parameter * @param {number} scope.runNumber run number diff --git a/lib/public/components/runTypes/RunTypesSelectionDropdownModel.js b/lib/public/components/runTypes/RunTypesSelectionDropdownModel.js index bfc0e8c484..151f645c1f 100644 --- a/lib/public/components/runTypes/RunTypesSelectionDropdownModel.js +++ b/lib/public/components/runTypes/RunTypesSelectionDropdownModel.js @@ -27,7 +27,6 @@ export class RunTypesSelectionDropdownModel extends SelectionDropdownModel { super({ availableOptions: RemoteData.notAsked() }); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/components/tag/TagSelectionDropdownModel.js b/lib/public/components/tag/TagSelectionDropdownModel.js index 5de6abcf34..5296d0672b 100644 --- a/lib/public/components/tag/TagSelectionDropdownModel.js +++ b/lib/public/components/tag/TagSelectionDropdownModel.js @@ -31,7 +31,6 @@ export class TagSelectionDropdownModel extends SelectionDropdownModel { this._includeArchived = includeArchived; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/components/tag/tagBadge.js b/lib/public/components/tag/tagBadge.js index a43d82532e..bd58bd28c9 100644 --- a/lib/public/components/tag/tagBadge.js +++ b/lib/public/components/tag/tagBadge.js @@ -19,11 +19,17 @@ import { tooltip } from '../common/popover/tooltip.js'; * Display a colored tag badge * * @param {object} tag the tag to display + * @param {string} tag.text the text of the badge + * @param {boolean} [tag.archived] if true, the badge will be displayed as archived + * @param {string} [tag.color] the color of the badge + * @param {string} [tag.description] the description of the badge * @param {object} [configuration] the configuration of the tag badge - * @param {boolean} [configuration.normalSize] if true, the badge will be displayed in normal size * @return {Component} the tag badge */ export const tagBadge = ({ text, archived, color, description }, configuration) => { + /** + * @param {boolean} [configuration.normalSize] if true, the badge will be displayed in normal size + */ const { normalSize } = configuration || {}; return badge( diff --git a/lib/public/models/CreationModel.js b/lib/public/models/CreationModel.js index 4d80d021da..44b18fdbe4 100644 --- a/lib/public/models/CreationModel.js +++ b/lib/public/models/CreationModel.js @@ -98,7 +98,6 @@ export class CreationModel extends Observable { /** * Returns a serializable version of the current data * - * @return {object} the current data * @private */ _getSerializableData() { diff --git a/lib/public/models/UserRoleSelectionModel.js b/lib/public/models/UserRoleSelectionModel.js index 47c315bf2a..dc12919a77 100644 --- a/lib/public/models/UserRoleSelectionModel.js +++ b/lib/public/models/UserRoleSelectionModel.js @@ -21,7 +21,6 @@ const DEFAULT_ROLES_OPTIONS = [{ value: 'admin' }]; * Model storing state of selected Bkp roles */ export class UserRoleSelectionModel extends SelectionDropdownModel { - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -29,7 +28,6 @@ export class UserRoleSelectionModel extends SelectionDropdownModel { super({ defaultSelection: DEFAULT_ROLES_OPTIONS }); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/services/lhcFill/LhcFillStatisticsExtractor.js b/lib/public/services/lhcFill/LhcFillStatisticsExtractor.js index 51f9167056..4351e1f89a 100644 --- a/lib/public/services/lhcFill/LhcFillStatisticsExtractor.js +++ b/lib/public/services/lhcFill/LhcFillStatisticsExtractor.js @@ -136,7 +136,6 @@ export class LhcFillStatisticsExtractor { const totalRunsDuration = this._rawTimeSegments.reduce((sum, segment) => sum + segment.end - segment.start, 0); - // eslint-disable-next-line require-jsdoc const getEfficiencyFromCoverage = (coverage) => coverage / this._stableBeamsDuration; const perDetectorsEfficiency = new Map(); for (const [detector, merger] of this._perDetetorsTimeSegmentsMergers.entries()) { diff --git a/lib/public/utilities/ObservableData.js b/lib/public/utilities/ObservableData.js index a5e61a1566..8465ad0252 100644 --- a/lib/public/utilities/ObservableData.js +++ b/lib/public/utilities/ObservableData.js @@ -71,7 +71,6 @@ class ObservableDataWithProcessing extends ObservableData { this._processors = processors; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/utilities/createPortal.js b/lib/public/utilities/createPortal.js index 85d7fb2312..4678993be4 100644 --- a/lib/public/utilities/createPortal.js +++ b/lib/public/utilities/createPortal.js @@ -36,7 +36,7 @@ class Portal { this._propagateClick = this._propagateClick.bind(this); } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc oncreate({ dom, children, text }) { /* * For simplicity, create a div that will serve as root for portal's target. @@ -57,7 +57,7 @@ class Portal { mount(this.rootNode, this.content, this.model, false); } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc onupdate({ dom, children, text }) { if (!this.content) { return; @@ -70,7 +70,7 @@ class Portal { this.model.notify(); } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc onremove() { this._portalSource = null; if (this.container.contains(this.rootNode)) { @@ -81,7 +81,7 @@ class Portal { } } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc view() { return h('.d-none'); } diff --git a/lib/public/utilities/durationUtils.mjs b/lib/public/utilities/durationUtils.mjs index 5454725faf..e7e1dde7d9 100644 --- a/lib/public/utilities/durationUtils.mjs +++ b/lib/public/utilities/durationUtils.mjs @@ -35,9 +35,10 @@ export const splitDuration = (duration) => { /** * Returns the total duration composed by a given amount of hours, minutes and seconds * - * @param {number} hours the amount of hours - * @param {minutes} minutes the amount of minutes - * @param {seconds} seconds the amount of seconds + * @param {object} duration the duration to merge + * @param {number} duration.hours the amount of hours + * @param {number} duration.minutes the amount of minutes + * @param {number} duration.seconds the amount of seconds * * @return {number} the total duration (in milliseconds) */ diff --git a/lib/public/utilities/export.js b/lib/public/utilities/export.js index b8540b2ea6..0b5a069abb 100644 --- a/lib/public/utilities/export.js +++ b/lib/public/utilities/export.js @@ -20,8 +20,8 @@ * @return {void} */ const downloadFile = (content, fileName, contentType) => { - const a = document.createElement('a'); //eslint-disable-line - const file = new Blob([content], { type: contentType }); //eslint-disable-line + const a = document.createElement('a'); + const file = new Blob([content], { type: contentType }); a.href = URL.createObjectURL(file); a.download = fileName; a.click(); @@ -50,7 +50,7 @@ const createJSONExport = (content, fileName, contentType) => { */ const createCSVExport = (content, fileName, contentType) => { const items = content; - const replacer = (key, value) => value === null ? '' : value; //eslint-disable-line + const replacer = (key, value) => value === null ? '' : value; const header = Object.keys(items[0]); let csv = items.map((row) => header.map((fieldName) => JSON.stringify(row[fieldName], replacer))); csv.unshift(header.join(',')); diff --git a/lib/public/utilities/fetch/PaginatedRemoteDataSource.js b/lib/public/utilities/fetch/PaginatedRemoteDataSource.js index 5990a6ca5d..bc6c4e5de0 100644 --- a/lib/public/utilities/fetch/PaginatedRemoteDataSource.js +++ b/lib/public/utilities/fetch/PaginatedRemoteDataSource.js @@ -17,10 +17,9 @@ import { getRemoteDataSlice } from './getRemoteDataSlice.js'; * Data source fetching paginated remote data */ export class PaginatedRemoteDataSource extends RemoteDataSource { - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc - * @return {Promise<{data: *, totalCount: number}>} + * @return {Promise<{data: *, totalCount: number}>} paginated data */ async getRemoteData(endpoint) { return getRemoteDataSlice(endpoint, { signal: this._abortController.signal }); diff --git a/lib/public/utilities/formatting/formatDuration.mjs b/lib/public/utilities/formatting/formatDuration.mjs index e87311f4e7..5ccf26fa40 100644 --- a/lib/public/utilities/formatting/formatDuration.mjs +++ b/lib/public/utilities/formatting/formatDuration.mjs @@ -26,7 +26,6 @@ export const formatDuration = (duration) => { const { hours, minutes, seconds } = splitDuration(duration); - // eslint-disable-next-line require-jsdoc const formatNumber = (number) => `${number}`.padStart(2, '0'); return `${formatNumber(hours)}:${formatNumber(minutes)}:${formatNumber(seconds)}`; diff --git a/lib/public/utilities/formatting/formatFloat.js b/lib/public/utilities/formatting/formatFloat.js index d8cecf5ef9..ad232fdbe2 100644 --- a/lib/public/utilities/formatting/formatFloat.js +++ b/lib/public/utilities/formatting/formatFloat.js @@ -14,6 +14,7 @@ /** * Format float number * @param {number} value number to be formatted + * @param {object} options options for formatting * @param {number} [options.precision = 3] precision of displayed value * @return {string} formatted number */ diff --git a/lib/public/utilities/removeElement.js b/lib/public/utilities/removeElement.js index a00670f8c4..21139e3c77 100644 --- a/lib/public/utilities/removeElement.js +++ b/lib/public/utilities/removeElement.js @@ -18,7 +18,6 @@ * @returns {undefined} */ const removeElement = (selector) => { - // eslint-disable-next-line no-undef const element = document.querySelector(selector); if (element === null) { // No need to remove something that doesn't exists diff --git a/lib/public/utilities/scrollTo.js b/lib/public/utilities/scrollTo.js index 96b3382e49..a3375106c8 100644 --- a/lib/public/utilities/scrollTo.js +++ b/lib/public/utilities/scrollTo.js @@ -18,7 +18,6 @@ * @returns {undefined} */ const scrollToPosition = (x, y) => { - // eslint-disable-next-line no-undef window.scrollTo(x, y); }; @@ -31,7 +30,6 @@ const scrollToPosition = (x, y) => { */ const scrollTo = (selector, timeout = 0) => { setTimeout(() => { - // eslint-disable-next-line no-undef const element = document.querySelector(selector); const x = 0; const y = element === null || isNaN(element.offsetTop) ? 0 : element.offsetTop; diff --git a/lib/public/utilities/targetURL.js b/lib/public/utilities/targetURL.js index 7bf5c621d9..7a635f7378 100644 --- a/lib/public/utilities/targetURL.js +++ b/lib/public/utilities/targetURL.js @@ -25,7 +25,6 @@ const targetURL = (model, targetKey, targetValue) => { [targetKey]: targetValue, }; - // eslint-disable-next-line require-jsdoc const getParameterExpression = (key, value) => `${key}=${value}`; return `?${Object.entries(newParams).map(([key, value]) => getParameterExpression(key, value)).join('&')}`; }; diff --git a/lib/public/views/About/Overview/index.js b/lib/public/views/About/Overview/index.js index 9989e3187a..48bb3a8337 100644 --- a/lib/public/views/About/Overview/index.js +++ b/lib/public/views/About/Overview/index.js @@ -106,8 +106,9 @@ const failurePanelBody = (statuses) => h('.flex-column.g2', [ /** * Returns a panel displaying the status of the service. - * @param {string} name the name of the service - * @param {RemoteData} infoRemoteData the remote data corresponding to the service + * @param {Object} service the service to display + * @param {string} service.name the name of the service + * @param {RemoteData} service.infoRemoteData the remote data corresponding to the service * @returns {vnode} a panel for the service */ const servicePanel = ({ name, infoRemoteData }) => { @@ -129,6 +130,7 @@ const servicePanel = ({ name, infoRemoteData }) => { /** * Returns a view of information panels for each service * @param {object} model Pass the model to access the defined functions + * @param {AboutModel} model.aboutModel the about model * @returns {vnode} the view of services */ const aboutOverview = ({ aboutModel }) => { diff --git a/lib/public/views/DataPasses/DataPassesModel.js b/lib/public/views/DataPasses/DataPassesModel.js index 1f1c9d2850..5d987b31d7 100644 --- a/lib/public/views/DataPasses/DataPassesModel.js +++ b/lib/public/views/DataPasses/DataPassesModel.js @@ -34,6 +34,7 @@ export class DataPassesModel extends Observable { /** * Load the overview page model + * @param {object} params the parameters to load the overview page with * @param {string} [params.lhcPeriodId] lhc period id which data passes should be fetched * @returns {void} */ @@ -60,6 +61,7 @@ export class DataPassesModel extends Observable { /** * Load the overview page model + * @param {object} params the parameters to load the overview page with * @param {string} [params.simulationPassId] simulation pass id which data passes should be fetched * @returns {void} */ diff --git a/lib/public/views/DataPasses/PerLhcPeriodOverview/DataPassesPerLhcPeriodOverviewModel.js b/lib/public/views/DataPasses/PerLhcPeriodOverview/DataPassesPerLhcPeriodOverviewModel.js index 76c281d95b..90131a34ba 100644 --- a/lib/public/views/DataPasses/PerLhcPeriodOverview/DataPassesPerLhcPeriodOverviewModel.js +++ b/lib/public/views/DataPasses/PerLhcPeriodOverview/DataPassesPerLhcPeriodOverviewModel.js @@ -27,7 +27,6 @@ export class DataPassesPerLhcPeriodOverviewModel extends OverviewPageModel { this._registerFilter(this._nameFilterModel); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ @@ -36,7 +35,6 @@ export class DataPassesPerLhcPeriodOverviewModel extends OverviewPageModel { super.load(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ diff --git a/lib/public/views/DataPasses/PerSimulationPassOverview/DataPassesPerSimulationPassOverviewModel.js b/lib/public/views/DataPasses/PerSimulationPassOverview/DataPassesPerSimulationPassOverviewModel.js index 0795701779..88e033a596 100644 --- a/lib/public/views/DataPasses/PerSimulationPassOverview/DataPassesPerSimulationPassOverviewModel.js +++ b/lib/public/views/DataPasses/PerSimulationPassOverview/DataPassesPerSimulationPassOverviewModel.js @@ -41,7 +41,7 @@ export class DataPassesPerSimulationPassOverviewModel extends OverviewPageModel } /** - * Fetch Simulaiton Pass data which data passes are fetched + * Fetch Simulation Pass data which data passes are fetched * @return {Promise} promise */ async _fetchSimulationPass() { @@ -54,7 +54,6 @@ export class DataPassesPerSimulationPassOverviewModel extends OverviewPageModel } } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ @@ -63,7 +62,6 @@ export class DataPassesPerSimulationPassOverviewModel extends OverviewPageModel super.load(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ diff --git a/lib/public/views/Environments/Details/EnvironmentDetailsModel.js b/lib/public/views/Environments/Details/EnvironmentDetailsModel.js index e1a17c84f2..09054f4e3e 100644 --- a/lib/public/views/Environments/Details/EnvironmentDetailsModel.js +++ b/lib/public/views/Environments/Details/EnvironmentDetailsModel.js @@ -115,7 +115,6 @@ class EnvironmentDetailTabbedPanelModel extends TabbedPanelModel { this._fetchCurrentPanelData(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/EosReport/create/EosReportCreationModel.js b/lib/public/views/EosReport/create/EosReportCreationModel.js index 2a6a06c591..c3d70e0c33 100644 --- a/lib/public/views/EosReport/create/EosReportCreationModel.js +++ b/lib/public/views/EosReport/create/EosReportCreationModel.js @@ -77,7 +77,6 @@ export class EosReportCreationModel extends CreationModel { return this._currentShiftData; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -117,7 +116,6 @@ export class EosReportCreationModel extends CreationModel { } } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/EosReport/create/typeSpecific/eosFormEcsSpecificPart.js b/lib/public/views/EosReport/create/typeSpecific/eosFormEcsSpecificPart.js index b038f34de8..513c668aa4 100644 --- a/lib/public/views/EosReport/create/typeSpecific/eosFormEcsSpecificPart.js +++ b/lib/public/views/EosReport/create/typeSpecific/eosFormEcsSpecificPart.js @@ -82,6 +82,8 @@ const formatEnvironment = (environment, environmentComments, runComments) => [ * * @param {object} formData the creation model's form current data * @param {object} shiftData the auto-generated shift data + * @param {object} shiftData.typeSpecific ECS type-specific shift data + * @param {Environment[]} shiftData.typeSpecific.environments the environments * @return {Component} the ecs form specific part */ export const eosFormEcsSpecificPart = (formData, { typeSpecific: { environments } }) => h('#type-specific.panel', [ diff --git a/lib/public/views/EosReport/create/typeSpecific/eosFormQcPdpSpecificPart.js b/lib/public/views/EosReport/create/typeSpecific/eosFormQcPdpSpecificPart.js index 67c35d067b..43f3022963 100644 --- a/lib/public/views/EosReport/create/typeSpecific/eosFormQcPdpSpecificPart.js +++ b/lib/public/views/EosReport/create/typeSpecific/eosFormQcPdpSpecificPart.js @@ -65,6 +65,7 @@ const formatDefinitionPanel = (definition, runs, runComments) => [ * * @param {object} formData the creation model's form current data * @param {object} shiftData the auto-generated shift data + * @param {object} shiftData.typeSpecific QC/PDP type-specific shift data * @return {Component} the QC/PDP form specific part */ export const eosFormQcPdpSpecificPart = (formData, { typeSpecific }) => { diff --git a/lib/public/views/EosReport/create/typeSpecific/eosFormShiftLeaderSpecificPart.js b/lib/public/views/EosReport/create/typeSpecific/eosFormShiftLeaderSpecificPart.js index c19d27950c..17a5150468 100644 --- a/lib/public/views/EosReport/create/typeSpecific/eosFormShiftLeaderSpecificPart.js +++ b/lib/public/views/EosReport/create/typeSpecific/eosFormShiftLeaderSpecificPart.js @@ -40,6 +40,8 @@ const formatDefinitionPanel = (definition, runs) => [ * @param {object} formData the creation model's form current data * @param {object} shiftData the auto-generated shift data * @param {{magnets: AliceMagnetsConfigurationSnapshotsFormModel}} shiftData.typeSpecific SL type-specific shift data + * @param {object} shiftData.shift shift period data + * @param {object[]} shiftData.issuesLogs the issues logs * @return {Component} the shift leader form specific part */ export const eosFormShiftLeaderSpecificPart = (formData, { typeSpecific, shift, issuesLogs }) => { diff --git a/lib/public/views/Flps/Details/index.js b/lib/public/views/Flps/Details/index.js index e29e2d49f3..ae4a67e715 100644 --- a/lib/public/views/Flps/Details/index.js +++ b/lib/public/views/Flps/Details/index.js @@ -19,10 +19,11 @@ import flpRun from '../../../components/FlpRun/index.js'; import { currentPageAndParameters } from '../../../utilities/currentPageAndParameters.js'; import { tabLink } from '../../../components/common/navigation/tabLink.js'; +// eslint-disable-next-line jsdoc/require-returns-check /** * The VNode of the Flp Detail screen. * - * @param {*} model Pass the model to access the defined functions. + * @param {Model} model Pass the model to access the defined functions. * @return {vnode} The VNode of the Flp Detail screen. */ const flpDetails = (model) => { @@ -76,6 +77,7 @@ const flpDetails = (model) => { }, 'Return to Overview'), ]); } + return; }; export default (model) => flpDetails(model); diff --git a/lib/public/views/Home/Overview/HomePage.js b/lib/public/views/Home/Overview/HomePage.js index d57038c016..955bcc3189 100644 --- a/lib/public/views/Home/Overview/HomePage.js +++ b/lib/public/views/Home/Overview/HomePage.js @@ -26,6 +26,10 @@ const MIN_ROWS = 5; /** * Home Page component * @param {Object} model global model + * @param {HomeModel} model.home home model + * @param {LogsOverviewModel} model.home.logsOverviewModel logs overview model + * @param {RunsOverviewModel} model.home.runsOverviewModel runs overview model + * @param {LhcFillsOverviewModel} model.home.lhcFillsOverviewModel lhc fills overview model * @return {Component} Return the component of the home page */ export const HomePage = ({ home: { logsOverviewModel, runsOverviewModel, lhcFillsOverviewModel } }) => { diff --git a/lib/public/views/LhcFills/Detail/LhcFillDetailsModel.js b/lib/public/views/LhcFills/Detail/LhcFillDetailsModel.js index 61e0ee9446..eab977b12e 100644 --- a/lib/public/views/LhcFills/Detail/LhcFillDetailsModel.js +++ b/lib/public/views/LhcFills/Detail/LhcFillDetailsModel.js @@ -136,7 +136,6 @@ class LhcFillDetailsTabbedPanelModel extends TabbedPanelModel { return this._runsTabModel; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/LhcFills/Overview/LhcFillsOverviewModel.js b/lib/public/views/LhcFills/Overview/LhcFillsOverviewModel.js index 3f90a515b2..e1958789b2 100644 --- a/lib/public/views/LhcFills/Overview/LhcFillsOverviewModel.js +++ b/lib/public/views/LhcFills/Overview/LhcFillsOverviewModel.js @@ -31,7 +31,6 @@ export class LhcFillsOverviewModel extends OverviewPageModel { this._stableBeamsOnly = stableBeamsOnly; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -42,7 +41,6 @@ export class LhcFillsOverviewModel extends OverviewPageModel { return items; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -50,7 +48,6 @@ export class LhcFillsOverviewModel extends OverviewPageModel { return '/api/lhcFills'; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/Logs/Create/LogCreationModel.js b/lib/public/views/Logs/Create/LogCreationModel.js index 2ff66a3ae2..46a5cc6e77 100644 --- a/lib/public/views/Logs/Create/LogCreationModel.js +++ b/lib/public/views/Logs/Create/LogCreationModel.js @@ -111,7 +111,6 @@ export class LogCreationModel extends Observable { }; if (attachments.length > 0 || tagsTexts.length > 0 || environmentsIds.length > 0 || lhcFillNumbers.length > 0) { - // eslint-disable-next-line no-undef const formData = new FormData(); Object.entries(body).forEach(([key, value]) => formData.append(key, value)); environmentsIds.forEach((environmentId) => formData.append('environments[]', environmentId)); diff --git a/lib/public/views/Logs/Create/TemplatedLogCreationModel.js b/lib/public/views/Logs/Create/TemplatedLogCreationModel.js index 2a4460d394..40e6251789 100644 --- a/lib/public/views/Logs/Create/TemplatedLogCreationModel.js +++ b/lib/public/views/Logs/Create/TemplatedLogCreationModel.js @@ -135,7 +135,6 @@ export class TemplatedLogCreationModel extends LogCreationModel { * Return log properties generated by the current template if it exists, else return the parent's property */ - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -143,7 +142,6 @@ export class TemplatedLogCreationModel extends LogCreationModel { return this._templateModel?.title ?? super.title; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -151,7 +149,6 @@ export class TemplatedLogCreationModel extends LogCreationModel { super.title = title; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -159,7 +156,6 @@ export class TemplatedLogCreationModel extends LogCreationModel { return this._templateModel?.text ?? super.text; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/Logs/Create/panels/LogCreationContentPanel.js b/lib/public/views/Logs/Create/panels/LogCreationContentPanel.js index 889663061d..fa4f1c67bf 100644 --- a/lib/public/views/Logs/Create/panels/LogCreationContentPanel.js +++ b/lib/public/views/Logs/Create/panels/LogCreationContentPanel.js @@ -33,7 +33,6 @@ export const logCreationContentPanel = (value, onChange) => h( { id: 'text', placeholder: 'Your message...', - // eslint-disable-next-line no-return-assign oninput: (e) => onChange(e.target.value), }, { height: '100%' }, diff --git a/lib/public/views/Logs/Details/logTreeViewComponent.js b/lib/public/views/Logs/Details/logTreeViewComponent.js index df861b5403..b88348c616 100644 --- a/lib/public/views/Logs/Details/logTreeViewComponent.js +++ b/lib/public/views/Logs/Details/logTreeViewComponent.js @@ -32,7 +32,6 @@ export const logTreeViewComponent = (treeViewModel) => { Success: (logTreeLeafs) => { const parentLogTitle = logTreeLeafs[0].log.title; - // eslint-disable-next-line require-jsdoc const logTreeLeafDisplay = (log, level, isCollapsed) => h( '.mw-100', { diff --git a/lib/public/views/Logs/FilePreview/attachmentPreviewComponent.js b/lib/public/views/Logs/FilePreview/attachmentPreviewComponent.js index 0112886f00..fde906a4a4 100644 --- a/lib/public/views/Logs/FilePreview/attachmentPreviewComponent.js +++ b/lib/public/views/Logs/FilePreview/attachmentPreviewComponent.js @@ -58,7 +58,7 @@ class AttachmentPreviewComponent extends StatefulComponent { if (response.ok) { try { this._setRemoteFileBlob(RemoteData.success(await response.blob())); - } catch (e) { + } catch { this._setRemoteFileBlob(RemoteData.failure(defaultApiError)); } } else { diff --git a/lib/public/views/Logs/FilePreview/filePreviewComponent.js b/lib/public/views/Logs/FilePreview/filePreviewComponent.js index 8e23b72421..b10f4278e3 100644 --- a/lib/public/views/Logs/FilePreview/filePreviewComponent.js +++ b/lib/public/views/Logs/FilePreview/filePreviewComponent.js @@ -23,9 +23,10 @@ class FileDisplayComponent extends StatefulComponent { /** * Constructor * - * @param {Blob|File} file the file or blob to display - * @param {string} fileName the display name of the file - * @return {Component} the resulting component + * @param {object} parameters the parameters + * @param {object} parameters.attrs the attributes + * @param {Blob|File} parameters.attrs.file the file or blob to display + * @param {string} parameters.attrs.fileName the display name of the file */ oninit({ attrs: { file, fileName } }) { this._fileName = fileName; @@ -80,11 +81,10 @@ class FileDisplayComponent extends StatefulComponent { /** * Render the file read result * - * @param {string} fileReadResult the file read result - * @return {Component} the component + * @return {void} * @private */ - _successComponent(fileReadResult) { // eslint-disable-line no-unused-vars + _successComponent() { throw new Error('Abstract function call'); } @@ -104,7 +104,6 @@ class FileDisplayComponent extends StatefulComponent { * Display an image loaded as a file blob */ class ImageFileDisplayComponent extends FileDisplayComponent { - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -112,7 +111,6 @@ class ImageFileDisplayComponent extends FileDisplayComponent { reader.readAsDataURL(file); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -128,7 +126,6 @@ class ImageFileDisplayComponent extends FileDisplayComponent { * Display a json file loaded as a file blob */ class JsonDisplayComponent extends FileDisplayComponent { - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -136,7 +133,6 @@ class JsonDisplayComponent extends FileDisplayComponent { reader.readAsText(file); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -150,7 +146,6 @@ class JsonDisplayComponent extends FileDisplayComponent { * Display a csv file loaded as a file blob */ class CsvDisplayComponent extends FileDisplayComponent { - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -158,7 +153,6 @@ class CsvDisplayComponent extends FileDisplayComponent { reader.readAsText(file); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -189,7 +183,6 @@ class CsvDisplayComponent extends FileDisplayComponent { * Display a text file loaded as a file blob */ class TextDisplayComponent extends FileDisplayComponent { - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -197,7 +190,6 @@ class TextDisplayComponent extends FileDisplayComponent { reader.readAsText(file); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/Logs/Overview/LogsOverviewModel.js b/lib/public/views/Logs/Overview/LogsOverviewModel.js index 2972678393..a488bfe6e4 100644 --- a/lib/public/views/Logs/Overview/LogsOverviewModel.js +++ b/lib/public/views/Logs/Overview/LogsOverviewModel.js @@ -62,8 +62,9 @@ export class LogsOverviewModel extends Observable { this._logs = RemoteData.NotAsked(); - // eslint-disable-next-line no-return-assign,require-jsdoc - const updateDebounceTime = () => this._debouncedFetchAllLogs = debounce(this.fetchLogs.bind(this), model.inputDebounceTime); + const updateDebounceTime = () => { + this._debouncedFetchAllLogs = debounce(this.fetchLogs.bind(this), model.inputDebounceTime); + }; model.appConfiguration$.observe(() => updateDebounceTime()); updateDebounceTime(); @@ -184,7 +185,6 @@ export class LogsOverviewModel extends Observable { const valuesRegex = /([0-9]+),?/g; let match = valuesRegex.exec(rawRuns); - // eslint-disable-next-line no-cond-assign while (match) { runs.push(parseInt(match[1], 10)); match = valuesRegex.exec(rawRuns); diff --git a/lib/public/views/QcFlagTypes/Create/QcFlagTypeCreationModel.js b/lib/public/views/QcFlagTypes/Create/QcFlagTypeCreationModel.js index 87c2816695..8e80e1aabf 100644 --- a/lib/public/views/QcFlagTypes/Create/QcFlagTypeCreationModel.js +++ b/lib/public/views/QcFlagTypes/Create/QcFlagTypeCreationModel.js @@ -44,7 +44,6 @@ export class QcFlagTypeCreationModel extends CreationModel { this.notify(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -57,7 +56,6 @@ export class QcFlagTypeCreationModel extends CreationModel { }; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -65,7 +63,6 @@ export class QcFlagTypeCreationModel extends CreationModel { return { ...this.formData }; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/QcFlagTypes/Overview/QcFlagTypesOverviewModel.js b/lib/public/views/QcFlagTypes/Overview/QcFlagTypesOverviewModel.js index 4e78c4cf4c..35ed715fa2 100644 --- a/lib/public/views/QcFlagTypes/Overview/QcFlagTypesOverviewModel.js +++ b/lib/public/views/QcFlagTypes/Overview/QcFlagTypesOverviewModel.js @@ -35,7 +35,6 @@ export class QcFlagTypesOverviewModel extends OverviewPageModel { this._registerFilter(this._isBadFilterModel); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ diff --git a/lib/public/views/QcFlags/Create/QcFlagCreationModel.js b/lib/public/views/QcFlags/Create/QcFlagCreationModel.js index e3705210c8..0e539d3501 100644 --- a/lib/public/views/QcFlags/Create/QcFlagCreationModel.js +++ b/lib/public/views/QcFlags/Create/QcFlagCreationModel.js @@ -73,7 +73,6 @@ export class QcFlagCreationModel extends CreationModel { this.notify(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -83,7 +82,6 @@ export class QcFlagCreationModel extends CreationModel { }; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -98,7 +96,6 @@ export class QcFlagCreationModel extends CreationModel { }; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/QcFlags/Create/forDataPass/QcFlagCreationForDataPassModel.js b/lib/public/views/QcFlags/Create/forDataPass/QcFlagCreationForDataPassModel.js index 7e3504229a..979ef241d5 100644 --- a/lib/public/views/QcFlags/Create/forDataPass/QcFlagCreationForDataPassModel.js +++ b/lib/public/views/QcFlags/Create/forDataPass/QcFlagCreationForDataPassModel.js @@ -26,7 +26,7 @@ export class QcFlagCreationForDataPassModel extends QcFlagCreationModel { * @param {number} parameters.runNumber runNumber of target run * @param {number} parameters.dplDetectorId id of target dpl detector * @param {number} parameters.dataPassId id of target data pass - * @param {function(number,*)} onCreationSuccess callback in case of successful QC flag creation + * @param {(data: number, any: any) => void} onCreationSuccess callback in case of successful QC flag creation */ constructor({ runNumber, @@ -41,7 +41,6 @@ export class QcFlagCreationForDataPassModel extends QcFlagCreationModel { this._fetchDataPass(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/QcFlags/Create/forSimulationPass/QcFlagCreationForSimulationPassModel.js b/lib/public/views/QcFlags/Create/forSimulationPass/QcFlagCreationForSimulationPassModel.js index a899c34bb8..208ab2b4bc 100644 --- a/lib/public/views/QcFlags/Create/forSimulationPass/QcFlagCreationForSimulationPassModel.js +++ b/lib/public/views/QcFlags/Create/forSimulationPass/QcFlagCreationForSimulationPassModel.js @@ -27,7 +27,7 @@ export class QcFlagCreationForSimulationPassModel extends QcFlagCreationModel { * @param {number} targetEntitiesIdentifiers.runNumber runNumber of target run * @param {number} targetEntitiesIdentifiers.dplDetectorId id of target dpl detector * @param {number} targetEntitiesIdentifiers.simulationPassId id of target simulation pass pass - * @param {function(number,*)} onCreationSuccess callback in case of successful QC flag creation + * @param {(id: number, param: any) => any} onCreationSuccess callback in case of successful QC flag creation */ constructor({ runNumber, @@ -42,7 +42,6 @@ export class QcFlagCreationForSimulationPassModel extends QcFlagCreationModel { this._fetchSimulationPass(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/QcFlags/Create/qcFlagCreationComponent.js b/lib/public/views/QcFlags/Create/qcFlagCreationComponent.js index 58d01de9fd..0a9b4bd8f2 100644 --- a/lib/public/views/QcFlags/Create/qcFlagCreationComponent.js +++ b/lib/public/views/QcFlags/Create/qcFlagCreationComponent.js @@ -40,7 +40,6 @@ const qcFlagCreationForm = (run, creationModel) => { /** * Create QC flag timestamp inputs if model is in time-based mode - * @param {Run} run run * @return {Component} QC flag timestamp inputs */ const timeBasedPanelBody = () => { diff --git a/lib/public/views/QcFlags/ForDataPass/QcFlagsForDataPassOverviewModel.js b/lib/public/views/QcFlags/ForDataPass/QcFlagsForDataPassOverviewModel.js index 6ff7e56bd8..942058f51a 100644 --- a/lib/public/views/QcFlags/ForDataPass/QcFlagsForDataPassOverviewModel.js +++ b/lib/public/views/QcFlags/ForDataPass/QcFlagsForDataPassOverviewModel.js @@ -32,7 +32,6 @@ export class QcFlagsForDataPassOverviewModel extends QcFlagsOverviewModel { this._dataPass$.bubbleTo(this); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ @@ -44,7 +43,6 @@ export class QcFlagsForDataPassOverviewModel extends QcFlagsOverviewModel { }); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ diff --git a/lib/public/views/QcFlags/ForSimulationPass/QcFlagsForSimulationPassOverviewModel.js b/lib/public/views/QcFlags/ForSimulationPass/QcFlagsForSimulationPassOverviewModel.js index 08815067cc..75a2d2b73e 100644 --- a/lib/public/views/QcFlags/ForSimulationPass/QcFlagsForSimulationPassOverviewModel.js +++ b/lib/public/views/QcFlags/ForSimulationPass/QcFlagsForSimulationPassOverviewModel.js @@ -32,7 +32,6 @@ export class QcFlagsForSimulationPassOverviewModel extends QcFlagsOverviewModel this._simulationPass$.bubbleTo(this); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ @@ -44,7 +43,6 @@ export class QcFlagsForSimulationPassOverviewModel extends QcFlagsOverviewModel }); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ diff --git a/lib/public/views/QcFlags/Overview/QcFlagsOverviewModel.js b/lib/public/views/QcFlags/Overview/QcFlagsOverviewModel.js index 952ede7c98..cd41fd3c55 100644 --- a/lib/public/views/QcFlags/Overview/QcFlagsOverviewModel.js +++ b/lib/public/views/QcFlags/Overview/QcFlagsOverviewModel.js @@ -37,7 +37,6 @@ export class QcFlagsOverviewModel extends OverviewPageModel { this._run$.bubbleTo(this); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ diff --git a/lib/public/views/QcFlags/QcFlagsModel.js b/lib/public/views/QcFlags/QcFlagsModel.js index fbf57a124b..7becb29eb4 100644 --- a/lib/public/views/QcFlags/QcFlagsModel.js +++ b/lib/public/views/QcFlags/QcFlagsModel.js @@ -41,7 +41,10 @@ export class QcFlagsModel extends Observable { /** * Load the overview page model - * + * @param {object} parameters parameters for the model + * @param {number} parameters.runNumber run number + * @param {number} parameters.dataPassId data pass id + * @param {number} parameters.dplDetectorId dpl detector id * @returns {void} */ loadForDataPassOverview({ dataPassId, runNumber, dplDetectorId }) { @@ -62,7 +65,10 @@ export class QcFlagsModel extends Observable { /** * Load the creation for data pass page model - * + * @param {object} parameters parameters for the model + * @param {number} parameters.runNumber run number + * @param {number} parameters.dataPassId data pass id + * @param {number} parameters.dplDetectorId dpl detector id * @returns {void} */ loadCreationForDataPass({ dataPassId, runNumber, dplDetectorId }) { @@ -91,7 +97,11 @@ export class QcFlagsModel extends Observable { /** * Load the QC flag details model - * + * @param {object} parameters parameters for the model + * @param {number} parameters.id run number + * @param {number} parameters.dataPassId data pass id + * @param {number} parameters.runNumber dpl detector id + * @param {number} parameters.dplDetectorId dpl detector id * @returns {void} */ loadDetailsForDataPass({ id, dataPassId, runNumber, dplDetectorId }) { @@ -124,7 +134,10 @@ export class QcFlagsModel extends Observable { /** * Load the overview page model - * + * @param {object} parameters parameters for the model + * @param {number} parameters.simulationPassId simulation pass id + * @param {number} parameters.runNumber run number + * @param {number} parameters.dplDetectorId dpl detector id * @returns {void} */ loadForSimulationPassOverview({ simulationPassId, runNumber, dplDetectorId }) { @@ -145,7 +158,10 @@ export class QcFlagsModel extends Observable { /** * Load the creation for simulation pass page model - * + * @param {object} parameters parameters for the model + * @param {number} parameters.simulationPassId simulation pass id + * @param {number} parameters.runNumber run number + * @param {number} parameters.dplDetectorId dpl detector id * @returns {void} */ loadCreationForSimulationPass({ simulationPassId, runNumber, dplDetectorId }) { @@ -174,7 +190,11 @@ export class QcFlagsModel extends Observable { /** * Load the QC flag details model - * + * @param {object} parameters parameters for the model + * @param {number} parameters.id id + * @param {number} parameters.simulationPassId simulation pass id + * @param {number} parameters.runNumber run number + * @param {number} parameters.dplDetectorId dpl detector id * @returns {void} */ loadDetailsForSimulationPass({ id, simulationPassId, runNumber, dplDetectorId }) { diff --git a/lib/public/views/QcFlags/details/QcFlagDetailsModel.js b/lib/public/views/QcFlags/details/QcFlagDetailsModel.js index 3675937fe8..319f13d8bd 100644 --- a/lib/public/views/QcFlags/details/QcFlagDetailsModel.js +++ b/lib/public/views/QcFlags/details/QcFlagDetailsModel.js @@ -25,8 +25,9 @@ export class QcFlagDetailsModel extends Observable { /** * Constructor * - * @param {number} [parameteres.id] QC flag id - * @param {function} onDeleteSuccess callback in case the flag is successfuly deleted + * @param {object} parameters parameters for the model + * @param {number} [parameters.id] QC flag id + * @param {function} onDeleteSuccess callback in case the flag is successfully deleted */ constructor( { id: qcFlagId }, @@ -199,7 +200,6 @@ class QcFlagVerificationCreationModel extends CreationModel { super(`/api/qcFlags/${qcFlagId}/verify`, onSuccess); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -209,7 +209,6 @@ class QcFlagVerificationCreationModel extends CreationModel { }; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/QcFlags/details/forDataPass/QcFlagDetailsForDataPassModel.js b/lib/public/views/QcFlags/details/forDataPass/QcFlagDetailsForDataPassModel.js index f6fa93e1ad..833680e96b 100644 --- a/lib/public/views/QcFlags/details/forDataPass/QcFlagDetailsForDataPassModel.js +++ b/lib/public/views/QcFlags/details/forDataPass/QcFlagDetailsForDataPassModel.js @@ -23,8 +23,10 @@ export class QcFlagDetailsForDataPassModel extends QcFlagDetailsModel { /** * Constructor * - * @param {number} [parameteres.id] QC flag id - * @param {function} onDeleteSuccess callback in case the flag is successfuly deleted + * @param {object} parameters parameters for the model + * @param {number} [parameters.id] QC flag id + * @param {number} [parameters.dataPassId] data pass id + * @param {function} onDeleteSuccess callback in case the flag is successfully deleted */ constructor( { id, dataPassId }, diff --git a/lib/public/views/QcFlags/details/forSimulationPass/QcFlagDetailsForSimulationPassModel.js b/lib/public/views/QcFlags/details/forSimulationPass/QcFlagDetailsForSimulationPassModel.js index da89ceee73..6b91658c57 100644 --- a/lib/public/views/QcFlags/details/forSimulationPass/QcFlagDetailsForSimulationPassModel.js +++ b/lib/public/views/QcFlags/details/forSimulationPass/QcFlagDetailsForSimulationPassModel.js @@ -23,8 +23,10 @@ export class QcFlagDetailsForSimulationPassModel extends QcFlagDetailsModel { /** * Constructor * - * @param {number} [parameteres.id] QC flag id - * @param {function} onDeleteSuccess callback in case the flag is successfuly deleted + * @param {object} parameters parameters for the model + * @param {number} [parameters.id] QC flag id + * @param {number} parameters.simulationPassId simulation pass id + * @param {function} onDeleteSuccess callback in case the flag is successfully deleted */ constructor( { id, simulationPassId }, diff --git a/lib/public/views/RunTypes/RunTypeModel.js b/lib/public/views/RunTypes/RunTypeModel.js index 7368cde598..4f8136f18d 100644 --- a/lib/public/views/RunTypes/RunTypeModel.js +++ b/lib/public/views/RunTypes/RunTypeModel.js @@ -21,7 +21,6 @@ import { Observable } from '/js/src/index.js'; export default class RunTypeModel extends Observable { /** * Constructor for the run type class. - * @param {model} model the overall model object. * @returns {void} */ constructor() { diff --git a/lib/public/views/Runs/ActiveColumns/runDetectorsAsyncQcActiveColumns.js b/lib/public/views/Runs/ActiveColumns/runDetectorsAsyncQcActiveColumns.js index dfdac3c0f8..71a90ccecc 100644 --- a/lib/public/views/Runs/ActiveColumns/runDetectorsAsyncQcActiveColumns.js +++ b/lib/public/views/Runs/ActiveColumns/runDetectorsAsyncQcActiveColumns.js @@ -60,6 +60,7 @@ const runDetectorAsyncQualityDisplay = ({ dataPassId, simulationPassId }, run, d /** * Format QC summary with color * @param {*} content content + * @param {object} configuration configuration of the display * @param {string} [configuration.color] the color to look for contrast, * in hexa RGB or CSS var() function over variable name expression: e.g. "var(--color-nice)" * @returns {Component} QC summary display diff --git a/lib/public/views/Runs/ActiveColumns/runsActiveColumns.js b/lib/public/views/Runs/ActiveColumns/runsActiveColumns.js index 22dc0cbf90..ec7198ea0e 100644 --- a/lib/public/views/Runs/ActiveColumns/runsActiveColumns.js +++ b/lib/public/views/Runs/ActiveColumns/runsActiveColumns.js @@ -360,7 +360,7 @@ export const runsActiveColumns = { visible: true, profiles: [profiles.none, 'lhcFill', 'environment'], classes: 'w-2 f6 w-wrapped', - // eslint-disable-next-line no-extra-parens + // eslint-disable-next-line @stylistic/js/no-extra-parens format: (nEpns, run) => run.epn ? (typeof nEpns === 'number' ? nEpns : 'ON') : 'OFF', filter: nEpnsFilter, }, diff --git a/lib/public/views/Runs/Details/RunDetailsModel.js b/lib/public/views/Runs/Details/RunDetailsModel.js index f0fc6317c2..d84245f1ac 100644 --- a/lib/public/views/Runs/Details/RunDetailsModel.js +++ b/lib/public/views/Runs/Details/RunDetailsModel.js @@ -57,8 +57,9 @@ export class RunDetailsModel extends Observable { /** * Fetch all data related to run details + * @param {object} params the parameters to fetch the run details * @param {number} [params.runNumber = null] the run Number of the run to display - * @param {number} [params.runId = null] this paramtere is deprecated, use runNumber instead if feasible + * @param {number} [params.runId = null] @deprecated this parameter is deprecated, use runNumber instead if feasible * @param {string} [params.panelKey = null] the key of the current panel * @return {Promise} promise */ @@ -320,7 +321,6 @@ class RunDetailsTabbedPanelModel extends TabbedPanelModel { this._fetchCurrentPanelData(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -454,7 +454,6 @@ export class HostTreeNodeModel extends CollapsibleTreeNodeModel { this._processId = processId; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -493,7 +492,6 @@ export class DplProcessTreeNodeModel extends CollapsibleTreeNodeModel { this._detectorId = detectorId; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -533,7 +531,6 @@ export class DplDetectorTreeNodeModel extends CollapsibleTreeNodeModel { this._runNumber = runNumber; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/Runs/Details/runDetailsConfiguration.js b/lib/public/views/Runs/Details/runDetailsConfiguration.js index 63929fe344..519869d940 100644 --- a/lib/public/views/Runs/Details/runDetailsConfiguration.js +++ b/lib/public/views/Runs/Details/runDetailsConfiguration.js @@ -106,7 +106,7 @@ export const runDetailsConfiguration = (runDetailsModel) => ({ nEpns: { name: 'Number of EPNs', visible: true, - // eslint-disable-next-line no-extra-parens + // eslint-disable-next-line @stylistic/js/no-extra-parens format: (nEpns, { epn }) => epn ? (typeof nEpns === 'number' ? nEpns : 'ON') : 'OFF', }, nFlps: { diff --git a/lib/public/views/Runs/Overview/RunsOverviewModel.js b/lib/public/views/Runs/Overview/RunsOverviewModel.js index b8fee81666..dd7f8ace4a 100644 --- a/lib/public/views/Runs/Overview/RunsOverviewModel.js +++ b/lib/public/views/Runs/Overview/RunsOverviewModel.js @@ -65,13 +65,13 @@ export class RunsOverviewModel extends OverviewPageModel { this._allRuns = RemoteData.NotAsked(); this.reset(false); - // eslint-disable-next-line no-return-assign,require-jsdoc - const updateDebounceTime = () => this._debouncedLoad = debounce(this.load.bind(this), model.inputDebounceTime); + const updateDebounceTime = () => { + this._debouncedLoad = debounce(this.load.bind(this), model.inputDebounceTime); + }; model.appConfiguration$.observe(() => updateDebounceTime()); updateDebounceTime(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ @@ -80,7 +80,6 @@ export class RunsOverviewModel extends OverviewPageModel { return `/api/runs?${paramsString}`; } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ diff --git a/lib/public/views/Runs/Overview/exportRunsTriggerAndModal.js b/lib/public/views/Runs/Overview/exportRunsTriggerAndModal.js index 64606953de..f4f432ddbb 100644 --- a/lib/public/views/Runs/Overview/exportRunsTriggerAndModal.js +++ b/lib/public/views/Runs/Overview/exportRunsTriggerAndModal.js @@ -87,7 +87,6 @@ const exportForm = (runsOverviewModel, runs, modalHandler) => { ]; }; -// eslint-disable-next-line require-jsdoc const errorDisplay = () => h('.danger', 'Data fetching failed'); /** diff --git a/lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewModel.js b/lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewModel.js index 9cf93431b9..cecb9ff04d 100644 --- a/lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewModel.js +++ b/lib/public/views/Runs/RunPerDataPass/RunsPerDataPassOverviewModel.js @@ -66,7 +66,6 @@ export class RunsPerDataPassOverviewModel extends RunsOverviewModel { } } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ @@ -79,7 +78,6 @@ export class RunsPerDataPassOverviewModel extends RunsOverviewModel { super.load(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ diff --git a/lib/public/views/Runs/RunPerPeriod/RunsPerLhcPeriodOverviewModel.js b/lib/public/views/Runs/RunPerPeriod/RunsPerLhcPeriodOverviewModel.js index a9db48232d..1ff6cab3a8 100644 --- a/lib/public/views/Runs/RunPerPeriod/RunsPerLhcPeriodOverviewModel.js +++ b/lib/public/views/Runs/RunPerPeriod/RunsPerLhcPeriodOverviewModel.js @@ -30,7 +30,6 @@ export class RunsPerLhcPeriodOverviewModel extends RunsOverviewModel { this.patchDisplayOptions({ horizontalScrollEnabled: true }); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ @@ -42,7 +41,6 @@ export class RunsPerLhcPeriodOverviewModel extends RunsOverviewModel { super.load(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ diff --git a/lib/public/views/Runs/RunsModel.js b/lib/public/views/Runs/RunsModel.js index e77197c2bd..10c2b33af1 100644 --- a/lib/public/views/Runs/RunsModel.js +++ b/lib/public/views/Runs/RunsModel.js @@ -62,6 +62,7 @@ export class RunsModel extends Observable { /** * Load the details page for the given run + * @param {object} params the parameters for the model * @param {string} [params.runNumber = null] the runNumber of the run to display * @param {string} [params.id = null] Usage of this paramter is deprecated, use runNumber if feasible, * @param {string} [params.panel = null] the key of the panel to display @@ -83,6 +84,8 @@ export class RunsModel extends Observable { /** * Load runs overview data + * @param {object} params the parameters for the model + * @param {string} [params.lhcPeriodName] the name of the LHC period to display * @return {void} */ loadPerLhcPeriodOverview({ lhcPeriodName }) { @@ -101,6 +104,8 @@ export class RunsModel extends Observable { /** * Load runs overview data + * @param {object} params the parameters for the model + * @param {string} [params.dataPassId] the id of the data pass to display * @return {void} */ loadPerDataPassOverview({ dataPassId }) { @@ -120,6 +125,8 @@ export class RunsModel extends Observable { /** * Load runs overview per simulation pass data + * @param {object} root0 - The parameters for the model. + * @param {string} root0.simulationPassId - The ID of the simulation pass to load. * @return {void} */ loadPerSimulationPassOverview({ simulationPassId }) { diff --git a/lib/public/views/Runs/RunsPerSimulationPass/RunsPerSimulationPassOverviewModel.js b/lib/public/views/Runs/RunsPerSimulationPass/RunsPerSimulationPassOverviewModel.js index 1bb30392e3..7f7d00fa92 100644 --- a/lib/public/views/Runs/RunsPerSimulationPass/RunsPerSimulationPassOverviewModel.js +++ b/lib/public/views/Runs/RunsPerSimulationPass/RunsPerSimulationPassOverviewModel.js @@ -38,7 +38,7 @@ export class RunsPerSimulationPassOverviewModel extends RunsOverviewModel { } /** - * Fetch Simulaiton Pass data which data passes are fetched + * Fetch Simulation Pass data which data passes are fetched * @return {Promise} promise */ async _fetchSimulationPass() { @@ -65,7 +65,6 @@ export class RunsPerSimulationPassOverviewModel extends RunsOverviewModel { } } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ @@ -75,7 +74,6 @@ export class RunsPerSimulationPassOverviewModel extends RunsOverviewModel { super.load(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ diff --git a/lib/public/views/Runs/format/editRunEorReasons.js b/lib/public/views/Runs/format/editRunEorReasons.js index db5f0961a3..1cc1bb487b 100644 --- a/lib/public/views/Runs/format/editRunEorReasons.js +++ b/lib/public/views/Runs/format/editRunEorReasons.js @@ -20,7 +20,6 @@ import spinner from '../../../components/common/spinner.js'; * * enabled: build widgets to allow user to remove existing reasons or add new ones * * disabled: display current eorReasons * @param {RunDetailsModel} runDetailsModel the model storing the run details state - * @param {Array} eorReasons - List of eor reasons for a particular run * @returns {Component} Return a formatted cell for eorReasons */ export const editRunEorReasons = (runDetailsModel) => { diff --git a/lib/public/views/Runs/format/formatEditableNumber.js b/lib/public/views/Runs/format/formatEditableNumber.js index d69b7ec4ae..543a3e2ab3 100644 --- a/lib/public/views/Runs/format/formatEditableNumber.js +++ b/lib/public/views/Runs/format/formatEditableNumber.js @@ -19,10 +19,11 @@ import { h } from '/js/src/index.js'; * * @param {boolean} isEditionEnabled if true the input is displayed, current values otherwise * @param {number} current the current value - * @param {function(InputEvent, void)} oninput callback - * @param {RunDetailsModel} runDetailsModel details model + * @param {(event: InputEvent) => void} oninput callback + * @param {object} [options] additional options for the formatting * @param {number} [options.inputDecimals = 3] precision of input value * @param {number} [options.displayDecimals = 3] precision of displayed value + * @param {string} [options.unit = null] unit to display * @return {Component} display or input */ export const formatEditableNumber = ( diff --git a/lib/public/views/SimulationPasses/AnchoredOverview/AnchoredSimulationPassesOverviewModel.js b/lib/public/views/SimulationPasses/AnchoredOverview/AnchoredSimulationPassesOverviewModel.js index 17e658c9bf..fa934c3604 100644 --- a/lib/public/views/SimulationPasses/AnchoredOverview/AnchoredSimulationPassesOverviewModel.js +++ b/lib/public/views/SimulationPasses/AnchoredOverview/AnchoredSimulationPassesOverviewModel.js @@ -46,7 +46,6 @@ export class AnchoredSimulationPassesOverviewModel extends OverviewPageModel { } } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ @@ -55,7 +54,6 @@ export class AnchoredSimulationPassesOverviewModel extends OverviewPageModel { super.load(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ diff --git a/lib/public/views/SimulationPasses/PerLhcPeriodOverview/SimulationPassesPerLhcPeriodOverviewModel.js b/lib/public/views/SimulationPasses/PerLhcPeriodOverview/SimulationPassesPerLhcPeriodOverviewModel.js index 01e167e36f..70b63529ef 100644 --- a/lib/public/views/SimulationPasses/PerLhcPeriodOverview/SimulationPassesPerLhcPeriodOverviewModel.js +++ b/lib/public/views/SimulationPasses/PerLhcPeriodOverview/SimulationPassesPerLhcPeriodOverviewModel.js @@ -50,7 +50,6 @@ export class SimulationPassesPerLhcPeriodOverviewModel extends OverviewPageModel } } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ @@ -59,7 +58,6 @@ export class SimulationPassesPerLhcPeriodOverviewModel extends OverviewPageModel super.load(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ diff --git a/lib/public/views/SimulationPasses/SimulationPassesModel.js b/lib/public/views/SimulationPasses/SimulationPassesModel.js index fc28e6ca96..8e8d6e7969 100644 --- a/lib/public/views/SimulationPasses/SimulationPassesModel.js +++ b/lib/public/views/SimulationPasses/SimulationPassesModel.js @@ -34,6 +34,7 @@ export class SimulationPassesModel extends Observable { /** * Load the overview page model + * @param {object} params the parameters for the model * @param {string} [params.lhcPeriodId] lhc period id which Simulation Passes should be fetched * @returns {void} */ @@ -63,6 +64,7 @@ export class SimulationPassesModel extends Observable { /** * Load the overview page model + * @param {object} params the parameters for the model * @param {string} [params.dataPassId] data pass id which Simulation Passes should be fetched * @returns {void} */ diff --git a/lib/public/views/Statistics/StatisticsPageModel.js b/lib/public/views/Statistics/StatisticsPageModel.js index fa58504bdb..caeced3c79 100644 --- a/lib/public/views/Statistics/StatisticsPageModel.js +++ b/lib/public/views/Statistics/StatisticsPageModel.js @@ -124,7 +124,6 @@ class StatisticsTabbedPanelModel extends TabbedPanelModel { this._fetchCurrentPanelData(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -141,28 +140,24 @@ class StatisticsTabbedPanelModel extends TabbedPanelModel { )); break; case STATISTICS_PANELS_KEYS.TIME_BETWEEN_RUNS_DISTRIBUTION: - // eslint-disable-next-line max-len this._fetchEndpointForPanelData(buildUrl( '/api/statistics/runs/timeBetweenRunsDistribution', { from: this._period.from, to: this._period.to }, )); break; case STATISTICS_PANELS_KEYS.LOG_TAG_OCCURRENCES: - // eslint-disable-next-line max-len this._fetchEndpointForPanelData(buildUrl( '/api/statistics/logs/tagsOccurrences', { from: this._period.from, to: this._period.to }, )); break; case STATISTICS_PANELS_KEYS.EOR_REASON_OCCURRENCES: - // eslint-disable-next-line max-len this._fetchEndpointForPanelData(buildUrl( '/api/statistics/runs/eorReasonsOccurrences', { from: this._period.from, to: this._period.to }, )); break; case STATISTICS_PANELS_KEYS.ENVIRONMENT_HISTORY_OCCURRENCES: - // eslint-disable-next-line max-len this._fetchEndpointForPanelData(buildUrl( '/api/statistics/environments/historyOccurrences', { from: this._period.from, to: this._period.to }, @@ -183,7 +178,6 @@ class StatisticsTabbedPanelModel extends TabbedPanelModel { return null; } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/Tags/Create/TagCreationModel.js b/lib/public/views/Tags/Create/TagCreationModel.js index e2d7aa4650..c348a9d120 100644 --- a/lib/public/views/Tags/Create/TagCreationModel.js +++ b/lib/public/views/Tags/Create/TagCreationModel.js @@ -25,7 +25,6 @@ export class TagCreationModel extends CreationModel { super('/api/tags', ({ id }) => onCreationSuccess(id)); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -34,7 +33,6 @@ export class TagCreationModel extends CreationModel { this.data.bubbleTo(this); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ @@ -42,7 +40,6 @@ export class TagCreationModel extends CreationModel { return this.data.toPojo(); } - // eslint-disable-next-line valid-jsdoc /** * @inheritDoc */ diff --git a/lib/public/views/Tags/Details/TagDetailsModel.js b/lib/public/views/Tags/Details/TagDetailsModel.js index 2b4b2ca797..c6c814cb38 100644 --- a/lib/public/views/Tags/Details/TagDetailsModel.js +++ b/lib/public/views/Tags/Details/TagDetailsModel.js @@ -224,7 +224,6 @@ class TagDetailsTabbedPanelModel extends TabbedPanelModel { this._fetchCurrentPanelData(); } - // eslint-disable-next-line valid-jsdoc /** * @override */ diff --git a/lib/public/views/Tags/Overview/TagsOverviewModel.js b/lib/public/views/Tags/Overview/TagsOverviewModel.js index 6569a1dc95..912b3c4597 100644 --- a/lib/public/views/Tags/Overview/TagsOverviewModel.js +++ b/lib/public/views/Tags/Overview/TagsOverviewModel.js @@ -38,8 +38,9 @@ export class TagsOverviewModel extends Observable { */ this._filters = {}; - // eslint-disable-next-line no-return-assign,require-jsdoc - const updateDebounceTime = () => this._debouncedFetchTagsList = debounce(this.fetchTagsList.bind(this), model.inputDebounceTime); + const updateDebounceTime = () => { + this._debouncedFetchTagsList = debounce(this.fetchTagsList.bind(this), model.inputDebounceTime); + }; model.appConfiguration$.observe(() => updateDebounceTime()); updateDebounceTime(); } diff --git a/lib/public/views/lhcPeriods/Overview/LhcPeriodsOverviewModel.js b/lib/public/views/lhcPeriods/Overview/LhcPeriodsOverviewModel.js index 33015c7727..ed66ce61fb 100644 --- a/lib/public/views/lhcPeriods/Overview/LhcPeriodsOverviewModel.js +++ b/lib/public/views/lhcPeriods/Overview/LhcPeriodsOverviewModel.js @@ -35,7 +35,6 @@ export class LhcPeriodsOverviewModel extends OverviewPageModel { this._registerFilter(this._beamTypesFilterModel); } - // eslint-disable-next-line valid-jsdoc /** * @inheritdoc */ @@ -54,7 +53,7 @@ export class LhcPeriodsOverviewModel extends OverviewPageModel { /** * Flatten lhc period statistics objects * @param {LhcPeriodStatistics[]} lhcPeriods data - * @returns {{LhcPeriodStatistics+LhcPeriod}[]} lhc period statistics and lhc period properties in single object + * @returns {{LhcPeriodStatistics,LhcPeriod}[]} lhc period statistics and lhc period properties in single object */ processItems(lhcPeriods) { return lhcPeriods.map((lhcPeriodData) => { diff --git a/lib/public/views/lhcPeriods/format/formatDistinctLhcBeamEnergies.js b/lib/public/views/lhcPeriods/format/formatDistinctLhcBeamEnergies.js index fbdfab166c..cff3e27ffa 100644 --- a/lib/public/views/lhcPeriods/format/formatDistinctLhcBeamEnergies.js +++ b/lib/public/views/lhcPeriods/format/formatDistinctLhcBeamEnergies.js @@ -1,4 +1,3 @@ -/* eslint-disable require-jsdoc */ /** * @license * Copyright CERN and copyright holders of ALICE O2. This software is @@ -55,7 +54,7 @@ const displayLhcBeamEnergy = (lhcBeamEnergy) => { }; /** - * Format lhc beam distinct energies, optionaly replacing some of them + * Format lhc beam distinct energies, optionally replacing some of them * by well defined energy levels @see displayLhcBeamEnergy * @param {number[]} distinctEnergies list of energies to be displayed * @returns {Component} formatted list of distinct energies diff --git a/lib/server/GRPCServer.js b/lib/server/GRPCServer.js index 1ad5fe8984..c445d74dba 100644 --- a/lib/server/GRPCServer.js +++ b/lib/server/GRPCServer.js @@ -63,7 +63,6 @@ class GRPCServer { } } - // eslint-disable-next-line valid-jsdoc /** * Start the server * diff --git a/lib/server/WebUiServer.js b/lib/server/WebUiServer.js index f32792de69..e66564148c 100644 --- a/lib/server/WebUiServer.js +++ b/lib/server/WebUiServer.js @@ -34,7 +34,7 @@ class WebUiServer { } /** - * @type HttpServer + * @type {HttpServer} */ this.http = new HttpServer({ port: 4000, diff --git a/lib/server/controllers/configuration.controller.js b/lib/server/controllers/configuration.controller.js index 966d217991..40242af223 100644 --- a/lib/server/controllers/configuration.controller.js +++ b/lib/server/controllers/configuration.controller.js @@ -11,7 +11,8 @@ * or submit itself to any jurisdiction. */ -// eslint-disable-next-line valid-jsdoc +/* eslint-disable jsdoc/require-param */ + const { ServicesConfig } = require('../../config/index.js'); /** @@ -23,7 +24,6 @@ const { ServicesConfig } = require('../../config/index.js'); * @property {string} QcGuiUrl */ -// eslint-disable-next-line valid-jsdoc /** * Request to provide configuration to the frontend */ diff --git a/lib/server/controllers/dataPasses.controller.js b/lib/server/controllers/dataPasses.controller.js index 355eff1a78..2f6ff899d2 100644 --- a/lib/server/controllers/dataPasses.controller.js +++ b/lib/server/controllers/dataPasses.controller.js @@ -11,6 +11,8 @@ * or submit itself to any jurisdiction. */ +/* eslint-disable jsdoc/require-param */ + const Joi = require('joi'); const { ApiConfig } = require('../../config/index.js'); const { DtoFactory } = require('../../domain/dtos/DtoFactory'); @@ -20,7 +22,6 @@ const { countedItemsToHttpView } = require('../utilities/countedItemsToHttpView. const { updateExpressResponseFromNativeError } = require('../express/updateExpressResponseFromNativeError'); const PaginationDto = require('../../domain/dtos/PaginationDto.js'); -// eslint-disable-next-line valid-jsdoc /** * List All DataPasss with statistics */ @@ -55,9 +56,8 @@ const listDataPassesHandler = async (req, res) => { } }; -// eslint-disable-next-line valid-jsdoc /** - * + * Set the GAQ detectors for the given data pass */ const setGaqDetectors = async (req, res) => { const validatedDTO = await dtoValidator( diff --git a/lib/server/controllers/dplDetectors.controller.js b/lib/server/controllers/dplDetectors.controller.js index a383bc2d27..55673590e6 100644 --- a/lib/server/controllers/dplDetectors.controller.js +++ b/lib/server/controllers/dplDetectors.controller.js @@ -13,7 +13,7 @@ const { updateExpressResponseFromNativeError } = require('../express/updateExpressResponseFromNativeError.js'); const { dplDetectorsService } = require('../services/dpl/DplDetectorsService.js'); -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Endpoint handler to list all dpl detectors * @return {Promise} promise diff --git a/lib/server/controllers/dplProcess.controller.js b/lib/server/controllers/dplProcess.controller.js index 0f6d0a32c2..74cd6d2c91 100644 --- a/lib/server/controllers/dplProcess.controller.js +++ b/lib/server/controllers/dplProcess.controller.js @@ -11,13 +11,14 @@ * or submit itself to any jurisdiction. */ +/* eslint-disable jsdoc/require-param */ + const { dtoValidator } = require('../utilities/index.js'); const { updateExpressResponseFromNativeError } = require('../express/updateExpressResponseFromNativeError.js'); const { DtoFactory } = require('../../domain/dtos/DtoFactory.js'); const Joi = require('joi'); const { dplProcessService } = require('../services/dpl/DplProcessService.js'); -// eslint-disable-next-line valid-jsdoc /** * Route to fetch all the DPL detectors that have at least one executed process for a given run */ @@ -37,7 +38,6 @@ const getAllDplDetectorsWithExecutedProcessesByRunHandler = async (request, resp } }; -// eslint-disable-next-line valid-jsdoc /** * Route to fetch all the processes that have been executed at least once for a given run and detector */ @@ -63,7 +63,6 @@ const getAllExecutedProcessesByRunAndDplDetectorHandler = async (request, respon } }; -// eslint-disable-next-line valid-jsdoc /** * Route to fetch all the hosts that on which a given process has been executed for a given run and detector */ @@ -91,7 +90,6 @@ const getAllHostsWithExecutedProcessByRunAndDplDetectorHandler = async (request, } }; -// eslint-disable-next-line valid-jsdoc /** * Route to fetch all executions of a given process on a given host for a given run and detector */ diff --git a/lib/server/controllers/environments.controller.js b/lib/server/controllers/environments.controller.js index f30b986c2f..0cf907e47b 100644 --- a/lib/server/controllers/environments.controller.js +++ b/lib/server/controllers/environments.controller.js @@ -144,7 +144,7 @@ const getEnvironmentById = async (request, response) => { } }; -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Route to fetch all the logs for a given environment */ diff --git a/lib/server/controllers/eosReport.controller.js b/lib/server/controllers/eosReport.controller.js index c0e3d40aaa..12dedc0042 100644 --- a/lib/server/controllers/eosReport.controller.js +++ b/lib/server/controllers/eosReport.controller.js @@ -15,7 +15,7 @@ const { CreateEosReportDto } = require('../../domain/dtos/eosReport/CreateEosRep const { eosReportService } = require('../services/eosReport/EosReportService.js'); const { shiftService } = require('../services/shift/ShiftService.js'); -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Route handler to create an EOS report log entry */ diff --git a/lib/server/controllers/gRPC/GRPCDplProcessExecutionController.js b/lib/server/controllers/gRPC/GRPCDplProcessExecutionController.js index 3da048320c..f69a252d6a 100644 --- a/lib/server/controllers/gRPC/GRPCDplProcessExecutionController.js +++ b/lib/server/controllers/gRPC/GRPCDplProcessExecutionController.js @@ -25,7 +25,7 @@ class GRPCDplProcessExecutionController { this.dplProcessService = dplProcessService; } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc Create(newDplProcessExecution) { const { runNumber, diff --git a/lib/server/controllers/gRPC/GRPCEnvironmentController.js b/lib/server/controllers/gRPC/GRPCEnvironmentController.js index 2980042ce0..ff719d7ee9 100644 --- a/lib/server/controllers/gRPC/GRPCEnvironmentController.js +++ b/lib/server/controllers/gRPC/GRPCEnvironmentController.js @@ -26,13 +26,13 @@ class GRPCEnvironmentController { this.runAdapter = runAdapter; } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async Create(newEnvironment) { const { id, rawConfiguration, status, statusMessage } = newEnvironment; return this.environmentService.create({ id, rawConfiguration }, { status, statusMessage }); } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async Update(environmentPatch) { const { id: environmentId, toredownAt, status, statusMessage } = environmentPatch; diff --git a/lib/server/controllers/gRPC/GRPCFlpRoleController.js b/lib/server/controllers/gRPC/GRPCFlpRoleController.js index bbb735f94e..10918169e1 100644 --- a/lib/server/controllers/gRPC/GRPCFlpRoleController.js +++ b/lib/server/controllers/gRPC/GRPCFlpRoleController.js @@ -24,20 +24,20 @@ class GRPCFlpRoleController { this.flpRoleService = flpRoleService; } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async CreateMany({ flps }) { const createdFlps = []; for (const { name, hostname, runNumber } of flps) { try { createdFlps.push(await this.flpRoleService.create({ name, hostname, runNumber })); - } catch (e) { + } catch { // TODO log into infologger } } return { flps: createdFlps }; } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async UpdateCounters({ flpName, runNumber, diff --git a/lib/server/controllers/gRPC/GRPCLhcFIllController.js b/lib/server/controllers/gRPC/GRPCLhcFIllController.js index 5397eba974..bef9688ea2 100644 --- a/lib/server/controllers/gRPC/GRPCLhcFIllController.js +++ b/lib/server/controllers/gRPC/GRPCLhcFIllController.js @@ -23,7 +23,7 @@ class GRPCLhcFillController { this.lhcFillService = lhcFillService; } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async GetLast() { return { lhcFill: await this.lhcFillService.getLast() }; } diff --git a/lib/server/controllers/gRPC/GRPCLogController.js b/lib/server/controllers/gRPC/GRPCLogController.js index 78f9063cb5..89ff398a71 100644 --- a/lib/server/controllers/gRPC/GRPCLogController.js +++ b/lib/server/controllers/gRPC/GRPCLogController.js @@ -24,7 +24,7 @@ class GRPCLogController { this.logService = logService; } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc Create({ title, text, parentLogId, runNumbers }) { return this.logService.create({ title, text, parentLogId }, runNumbers); } diff --git a/lib/server/controllers/gRPC/GRPCQcFlagController.js b/lib/server/controllers/gRPC/GRPCQcFlagController.js index 71ad77ee25..e109bf2a6e 100644 --- a/lib/server/controllers/gRPC/GRPCQcFlagController.js +++ b/lib/server/controllers/gRPC/GRPCQcFlagController.js @@ -26,7 +26,7 @@ class GRPCQcFlagController { this.dataPassService = dataPassService; } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async CreateForDataPass({ runNumber, detectorName, passName, flags }) { const qcFlags = await this.qcFlagService.create( flags.map(({ from, to, ...flag }) => ({ @@ -47,7 +47,7 @@ class GRPCQcFlagController { }; } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async CreateForSimulationPass({ runNumber, detectorName, productionName, flags }) { const qcFlags = await this.qcFlagService.create( flags.map(({ from, to, ...flag }) => ({ @@ -64,7 +64,7 @@ class GRPCQcFlagController { }; } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async CreateSynchronous({ runNumber, detectorName, flags }) { const qcFlags = await this.qcFlagService.create( flags.map(({ from, to, ...flag }) => ({ diff --git a/lib/server/controllers/gRPC/GRPCRunController.js b/lib/server/controllers/gRPC/GRPCRunController.js index 1537ace7d0..809d514fbc 100644 --- a/lib/server/controllers/gRPC/GRPCRunController.js +++ b/lib/server/controllers/gRPC/GRPCRunController.js @@ -26,7 +26,7 @@ class GRPCRunController { this.runAdapter = runAdapter; } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async Get({ runNumber, relations }) { const run = await this.runService.getOrFail({ runNumber }, { lhcFill: relations.includes('LHC_FILL') }); const { lhcFill } = run; @@ -34,7 +34,7 @@ class GRPCRunController { return { run: this.runAdapter.toGRPC(run), lhcFill }; } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async Create(newRunRequest) { const { run, relations } = this.gRPCToRunAndRelations(newRunRequest); @@ -48,7 +48,7 @@ class GRPCRunController { )); } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async Update(runPatchRequest) { const { run, relations } = this.gRPCToRunAndRelations(runPatchRequest); const { runNumber } = run; diff --git a/lib/server/controllers/gRPC/GRPCTriggerCountersController.js b/lib/server/controllers/gRPC/GRPCTriggerCountersController.js index 51acea90e2..51f356ec68 100644 --- a/lib/server/controllers/gRPC/GRPCTriggerCountersController.js +++ b/lib/server/controllers/gRPC/GRPCTriggerCountersController.js @@ -24,7 +24,7 @@ class GRPCTriggerCountersController { this.triggerCountersService = triggerCountersService; } - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-jsdoc async CreateOrUpdateForRun({ runNumber, className, timestamp, lmb, lma, l0b, l0a, l1b, l1a }) { await this.triggerCountersService.createOrUpdatePerRun( { runNumber, className }, diff --git a/lib/server/controllers/lhcFill.controller.js b/lib/server/controllers/lhcFill.controller.js index 05d7eeb682..11200b0fd6 100644 --- a/lib/server/controllers/lhcFill.controller.js +++ b/lib/server/controllers/lhcFill.controller.js @@ -213,7 +213,7 @@ const getRunByRunNumber = async (request, response) => { } }; -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Route to fetch all the logs for a given LHC fill */ @@ -234,7 +234,7 @@ const getAllLhcFillLogsHandler = async (request, response) => { } }; -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Route to fetch all the lhc fills that are ended in a given period */ diff --git a/lib/server/controllers/lhcPeriodStatistics.controller.js b/lib/server/controllers/lhcPeriodStatistics.controller.js index c74f4c223b..4cdc028372 100644 --- a/lib/server/controllers/lhcPeriodStatistics.controller.js +++ b/lib/server/controllers/lhcPeriodStatistics.controller.js @@ -11,6 +11,8 @@ * or submit itself to any jurisdiction. */ +/* eslint-disable jsdoc/require-param */ + const Joi = require('joi'); const { ApiConfig } = require('../../config/index.js'); const { DtoFactory } = require('../../domain/dtos/DtoFactory'); @@ -20,7 +22,6 @@ const { countedItemsToHttpView } = require('../utilities/countedItemsToHttpView. const { updateExpressResponseFromNativeError } = require('../express/updateExpressResponseFromNativeError'); const PaginationDto = require('../../domain/dtos/PaginationDto.js'); -// eslint-disable-next-line valid-jsdoc /** * List All LHC Periods with statistics */ @@ -55,7 +56,6 @@ const listLhcPeriodStatisticsHandler = async (req, res) => { } }; -// eslint-disable-next-line valid-jsdoc /** * Get one LHC Period with given id with statistics */ diff --git a/lib/server/controllers/logs.controller.js b/lib/server/controllers/logs.controller.js index c896384fe0..7c16a3c5bb 100644 --- a/lib/server/controllers/logs.controller.js +++ b/lib/server/controllers/logs.controller.js @@ -287,7 +287,7 @@ const getLogById = async (request, response, next) => { } }; -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Get all root logs */ @@ -316,7 +316,7 @@ const getRootLogsHandler = async (request, response) => { } }; -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Get all child logs by parent id */ diff --git a/lib/server/controllers/qcFlag.controller.js b/lib/server/controllers/qcFlag.controller.js index 6c6d76a568..d3e599547d 100644 --- a/lib/server/controllers/qcFlag.controller.js +++ b/lib/server/controllers/qcFlag.controller.js @@ -11,6 +11,8 @@ * or submit itself to any jurisdiction. */ +/* eslint-disable jsdoc/require-param */ + const Joi = require('joi'); const { DtoFactory, tokenSchema } = require('../../domain/dtos/DtoFactory'); const { dtoValidator } = require('../utilities/dtoValidator.js'); @@ -20,7 +22,6 @@ const { ApiConfig } = require('../../config'); const { countedItemsToHttpView } = require('../utilities/countedItemsToHttpView'); const { qcFlagService } = require('../services/qualityControlFlag/QcFlagService.js'); -// eslint-disable-next-line valid-jsdoc /** * Get one QC Flag by its id */ @@ -40,7 +41,6 @@ const getQcFlagByIdHandler = async (req, res) => { } }; -// eslint-disable-next-line valid-jsdoc /** * List All QcFlags for a given data pass */ @@ -75,7 +75,6 @@ const listQcFlagsPerDataPassHandler = async (req, res) => { } }; -// eslint-disable-next-line valid-jsdoc /** * List All QcFlags for a given data pass */ @@ -110,7 +109,6 @@ const listQcFlagsPerSimulationPassHandler = async (req, res) => { } }; -// eslint-disable-next-line valid-jsdoc /** * Create QcFlag */ @@ -163,7 +161,6 @@ const createQcFlagHandler = async (req, res) => { } }; -// eslint-disable-next-line valid-jsdoc /** * Delete one QC Flag by its id */ @@ -183,7 +180,6 @@ const deleteQcFlagByIdHandler = async (req, res) => { } }; -// eslint-disable-next-line valid-jsdoc /** * Verify QcFlag */ @@ -220,7 +216,6 @@ const verifyQcFlagHandler = async (req, res) => { } }; -// eslint-disable-next-line valid-jsdoc /** * Get QC flags summary for data/simulation pass */ @@ -248,7 +243,6 @@ const getQcFlagsSummaryHandler = async (req, res) => { } }; -// eslint-disable-next-line valid-jsdoc /** * Get QC flags in GAQ effective periods for given data pass and run */ diff --git a/lib/server/controllers/qcFlagTypes.controller.js b/lib/server/controllers/qcFlagTypes.controller.js index b9f1779a2e..af6631278b 100644 --- a/lib/server/controllers/qcFlagTypes.controller.js +++ b/lib/server/controllers/qcFlagTypes.controller.js @@ -11,6 +11,8 @@ * or submit itself to any jurisdiction. */ +/* eslint-disable jsdoc/require-param */ + const Joi = require('joi'); const { DtoFactory, tokenSchema } = require('../../domain/dtos/DtoFactory'); const { dtoValidator } = require('../utilities/dtoValidator.js'); @@ -20,7 +22,6 @@ const { PaginationDto } = require('../../domain/dtos'); const { ApiConfig } = require('../../config'); const { countedItemsToHttpView } = require('../utilities/countedItemsToHttpView'); -// eslint-disable-next-line valid-jsdoc /** * Get one QC Flag Type by its id */ @@ -40,7 +41,6 @@ const getQcFlagTypeByIdHandler = async (req, res) => { } }; -// eslint-disable-next-line valid-jsdoc /** * Create QC Flag Type */ @@ -65,7 +65,6 @@ const createQCFlagTypeHandler = async (req, res) => { } }; -// eslint-disable-next-line valid-jsdoc /** * List All QCFlagReasons */ @@ -106,7 +105,6 @@ const listQcFlagTypesHandler = async (req, res) => { } }; -// eslint-disable-next-line valid-jsdoc /** * Update QC Flag Type */ diff --git a/lib/server/controllers/runTypes.controller.js b/lib/server/controllers/runTypes.controller.js index 6a99553e4a..8ea5bdd7c1 100644 --- a/lib/server/controllers/runTypes.controller.js +++ b/lib/server/controllers/runTypes.controller.js @@ -66,8 +66,6 @@ const listRunTypes = async (request, response) => { * string, parameters, body, HTTP headers, and so on. * @param {Object} response The *response* object represents the HTTP response that an Express app sends when it gets an * HTTP request. - * @param {Function} next The *next* object represents the next middleware function which is used to pass control to the - * next middleware function. * @returns {undefined} */ const getRunTypeById = async (request, response) => { diff --git a/lib/server/controllers/runs.controller.js b/lib/server/controllers/runs.controller.js index 411303d9e9..bc6c291078 100644 --- a/lib/server/controllers/runs.controller.js +++ b/lib/server/controllers/runs.controller.js @@ -207,8 +207,6 @@ const startRun = async (request, response) => { * string, parameters, body, HTTP headers, and so on. * @param {Object} response The *response* object represents the HTTP response that an Express app sends when it gets an * HTTP request. - * @param {Function} next The *next* object represents the next middleware function which is used to pass control to the - * next middleware function. * @returns {undefined} */ const endRun = async (request, response) => { @@ -294,14 +292,14 @@ const listReasonTypes = async (_request, response, _next) => { } else { response.status(204).json({ data: [] }); } - } catch (error) { + } catch { response.status(502).json({ errors: ['Unable to retrieve list of reason types'] }); } }; -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** - * Retrive distinct combination of levels of alice L3 and dipole current rounded to kilo amperes + * Retrieve distinct combination of levels of alice L3 and dipole current rounded to kilo amperes */ const listAllAliceL3AndDipoleLevelsForPhysicsRuns = async (req, res) => { const validatedDTO = await dtoValidator( diff --git a/lib/server/controllers/shift.controller.js b/lib/server/controllers/shift.controller.js index 333543c620..cbba276f3f 100644 --- a/lib/server/controllers/shift.controller.js +++ b/lib/server/controllers/shift.controller.js @@ -15,7 +15,7 @@ const { shiftService } = require('../services/shift/ShiftService.js'); const { updateExpressResponseFromNativeError } = require('../express/updateExpressResponseFromNativeError.js'); const { GetShiftDataDto } = require('../../domain/dtos/shift/GetShiftDataDto.js'); -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Route to fetch shift data */ diff --git a/lib/server/controllers/simulationPasses.controller.js b/lib/server/controllers/simulationPasses.controller.js index f02cfbfe81..48d210414f 100644 --- a/lib/server/controllers/simulationPasses.controller.js +++ b/lib/server/controllers/simulationPasses.controller.js @@ -20,7 +20,7 @@ const { countedItemsToHttpView } = require('../utilities/countedItemsToHttpView. const { updateExpressResponseFromNativeError } = require('../express/updateExpressResponseFromNativeError'); const PaginationDto = require('../../domain/dtos/PaginationDto.js'); -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Get one Simulation Pass by id */ @@ -40,7 +40,7 @@ const getSimulationPassByIdHandler = async (req, res) => { } }; -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * List All Simulation Passes with statistics */ diff --git a/lib/server/controllers/statistics.controller.js b/lib/server/controllers/statistics.controller.js index 62c261bf25..f155d01955 100644 --- a/lib/server/controllers/statistics.controller.js +++ b/lib/server/controllers/statistics.controller.js @@ -16,7 +16,7 @@ const Joi = require('joi'); const { updateExpressResponseFromNativeError } = require('../express/updateExpressResponseFromNativeError.js'); const { statisticsService } = require('../services/statistics/StatisticsService.js'); -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Route to get LHC fill statistics */ @@ -39,7 +39,7 @@ const getLhcFillStatisticsHandler = async (request, response) => { } }; -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Route to get weekly run data size */ @@ -62,7 +62,7 @@ const getWeeklyRunDataSizeHandler = async (request, response) => { } }; -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Route to get time between runs distributions */ @@ -85,7 +85,7 @@ const getTimeBetweenRunsDistributionHandler = async (request, response) => { } }; -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Route to get the detectors efficiency per fill */ @@ -108,7 +108,7 @@ const getDetectorEfficiencyPerFillHandler = async (request, response) => { } }; -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Route to get the tags occurrences in logs */ @@ -131,7 +131,7 @@ const getTagsOccurrencesInLogsHandler = async (request, response) => { } }; -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Route to get the EoR reasons occurrences in runs */ @@ -154,7 +154,7 @@ const getEorReasonsOccurrencesHandler = async (request, response) => { } }; -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Route to get the environment status history combinations and their occurrences */ diff --git a/lib/server/controllers/tags.controller.js b/lib/server/controllers/tags.controller.js index 59bb1740ed..76c480e629 100644 --- a/lib/server/controllers/tags.controller.js +++ b/lib/server/controllers/tags.controller.js @@ -34,8 +34,6 @@ const GetAllLogsByTagDto = require('../../domain/dtos/GetAllLogsByTagDto.js'); * string, parameters, body, HTTP headers, and so on. * @param {Object} response The *response* object represents the HTTP response that an Express app sends when it gets an * HTTP request. - * @param {Function} next The *next* object represents the next middleware function which is used to pass control to the - * next middleware function. * @returns {undefined} */ const createTag = async (request, response) => { @@ -107,8 +105,6 @@ const deleteTag = async (request, response, next) => { * string, parameters, body, HTTP headers, and so on. * @param {Object} response The *response* object represents the HTTP response that an Express app sends when it gets an * HTTP request. - * @param {Function} next The *next* object represents the next middleware function which is used to pass control to the - * next middleware function. * @returns {undefined} */ const getLogsByTagId = async (request, response) => { diff --git a/lib/server/controllers/triggerCounters.controller.js b/lib/server/controllers/triggerCounters.controller.js index 839ffa28fd..73bed57924 100644 --- a/lib/server/controllers/triggerCounters.controller.js +++ b/lib/server/controllers/triggerCounters.controller.js @@ -4,7 +4,7 @@ const Joi = require('joi'); const { updateExpressResponseFromNativeError } = require('../express/updateExpressResponseFromNativeError'); const { triggerCountersService } = require('../services/triggerCounters/TriggerCountersService'); -// eslint-disable-next-line valid-jsdoc +// eslint-disable-next-line jsdoc/require-param /** * Return all the trigger counters for a given run */ diff --git a/lib/server/gRPC/services/protoParsing/extractFieldsConverters.js b/lib/server/gRPC/services/protoParsing/extractFieldsConverters.js index d36701cbfd..31c049282c 100644 --- a/lib/server/gRPC/services/protoParsing/extractFieldsConverters.js +++ b/lib/server/gRPC/services/protoParsing/extractFieldsConverters.js @@ -60,6 +60,8 @@ const getCloserMessageDefinition = (messageName, context, absoluteMessageDefinit * Extract the list of all the fields that need a conversion between their js value and their gRPC value * * @param {object} typeDefinition the protobuf type to look for convertible fields + * @param {object} typeDefinition.field the field to look for + * @param {object} typeDefinition.name the name of the type * @param {Map} absoluteMessageDefinitions the absolute messages definitions * @return {FieldConverter[]} the list of properties path and the corresponding enum name for all the enums found in the given type */ diff --git a/lib/server/monalisa-synchronization/MonAlisaClient.js b/lib/server/monalisa-synchronization/MonAlisaClient.js index a8c5d0e0b2..a88900c192 100644 --- a/lib/server/monalisa-synchronization/MonAlisaClient.js +++ b/lib/server/monalisa-synchronization/MonAlisaClient.js @@ -291,6 +291,7 @@ exports.MonAlisaClient = MonAlisaClient; * @param {object} configuration configuration of MonAlisa client * @param {URL|string} [configuration.dataPassesUrl] url to fetch data passes * @param {URL|string} [configuration.dataPassDetailsUrl] url to fetch data pass version details + * @param {URL|string} [configuration.simulationPassesUrl] url to fetch simulation passes * @param {number} [configuration.yearLowerLimit] indicates how old data are accepted, * @param {string} [configuration.userCertificatePath] path to PKCS12 certificate * @param {string} [configuration.certificatePassphrase] passphrase to the certificate diff --git a/lib/server/services/dataPasses/DataPassService.js b/lib/server/services/dataPasses/DataPassService.js index 141b8ecc6d..7bb15732b6 100644 --- a/lib/server/services/dataPasses/DataPassService.js +++ b/lib/server/services/dataPasses/DataPassService.js @@ -172,10 +172,6 @@ class DataPassService { * Get all data passes * @param {object} [options={}] define which records should be fetched * @param {object} [options.filter] definition of filtering - * @param {number[]} [options.filter.lhcPeriodIds] lhcPeriod identifier to filter with - * @param {number[]} [options.filter.simulationPassIds] simulationPass identifier to filter with - * @param {number[]} [options.filter.ids] data passes identifier to filter with - * @param {string[]} [options.filter.names] data passes names to filter with * @param {number} [options.offset] paramter related to pagination - offset * @param {number} [options.limit] paramter related to pagination - limit * @param {object[]} [options.sort] definition of sorting - @@ -204,6 +200,12 @@ class DataPassService { } if (filter) { + /** + * @param {number[]} [filter.lhcPeriodIds] lhcPeriod identifier to filter with + * @param {number[]} [filter.simulationPassIds] simulationPass identifier to filter with + * @param {number[]} [filter.ids] data passes identifier to filter with + * @param {string[]} [filter.names] data passes names to filter with + */ const { ids, names, lhcPeriodIds, simulationPassIds } = filter; if (lhcPeriodIds) { queryBuilder.where('lhcPeriodId').oneOf(...lhcPeriodIds); diff --git a/lib/server/services/flp/createFlpRole.js b/lib/server/services/flp/createFlpRole.js index 8550c163a5..8498d26305 100644 --- a/lib/server/services/flp/createFlpRole.js +++ b/lib/server/services/flp/createFlpRole.js @@ -22,7 +22,6 @@ const { validateAgainstSchema } = require('../../utilities/validateAgainstSchema * Create an FLP role in the database and return the auto generated id * * @param {Partial} flpRole the FLP role to create - * @param {number} [runNumber] optionally the run number to which FLP role must be linked * @return {Promise} resolve once the creation is done providing the id of the FLP role that have been (or will be) created */ exports.createFlpRole = async (flpRole) => { diff --git a/lib/server/services/log/createLog.js b/lib/server/services/log/createLog.js index 4498995cb9..3840a07326 100644 --- a/lib/server/services/log/createLog.js +++ b/lib/server/services/log/createLog.js @@ -80,7 +80,7 @@ const getRootLogId = async (parentLogId) => { try { const parentLog = await getLogOrFail(parentLogId); return parentLog.rootLogId || parentLog.id; - } catch (e) { + } catch { throw new NotFoundError(`Parent log with this id (${parentLogId}) could not be found`); } }; diff --git a/lib/server/services/qualityControlFlag/QcFlagService.js b/lib/server/services/qualityControlFlag/QcFlagService.js index c1b99618e0..110a2efe8b 100644 --- a/lib/server/services/qualityControlFlag/QcFlagService.js +++ b/lib/server/services/qualityControlFlag/QcFlagService.js @@ -192,8 +192,9 @@ class QcFlagService { /** * Get QC summary for given data/simulation pass - * @param {number} dataPassId data pass id - exclusive with simulationPassId - * @param {number} simulationPassId simulation pass id - exclusive with dataPassId + * @param {object} queryParameters query parameters that are to be applied + * @param {number} queryParameters.dataPassId data pass id - exclusive with simulationPassId + * @param {number} queryParameters.simulationPassId simulation pass id - exclusive with dataPassId * @return {Promise} summary */ async getQcFlagsSummary({ dataPassId, simulationPassId }) { @@ -336,7 +337,7 @@ class QcFlagService { * @param {object} relations relations of the QC flag * @param {UserWithRoles} relations.user identifier with roles of the user creating the QC flag * @return {Promise} resolves with the created QC flags - * @throws {BadParameterError, NotFoundError} + * @throws {{BadParameterError, NotFoundError}} */ async create(qcFlags, scope, relations) { const { diff --git a/lib/server/services/qualityControlFlag/QcFlagTypeService.js b/lib/server/services/qualityControlFlag/QcFlagTypeService.js index 67c3732566..780c966588 100644 --- a/lib/server/services/qualityControlFlag/QcFlagTypeService.js +++ b/lib/server/services/qualityControlFlag/QcFlagTypeService.js @@ -148,14 +148,10 @@ class QcFlagTypeService { /** * Get all quality control flag types - * @param {object} [options.filter] filtering defintion - * @param {number[]} [options.filter.ids] quality control flag ids to filter with - * @param {boolean} [options.filter.bad] quality control flag boolean to filter bad or not-bad QC flags - * @param {boolean} [options.filter.archived] quality control flag boolean to filter arhived or not-archived QC flags - * @param {string[]} [options.filter.names] quality control flag type name to filter with, single token is treated as pattern - * @param {string[]} [options.filter.methods] quality control flag type method to filter with, single token is treated as pattern - * @param {number} [options.offset] paramter related to pagination - offset - * @param {number} [options.limit] paramter related to pagination - limit + * @param {object} [options] options - filtering, sorting, pagination + * @param {object} [options.filter] filtering configuration object that is to be applied + * @param {number} [options.offset] parameter related to pagination - offset + * @param {number} [options.limit] parameter related to pagination - limit * @param {Object[]} [options.sort] definition of sorting * @return {Promise>} promise */ @@ -180,6 +176,14 @@ class QcFlagTypeService { } if (filter) { + /** + * @param {number[]} [options.filter.ids] quality control flag ids to filter with + * @param {boolean} [options.filter.bad] quality control flag boolean to filter bad or not-bad QC flags + * @param {boolean} [options.filter.archived] quality control flag boolean to filter archived or not-archived QC flags + * @param {string[]} [options.filter.names] quality control flag type name to filter with, single token is treated as pattern + * @param {string[]} [options.filter.methods] quality control flag type method to filter with, single token is treated as pattern + * + */ const { ids, names, methods, bad, archived } = filter; if (ids) { queryBuilder.where('id').oneOf(...ids); diff --git a/lib/server/services/run/getRun.js b/lib/server/services/run/getRun.js index 65eca2428b..343e7da7b9 100644 --- a/lib/server/services/run/getRun.js +++ b/lib/server/services/run/getRun.js @@ -21,7 +21,6 @@ const RunRepository = require('../../../database/repositories/RunRepository.js') * @param {RunIdentifier} identifier the criteria to find run * @param {function|null} qbConfiguration function called with the run find query builder as parameter to add specific configuration to the * query - * @param {Object} [transaction] optionally the transaction in which one the log creation is executed * @return {Promise} the run found or null */ exports.getRun = ({ runId, runNumber }, qbConfiguration = null) => { diff --git a/lib/server/services/run/getRunDefinition.js b/lib/server/services/run/getRunDefinition.js index f5c8e81fae..f81ad1a16e 100644 --- a/lib/server/services/run/getRunDefinition.js +++ b/lib/server/services/run/getRunDefinition.js @@ -60,7 +60,6 @@ const getRunDefinition = (run) => { const stableBeamStart = stableBeamStartString ? new Date(stableBeamStartString).getTime() : null; const stableBeamEnd = (stableBeamEndString ? new Date(stableBeamEndString) : new Date()).getTime(); - // eslint-disable-next-line require-jsdoc const parseDate = (toParse) => { if (!(toParse instanceof Date)) { return new Date(toParse).getTime(); diff --git a/lib/server/services/shift/ShiftService.js b/lib/server/services/shift/ShiftService.js index cf3e69b7d5..d3a56fbfcb 100644 --- a/lib/server/services/shift/ShiftService.js +++ b/lib/server/services/shift/ShiftService.js @@ -55,7 +55,6 @@ class ShiftService { * * @param {UserIdentifier} shifterUserIdentifier the identifier of the user for which shift information must be retrieved * @param {string} shiftType the type of the shift for which information must be retrieved - * @param {Date} shiftStart the start time of the shift (to check for previous information) * @return {Promise} the shift data */ async getShiftData(shifterUserIdentifier, shiftType) { diff --git a/lib/server/services/shift/getShiftFromTimestamp.js b/lib/server/services/shift/getShiftFromTimestamp.js index 6105758aff..20cc4561f4 100644 --- a/lib/server/services/shift/getShiftFromTimestamp.js +++ b/lib/server/services/shift/getShiftFromTimestamp.js @@ -32,7 +32,6 @@ const MILLISECONDS_IN_ONE_HOUR = 60 * 60 * 1000; * @return {number} the offset (in ms) */ const getShifterToUTCOffset = (date) => { - // eslint-disable-next-line prefer-template const shifterLocaleDate = date.toLocaleString(PARSEABLE_DATE_FORMAT, { timeZone: SHIFTER_TIMEZONE }); // Get unix timestamp IN THE SHIFTERS TIMEZONE diff --git a/lib/server/utilities/appendPath.js b/lib/server/utilities/appendPath.js index ff72994cbc..559b3dee74 100644 --- a/lib/server/utilities/appendPath.js +++ b/lib/server/utilities/appendPath.js @@ -15,8 +15,6 @@ * Function to add one path to another. * @param {string} basePath The base path that will be used to append on. * @param {string} appendix The path that will be added on the base path. - * @param {Object} [options={base: 'trim', appendix: 'trim'}] Options to be applied on the appending. - * Options are: 'trim' or 'exact' * @returns {string} the full appended path */ const appendPath = (basePath, appendix) => { diff --git a/lib/server/utilities/countedItemsToHttpView.js b/lib/server/utilities/countedItemsToHttpView.js index 2269097fa3..e19be320b9 100644 --- a/lib/server/utilities/countedItemsToHttpView.js +++ b/lib/server/utilities/countedItemsToHttpView.js @@ -23,6 +23,8 @@ * @template T * * @typedef CountedItemsHttpView + * @property {object} meta + * @property {object} meta.page * @property {number} [meta.page.totalCount] * @property {number|null} [meta.page.pageCount] * @property {T[]} data @@ -30,7 +32,7 @@ /** * Adapt counted data to http api - * @param {CountedItems} data counted data + * @param {CountedItems} data counted data * @param {number} itemsPerPage limit with which the data were acquired * @returns {CountedItemsHttpView} adapted result */ diff --git a/lib/server/utilities/dtoValidator.js b/lib/server/utilities/dtoValidator.js index e39a6b12d9..f5c40142e9 100644 --- a/lib/server/utilities/dtoValidator.js +++ b/lib/server/utilities/dtoValidator.js @@ -21,15 +21,16 @@ * HTTP request. * @returns {Promise} Returns the validated value or null if an error occurred. */ -const dtoValidator = async (dto, { body, params, query, session, files = undefined }, response) => { +const dtoValidator = async (dto, request, response) => { + const { body, params, query, session, files = undefined } = request; let value = null; - const request = { body, params, query }; + const partialRequest = { body, params, query }; if (files) { - request.files = files; + partialRequest.files = files; } try { - value = await dto.validateAsync(request, { + value = await dto.validateAsync(partialRequest, { abortEarly: false, }); value.session = session; diff --git a/lib/usecases/run/GetAllRunsUseCase.js b/lib/usecases/run/GetAllRunsUseCase.js index 4b276215eb..613e1ea976 100644 --- a/lib/usecases/run/GetAllRunsUseCase.js +++ b/lib/usecases/run/GetAllRunsUseCase.js @@ -169,10 +169,10 @@ class GetAllRunsUseCase { /** * The computed duration column is based on trigger-start and trigger-end, using current timestamp as trigger-end if it is null - * - * @param {function} fn function to create an object representing a database function - * @param {function} col function to create an object representing a database column - * @param {function} literal function to create an object representing a database literal expression + * @param {object} object object containing functions to create database objects + * @param {function} object.fn function to create an object representing a database function + * @param {function} object.col function to create an object representing a database column + * @param {function} object.literal function to create an object representing a database literal expression * * @return {Object} the object representing the column */ diff --git a/lib/usecases/run/StartRunUseCase.js b/lib/usecases/run/StartRunUseCase.js index da8a5c0625..a2ec94165e 100644 --- a/lib/usecases/run/StartRunUseCase.js +++ b/lib/usecases/run/StartRunUseCase.js @@ -45,7 +45,7 @@ class StartRunUseCase { } ({ run, error } = await TransactionHelper.provide(async () => this._createRun(body))); - } catch (e) { + } catch { // Will use the default error error = {}; } diff --git a/scripts/update-dockerfile.js b/scripts/update-dockerfile.js index a40843d48d..6e7723181c 100644 --- a/scripts/update-dockerfile.js +++ b/scripts/update-dockerfile.js @@ -17,7 +17,6 @@ const path = require('path'); const DOCKERFILE_SRC = path.join(__dirname, '..', 'Dockerfile'); -// eslint-disable-next-line no-console const { log } = console; /** diff --git a/test/api/runs.test.js b/test/api/runs.test.js index 1c6c0cb751..5e0c26fd49 100644 --- a/test/api/runs.test.js +++ b/test/api/runs.test.js @@ -822,7 +822,7 @@ module.exports = () => { return; } expect(res.body.errors).to.be.an('array'); - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len expect(res.body.errors[0].detail).to.equal('Error code "Provide detector list contains invalid elements" is not' + ' defined, your custom type is missing the correct messages definition'); diff --git a/test/gRPC/serviceImplementation.test.js b/test/gRPC/serviceImplementation.test.js index 3d103abf4d..1cf40f2325 100644 --- a/test/gRPC/serviceImplementation.test.js +++ b/test/gRPC/serviceImplementation.test.js @@ -72,7 +72,7 @@ module.exports = () => { }; // Bigint can not be parsed by JSON utils so it can't be easily copied - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-param const getGRPCBigintMessage = () => ({ ui: Long.fromString('FEDCBA9876543210', true, 16), i: Long.fromString('-76543210FEDCBA98', false, 16), diff --git a/test/lib/server/middleware/rbac.middleware.test.js b/test/lib/server/middleware/rbac.middleware.test.js index 2925dbe7e0..3f20a563ca 100644 --- a/test/lib/server/middleware/rbac.middleware.test.js +++ b/test/lib/server/middleware/rbac.middleware.test.js @@ -29,7 +29,7 @@ const arrayRequest = { }, }; -// eslint-disable-next-line require-jsdoc +// eslint-disable-next-line jsdoc/require-param const expectRequestToReturn403 = (request) => { const response = {}; response.status = sinon.fake.returns(response); diff --git a/test/lib/server/monalisa-synchronization/MonAlisaSynchronizer.test.js b/test/lib/server/monalisa-synchronization/MonAlisaSynchronizer.test.js index 5559a5bcb7..da64695917 100644 --- a/test/lib/server/monalisa-synchronization/MonAlisaSynchronizer.test.js +++ b/test/lib/server/monalisa-synchronization/MonAlisaSynchronizer.test.js @@ -145,10 +145,10 @@ module.exports = () => { // All associated with appropriate Data Passes - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-param const helperGetDataPassNamesPerLhcPeriodOfSimulationPass = (name, lhcPeriod) => nameToSimulationPass[name].associations.dataPassesSuffixes.map((suffix) => `${lhcPeriod}_${suffix}`); - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-param const helperGetDataPassNamesPerSimulationPassName = (name) => nameToSimulationPass[name]?.associations.lhcPeriods .flatMap((lhcPeriod) => helperGetDataPassNamesPerLhcPeriodOfSimulationPass(name, lhcPeriod)); diff --git a/test/lib/server/services/qualityControlFlag/QcFlagService.test.js b/test/lib/server/services/qualityControlFlag/QcFlagService.test.js index 7845203cb6..0840913d0b 100644 --- a/test/lib/server/services/qualityControlFlag/QcFlagService.test.js +++ b/test/lib/server/services/qualityControlFlag/QcFlagService.test.js @@ -266,7 +266,7 @@ module.exports = () => { await assert.rejects( () => qcFlagService.create([qcFlag], scope, relations), - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len new BadParameterError(`Given QC flag period (${period.from}, ${period.to}) is out of run (${runStart}, ${runEnd}) period`), ); }); @@ -311,7 +311,7 @@ module.exports = () => { await assert.rejects( () => qcFlagService.create([qcFlag], scope, relations), - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len new BadParameterError('Data pass with this id (9999) could not be found'), ); }); @@ -810,7 +810,7 @@ module.exports = () => { await assert.rejects( () => qcFlagService.create([qcFlag], scope, relations), - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len new BadParameterError(`Given QC flag period (${period.from}, ${period.to}) is out of run (${runStart}, ${runEnd}) period`), ); }); @@ -855,7 +855,7 @@ module.exports = () => { await assert.rejects( () => qcFlagService.create([qcFlag], scope, relations), - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len new BadParameterError('Simulation pass with this id (9999) could not be found'), ); }); diff --git a/test/lib/server/services/qualityControlFlag/QcFlagTypeService.test.js b/test/lib/server/services/qualityControlFlag/QcFlagTypeService.test.js index 9ea0820c37..04fb98a0f9 100644 --- a/test/lib/server/services/qualityControlFlag/QcFlagTypeService.test.js +++ b/test/lib/server/services/qualityControlFlag/QcFlagTypeService.test.js @@ -324,7 +324,7 @@ module.exports = () => { }; await assert.rejects( () => qcFlagTypeService.create(parameters, { user: { externalUserId: 1 } }), - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len new ConflictError(`A QC flag type with name ${parameters.name} or method ${parameters.method} already exists`), ); }); diff --git a/test/lib/usecases/run/UpdateRunUseCase.test.js b/test/lib/usecases/run/UpdateRunUseCase.test.js index 7fc6427e9d..5a9369afb3 100644 --- a/test/lib/usecases/run/UpdateRunUseCase.test.js +++ b/test/lib/usecases/run/UpdateRunUseCase.test.js @@ -106,7 +106,7 @@ module.exports = () => { const changeReason = 'Change reason'; updateRunDto.body.runQualityChangeReason = changeReason; - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-param const expectLastLogToBeForQualityChange = async (previousQuality, newQuality, expectedTags) => { const { logs } = await new GetAllLogsUseCase().execute({ query: { page: { offset: 0, limit: 1 } } }); expect(logs).to.have.lengthOf(1); @@ -229,7 +229,7 @@ module.exports = () => { it('should successfully update the run detector\'s quality and create a log accordingly', async () => { const justification = 'The detector quality change justification'; - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-param const expectLastLogToBeForDetectorQualityChange = async (newQuality) => { const { logs } = await new GetAllLogsUseCase().execute({ query: { page: { offset: 0, limit: 1 } } }); expect(logs).to.have.lengthOf(1); diff --git a/test/lib/utilities/cacheAsyncFunction.test.js b/test/lib/utilities/cacheAsyncFunction.test.js index bc4d8ff07d..9b18fdbd46 100644 --- a/test/lib/utilities/cacheAsyncFunction.test.js +++ b/test/lib/utilities/cacheAsyncFunction.test.js @@ -21,7 +21,7 @@ const { cacheAsyncFunction } = require('../../../lib/utilities/cacheAsyncFunctio module.exports = () => { it('should successfully cache a resolving function', async () => { const fake = sinon.fake(); - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-param const functionMock = async (value) => { fake(value); return value; @@ -43,7 +43,7 @@ module.exports = () => { it('should successfully cache a rejecting function', async () => { const fake = sinon.fake(); - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-param const rejecting = async (value) => { fake(); throw new Error(value); @@ -75,7 +75,7 @@ module.exports = () => { it('should successfully delete function call when cache overflows', async () => { const fake = sinon.fake(); - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-param const functionMock = async (value) => { fake(value); return value; diff --git a/test/mocks/mock-dcs-eos-report.js b/test/mocks/mock-dcs-eos-report.js index 7526dd61da..18b635062e 100644 --- a/test/mocks/mock-dcs-eos-report.js +++ b/test/mocks/mock-dcs-eos-report.js @@ -90,7 +90,7 @@ exports.customizedDcsEosReportRequest = { exports.formattedCustomizedDcsEosReport = genericFormattedCustomizedEosReport( ShiftTypes.DCS, - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len '- \\[DCS Shifter\\] - [Third issue log](http://localhost:4000?page=log-detail&id=120)\n- \\[DCS Shifter, FLP\\] - [Fifth issue log](http://localhost:4000?page=log-detail&id=124)', '\n## Alert handling\nAn alert\nAnd another one\n', ); diff --git a/test/mocks/mock-ecs-eos-report.js b/test/mocks/mock-ecs-eos-report.js index 67e3233d76..afe0653525 100644 --- a/test/mocks/mock-ecs-eos-report.js +++ b/test/mocks/mock-ecs-eos-report.js @@ -167,7 +167,7 @@ const formattedCustomizedECSEosReportTypeSpecific = ` exports.formattedCustomizedECSEosReport = genericFormattedCustomizedEosReport( ShiftTypes.ECS, - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len '- \\[ECS Shifter\\] - [Third issue log](http://localhost:4000?page=log-detail&id=120)\n- \\[ECS Shifter, FLP\\] - [Fifth issue log](http://localhost:4000?page=log-detail&id=124)', formattedCustomizedECSEosReportTypeSpecific, ); diff --git a/test/mocks/mock-qc-pdp-eos-report.js b/test/mocks/mock-qc-pdp-eos-report.js index 91a5e0e345..ec5de88628 100644 --- a/test/mocks/mock-qc-pdp-eos-report.js +++ b/test/mocks/mock-qc-pdp-eos-report.js @@ -227,7 +227,7 @@ const formattedCustomizedQcPdpEosReportTypeSpecific = ` exports.formattedCustomizedQcPdpEosReport = genericFormattedCustomizedEosReport( ShiftTypes.QC_PDP, - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len '- \\[QC/PDP Shifter\\] - [Third issue log](http://localhost:4000?page=log-detail&id=120)\n- \\[QC/PDP Shifter, FLP\\] - [Fifth issue log](http://localhost:4000?page=log-detail&id=124)', formattedCustomizedQcPdpEosReportTypeSpecific, ); diff --git a/test/mocks/mock-slimos-eos-report.js b/test/mocks/mock-slimos-eos-report.js index 41b7ea1f0c..a80453a5e3 100644 --- a/test/mocks/mock-slimos-eos-report.js +++ b/test/mocks/mock-slimos-eos-report.js @@ -86,7 +86,7 @@ exports.customizedSlimosEosReportRequest = { exports.formattedCustomizedSlimosEosReport = genericFormattedCustomizedEosReport( ShiftTypes.SLIMOS, - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len '- \\[SLIMOS\\] - [Third issue log](http://localhost:4000?page=log-detail&id=120)\n- \\[SLIMOS, FLP\\] - [Fifth issue log](http://localhost:4000?page=log-detail&id=124)', '', ); diff --git a/test/public/envs/overview.test.js b/test/public/envs/overview.test.js index 5ca08abfe4..0d85d1c38d 100644 --- a/test/public/envs/overview.test.js +++ b/test/public/envs/overview.test.js @@ -63,7 +63,7 @@ module.exports = () => { const statusNames = new Set(Object.keys(StatusAcronym)); - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-param const checkDate = (date) => !isNaN(dateAndTime.parse(date, 'DD/MM/YYYY hh:mm:ss')); const tableDataValidators = { id: (id) => /[A-Za-z0-9]+/.test(id), diff --git a/test/public/lhcFills/detail.test.js b/test/public/lhcFills/detail.test.js index 7183d42ed5..186385d6f5 100644 --- a/test/public/lhcFills/detail.test.js +++ b/test/public/lhcFills/detail.test.js @@ -160,7 +160,7 @@ module.exports = () => { }); it('should successfully display time elapsed between runs', async () => { - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-param const getRunDuration = async (rowNumber) => page.$eval( `#runs tbody tr:nth-of-type(${rowNumber})`, (row) => document.querySelector(`#${row.id}-timeSincePreviousRun`).innerText, diff --git a/test/public/qcFlagTypes/creation.test.js b/test/public/qcFlagTypes/creation.test.js index b3769b1c8d..397c21730b 100644 --- a/test/public/qcFlagTypes/creation.test.js +++ b/test/public/qcFlagTypes/creation.test.js @@ -58,7 +58,7 @@ module.exports = () => { await expectInnerText( page, '.alert.alert-danger', - // eslint-disable-next-line max-len + // eslint-disable-next-line @stylistic/js/max-len 'The request conflicts with existing data: A QC flag type with name Limited acceptance or method LimitedAcceptance already exists', ); }); diff --git a/test/public/qcFlags/forDataPassOverview.test.js b/test/public/qcFlags/forDataPassOverview.test.js index a8d2bfa4f1..25d0b65baa 100644 --- a/test/public/qcFlags/forDataPassOverview.test.js +++ b/test/public/qcFlags/forDataPassOverview.test.js @@ -95,7 +95,7 @@ module.exports = () => { dplDetectorId: 1, } }); - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-param const validateDate = (date) => date === '-' || !isNaN(dateAndTime.parse(date, 'DD/MM/YYYY hh:mm:ss')); const tableDataValidators = { flagType: (flagType) => flagType && flagType !== '-', diff --git a/test/public/qcFlags/forSimulationPassOverview.test.js b/test/public/qcFlags/forSimulationPassOverview.test.js index bc7783cb36..f343a10753 100644 --- a/test/public/qcFlags/forSimulationPassOverview.test.js +++ b/test/public/qcFlags/forSimulationPassOverview.test.js @@ -95,7 +95,7 @@ module.exports = () => { dplDetectorId: 1, } }); - // eslint-disable-next-line require-jsdoc + // eslint-disable-next-line jsdoc/require-param const validateDate = (date) => date === '-' || !isNaN(dateAndTime.parse(date, 'DD/MM/YYYY hh:mm:ss')); const tableDataValidators = { flagType: (flagType) => flagType && flagType !== '-', From 5923b28e6aa3ab619c7e0706a8e3474ae8d14a31 Mon Sep 17 00:00:00 2001 From: George Raduta Date: Wed, 24 Jul 2024 16:49:06 +0200 Subject: [PATCH 3/3] Fix issues created by lint changes --- .../20230120160345-add-environment-history.js | 115 ++++++++++-------- ...30213082905-run-quality-unknown-to-null.js | 17 ++- .../20230411123947-add-tag-description.js | 15 ++- .../20230424121312-add-dpl-process.js | 17 +-- lib/database/models/qcFlagType.js | 6 +- lib/database/models/run.js | 9 +- lib/database/models/tag.js | 5 +- 7 files changed, 107 insertions(+), 77 deletions(-) diff --git a/lib/database/migrations/20230120160345-add-environment-history.js b/lib/database/migrations/20230120160345-add-environment-history.js index df2863e0f5..492fec31ed 100644 --- a/lib/database/migrations/20230120160345-add-environment-history.js +++ b/lib/database/migrations/20230120160345-add-environment-history.js @@ -1,73 +1,79 @@ 'use strict'; module.exports = { - up: async (queryInterface, Sequelize) => queryInterface.sequelize.transaction(async () => { - await queryInterface.createTable('environments_history_items', { - id: { - allowNull: false, - autoIncrement: true, - primaryKey: true, - type: Sequelize.INTEGER, - }, - environment_id: { - type: Sequelize.CHAR(32), - }, - status: { - allowNull: false, - type: Sequelize.STRING, - }, - status_message: { - type: Sequelize.TEXT, - }, - created_at: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'), - }, - updated_at: { - allowNull: false, - type: Sequelize.DATE, - defaultValue: Sequelize.literal('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'), - }, - }, { - timestamps: true, - }); - // Convert status and status message to the new history table + // eslint-disable-next-line jsdoc/require-jsdoc + async up(queryInterface, Sequelize) { + return queryInterface.sequelize.transaction(async () => { + await queryInterface.createTable('environments_history_items', { + id: { + allowNull: false, + autoIncrement: true, + primaryKey: true, + type: Sequelize.INTEGER, + }, + environment_id: { + type: Sequelize.CHAR(32), + }, + status: { + allowNull: false, + type: Sequelize.STRING, + }, + status_message: { + type: Sequelize.TEXT, + }, + created_at: { + allowNull: false, + type: Sequelize.DATE, + defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'), + }, + updated_at: { + allowNull: false, + type: Sequelize.DATE, + defaultValue: Sequelize.literal('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'), + }, + }, { + timestamps: true, + }); + + // Convert status and status message to the new history table - // Use created at to define the standby history item - await queryInterface.sequelize.query(` + // Use created at to define the standby history item + await queryInterface.sequelize.query(` INSERT INTO environments_history_items(environment_id, status, created_at, updated_at) SELECT id, "STANDBY", created_at, created_at FROM environments e WHERE created_at <> updated_at `); - // Use updated at to define the current history item - await queryInterface.sequelize.query(` + // Use updated at to define the current history item + await queryInterface.sequelize.query(` INSERT INTO environments_history_items(environment_id, status, status_message, created_at, updated_at) SELECT id, status, status_message, updated_at, updated_at FROM environments; `); - await Promise.all([ - queryInterface.removeColumn('environments', 'status'), - queryInterface.removeColumn('environments', 'status_message'), - ]); - }), + await Promise.all([ + queryInterface.removeColumn('environments', 'status'), + queryInterface.removeColumn('environments', 'status_message'), + ]); + }); + }, - down: async (queryInterface, Sequelize) => queryInterface.sequelize.transaction(async () => { - await Promise.all([ - queryInterface.addColumn('environments', 'status', { - allowNull: false, - type: Sequelize.STRING, - }), - queryInterface.addColumn('environments', 'status_message', { - type: Sequelize.TEXT, - }), - ]); + // eslint-disable-next-line jsdoc/require-jsdoc + async down(queryInterface, Sequelize) { + return queryInterface.sequelize.transaction(async () => { + await Promise.all([ + queryInterface.addColumn('environments', 'status', { + allowNull: false, + type: Sequelize.STRING, + }), + queryInterface.addColumn('environments', 'status_message', { + type: Sequelize.TEXT, + }), + ]); - await queryInterface.sequelize.query(` + await queryInterface.sequelize.query(` UPDATE environments e INNER JOIN environments_history_items h ON h.environment_id = e.id @@ -75,6 +81,7 @@ module.exports = { ORDER BY h.updated_at DESC `); - await queryInterface.dropTable('environments_history_items'); - }), + await queryInterface.dropTable('environments_history_items'); + }); + }, }; diff --git a/lib/database/migrations/20230213082905-run-quality-unknown-to-null.js b/lib/database/migrations/20230213082905-run-quality-unknown-to-null.js index 2bbc879928..654b68af4f 100644 --- a/lib/database/migrations/20230213082905-run-quality-unknown-to-null.js +++ b/lib/database/migrations/20230213082905-run-quality-unknown-to-null.js @@ -4,8 +4,10 @@ const { Op } = require('sequelize'); /** @type {import('sequelize-cli').Migration} */ module.exports = { - up: async (queryInterface, Sequelize) => - queryInterface.sequelize.transaction(async (transaction) => { + + // eslint-disable-next-line jsdoc/require-jsdoc + async up(queryInterface, Sequelize) { + return queryInterface.sequelize.transaction(async (transaction) => { await queryInterface.changeColumn('runs', 'run_quality', { type: Sequelize.ENUM('good', 'bad', 'test', 'unknown', 'none'), defaultValue: 'none', @@ -27,10 +29,12 @@ module.exports = { defaultValue: 'none', allowNull: false, }, { transaction }); - }), + }); + }, - down: async (queryInterface, Sequelize) => - queryInterface.sequelize.transaction(async (transaction) => { + // eslint-disable-next-line jsdoc/require-jsdoc + async down(queryInterface, Sequelize) { + return queryInterface.sequelize.transaction(async (transaction) => { await queryInterface.changeColumn('runs', 'run_quality', { type: Sequelize.ENUM('good', 'bad', 'test', 'unknown', 'none'), defaultValue: 'test', @@ -45,5 +49,6 @@ module.exports = { defaultValue: 'test', allowNull: true, }, { transaction }); - }), + }); + }, }; diff --git a/lib/database/migrations/20230411123947-add-tag-description.js b/lib/database/migrations/20230411123947-add-tag-description.js index cf423d9bab..9fb710b3d3 100644 --- a/lib/database/migrations/20230411123947-add-tag-description.js +++ b/lib/database/migrations/20230411123947-add-tag-description.js @@ -2,11 +2,16 @@ /** @type {import('sequelize-cli').Migration} */ module.exports = { - up: async (queryInterface, Sequelize) => - queryInterface.addColumn('tags', 'description', { + // eslint-disable-next-line jsdoc/require-jsdoc + async up(queryInterface, Sequelize) { + return queryInterface.addColumn('tags', 'description', { allowNull: true, type: Sequelize.TEXT, - }), - down: async (queryInterface) => - queryInterface.removeColumn('tags', 'description'), + }); + }, + + // eslint-disable-next-line jsdoc/require-jsdoc + async down(queryInterface) { + return queryInterface.removeColumn('tags', 'description'); + }, }; diff --git a/lib/database/migrations/20230424121312-add-dpl-process.js b/lib/database/migrations/20230424121312-add-dpl-process.js index a92e2216d0..9d99ed9b60 100644 --- a/lib/database/migrations/20230424121312-add-dpl-process.js +++ b/lib/database/migrations/20230424121312-add-dpl-process.js @@ -2,8 +2,9 @@ /** @type {import('sequelize-cli').Migration} */ module.exports = { - up: async (queryInterface, Sequelize) => - queryInterface.sequelize.transaction(async () => { + // eslint-disable-next-line jsdoc/require-jsdoc + async up(queryInterface, Sequelize) { + return queryInterface.sequelize.transaction(async () => { // DPL Hosts await queryInterface.createTable('hosts', { id: { @@ -184,14 +185,16 @@ module.exports = { }, { timestamps: true, }); - }), - - down: async (queryInterface) => - queryInterface.sequelize.transaction(async () => { + }); + }, + // eslint-disable-next-line jsdoc/require-jsdoc + async down(queryInterface) { + return queryInterface.sequelize.transaction(async () => { await queryInterface.dropTable('dpl_processes_executions'); await queryInterface.dropTable('dpl_processes'); await queryInterface.dropTable('dpl_processes_types'); await queryInterface.dropTable('dpl_detectors'); await queryInterface.dropTable('hosts'); - }), + }); + }, }; diff --git a/lib/database/models/qcFlagType.js b/lib/database/models/qcFlagType.js index 892e76ecf4..8448b24f6a 100644 --- a/lib/database/models/qcFlagType.js +++ b/lib/database/models/qcFlagType.js @@ -51,7 +51,11 @@ module.exports = (sequelize) => { archived: { type: Sequelize.VIRTUAL, defaultValue: null, - get: ()=> Boolean(this.getDataValue('archivedAt')), + + // eslint-disable-next-line jsdoc/require-jsdoc + get() { + return Boolean(this.getDataValue('archivedAt')); + }, }, }, { tableName: 'quality_control_flag_types' }, diff --git a/lib/database/models/run.js b/lib/database/models/run.js index 6055a74d69..8dd2aff41a 100644 --- a/lib/database/models/run.js +++ b/lib/database/models/run.js @@ -35,7 +35,8 @@ module.exports = (sequelize) => { }, startTime: { type: Sequelize.VIRTUAL, - get: () => { + // eslint-disable-next-line jsdoc/require-jsdoc + get() { const timeTrgStart = this.getDataValue('timeTrgStart'); const timeO2Start = this.getDataValue('timeO2Start'); const runStartString = timeTrgStart ?? timeO2Start; @@ -44,7 +45,8 @@ module.exports = (sequelize) => { }, endTime: { type: Sequelize.VIRTUAL, - get: () => { + // eslint-disable-next-line jsdoc/require-jsdoc + get() { if (this.getDataValue('start') === null) { return null; } @@ -59,7 +61,8 @@ module.exports = (sequelize) => { }, runDuration: { type: Sequelize.VIRTUAL, - get: () => { + // eslint-disable-next-line jsdoc/require-jsdoc + get() { const { startTime, endTime } = this; if (!startTime) { return null; diff --git a/lib/database/models/tag.js b/lib/database/models/tag.js index fbb4cf51f5..7bacf4a9b4 100644 --- a/lib/database/models/tag.js +++ b/lib/database/models/tag.js @@ -49,7 +49,10 @@ module.exports = (sequelize) => { type: Sequelize.VIRTUAL, allowNull: true, defaultValue: null, - get: ()=> Boolean(this.getDataValue('archivedAt')), + // eslint-disable-next-line jsdoc/require-jsdoc + get() { + return Boolean(this.getDataValue('archivedAt')); + }, }, }, { indexes: [