Implemented ESlint and passed down the rules
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
'use strict'
|
||||
const bookshelf = require('../database/bookshelf').bookshelf;
|
||||
|
||||
require('./user-model');
|
||||
@@ -9,6 +8,6 @@ let APIToken = bookshelf.Model.extend({
|
||||
user() {
|
||||
return this.belongsTo('User', 'user_uuid', 'uuid');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
module.exports = bookshelf.model('APIToken', APIToken);
|
||||
@@ -1,13 +1,12 @@
|
||||
'use strict'
|
||||
const bookshelf = require('../database/bookshelf').bookshelf
|
||||
const bookshelf = require('../database/bookshelf').bookshelf;
|
||||
|
||||
require('./spell-model')
|
||||
require('./spell-model');
|
||||
|
||||
let Ingredient = bookshelf.Model.extend({
|
||||
tableName: 'ingredient',
|
||||
spells() {
|
||||
return this.belongsToMany('Spell', 'spell_ingredient')
|
||||
return this.belongsToMany('Spell', 'spell_ingredient');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
module.exports = bookshelf.model('Ingredient', Ingredient)
|
||||
module.exports = bookshelf.model('Ingredient', Ingredient);
|
||||
@@ -1,13 +1,12 @@
|
||||
'use strict'
|
||||
const bookshelf = require('../database/bookshelf').bookshelf
|
||||
const bookshelf = require('../database/bookshelf').bookshelf;
|
||||
|
||||
require('./school-model')
|
||||
require('./school-model');
|
||||
|
||||
let MetaSchool = bookshelf.Model.extend({
|
||||
tableName: 'meta_school',
|
||||
schools() {
|
||||
return this.hasMany('School')
|
||||
return this.hasMany('School');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
module.exports = bookshelf.model('MetaSchool', MetaSchool)
|
||||
module.exports = bookshelf.model('MetaSchool', MetaSchool);
|
||||
@@ -1,13 +1,13 @@
|
||||
const bookshelf = require('../database/bookshelf').bookshelf
|
||||
const bookshelf = require('../database/bookshelf').bookshelf;
|
||||
|
||||
require('./role-model')
|
||||
require('./role-model');
|
||||
|
||||
let Permission = bookshelf.Model.extend({
|
||||
tableName: 'permission',
|
||||
hidden: ['id'],
|
||||
role() {
|
||||
return this.belongsToMany('Role', 'role_permission')
|
||||
return this.belongsToMany('Role', 'role_permission');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
module.exports = bookshelf.model('Permission', Permission);
|
||||
@@ -1,12 +1,12 @@
|
||||
const bookshelf = require('../database/bookshelf').bookshelf
|
||||
const bookshelf = require('../database/bookshelf').bookshelf;
|
||||
|
||||
require('./permission-model')
|
||||
require('./permission-model');
|
||||
|
||||
let Role = bookshelf.Model.extend({
|
||||
tableName: 'role',
|
||||
permissions() {
|
||||
return this.belongsToMany('Permission', 'role_permission');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
module.exports = bookshelf.model('Role', Role);
|
||||
@@ -1,17 +1,16 @@
|
||||
'use strict'
|
||||
const bookshelf = require('../database/bookshelf').bookshelf
|
||||
const bookshelf = require('../database/bookshelf').bookshelf;
|
||||
|
||||
require('./spell-model')
|
||||
require('./meta-school-model')
|
||||
require('./spell-model');
|
||||
require('./meta-school-model');
|
||||
|
||||
let School = bookshelf.Model.extend({
|
||||
tableName: 'school',
|
||||
spells() {
|
||||
return this.belongsToMany('Spell', 'spell_school')
|
||||
return this.belongsToMany('Spell', 'spell_school');
|
||||
},
|
||||
meta_schools() {
|
||||
return this.belongsTo('MetaSchool', 'meta_school_id')
|
||||
return this.belongsTo('MetaSchool', 'meta_school_id');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
module.exports = bookshelf.model('School', School)
|
||||
module.exports = bookshelf.model('School', School);
|
||||
@@ -1,9 +1,8 @@
|
||||
'use strict'
|
||||
const bookshelf = require('../database/bookshelf').bookshelf
|
||||
const bookshelf = require('../database/bookshelf').bookshelf;
|
||||
|
||||
require('./school-model')
|
||||
require('./variable-model')
|
||||
require('./ingredient-model')
|
||||
require('./school-model');
|
||||
require('./variable-model');
|
||||
require('./ingredient-model');
|
||||
|
||||
let Spell = bookshelf.Model.extend({
|
||||
tableName: 'spell',
|
||||
@@ -20,6 +19,6 @@ let Spell = bookshelf.Model.extend({
|
||||
ingredients() {
|
||||
return this.belongsToMany( 'Ingredient', 'spell_ingredient' );
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
module.exports = bookshelf.model('Spell', Spell)
|
||||
module.exports = bookshelf.model('Spell', Spell);
|
||||
@@ -1,4 +1,3 @@
|
||||
'use strict'
|
||||
const bookshelf = require('../database/bookshelf').bookshelf;
|
||||
|
||||
require('./role-model');
|
||||
@@ -13,6 +12,6 @@ let User = bookshelf.Model.extend({
|
||||
spells() {
|
||||
return this.hasMany('Spell', 'author_id');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
module.exports = bookshelf.model('User', User)
|
||||
module.exports = bookshelf.model('User', User);
|
||||
@@ -1,13 +1,12 @@
|
||||
'use strict'
|
||||
const bookshelf = require('../database/bookshelf').bookshelf
|
||||
const bookshelf = require('../database/bookshelf').bookshelf;
|
||||
|
||||
require('./spell-model')
|
||||
require('./spell-model');
|
||||
|
||||
let Variable = bookshelf.Model.extend({
|
||||
tableName: 'variable',
|
||||
spells() {
|
||||
return this.belongsToMany('Spell', 'spell_variable')
|
||||
return this.belongsToMany('Spell', 'spell_variable');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
module.exports = bookshelf.model('Variable', Variable)
|
||||
module.exports = bookshelf.model('Variable', Variable);
|
||||
Reference in New Issue
Block a user