Showing 570 of 1,380 total issues
Function loadNotifications
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const loadNotifications = () => {
const notificationsInternal = prop([]);
const addNotificationsToInternal = (notifications) => notificationsInternal(notifications);
// First loads the first page and configure the next interactions
Function p
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const p = new Promise((resolve, reject) => {
m.request({
method: 'GET',
url: `/payment/pagarme/${contribution_id}/get_encryption_key`,
config: setCsrfToken
Function updateProject
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateProject = async (project_id) => {
const projectData = {
tracker_snippet_html: fields.tracker_snippet_html(),
user_id: fields.user_id(),
all_tags: fields.admin_tags(),
Function runFunctionsWithinRange
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
var scheduledFunc;
var funcsToRun = [];
for (var timeoutKey in this.scheduledFunctions) {
scheduledFunc = this.scheduledFunctions[timeoutKey];
Function displayTabContent
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
displayTabContent = (project) => {
const c_opts = {
project,
post_id: vnode.attrs.post_id,
subscriptionData: vnode.attrs.subscriptionData
Function ajax
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var ajax = (function(){
//based on https://raw.githubusercontent.com/yanatan16/nanoajax/v0.2.4/index.js
function getRequest() {
if (window.XMLHttpRequest)
return new window.XMLHttpRequest;
Function RedrawScheduler
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function RedrawScheduler() {
let redrawsRequestCounter = 0;
const markedCallStack = {};
const requestAnimationFramePolyfill = (function() {
if (window.requestAnimationFrame !== undefined) {
Function view
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
view({ attrs, state } : m.Vnode<ExploreMobileSearchAttrs, ExploreMobileSearchState>) {
const action = attrs.action || `/${window.I18n.locale}/explore?ref=ctrse_explore_pgsearch&filter=all`
const method = attrs.method || 'GET'
const searchParam = state.searchParam
Function loadProjects
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private loadProjects(model, parameters : Object = {}) : ViewModel<Project> {
model.pageSize(9);
if (this._searchParam) {
return new SinglePageViewModel(async () => {
const projectsFound = await this.makeProjectsSearch()
Function oninit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
oninit: function(vnode) {
const userDetails = prop(vnode.attrs.user_details || {}),
user_id = vnode.attrs.user_id.split('-')[0],
hash = prop(window.location.hash),
displayTabContent = (user) => {
Function oninit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
oninit: function(vnode) {
vnode.state = {
actions: {
reset: {
property: 'password',
Function safeVal
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const safeVal = (value, $target, cardNumberProp) => {
let currPair,
cursor,
digit,
error,
Function compareObjects_
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
return true;
}
Function oninit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
oninit: function(vnode) {
const subscription = vnode.attrs.subscription,
reward = prop(),
toggleDetails = h.toggleProp(false, true),
user = prop(vnode.attrs.user);
Function validate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validate = () => {
const errorFields = prop([]);
return {
submit(fields, fn) {
Function view
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
view({ attrs, state } : m.Vnode<InputFindLocationAttrs, InputFindLocationState>) {
const cities = state.cities
const searchCities = state.searchCities
const hasCitiesToDisplay = cities && cities.length > 0
const onSelect = state.onSelect
Function sendNotification
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sendNotification = (e) => {
e.preventDefault();
isLoading(true);
const notificationData = {
Function reportSpecResults
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
var results = spec.results();
var status = results.passed() ? 'passed' : 'failed';
if (results.skipped) {
status = 'skipped';
Function renderComponent
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderComponent(component, treePath) {
if (isFunction(component.tag)) {
component.instance = component.tag(component)
} else if (isClass(component.tag)) {
const Component = component.tag
Function checkPermalinkAvailable
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
state.checkPermalinkAvailable = async (inputText) => {
let lastValidValue = state.currentPermalink
state.currentPermalink = inputText
try {
const projectBySlugRequestConfig = {