replaced eslint:recommended with prettier

This commit is contained in:
Wyatt Johnson
2018-01-11 20:00:34 -07:00
parent d56c19016a
commit 0abc2ca243
649 changed files with 16235 additions and 13008 deletions
+38 -33
View File
@@ -8,46 +8,51 @@ const USER_ROLES = require('../enum/user_roles');
* The Mongo schema for a Tag.
* @type {Schema}
*/
const TagSchema = new Schema({
const TagSchema = new Schema(
{
// The actual name of the tag.
name: String,
// The actual name of the tag.
name: String,
// Contains permission data.
permissions: {
// Determines if this tag is public or not.
public: {
type: Boolean,
default: true,
},
// Contains permission data.
permissions: {
// Determines if the owner of the Model can add/remove this tag on their own
// resources.
self: Boolean,
// Determines if this tag is public or not.
public: {
type: Boolean,
default: true
// Determines other roles that are allowed to set this tag on other
// resources.
roles: [
{
type: String,
enum: USER_ROLES,
default: [],
},
],
},
// Determines if the owner of the Model can add/remove this tag on their own
// resources.
self: Boolean,
// A list of all the model types that this tag can be added to.
models: [
{
type: String,
enum: ITEM_TYPES,
},
],
// Determines other roles that are allowed to set this tag on other
// resources.
roles: [{
type: String,
enum: USER_ROLES,
default: []
}]
// The date for when the tag was created.
created_at: {
type: Date,
default: Date,
},
},
// A list of all the model types that this tag can be added to.
models: [{
type: String,
enum: ITEM_TYPES
}],
// The date for when the tag was created.
created_at: {
type: Date,
default: Date
{
_id: false,
}
}, {
_id: false
});
);
module.exports = TagSchema;
+19 -17
View File
@@ -6,26 +6,28 @@ const TagSchema = require('./tag');
* The Mongo schema for linking a Tag to a Model.
* @type {Schema}
*/
const TagLinkSchema = new Schema({
const TagLinkSchema = new Schema(
{
// A deep copy of the tag that is the origin for this link. If the ID matches
// with existing tags in the global/asset context then content will be
// substituted.
tag: TagSchema,
// A deep copy of the tag that is the origin for this link. If the ID matches
// with existing tags in the global/asset context then content will be
// substituted.
tag: TagSchema,
// The User ID of the user that assigned the status.
assigned_by: {
type: String,
default: null,
},
// The User ID of the user that assigned the status.
assigned_by: {
type: String,
default: null
// The date when the tag was added to the model.
created_at: {
type: Date,
default: Date,
},
},
// The date when the tag was added to the model.
created_at: {
type: Date,
default: Date
{
_id: false,
}
}, {
_id: false
});
);
module.exports = TagLinkSchema;
+1 -2
View File
@@ -2,7 +2,6 @@ const mongoose = require('../../services/mongoose');
const Schema = mongoose.Schema;
const TokenSchema = new Schema({
// ID is the JTI of a given JWT's identifier.
id: String,
@@ -10,7 +9,7 @@ const TokenSchema = new Schema({
name: String,
// Active is used to determine if the token is valid.
active: Boolean
active: Boolean,
});
module.exports = TokenSchema;