Skip to content

Commit

Permalink
Merge pull request #7751 from jackyalbo/jacky-eslint-fix
Browse files Browse the repository at this point in the history
Fixing ESlint issues and returning some missing rules
  • Loading branch information
jackyalbo authored Jan 23, 2024
2 parents 20cd606 + 664180e commit 6afbd87
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ module.exports = {
"ignoreReadBeforeAssign": false
}],

// These were deprecated out of eslint-all and moved to @stylistic plugin.
// will be changed once we will start using the plugin as well
'no-multi-spaces': ['error', {}],
'semi': ['error', 'always'],

//////////////////////////////////////////////////////////////////////
// //
// WARN //
Expand Down
12 changes: 6 additions & 6 deletions src/cmd/health.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const fork_response_code = {
const health_errors_tyes = {
PERSISTENT: 'PERSISTENT',
TEMPORARY: 'TEMPORARY',
}
};

//suppress aws sdk related commands.
process.env.AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE = '1';
Expand Down Expand Up @@ -132,8 +132,8 @@ class NSFSHealth {
service_health = "NOTOK";
}
const error_code = await this.get_error_code(service_status, pid, rsyslog.service_status, response_code);
if (this.all_bucket_details) bucket_details = await this.get_bucket_status(this.config_root);
if (this.all_account_details) account_details = await this.get_account_status(this.config_root);
if (this.all_bucket_details) bucket_details = await this.get_bucket_status(this.config_root);
if (this.all_account_details) account_details = await this.get_account_status(this.config_root);
const health = {
service_name: NSFS_SERVICE,
status: service_health,
Expand All @@ -157,7 +157,7 @@ class NSFSHealth {
error_type: health_errors_tyes.TEMPORARY,
},
accounts_status: {
invalid_accounts: account_details === undefined ? undefined: account_details.invalid_storages,
invalid_accounts: account_details === undefined ? undefined: account_details.invalid_storages,
valid_accounts: account_details === undefined ? undefined : account_details.valid_storages,
error_type: health_errors_tyes.PERSISTENT,
},
Expand All @@ -168,8 +168,8 @@ class NSFSHealth {
}
}
};
if (!this.all_account_details) delete health.checks.accounts_status;
if (!this.all_bucket_details) delete health.checks.buckets_status;
if (!this.all_account_details) delete health.checks.accounts_status;
if (!this.all_bucket_details) delete health.checks.buckets_status;
return health;
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/unit_tests/test_nc_nsfs_health.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ mocha.describe('nsfs nc health', function() {
assert.strictEqual(health_status.checks.accounts_status.valid_accounts.length, 0);
assert.strictEqual(health_status.checks.accounts_status.invalid_accounts.length, 0);
//revert to config root
Health.config_root = config_root;
Health.config_root = config_root;
});

mocha.it('Account with inaccessible path', async function() {
Expand Down
2 changes: 1 addition & 1 deletion src/util/buffer_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class BuffersPool {
[util.inspect.custom]() {
return 'BufferPool.get_buffer: sem value: ' + this.sem._value +
' waiting_value: ' + this.sem._waiting_value +
' buffers length: ' + this.buffers.length;
' buffers length: ' + this.buffers.length;
}
}

Expand Down

0 comments on commit 6afbd87

Please sign in to comment.