Skip to content

Commit 5fb93d0

Browse files
Just Use Prettier™
1 parent 17f599c commit 5fb93d0

23 files changed

+437
-431
lines changed

rollup.config.js

+13-7
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ const ROUTER_CONFIG = Object.assign(
6767
name: '@uirouter/angularjs',
6868
globals: { angular: 'angular', '@uirouter/core': '@uirouter/core' },
6969
},
70-
BASE_OUTPUT,
70+
BASE_OUTPUT
7171
),
7272
},
73-
BASE_CONFIG,
73+
BASE_CONFIG
7474
);
7575

7676
// Also bundles the code from @uirouter/core into the same bundle
@@ -84,10 +84,10 @@ const MONOLITHIC_ROUTER_CONFIG = Object.assign(
8484
name: '@uirouter/angularjs',
8585
globals: { angular: 'angular' },
8686
},
87-
BASE_OUTPUT,
87+
BASE_OUTPUT
8888
),
8989
},
90-
BASE_CONFIG,
90+
BASE_CONFIG
9191
);
9292

9393
const EVENTS_CONFIG = Object.assign({}, BASE_CONFIG, {
@@ -99,7 +99,7 @@ const EVENTS_CONFIG = Object.assign({}, BASE_CONFIG, {
9999
name: '@uirouter/angularjs-state-events',
100100
globals: { angular: 'angular', '@uirouter/core': '@uirouter/core' },
101101
},
102-
BASE_OUTPUT,
102+
BASE_OUTPUT
103103
),
104104
});
105105

@@ -112,12 +112,18 @@ const RESOLVE_CONFIG = Object.assign({}, BASE_CONFIG, {
112112
name: '@uirouter/angularjs-resolve-service',
113113
globals: { angular: 'angular', '@uirouter/core': '@uirouter/core' },
114114
},
115-
BASE_OUTPUT,
115+
BASE_OUTPUT
116116
),
117117
});
118118

119119
const CONFIG = RESOLVE
120120
? RESOLVE_CONFIG
121-
: EVENTS ? EVENTS_CONFIG : MONOLITHIC ? MONOLITHIC_ROUTER_CONFIG : ROUTER ? ROUTER_CONFIG : ROUTER_CONFIG;
121+
: EVENTS
122+
? EVENTS_CONFIG
123+
: MONOLITHIC
124+
? MONOLITHIC_ROUTER_CONFIG
125+
: ROUTER
126+
? ROUTER_CONFIG
127+
: ROUTER_CONFIG;
122128

123129
export default CONFIG;

