boris-jenicek / ngx-awesome-popup

🚀 Open-source - The world's easiest, most powerful Angular dialog modal framework. Confirmation box, Alert box, Toast notification, Cookie banner, Any dynamic dialog content.

Home Page:https://boris-jenicek.github.io/ngx-awesome-popup/#/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change naming convention to camelCase

boris-jenicek opened this issue · comments

Discussed in #24

Originally posted by mgrtomasjurik December 1, 2021
Hello,
please could you adjust the code so it passes the lint code analyzer - lowerCamelCase rule?
Thank you 😀👍

Here is a Google typescript styleguide with the lowerCamelCase rule https://google.github.io/styleguide/tsguide.html#identifiers

In this case, the code for app.module.ts doesn't comply with the lowerCamelCase naming conventions for properties.
Instead of this:
// FROM HERE; NGX-AWESOME-POPUP
NgxAwesomePopupModule.forRoot({
ColorList: {
Success: '#3caea3', // optional
Info: '#2f8ee5', // optional
Warning: '#ffc107', // optional
...

It should be
// FROM HERE; NGX-AWESOME-POPUP
NgxAwesomePopupModule.forRoot({
colorList: {
success: '#3caea3', // optional
info: '#2f8ee5', // optional
warning: '#ffc107', // optional
etc....

Similar error appears when setting up the ToastNotificationInitializer
Instead of...
// Choose layout color type
newToastNotification.setConfig({
AutoCloseDelay: 5000, // optional
TextPosition: 'left', // optional
LayoutType: DialogLayoutDisplay.SUCCESS, // SUCCESS | INFO | NONE | DANGER | WARNING
ProgressBar: ToastProgressBarEnum.NONE, // INCREASE | DECREASE | NONE
ToastUserViewType: ToastUserViewTypeEnum.SIMPLE, // STANDARD | SIMPLE
...

...it should be:
// Choose layout color type
newToastNotification.setConfig({
autoCloseDelay: 5000, // optional
textPosition: 'left', // optional
layoutType: DialogLayoutDisplay.SUCCESS, // SUCCESS | INFO | NONE | DANGER | WARNING
progressBar: ToastProgressBarEnum.NONE, // INCREASE | DECREASE | NONE
toastUserViewType: ToastUserViewTypeEnum.SIMPLE, // STANDARD | SIMPLE
etc...