Topic: tslint issues in MDB 5.2

kaimeng pro asked 6 years ago


I've migrated my project from MDB 4.3.7 to 5.2.0

I got more than 40 errors with tslint (npm run lint) on MDB components, something not seen in 4.3.

The first line "No valid rules have been specified" is puzzling.  I'm not sure if this triggers the rest.

I probe around but could not find any clues.

_____________________________________________________________________

No valid rules have been specified

ERROR: E:/FSF/ng5/src/app/typescripts/pro/alerts/toast/toast.config.ts[159, 2]: file should end with a newline
ERROR: E:/FSF/ng5/src/app/typescripts/free/inputs/input-validate.directive.ts[13, 41]: Type string trivially inferred from a string literal, remove type annotation
ERROR: E:/FSF/ng5/src/app/typescripts/free/inputs/input-validate.directive.ts[14, 41]: Type string trivially inferred from a string literal, remove type annotation
ERROR: E:/FSF/ng5/src/app/typescripts/free/buttons/checkbox.directive.ts[8, 33]: variable 'ButtonCheckboxDirective' used before declaration
ERROR: E:/FSF/ng5/src/app/typescripts/free/buttons/radio.directive.ts[6, 33]: variable 'ButtonRadioDirective' used before declaration
ERROR: E:/FSF/ng5/src/app/typescripts/free/navbars/links.component.ts[6, 13]: The selector of the component "LinksComponent" should be named kebab-case and include dash (https://angular.io/styleguide#style-05-02)
ERROR: E:/FSF/ng5/src/app/typescripts/free/navbars/logo.component.ts[4, 13]: The selector of the component "LogoComponent" should be named kebab-case and include dash (https://angular.io/styleguide#style-05-02)
ERROR: E:/FSF/ng5/src/app/typescripts/free/navbars/navlinks.component.ts[6, 13]: The selector of the component "NavlinksComponent" should be named kebab-case and include dash (https://angular.io/styleguide#style-05-02)
ERROR: E:/FSF/ng5/src/app/typescripts/free/utils/component-loader/component-loader.class.ts[273, 20]: Shadowed name: 'viewRef'
ERROR: E:/FSF/ng5/src/app/typescripts/free/dropdown/dropdown.directive.ts[180, 8]: comment must start with a space
ERROR: E:/FSF/ng5/src/app/typescripts/free/carousel/carousel.component.ts[205, 8]: comment must start with a space
ERROR: E:/FSF/ng5/src/app/typescripts/free/carousel/carousel.component.ts[37, 43]: Type boolean trivially inferred from a boolean literal, remove type annotation
ERROR: E:/FSF/ng5/src/app/typescripts/free/collapse/collapse.directive.ts[75, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/free/modals/modalService.config.ts[3, 2]: file should end with a newline
ERROR: E:/FSF/ng5/src/app/typescripts/free/popover/popover-container.component.ts[37, 2]: file should end with a newline
ERROR: E:/FSF/ng5/src/app/typescripts/pro/autocomplete/components/completer.component.ts[19, 33]: variable 'CompleterComponent' used before declaration
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[84, 3]: file should end with a newline
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[2, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[7, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[9, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[10, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[16, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[22, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[24, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[26, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[34, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[37, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[42, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[51, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[59, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[66, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[72, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[84, 1]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/tags/chips.component.ts[13, 35]: variable 'MaterialChipsComponent' used before declaration
ERROR: E:/FSF/ng5/src/app/typescripts/pro/material-select/select.component.ts[11, 33]: variable 'SelectComponent' used before declaration
ERROR: E:/FSF/ng5/src/app/typescripts/pro/date-picker/datepicker.component.ts[35, 33]: variable 'MDBDatePickerComponent' used before declaration
ERROR: E:/FSF/ng5/src/app/typescripts/pro/time-picker/timepicker.component.ts[7, 35]: variable 'ClockPickerComponent' used before declaration
ERROR: E:/FSF/ng5/src/app/typescripts/pro/time-picker/timepicker.component.ts[35, 5]: In the class "ClockPickerComponent", the directive input property "buttonLabel" should not be renamed.Please, consider the following use "@Input() buttonLabel: string"
ERROR: E:/FSF/ng5/src/app/typescripts/pro/sidenav/sidenav.component.ts[54, 8]: trailing whitespace
ERROR: E:/FSF/ng5/src/app/typescripts/pro/accordion/components/sb.config.ts[3, 2]: file should end with a newline

 


Damian Gemza staff answered 6 years ago


Hello Kaimeng, Could you tell me - did you upgraded your project, or created blank new? Could you paste here your tsconfig.json, tslint.json and package.json files? Best Regards, Damian

kaimeng pro commented 6 years ago

I upgraded my project, by merging the changes from mdb-angular-pro5.2. I just ran 'npm run lint' out-of-the-box, i.e. on the contents of the download zip file. I got exactly the same 40 lint errors, except that the "No valid rules have been specified" did not appear.

Damian Gemza staff commented 6 years ago

Thanks for your report! We'll take a look at this. We'll try to fix this ASAP. Best Regards, Damian


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags