{"action":"opened","issue":{"url":"https://api.github.com/repos/portainer/portainer/issues/1771","repository_url":"https://api.github.com/repos/portainer/portainer","labels_url":"https://api.github.com/repos/portainer/portainer/issues/1771/labels{/name}","comments_url":"https://api.github.com/repos/portainer/portainer/issues/1771/comments","events_url":"https://api.github.com/repos/portainer/portainer/issues/1771/events","html_url":"https://github.com/portainer/portainer/issues/1771","id":308758048,"number":1771,"title":"Failure: project fails on Lint","user":{"login":"balanza","id":265564,"avatar_url":"https://avatars2.githubusercontent.com/u/265564?v=4","gravatar_id":"","url":"https://api.github.com/users/balanza","html_url":"https://github.com/balanza","followers_url":"https://api.github.com/users/balanza/followers","following_url":"https://api.github.com/users/balanza/following{/other_user}","gists_url":"https://api.github.com/users/balanza/gists{/gist_id}","starred_url":"https://api.github.com/users/balanza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balanza/subscriptions","organizations_url":"https://api.github.com/users/balanza/orgs","repos_url":"https://api.github.com/users/balanza/repos","events_url":"https://api.github.com/users/balanza/events{/privacy}","received_events_url":"https://api.github.com/users/balanza/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-26T22:30:27Z","updated_at":"2018-03-26T22:30:27Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nwhile trying to lint source code to be sure it's well written, I realised `develop` branch ships several error (as well as `master`). I just `yarn grunt lint` codebase.\r\n\r\nHere's the list\r\n```\r\nRunning \"eslint:src\" (eslint) task\r\n\r\n/home/asap/Workspace/portainer/app/docker/__module.js\r\n  2:36  error  Function has too many statements (85). Maximum allowed is 30  max-statements\r\n\r\n/home/asap/Workspace/portainer/app/portainer/__module.js\r\n  2:36  error  Function has too many statements (43). Maximum allowed is 30  max-statements\r\n\r\n/home/asap/Workspace/portainer/app/docker/filters/filters.js\r\n   81:10  error  Function has a complexity of 8  complexity\r\n  121:10  error  Function has a complexity of 7  complexity\r\n\r\n/home/asap/Workspace/portainer/app/docker/helpers/containerHelper.js\r\n  16:32  error  Function has a complexity of 8  complexity\r\n\r\n/home/asap/Workspace/portainer/app/docker/helpers/infoHelper.js\r\n  5:28  error  Method 'determineEndpointMode' has a complexity of 7  complexity\r\n\r\n/home/asap/Workspace/portainer/app/docker/models/container.js\r\n  1:1  error  Function 'ContainerViewModel' has a complexity of 9  complexity\r\n\r\n/home/asap/Workspace/portainer/app/docker/models/event.js\r\n  1:1  error  Function 'createEventDetails' has a complexity of 44  complexity\r\n\r\n/home/asap/Workspace/portainer/app/docker/models/service.js\r\n  1:1  error  Function 'ServiceViewModel' has a complexity of 35                               complexity\r\n  1:1  error  Function 'ServiceViewModel' has too many statements (85). Maximum allowed is 30  max-statements\r\n\r\n/home/asap/Workspace/portainer/app/docker/models/template.js\r\n  1:1  error  Function 'TemplateViewModel' has a complexity of 14  complexity\r\n\r\n/home/asap/Workspace/portainer/app/docker/models/templateLinuxServer.js\r\n  1:1  error  Function 'TemplateLSIOViewModel' has a complexity of 12  complexity\r\n\r\n/home/asap/Workspace/portainer/app/docker/rest/response/handlers.js\r\n  12:13  error  Empty block statement  no-empty\r\n\r\n/home/asap/Workspace/portainer/app/docker/views/containers/create/createContainerController.js\r\n    3:1  error  Function has too many statements (45). Maximum allowed is 30      max-statements\r\n  359:3  error  Function 'loadFromContainerNetworkConfig' has a complexity of 12  complexity\r\n\r\n/home/asap/Workspace/portainer/app/docker/views/services/create/createServiceController.js\r\n  3:1  error  Function has too many statements (53). Maximum allowed is 30  max-statements\r\n\r\n/home/asap/Workspace/portainer/app/docker/views/services/edit/serviceController.js\r\n    3:1   error  Function has too many statements (57). Maximum allowed is 30                  max-statements\r\n  236:26  error  Function 'updateService' has a complexity of 15                               complexity\r\n  236:26  error  Function 'updateService' has too many statements (35). Maximum allowed is 30  max-statements\r\n\r\n/home/asap/Workspace/portainer/app/portainer/helpers/templateHelper.js\r\n  62:33  error  Function has a complexity of 8  complexity\r\n\r\n/home/asap/Workspace/portainer/app/portainer/services/notifications.js\r\n  14:19  error  Function has a complexity of 9  complexity\r\n\r\n/home/asap/Workspace/portainer/app/portainer/views/endpoints/edit/endpointController.js\r\n  18:27  error  Function has a complexity of 9  complexity\r\n\r\n/home/asap/Workspace/portainer/app/portainer/views/endpoints/endpointsController.js\r\n  16:24  error  Function has a complexity of 7  complexity\r\n\r\n✖ 23 problems (23 errors, 0 warnings)\r\n\r\n```\r\n"}}
{"actor":{"display_login":"balanza"}}