mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
lint: Correct linting errors
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
|||||||
isEmpty,
|
isEmpty,
|
||||||
set,
|
set,
|
||||||
} from 'lodash';
|
} from 'lodash';
|
||||||
import { MongoClient as mongo } from 'mongodb';
|
|
||||||
|
|
||||||
class ApiObject {
|
class ApiObject {
|
||||||
constructor (options) {
|
constructor (options) {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
/* eslint-disable no-use-before-define */
|
||||||
|
|
||||||
import { MongoClient as mongo } from 'mongodb';
|
import { MongoClient as mongo } from 'mongodb';
|
||||||
|
|
||||||
const DB_URI = 'mongodb://localhost/habitrpg_test';
|
const DB_URI = 'mongodb://localhost/habitrpg_test';
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
/* eslint-disable no-use-before-define */
|
||||||
|
|
||||||
import superagent from 'superagent';
|
import superagent from 'superagent';
|
||||||
|
|
||||||
const API_TEST_SERVER_PORT = 3003;
|
const API_TEST_SERVER_PORT = 3003;
|
||||||
var apiVersion;
|
let apiVersion;
|
||||||
|
|
||||||
// Sets up an abject that can make all REST requests
|
// Sets up an abject that can make all REST requests
|
||||||
// If a user is passed in, the uuid and api token of
|
// If a user is passed in, the uuid and api token of
|
||||||
@@ -17,7 +19,7 @@ export function requester (user = {}, additionalSets) {
|
|||||||
|
|
||||||
requester.setApiVersion = (version) => {
|
requester.setApiVersion = (version) => {
|
||||||
apiVersion = version;
|
apiVersion = version;
|
||||||
}
|
};
|
||||||
|
|
||||||
function _requestMaker (user, method, additionalSets) {
|
function _requestMaker (user, method, additionalSets) {
|
||||||
if (!apiVersion) throw new Error('apiVersion not set');
|
if (!apiVersion) throw new Error('apiVersion not set');
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
/* eslint-disable no-use-before-define */
|
|
||||||
|
|
||||||
// Import requester function, set it up for v2, export it
|
// Import requester function, set it up for v2, export it
|
||||||
import { requester } from '../requester'
|
import { requester } from '../requester';
|
||||||
requester.setApiVersion('v2');
|
requester.setApiVersion('v2');
|
||||||
export { requester };
|
export { requester };
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
each,
|
|
||||||
times,
|
times,
|
||||||
} from 'lodash';
|
} from 'lodash';
|
||||||
import Q from 'q';
|
import Q from 'q';
|
||||||
import { v4 as generateUUID } from 'uuid';
|
import { v4 as generateUUID } from 'uuid';
|
||||||
import { ApiUser, ApiGroup } from '../api-classes';
|
import { ApiUser, ApiGroup } from '../api-classes';
|
||||||
import { requester } from '../requester'
|
import { requester } from '../requester';
|
||||||
|
|
||||||
// Creates a new user and returns it
|
// Creates a new user and returns it
|
||||||
// If you need the user to have specific requirements,
|
// If you need the user to have specific requirements,
|
||||||
|
|||||||
Reference in New Issue
Block a user