Showing 1,820 of 4,015 total issues
Function setFacebookUrl
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
@action
setFacebookUrl(event) {
const {model, modelProperty} = this.args;
let newUrl = event.target.value;
Function default
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function () {
let path = window.location.pathname;
let subdir = path.substr(0, path.search('/ghost/'));
let adminRoot = `${subdir}/ghost/`;
let assetRoot = `${subdir}/ghost/assets/`;
Function mockSettings
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function mockSettings(server) {
server.get('/settings/', function ({db}, {queryParams}) {
let {group} = queryParams;
let filters = group.split(',');
let settings = [];
Function constructor
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(options) {
const {
cookieSecure = true,
cookieName = 'members-ssr',
cookieMaxAge = SIX_MONTHS_MS,
Function getSerializedData
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getSerializedData({member, tier = null, subscription = null, offer = null}) {
return {
offer: offer ? {
name: offer.name,
type: offer.discount_type,
Function output
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports.output = (response = {}, apiConfig, apiSerializers, frame) => {
debug('output');
const tasks = [];
Function getForPost
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getForPost(postId) {
const knex = this.knex;
const signupRows = await knex('members_created_events')
.select('referrer_source')
.select(knex.raw('COUNT(id) AS total'))
Function _startVerificationProcess
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async _startVerificationProcess({
amount,
throwOnTrigger,
source
}) {
Function loadConverters
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const loadConverters = () => {
if (excerptConverter && emailConverter) {
return;
}
Function serve
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
serve() {
const {storagePath, errorMessages} = this;
return function serveStaticContent(req, res, next) {
return serveStatic(
Function countRelations
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
countRelations() {
return {
replies(modelOrCollection) {
modelOrCollection.query('columns', 'comments.*', (qb) => {
qb.count('replies.id')
Function init
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init() {
if (this.eventStorage) {
// Prevent creating duplicate DomainEvents subscribers
return;
}
Function getResource
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getResource(url, options) {
options = options || {};
let objects = this.urls.getByUrl(url);
Function _onResourceAdded
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async _onResourceAdded(type, model) {
debug('_onResourceAdded', type);
const resourceConfig = _.find(this.resourcesConfig, {type: type});
Function _prepareModelSync
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_prepareModelSync(model, resourceConfig) {
const exclude = resourceConfig.modelOptions.exclude;
const withRelatedFields = resourceConfig.modelOptions.withRelatedFields;
const obj = _.omit(model.toJSON(), exclude);
Function browse
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
browse({user}) {
let allNotifications = this.fetchAllNotifications();
allNotifications = _.orderBy(allNotifications, 'addedAt', 'desc');
const blogVersion = ghostVersion.full.match(/^(\d+\.)(\d+\.)(\d+)/);
Function up
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function up(knex) {
logging.info('Populating members_subscribe_events from members');
const allMembers = await knex.select(
'id as member_id',
Function exports
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (...attrs) {
// Options is the last argument
const options = attrs.pop();
let date;
Function makeAPICall
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function makeAPICall(resource, controllerName, action, apiOptions) {
const controller = api[controllerName];
let timer;
Function configure
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function configure(dbConfig) {
const client = dbConfig.client;
if (client === 'sqlite3') {
// Backwards compatibility with old knex behaviour