Skip to content

Commit

Permalink
style(stark-all): reformat code with prettier 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mhenkens committed Dec 21, 2023
1 parent f978141 commit 71e3956
Show file tree
Hide file tree
Showing 75 changed files with 836 additions and 872 deletions.
10 changes: 8 additions & 2 deletions docs/stark-ui/GENERIC_SEARCH.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ export class MovieSearchFormComponent implements OnInit, OnChanges, StarkSearchF

public searchForm: FormGroup;

public constructor(@Inject(DEMO_GENERIC_SERVICE) private genericService: DemoGenericService, private formBuilder: FormBuilder) {}
public constructor(
@Inject(DEMO_GENERIC_SERVICE) private genericService: DemoGenericService,
private formBuilder: FormBuilder
) {}

public ngOnInit(): void {
this.searchForm = this.createSearchForm(this.searchCriteria);
Expand Down Expand Up @@ -361,7 +364,10 @@ import { MovieSearchActions } from "../actions";

@Injectable()
export class DemoGenericServiceImpl implements MovieService {
public constructor(private store: Store<MovieSearchState>, @Inject(MOVIE_REPOSITORY) private movieRepository: MovieRepository) {}
public constructor(
private store: Store<MovieSearchState>,
@Inject(MOVIE_REPOSITORY) private movieRepository: MovieRepository
) {}

public getSearchState(): Observable<StarkSearchState<MovieSearchCriteria>> {
return this.store.pipe(select(selectMovieSearch));
Expand Down
8 changes: 4 additions & 4 deletions packages/stark-build/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ module.exports = (config, options) => {
chunkOrigins: true,
reasons: true,
optimizationBailout: true // display bailout reasons (ModuleConcatenationPlugin debugging)
}
}
: {}
),

Expand Down Expand Up @@ -139,7 +139,7 @@ module.exports = (config, options) => {
openAnalyzer: true, //default 'true'
analyzerPort: 3030 // default 8888
})
]
]
: []),

/**
Expand All @@ -156,7 +156,7 @@ module.exports = (config, options) => {
failOnError: false,
files: ["src/**/*.?(pc|sc|c|sa)ss"] // pcss|scss|css|sass
})
]
]
: [])
],

Expand Down Expand Up @@ -208,7 +208,7 @@ module.exports = (config, options) => {
"X-Content-Type-Options": "nosniff"
}
}
}
}
: {})
});
};
17 changes: 15 additions & 2 deletions packages/stark-core/assets/css/pre-load-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,17 @@

.stark-preload {
color: #000;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue,
font-family:
-apple-system,
BlinkMacSystemFont,
Segoe UI,
Roboto,
Oxygen,
Ubuntu,
Cantarell,
Fira Sans,
Droid Sans,
Helvetica Neue,
sans-serif;
font-size: 16px;
font-weight: 400;
Expand All @@ -41,7 +51,10 @@
width: 500px;
overflow: hidden;
border: solid 1px rgba(0, 0, 0, 0.12);
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12);
box-shadow:
0 1px 5px 0 rgba(0, 0, 0, 0.2),
0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 3px 1px -2px rgba(0, 0, 0, 0.12);

