ci: Add lint rule for mandatory curly braces (#9348)
This commit is contained in:
@@ -122,7 +122,7 @@ OAuth.nonce = function () {
|
||||
var text = '';
|
||||
var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||
|
||||
for (var i = 0; i < 30; i++) text += possible.charAt(Math.floor(Math.random() * possible.length));
|
||||
for (var i = 0; i < 30; i++) { text += possible.charAt(Math.floor(Math.random() * possible.length)); }
|
||||
|
||||
return text;
|
||||
};
|
||||
|
||||
@@ -215,7 +215,7 @@ module.exports = function (authOptions = {}, enableAnonymousUsers = true) {
|
||||
return { validator: undefined };
|
||||
}
|
||||
const authAdapter = loadAuthAdapter(provider, authOptions);
|
||||
if (!authAdapter) return;
|
||||
if (!authAdapter) { return; }
|
||||
const { adapter, appIds, providerOptions } = authAdapter;
|
||||
return { validator: authDataValidator(provider, adapter, appIds, providerOptions), adapter };
|
||||
};
|
||||
|
||||
@@ -37,13 +37,13 @@ const { Parse } = require('parse/node');
|
||||
const httpsRequest = require('./httpsRequest');
|
||||
|
||||
const arraysEqual = (_arr1, _arr2) => {
|
||||
if (!Array.isArray(_arr1) || !Array.isArray(_arr2) || _arr1.length !== _arr2.length) return false;
|
||||
if (!Array.isArray(_arr1) || !Array.isArray(_arr2) || _arr1.length !== _arr2.length) { return false; }
|
||||
|
||||
var arr1 = _arr1.concat().sort();
|
||||
var arr2 = _arr2.concat().sort();
|
||||
|
||||
for (var i = 0; i < arr1.length; i++) {
|
||||
if (arr1[i] !== arr2[i]) return false;
|
||||
if (arr1[i] !== arr2[i]) { return false; }
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user