mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-18 17:21:33 +00:00
Updates
* Bumped node requirement to >= 8.0.0 (due to async/await). * Moved ESLint config to .eslintrc.json. * Moved ESLint ignore to .eslintignore. * Bumped ESLint's ecmaVersion to 8, although it was probably already automatically set to that before. * Bugfix line 110 of albumsController.js.
This commit is contained in:
parent
31ef82d37d
commit
715c821c14
1
.eslintignore
Normal file
1
.eslintignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
**/*.min.js
|
44
.eslintrc.json
Normal file
44
.eslintrc.json
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"root": true,
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 8
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"standard"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"curly": [
|
||||||
|
"error",
|
||||||
|
"all"
|
||||||
|
],
|
||||||
|
"prefer-const": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"destructuring": "any",
|
||||||
|
"ignoreReadBeforeAssign": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"object-shorthand": [
|
||||||
|
"error",
|
||||||
|
"always"
|
||||||
|
],
|
||||||
|
"quotes": [
|
||||||
|
"error",
|
||||||
|
"single"
|
||||||
|
],
|
||||||
|
"no-var": "error"
|
||||||
|
},
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"public/**/*.js"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"browser": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -107,7 +107,7 @@ albumsController.getUniqueRandomName = () => {
|
|||||||
.where('identifier', identifier)
|
.where('identifier', identifier)
|
||||||
.then(rows => {
|
.then(rows => {
|
||||||
if (!rows || !rows.length) { return resolve(identifier) }
|
if (!rows || !rows.length) { return resolve(identifier) }
|
||||||
console.log(`An album with identifier ${name} already exists (${++i}/${maxTries}).`)
|
console.log(`An album with identifier ${identifier} already exists (${++i}/${maxTries}).`)
|
||||||
if (i < maxTries) { return select(i) }
|
if (i < maxTries) { return select(i) }
|
||||||
// eslint-disable-next-line prefer-promise-reject-errors
|
// eslint-disable-next-line prefer-promise-reject-errors
|
||||||
return reject('Sorry, we could not allocate a unique random identifier. Try again?')
|
return reject('Sorry, we could not allocate a unique random identifier. Try again?')
|
||||||
|
37
package.json
37
package.json
@ -11,7 +11,7 @@
|
|||||||
"url": "https://github.com/WeebDev/lolisafe/issues"
|
"url": "https://github.com/WeebDev/lolisafe/issues"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=7.0.0"
|
"node": ">=8.0.0"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -43,38 +43,5 @@
|
|||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"chokidar": "^2.0.3"
|
"chokidar": "^2.0.3"
|
||||||
},
|
}
|
||||||
"eslintConfig": {
|
|
||||||
"env": {
|
|
||||||
"browser": true,
|
|
||||||
"node": true
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
"standard"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"curly": [
|
|
||||||
"error",
|
|
||||||
"all"
|
|
||||||
],
|
|
||||||
"prefer-const": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
"destructuring": "any",
|
|
||||||
"ignoreReadBeforeAssign": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"object-shorthand": [
|
|
||||||
"error",
|
|
||||||
"always"
|
|
||||||
],
|
|
||||||
"quotes": [
|
|
||||||
"error",
|
|
||||||
"single"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eslintIgnore": [
|
|
||||||
"**/*.min.js"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user