margin: 16px auto;
border-radius: 8px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export class StarkSettingsEffects {
* @param actions$ - The action to perform.
* @param sessionService - The `StarkSessionService` instance of the application.
*/
public constructor(private actions$: Actions, @Inject(STARK_SESSION_SERVICE) public sessionService: StarkSessionService) {}
public constructor(
private actions$: Actions,
@Inject(STARK_SESSION_SERVICE) public sessionService: StarkSessionService
) {}

/**
* Sets the language of the current session via the `StarkSessionService` whenever the preferred language changes in the settings.
Expand Down
4 changes: 3 additions & 1 deletion packages/stark-ui/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ $stark-typography-theme: null !default;
);
@forward "./styles/theming/stark-palettes" show $alert-palette, $grey-palette, $success-palette;

@use "./styles/theming/typography" with ($stark-typography-theme: $stark-typography-theme);
@use "./styles/theming/typography" with (
$stark-typography-theme: $stark-typography-theme
);
@forward "./styles/theming/typography" show $typography-theme, $typography-config;

// Core APIs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ export abstract class AbstractStarkUiComponent implements OnInit {
* @param renderer - Angular `Renderer2` wrapper for DOM manipulations.
* @param elementRef - Reference to the DOM element where this component is attached to.
*/
protected constructor(protected renderer: Renderer2, protected elementRef: ElementRef) {}
protected constructor(
protected renderer: Renderer2,
protected elementRef: ElementRef
) {}

/**
* Component lifecycle hook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,12 @@ describe("ActionBarComponent", () => {
let component: StarkActionBarComponent;
const buttonToggleSelector = ".extend-action-bar";

beforeEach(
waitForAsync(() =>
TestBed.configureTestingModule({
declarations: [StarkActionBarComponent, TestHostComponent],
imports: [MatButtonModule, MatIconModule, MatIconTestingModule, MatMenuModule, MatTooltipModule, TranslateModule.forRoot()],
providers: [{ provide: STARK_LOGGING_SERVICE, useValue: new MockStarkLoggingService() }, TranslateService]
}).compileComponents()
)
);
beforeEach(waitForAsync(() =>
TestBed.configureTestingModule({
declarations: [StarkActionBarComponent, TestHostComponent],
imports: [MatButtonModule, MatIconModule, MatIconTestingModule, MatMenuModule, MatTooltipModule, TranslateModule.forRoot()],
providers: [{ provide: STARK_LOGGING_SERVICE, useValue: new MockStarkLoggingService() }, TranslateService]
}).compileComponents()));

beforeEach(() => {
hostFixture = TestBed.createComponent(TestHostComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ export class StarkActionBarComponent extends AbstractStarkUiComponent implements
* @param renderer - Angular `Renderer2` wrapper for DOM manipulations.
* @param elementRef - Reference to the DOM element where this component is attached to.
*/
public constructor(@Inject(STARK_LOGGING_SERVICE) public logger: StarkLoggingService, renderer: Renderer2, elementRef: ElementRef) {
public constructor(
@Inject(STARK_LOGGING_SERVICE) public logger: StarkLoggingService,
renderer: Renderer2,
elementRef: ElementRef
) {
super(renderer, elementRef);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,21 @@ describe("AppDataComponent", () => {

const mockLogger: MockStarkLoggingService = new MockStarkLoggingService();

beforeEach(
waitForAsync(() =>
TestBed.configureTestingModule({
declarations: [StarkAppDataComponent, TestHostComponent],
imports: [
CommonModule,
MatButtonModule,
MatIconModule,
MatIconTestingModule,
MatMenuModule,
MatTooltipModule,
NoopAnimationsModule,
TranslateModule.forRoot()
],
providers: [{ provide: STARK_LOGGING_SERVICE, useValue: mockLogger }, TranslateService]
}).compileComponents()
)
);
beforeEach(waitForAsync(() =>
TestBed.configureTestingModule({
declarations: [StarkAppDataComponent, TestHostComponent],
imports: [
CommonModule,
MatButtonModule,
MatIconModule,
MatIconTestingModule,
MatMenuModule,
MatTooltipModule,
NoopAnimationsModule,
TranslateModule.forRoot()
],
providers: [{ provide: STARK_LOGGING_SERVICE, useValue: mockLogger }, TranslateService]
}).compileComponents()));

beforeEach(() => {
// OverlayContainer needs to be injected to get the context for the rendered menu dropdown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ export class StarkAppDataComponent extends AbstractStarkUiComponent implements O
* @param renderer - Angular `Renderer2` wrapper for DOM manipulations.
* @param elementRef - Reference to the DOM element where this component is attached to.
*/
public constructor(@Inject(STARK_LOGGING_SERVICE) public logger: StarkLoggingService, renderer: Renderer2, elementRef: ElementRef) {
public constructor(
@Inject(STARK_LOGGING_SERVICE) public logger: StarkLoggingService,
renderer: Renderer2,
elementRef: ElementRef
) {
super(renderer, elementRef);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,16 @@ describe("AppFooterComponent", () => {
/**
* async beforeEach
*/
beforeEach(
waitForAsync(() =>
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
declarations: [StarkAppFooterComponent],
providers: [{ provide: STARK_LOGGING_SERVICE, useValue: new MockStarkLoggingService() }, TranslateService]
})
/**
* Compile template and css
*/
.compileComponents()
)
);
beforeEach(waitForAsync(() =>
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot()],
declarations: [StarkAppFooterComponent],
providers: [{ provide: STARK_LOGGING_SERVICE, useValue: new MockStarkLoggingService() }, TranslateService]
})
/**
* Compile template and css
*/
.compileComponents()));

// Inject module dependencies
beforeEach(inject([TranslateService], (_translateService: TranslateService) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ export class StarkAppFooterComponent implements OnInit {
* @param logger - The `StarkLoggingService` instance of the application.
* @param $translate - The `TranslateService` instance of the application.
*/
public constructor(@Inject(STARK_LOGGING_SERVICE) public logger: StarkLoggingService, public $translate: TranslateService) {
public constructor(
@Inject(STARK_LOGGING_SERVICE) public logger: StarkLoggingService,
public $translate: TranslateService
) {
// empty constructor
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,18 @@ describe("AppLogoComponent", () => {
/**
* async beforeEach
*/
beforeEach(
waitForAsync(() =>
TestBed.configureTestingModule({
declarations: [StarkAppLogoComponent],
providers: [
{ provide: STARK_LOGGING_SERVICE, useValue: new MockStarkLoggingService() },
{ provide: STARK_ROUTING_SERVICE, useClass: MockStarkRoutingService }
]
})
/**
* Compile template and css
*/
.compileComponents()
)
);
beforeEach(waitForAsync(() =>
TestBed.configureTestingModule({
declarations: [StarkAppLogoComponent],
providers: [
{ provide: STARK_LOGGING_SERVICE, useValue: new MockStarkLoggingService() },
{ provide: STARK_ROUTING_SERVICE, useClass: MockStarkRoutingService }
]
})
/**
* Compile template and css
*/
.compileComponents()));

/**
* Synchronous beforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,22 @@ describe("AppLogoutComponent", () => {
/**
* async beforeEach
*/
beforeEach(
waitForAsync(() =>
TestBed.configureTestingModule({
imports: [MatTooltipModule, MatButtonModule, MatIconModule, MatIconTestingModule, TranslateModule.forRoot()],
declarations: [StarkAppLogoutComponent],
providers: [
{ provide: STARK_LOGGING_SERVICE, useValue: new MockStarkLoggingService() },
{ provide: STARK_SESSION_SERVICE, useValue: new MockStarkSessionService() },
{ provide: STARK_ROUTING_SERVICE, useClass: MockStarkRoutingService },
// Need to clone the object to avoid mutation of it between tests
{ provide: STARK_SESSION_CONFIG, useValue: { ...mockStarkSessionConfig } }
]
})
/**
* Compile template and css
*/
.compileComponents()
)
);
beforeEach(waitForAsync(() =>
TestBed.configureTestingModule({
imports: [MatTooltipModule, MatButtonModule, MatIconModule, MatIconTestingModule, TranslateModule.forRoot()],
declarations: [StarkAppLogoutComponent],
providers: [
{ provide: STARK_LOGGING_SERVICE, useValue: new MockStarkLoggingService() },
{ provide: STARK_SESSION_SERVICE, useValue: new MockStarkSessionService() },
{ provide: STARK_ROUTING_SERVICE, useClass: MockStarkRoutingService },
// Need to clone the object to avoid mutation of it between tests
{ provide: STARK_SESSION_CONFIG, useValue: { ...mockStarkSessionConfig } }
]
})
/**
* Compile template and css
*/
.compileComponents()));

/**
* Synchronous beforeEach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,19 @@ describe("AppMenuItemComponent", () => {
/**
* async beforeEach
*/
beforeEach(
waitForAsync(() =>
TestBed.configureTestingModule({
declarations: [StarkAppMenuItemComponent, TestHostComponent],
imports: [MatExpansionModule, MatIconModule, MatIconTestingModule, MatListModule, NoopAnimationsModule, UIRouterModule],
providers: [
{ provide: STARK_LOGGING_SERVICE, useValue: new MockStarkLoggingService() },
{ provide: STARK_ROUTING_SERVICE, useValue: mockRoutingService }
]
})
/**
* Compile template and css
*/
.compileComponents()
)
);
beforeEach(waitForAsync(() =>
TestBed.configureTestingModule({
declarations: [StarkAppMenuItemComponent, TestHostComponent],
imports: [MatExpansionModule, MatIconModule, MatIconTestingModule, MatListModule, NoopAnimationsModule, UIRouterModule],
providers: [
{ provide: STARK_LOGGING_SERVICE, useValue: new MockStarkLoggingService() },
{ provide: STARK_ROUTING_SERVICE, useValue: mockRoutingService }
]
})
/**
* Compile template and css
*/
.compileComponents()));

/**
* Synchronous beforeEach
Expand Down
Loading

0 comments on commit 71e3956

Please sign in to comment.