Skip to content

Commit be6cf0c

Browse files
committed
eslint fix
1 parent fab514f commit be6cf0c

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929
"max-len": [
3030
"error",
3131
{
32-
"code": 205,
32+
"code": 210,
3333
"ignoreUrls": true
3434
}
3535
],
36+
"indent": ["error", 2, { "SwitchCase": 1 }],
3637
"object-curly-spacing": "off",
3738
"space-before-function-paren": "off",
3839
"semi": "error",

src/API/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const fs = require('fs');
33
// eslint-disable-next-line no-path-concat
44
const curDir = __dirname + '/';
55
module.exports = Array.from(fs.readdirSync(curDir, { withFileTypes: true }))
6-
.filter((x) => x.name !== 'index.js')
7-
.map((x) => x.isDirectory() ? Array.from(fs.readdirSync(curDir + x.name)).map((y) => ([y.split('.')[0], x.name + '/' + y])) : [[x.name.split('.')[0], x.name]])
8-
.flat(1)
9-
.reduce((pV, cV) => Object.assign(pV, { [cV[0]]: require(curDir + cV[1]) }), {});
6+
.filter((x) => x.name !== 'index.js')
7+
.map((x) => x.isDirectory() ? Array.from(fs.readdirSync(curDir + x.name)).map((y) => ([y.split('.')[0], x.name + '/' + y])) : [[x.name.split('.')[0], x.name]])
8+
.flat(1)
9+
.reduce((pV, cV) => Object.assign(pV, { [cV[0]]: require(curDir + cV[1]) }), {});

src/Private/rateLimit.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ module.exports = class RateLimit {
2929
this.waitingRequests = 0;
3030
this.lastRequestAt = 0; // Set to a large number so 1st request doesn't get rate limited already
3131
keyInfo
32-
.then((info) => {
33-
this.requests = info.requestsInPastMin;
34-
setTimeout(this.rateLimitMonitor, 1000 * info.resetsAfter);
35-
})
36-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
37-
.catch((O_o) => {});
32+
.then((info) => {
33+
this.requests = info.requestsInPastMin;
34+
setTimeout(this.rateLimitMonitor, 1000 * info.resetsAfter);
35+
})
36+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
37+
.catch((O_o) => {});
3838
// Still make the requests per min possible
3939
}
4040
};

src/structures/ItemBytes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class ItemBytes {
88
* @param {string} data base64 encoded bytes
99
*/
1010
constructor (data) {
11-
/**
11+
/**
1212
* Item Bytes as Buffer
1313
* @type {Buffer}
1414
*/

src/utils/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const fs = require('fs');
33
// eslint-disable-next-line no-path-concat
44
const curDir = __dirname + '/';
55
module.exports = Array.from(fs.readdirSync(curDir, { withFileTypes: true }))
6-
.filter((x) => x.name !== 'index.js')
7-
.map((x) => x.isDirectory() ? Array.from(fs.readdirSync(curDir + x.name)).map((y) => ([y.split('.')[0], x.name + '/' + y])) : [[x.name.split('.')[0], x.name]])
8-
.flat(1)
9-
.reduce((pV, cV) => Object.assign(pV, { [cV[0]]: require(curDir + cV[1]) }), {});
6+
.filter((x) => x.name !== 'index.js')
7+
.map((x) => x.isDirectory() ? Array.from(fs.readdirSync(curDir + x.name)).map((y) => ([y.split('.')[0], x.name + '/' + y])) : [[x.name.split('.')[0], x.name]])
8+
.flat(1)
9+
.reduce((pV, cV) => Object.assign(pV, { [cV[0]]: require(curDir + cV[1]) }), {});

0 commit comments

Comments
 (0)