Skip to content

Apply linting & formatting globally #1

Apply linting & formatting globally

Apply linting & formatting globally #1

Triggered via pull request May 21, 2024 17:13
Status Failure
Total duration 1m 6s
Artifacts

lint-and-format.yml

on: pull_request
runner / eslint and prettier
58s
runner / eslint and prettier
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 10 warnings
runner / eslint and prettier: src/js/collections/DataPackage.js#L15
[eslint] reported by reviewdog 🐶 Unexpected function expression. Raw Output: {"ruleId":"prefer-arrow-callback","severity":2,"message":"Unexpected function expression.","line":15,"column":4,"nodeType":"FunctionExpression","messageId":"preferArrowCallback","endLine":3749,"endColumn":2,"fix":{"range":[254,381],"text":"(\n $,\n _,\n Backbone,\n rdf,\n uuid,\n md5,\n SolrResults,\n Filter,\n DataONEObject,\n ScienceMetadata,\n EML211,\n) =>"}}
runner / eslint and prettier: src/js/collections/DataPackage.js#L38
[eslint] reported by reviewdog 🐶 Unexpected var, use let or const instead. Raw Output: {"ruleId":"no-var","severity":2,"message":"Unexpected var, use let or const instead.","line":38,"column":3,"nodeType":"VariableDeclaration","messageId":"unexpectedVar","endLine":3746,"endColumn":5}
runner / eslint and prettier: src/js/collections/DataPackage.js#L3449
[eslint] reported by reviewdog 🐶 Expected method shorthand. Raw Output: {"ruleId":"object-shorthand","severity":2,"message":"Expected method shorthand.","line":3449,"column":7,"nodeType":"Property","messageId":"expectedMethodShorthand","endLine":3505,"endColumn":8,"fix":{"range":[137490,139859],"text":"handleAdd (dataONEObject) {\n var metadataModel = this.find(function (m) {\n return m.get(\"type\") == \"Metadata\";\n });\n\n // Append to or create a new documents list\n if (metadataModel) {\n if (!Array.isArray(metadataModel.get(\"documents\"))) {\n metadataModel.set(\"documents\", [dataONEObject.id]);\n } else {\n if (!_.contains(metadataModel.get(\"documents\"), dataONEObject.id))\n metadataModel.get(\"documents\").push(dataONEObject.id);\n }\n\n // Create an EML Entity for this DataONE Object if there isn't one already\n if (\n metadataModel.type == \"EML\" &&\n !dataONEObject.get(\"metadataEntity\") &&\n dataONEObject.type != \"EML\"\n ) {\n metadataModel.createEntity(dataONEObject);\n metadataModel.set(\"uploadStatus\", \"q\");\n }\n }\n\n this.saveReference(dataONEObject);\n\n this.setLoadingFiles(dataONEObject);\n\n //Save a reference to this DataPackage\n // If the collections attribute is an array\n /* if( Array.isArray(dataONEObject.get(\"collections\")) ){\n //Add this DataPackage to the collections list if it's not already in the array\n if( !_.contains(dataONEObject.get(\"collections\"), this) ){\n dataONEObject.get(\"collections\").push(this);\n }\n }\n //If the collections attribute is not an array but there is a value,\n else if(dataONEObject.get(\"collections\")){\n\n //And if the value is not this DataPackage or it's pid, then set it on the model\n if( dataONEObject.get(\"collections\") != this && dataONEObject.get(\"collections\") != this.get(\"id\") ){\n dataONEObject.set(\"collections\", [dataONEObject.get(\"collections\"), this] );\n }\n //Otherwise, set the collections attribute to this DataPackage in an array\n else {\n dataONEObject.set(\"collections\", [this]);\n }\n\n }\n // If there is no value set on the collections attribute, then set it to\n // this DataPackage in an array\n else{\n dataONEObject.set(\"collections\", [this]);\n }\n*/\n }"}}
runner / eslint and prettier: src/js/collections/Filters.js#L12
[eslint] reported by reviewdog 🐶 Unexpected function expression. Raw Output: {"ruleId":"prefer-arrow-callback","severity":2,"message":"Unexpected function expression.","line":12,"column":4,"nodeType":"FunctionExpression","messageId":"preferArrowCallback","endLine":660,"endColumn":2,"fix":{"range":[280,421],"text":"(\n $,\n _,\n Backbone,\n Filter,\n BooleanFilter,\n ChoiceFilter,\n DateFilter,\n NumericFilter,\n ToggleFilter,\n SpatialFilter,\n) =>"}}
runner / eslint and prettier: src/js/collections/Filters.js#L34
[eslint] reported by reviewdog 🐶 Unexpected var, use let or const instead. Raw Output: {"ruleId":"no-var","severity":2,"message":"Unexpected var, use let or const instead.","line":34,"column":3,"nodeType":"VariableDeclaration","messageId":"unexpectedVar","endLine":658,"endColumn":5}
runner / eslint and prettier: src/js/collections/Filters.js#L69
[eslint] reported by reviewdog 🐶 Expected method shorthand. Raw Output: {"ruleId":"object-shorthand","severity":2,"message":"Expected method shorthand.","line":69,"column":7,"nodeType":"Property","messageId":"expectedMethodShorthand","endLine":88,"endColumn":8,"fix":{"range":[2155,2880],"text":"initialize (models, options) {\n try {\n if (typeof options === \"undefined\") {\n var options = {};\n }\n if (options && options.objectDOM) {\n // Models are automatically added to the collection by the parse\n // function.\n var isUIFilterType = options.isUIFilterType == true ? true : false;\n this.parse(options.objectDOM, isUIFilterType);\n }\n if (options.catalogSearch) {\n this.catalogSearchQuery = this.createCatalogSearchQuery();\n }\n } catch (error) {\n console.log(\n \"Error initializing a Filters collection. Error details: \" + error,\n );\n }\n }"}}
runner / eslint and prettier: src/js/collections/Filters.js#L271
[eslint] reported by reviewdog 🐶 Expected method shorthand. Raw Output: {"ruleId":"object-shorthand","severity":2,"message":"Expected method shorthand.","line":271,"column":7,"nodeType":"Property","messageId":"expectedMethodShorthand","endLine":284,"endColumn":8,"fix":{"range":[10581,10993],"text":"getIdFilters () {\n try {\n return this.filter(function (filterModel) {\n if (typeof filterModel.isIdFilter == \"undefined\") {\n return false;\n }\n return filterModel.isIdFilter();\n });\n } catch (error) {\n console.log(\n \"Error trying to find ID Filters, error details: \" + error,\n );\n }\n }"}}
runner / eslint and prettier: src/js/collections/Filters.js#L273
[eslint] reported by reviewdog 🐶 Unexpected function expression. Raw Output: {"ruleId":"prefer-arrow-callback","severity":2,"message":"Unexpected function expression.","line":273,"column":30,"nodeType":"FunctionExpression","messageId":"preferArrowCallback","endLine":278,"endColumn":12,"fix":{"range":[10652,10674],"text":"(filterModel) =>"}}
runner / eslint and prettier: src/js/collections/Filters.js#L293
[eslint] reported by reviewdog 🐶 Expected method shorthand. Raw Output: {"ruleId":"object-shorthand","severity":2,"message":"Expected method shorthand.","line":293,"column":7,"nodeType":"Property","messageId":"expectedMethodShorthand","endLine":301,"endColumn":8,"fix":{"range":[11346,11601],"text":"getNonIdFilters () {\n try {\n return this.difference(this.getIdFilters());\n } catch (error) {\n console.log(\n \"Error trying to find non-ID Filters, error details: \" + error,\n );\n }\n }"}}
runner / eslint and prettier
reviewdog: Too many results (annotations) in diff. You may miss some annotations due to GitHub limitation for annotation created by logging command. Please check GitHub Actions log console to see all results. Limitation: - 10 warning annotations and 10 error annotations per step - 50 annotations per job (sum of annotations from all the steps) - 50 annotations per run (separate from the job annotations, these annotations aren't created by users) Source: https://github.com/orgs/community/discussions/26680#discussioncomment-3252835
runner / eslint and prettier: src/js/models/AppModel.js#L2652
[eslint] reported by reviewdog 🐶 Missing JSDoc @returns declaration. Raw Output: {"ruleId":"jsdoc/require-returns","severity":1,"message":"Missing JSDoc @returns declaration.","line":2652,"column":7,"nodeType":"Block","endLine":2656,"endColumn":10}
runner / eslint and prettier: src/js/models/LookupModel.js#L395
[eslint] reported by reviewdog 🐶 Missing JSDoc comment. Raw Output: {"ruleId":"jsdoc/require-jsdoc","severity":1,"message":"Missing JSDoc comment.","line":395,"column":9,"nodeType":"FunctionDeclaration","messageId":"missingJsDoc","endLine":396,"endColumn":1,"fix":{"range":[12866,12866],"text":"/**\n *\n */\n "}}
runner / eslint and prettier: src/js/models/maps/GeoPoint.js#L174
[eslint] reported by reviewdog 🐶 Missing JSDoc @returns declaration. Raw Output: {"ruleId":"jsdoc/require-returns","severity":1,"message":"Missing JSDoc @returns declaration.","line":174,"column":7,"nodeType":"Block","endLine":180,"endColumn":10}
runner / eslint and prettier: src/js/models/maps/assets/CesiumGeohash.js#L292
[eslint] reported by reviewdog 🐶 Missing JSDoc @param "geohashes" declaration. Raw Output: {"ruleId":"jsdoc/require-param","severity":1,"message":"Missing JSDoc @param \"geohashes\" declaration.","line":292,"column":7,"nodeType":"Block","endLine":297,"endColumn":10,"fix":{"range":[9968,10150],"text":"/**\n * Find the geohash Entity on the map and add it to the selected\n * features.\n * @param {string} geohash The geohash to select.\n * @param geohashes\n * @SInCE 2.25.0\n */"}}
runner / eslint and prettier: src/js/models/metadata/eml211/EML211.js#L2135
[eslint] reported by reviewdog 🐶 Missing JSDoc @param "partyModel" declaration. Raw Output: {"ruleId":"jsdoc/require-param","severity":1,"message":"Missing JSDoc @param \"partyModel\" declaration.","line":2135,"column":7,"nodeType":"Block","endLine":2139,"endColumn":10,"fix":{"range":[78300,78470],"text":"/**\n * Attempt to move a party one index forward within its sibling models\n *\n * @param {EMLParty} partyModel: The EMLParty model we're moving\n * @param partyModel\n */"}}
runner / eslint and prettier: src/js/models/metadata/eml211/EML211.js#L2183
[eslint] reported by reviewdog 🐶 Missing JSDoc @param "partyModel" declaration. Raw Output: {"ruleId":"jsdoc/require-param","severity":1,"message":"Missing JSDoc @param \"partyModel\" declaration.","line":2183,"column":7,"nodeType":"Block","endLine":2187,"endColumn":10,"fix":{"range":[79649,79819],"text":"/**\n * Attempt to move a party one index forward within its sibling models\n *\n * @param {EMLParty} partyModel: The EMLParty model we're moving\n * @param partyModel\n */"}}
runner / eslint and prettier: src/js/models/metadata/eml211/EML211.js#L2260
[eslint] reported by reviewdog 🐶 Missing JSDoc @returns declaration. Raw Output: {"ruleId":"jsdoc/require-returns","severity":1,"message":"Missing JSDoc @returns declaration.","line":2260,"column":7,"nodeType":"Block","endLine":2264,"endColumn":10}
runner / eslint and prettier: src/js/models/metadata/eml211/EML211.js#L2505
[eslint] reported by reviewdog 🐶 Missing JSDoc @param "eml" declaration. Raw Output: {"ruleId":"jsdoc/require-param","severity":1,"message":"Missing JSDoc @param \"eml\" declaration.","line":2505,"column":7,"nodeType":"Block","endLine":2511,"endColumn":10,"fix":{"range":[91149,91420],"text":"/**\n * Sets the xsi:schemaLocation attribute on the passed-in Element\n * depending on the application configuration.\n *\n * @param {Element} eml: The root eml:eml element to modify\n * @param eml\n * @return {Element} The element, possibly modified\n */"}}
runner / eslint and prettier: src/js/models/metadata/eml211/EML211.js#L2505
[eslint] reported by reviewdog 🐶 Missing JSDoc @returns declaration. Raw Output: {"ruleId":"jsdoc/require-returns","severity":1,"message":"Missing JSDoc @returns declaration.","line":2505,"column":7,"nodeType":"Block","endLine":2511,"endColumn":10}
runner / eslint and prettier: src/js/models/queryFields/QueryField.js#L89
[eslint] reported by reviewdog 🐶 Missing JSDoc @returns declaration. Raw Output: {"ruleId":"jsdoc/require-returns","severity":1,"message":"Missing JSDoc @returns declaration.","line":89,"column":7,"nodeType":"Block","endLine":94,"endColumn":10}