Skip to content

Commit 5023093

Browse files
committed
refactor(app): fix eslint errors for default gen
and a few warnings
1 parent c5ab431 commit 5023093

File tree

23 files changed

+72
-67
lines changed

23 files changed

+72
-67
lines changed

templates/app/client/app/account(auth)/login/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
import angular from 'angular';
23
import LoginController from './login.controller';
34

45
export default angular.module('<%= scriptAppName %>.login', [])

templates/app/client/app/account(auth)/settings/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
import angular from 'angular';
23
import SettingsController from './settings.controller';
34

45
export default angular.module('<%= scriptAppName %>.settings', [])

templates/app/client/app/account(auth)/signup/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
2+
import angular from 'angular';
33
import SignupController from './signup.controller';
44

55
export default angular.module('<%= scriptAppName %>.signup', [])

templates/app/client/app/account(auth)/signup/signup.controller.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict';
22
// @flow
3+
import angular from 'angular';
4+
35
<%_ if(filters.flow) { -%>
46
type User = {
57
name: string;

templates/app/client/app/admin(auth)/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
import angular from 'angular';
23
import routes from './admin.routes';
34
import AdminController from './admin.controller';
45

templates/app/client/components/auth(auth)/auth.service.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22
// @flow
3-
class User {
3+
class _User {
44
_id: string = '';
55
name: string = '';
66
email: string = '';
@@ -11,7 +11,7 @@ class User {
1111
export function AuthService($location, $http, $cookies, $q, appConfig, Util, User) {
1212
'ngInject';
1313
var safeCb = Util.safeCb;
14-
var currentUser: User = new User();
14+
var currentUser: _User = new _User();
1515
var userRoles = appConfig.userRoles || [];
1616
/**
1717
* Check if userRole is >= role
@@ -27,7 +27,6 @@ export function AuthService($location, $http, $cookies, $q, appConfig, Util, Use
2727
}
2828

2929
var Auth = {
30-
3130
/**
3231
* Authenticate user and save token
3332
*

templates/app/client/components/auth(auth)/router.decorator.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
'use strict';
2-
import * as _ from 'lodash';
32

43
export function routerDecorator($rootScope<% if(filters.ngroute) { %>, $location<% } if(filters.uirouter) { %>, $state<% } %>, Auth) {
54
'ngInject';

templates/app/client/components/modal(uibootstrap)/modal.service.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
import angular from 'angular';
23

34
export function Modal($rootScope, $uibModal) {
45
/**
@@ -37,9 +38,9 @@ export function Modal($rootScope, $uibModal) {
3738
* @param {All} - any additional args are passed straight to del callback
3839
*/
3940
return function() {
40-
var args = Array.prototype.slice.call(arguments),
41-
name = args.shift(),
42-
deleteModal;
41+
var args = Array.prototype.slice.call(arguments);
42+
var name = args.shift();
43+
var deleteModal;
4344

4445
deleteModal = openModal({
4546
modal: {

templates/app/client/components/mongoose-error(auth)/mongoose-error.directive.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
import angular from 'angular';
23

34
/**
45
* Removes server error when user updates input

templates/app/client/components/navbar/navbar.component.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
'use strict';
2+
/* eslint no-sync: 0 */
3+
import angular from 'angular';
24

35
export class NavbarComponent {
46
menu = [{

0 commit comments

Comments
 (0)