mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 23:28:14 +00:00
ESLint upgrade, implement additional rules (#3230)
* upgrade to ESLintv7, added overrides for rules violated * removed overrides for spec files * fixed no-prototype-builtins issues * added rules for default-case-last, default-param-last, grouped-accessor-pairs, no-constructor-return, and added override for one violation Co-authored-by: Andrew Henry <akhenry@gmail.com> Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
This commit is contained in:
@ -303,7 +303,7 @@ export default class ConditionManager extends EventEmitter {
|
||||
isTelemetryUsed(endpoint) {
|
||||
const id = this.openmct.objects.makeKeyString(endpoint.identifier);
|
||||
|
||||
for (const condition of this.conditions) {
|
||||
for (let condition of this.conditions) {
|
||||
if (condition.isTelemetryUsed(id)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -213,9 +213,9 @@ export default {
|
||||
this.enumerations = foundMetadata.enumerations;
|
||||
} else if (foundMetadata.format === 'string' || foundMetadata.format === 'number') {
|
||||
this.operationFormat = foundMetadata.format;
|
||||
} else if (foundMetadata.hints.hasOwnProperty('range')) {
|
||||
} else if (Object.prototype.hasOwnProperty.call(foundMetadata.hints, 'range')) {
|
||||
this.operationFormat = 'number';
|
||||
} else if (foundMetadata.hints.hasOwnProperty('domain')) {
|
||||
} else if (Object.prototype.hasOwnProperty.call(foundMetadata.hints, 'domain')) {
|
||||
this.operationFormat = 'number';
|
||||
} else if (foundMetadata.key === 'name') {
|
||||
this.operationFormat = 'string';
|
||||
|
@ -34,7 +34,7 @@ export function evaluateResults(results, trigger) {
|
||||
}
|
||||
|
||||
function matchAll(results) {
|
||||
for (const result of results) {
|
||||
for (let result of results) {
|
||||
if (result !== true) {
|
||||
return false;
|
||||
}
|
||||
@ -44,7 +44,7 @@ function matchAll(results) {
|
||||
}
|
||||
|
||||
function matchAny(results) {
|
||||
for (const result of results) {
|
||||
for (let result of results) {
|
||||
if (result === true) {
|
||||
return true;
|
||||
}
|
||||
@ -55,7 +55,7 @@ function matchAny(results) {
|
||||
|
||||
function matchExact(results, target) {
|
||||
let matches = 0;
|
||||
for (const result of results) {
|
||||
for (let result of results) {
|
||||
if (result === true) {
|
||||
matches++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user