mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-26 05:10:41 +03:00
eslint
This commit is contained in:
parent
24cdd86e34
commit
da214db047
5 changed files with 1901 additions and 2 deletions
25
.eslintrc.json
Normal file
25
.eslintrc.json
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
// exclude public folder from linting
|
||||
"ignorePatterns": ["public/"],
|
||||
|
||||
"env": {
|
||||
"node": true,
|
||||
"commonjs": true,
|
||||
"es2021": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"overrides": [
|
||||
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest"
|
||||
},
|
||||
"rules": {
|
||||
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"windows"
|
||||
]
|
||||
|
||||
}
|
||||
}
|
|
@ -13,7 +13,7 @@ schema.methods.takeId = async function () {
|
|||
}
|
||||
|
||||
schema.methods.getLink = function (id = this.id) {
|
||||
return "/categories/" + this.id;
|
||||
return "/categories/" + id;
|
||||
}
|
||||
|
||||
const model = mongoose.model('category', schema);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const mongoose = require("mongoose")
|
||||
const { def_theme, limits, email_auth, default_user_state } = require("../config.json");
|
||||
const { def_theme, limits, default_user_state } = require("../config.json");
|
||||
const { userEnum } = require("../lib");
|
||||
|
||||
const schema = new mongoose.Schema({
|
||||
|
|
1871
package-lock.json
generated
1871
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -37,5 +37,8 @@
|
|||
"node-fetch": "^2.6.7",
|
||||
"nodemailer": "^6.8.0",
|
||||
"request-ip": "^3.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.25.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue