Use lowerCamelCase naming for properties #24
Replies: 3 comments
-
I see the point, personally, I like the PascalCase convention for custom classes and entities but because this is not just for my personal use I will think about your proposition. I must think because in that case API is changed and the major version of the package should be increased by one, in this case, that would be version 3. If I will make an API change I need to think a little bit if there is also something else to change or improve may be in the same major version, it is not great to increase major versions too often. |
Beta Was this translation helpful? Give feedback.
-
@mgrtomasjurik several new features will be added to 3.0.0 version including this one, many of them are alreay done on my local repo. Look at the issues for more info. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/costlydeveloper/ngx-awesome-popup/releases/tag/3.0.0 |
Beta Was this translation helpful? Give feedback.
-
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...
Beta Was this translation helpful? Give feedback.
All reactions