src/directives/stateDirectives.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function clickHook(
9191
$state: StateService,
9292
$timeout: ITimeoutService,
9393
type: TypeInfo,
94-
getDef: () => Def,
94+
getDef: () => Def
9595
) {
9696
return function(e: JQueryMouseEventObject) {
9797
const button = e.which || e.button,
@@ -318,7 +318,7 @@ uiSrefDirective = [
318318
rawDef.uiStateParams = extend({}, val);
319319
update();
320320
},
321-
true,
321+
true
322322
);
323323
rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));
324324
}
@@ -460,7 +460,7 @@ uiStateDirective = [
460460
rawDef[field] = newval;
461461
update();
462462
},
463-
true,
463+
true
464464
);
465465
});
466466
});
@@ -580,7 +580,7 @@ uiSrefActiveDirective = [
580580
$state: StateService,
581581
$stateParams: Obj,
582582
$interpolate: IInterpolateService,
583-
$uiRouter: UIRouter,
583+
$uiRouter: UIRouter
584584
) {
585585
return {
586586
restrict: 'A',

src/directives/viewDirective.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ uiView = [
185185
$animate: any,
186186
$uiViewScroll: any,
187187
$interpolate: IInterpolateService,
188-
$q: $QLike,
188+
$q: $QLike
189189
) {
190190
function getRenderer(attrs: Obj, scope: IScope) {
191191
return {
@@ -376,7 +376,7 @@ function $ViewDirectiveFill(
376376
$transitions: TransitionService,
377377
$view: ViewService,
378378
$q: angular.IQService,
379-
$timeout: ITimeoutService,
379+
$timeout: ITimeoutService
380380
) {
381381
const getControllerAs = parse('viewDecl.controllerAs');
382382
const getResolveAs = parse('viewDecl.resolveAs');
@@ -412,7 +412,7 @@ function $ViewDirectiveFill(
412412
if (controller) {
413413
const controllerInstance = <Ng1Controller>$controller(
414414
controller,
415-
extend({}, locals, { $scope: scope, $element: $element }),
415+
extend({}, locals, { $scope: scope, $element: $element })
416416
);
417417
if (controllerAs) {
418418
scope[controllerAs] = controllerInstance;
@@ -468,7 +468,7 @@ function registerControllerCallbacks(
468468
$transitions: TransitionService,
469469
controllerInstance: Ng1Controller,
470470
$scope: IScope,
471-
cfg: Ng1ViewConfig,
471+
cfg: Ng1ViewConfig
472472
) {
473473
// Call $onInit() ASAP
474474
if (isFunction(controllerInstance.$onInit) && !(cfg.viewDecl.component && hasComponentImpl)) {

src/legacy/stateEvents.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export let $stateNotFound: IAngularEvent;
192192
$transition$.from(),
193193
fromParams,
194194
$transition$.options(),
195-
$transition$,
195+
$transition$
196196
);
197197

198198
if (startEvent.defaultPrevented) {
@@ -204,7 +204,7 @@ export let $stateNotFound: IAngularEvent;
204204
$transition$.from(),
205205
fromParams,
206206
$transition$.options(),
207-
$transition$,
207+
$transition$
208208
);
209209
}
210210
// Don't update and resync url if there's been a new transition started. see issue #2238, #600
@@ -224,10 +224,10 @@ export let $stateNotFound: IAngularEvent;
224224
$transition$.from(),
225225
fromParams,
226226
$transition$.options(),
227-
$transition$,
227+
$transition$
228228
);
229229
},
230-
successOpts,
230+
successOpts
231231
);
232232
}
233233

@@ -244,7 +244,7 @@ export let $stateNotFound: IAngularEvent;
244244
fromParams,
245245
error,
246246
$transition$.options(),
247-
$transition$,
247+
$transition$
248248
);
249249

250250
if (!evt.defaultPrevented) {

src/services.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function $uiRouterProvider($locationProvider: ILocationProvider) {
7777
router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());
7878

7979
const ng1LocationService = (router.locationService = router.locationConfig = new Ng1LocationServices(
80-
$locationProvider,
80+
$locationProvider
8181
));
8282

8383
Ng1LocationServices.monkeyPatchPathParameterType(router);
@@ -92,7 +92,7 @@ function $uiRouterProvider($locationProvider: ILocationProvider) {
9292
$sniffer: any,
9393
$rootScope: ng.IScope,
9494
$http: IHttpService,
95-
$templateCache: ITemplateCacheService,
95+
$templateCache: ITemplateCacheService
9696
) {
9797
ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser);
9898
delete router['router'];

src/statebuilders/views.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function ng1ViewsBuilder(state: StateObject) {
6161
`State '${state.name}' has a 'views' object. ` +
6262
`It cannot also have "view properties" at the state level. ` +
6363
`Move the following properties into a view (in the 'views' object): ` +
64-
` ${allViewKeys.filter(key => isDefined(state[key])).join(', ')}`,
64+
` ${allViewKeys.filter(key => isDefined(state[key])).join(', ')}`
6565
);
6666
}
6767

@@ -80,7 +80,7 @@ export function ng1ViewsBuilder(state: StateObject) {
8080
// Do not allow a view to mix props for component-style view with props for template/controller-style view
8181
if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {
8282
throw new Error(
83-
`Cannot combine: ${compKeys.join('|')} with: ${nonCompKeys.join('|')} in stateview: '${name}@${state.name}'`,
83+
`Cannot combine: ${compKeys.join('|')} with: ${nonCompKeys.join('|')} in stateview: '${name}@${state.name}'`
8484
);
8585
}
8686

src/templateFactory.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class TemplateFactory implements TemplateFactoryProvider {
6161
fromConfig(
6262
config: Ng1ViewDeclaration,
6363
params: any,
64-
context: ResolveContext,
64+
context: ResolveContext
6565
): Promise<{ template?: string; component?: string }> {
6666
const defaultTemplate = '<ui-view></ui-view>';
6767

src/viewScroll.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function $ViewScrollProvider() {
3636
$element[0].scrollIntoView();
3737
},
3838
0,
39-
false,
39+
false
4040
);
4141
};
4242
},

test/ng1StateBuilderSpec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('Ng1 StateBuilder', function() {
5050
expect(() => builder.builder('views')(extend({ component: 'fooComponent' }, config))).toThrow();
5151
expect(() => builder.builder('views')(extend({ componentProvider: () => 'fooComponent' }, config))).toThrow();
5252
expect(() => builder.builder('views')(extend({ bindings: {} }, config))).toThrow();
53-
}),
53+
})
5454
);
5555

5656
it(
@@ -60,6 +60,6 @@ describe('Ng1 StateBuilder', function() {
6060
expect(builder.builder('resolvables')).toBeDefined();
6161
const built: Resolvable[] = builder.builder('resolvables')(config);
6262
expect(built[0].deps).toEqual(['bar']);
63-
}),
63+
})
6464
);
6565
});

0 commit comments

Comments
 (0)