angular-meteor icon indicating copy to clipboard operation
angular-meteor copied to clipboard

WebStorm

Open TWKDreamState opened this issue 10 years ago • 5 comments

Hi,

This is not an issue particularly with angular-meteor (I'm liking the changes that have been made).

Just out of interest, in my version of WebStorm, all of the new code I am using is causing errors in WebStorm and perhaps someone else can help to advise on this as it makes the code quite hard to work with! Feel free to close if not the place to discuss (fairly new to GitHub).

As an example....

'use strict';

angular.module('meteorbluespyApp')
    .controller('HomeCtrl', function ($scope, $state, $window, $reactive) {

        $reactive(this).attach($scope);

        this.helpers({
            isLoggedIn() {                  <-----THIS CAUSES WEBSTORM TO SHOW AN ERROR - THE CODE STILL WORKS
            if (!!Meteor.user()){
                $state.go('dashboard');
            }
        }
    });

$scope.admin.bodyWide = true;

$scope.currWindowScroll = 0;

angular.element($window).bind('scroll', function () {
    $scope.currWindowScroll = $window.scrollY;
    $scope.$apply();
});

})
.
value('duScrollDuration', 1500);

WebStorm is expecting 'isLoggedIn' to have a ':' after it and therefore the formatting is out for the rest of the code. Is there anyway to get round this? Whilst the above is a simple example, some of app will be more complex. It's hard to show my view in this thread, but the auto-formatting doesn't work and the code is shown to have errors. I'm planning to upgrade my whole app to the new helpers syntax which will make it hard to debug.

Many thanks.

TWKDreamState avatar Jan 15 '16 20:01 TWKDreamState

capture

Screen shot might help highlight the issue. The error stops the automatic indentation of the code that follows the error.

TWKDreamState avatar Jan 15 '16 20:01 TWKDreamState

@TWKDreamState you can enable ES6 support in settings: 2016-01-16_001825

Deadly0 avatar Jan 15 '16 21:01 Deadly0

Thanks @Deadly0

Urigo avatar Jan 15 '16 21:01 Urigo

Thank you :) Appreciate it.

TWKDreamState avatar Jan 15 '16 22:01 TWKDreamState

This solved the issue

kelvinaero avatar Apr 21 '16 19:04 kelvinaero