I am new to angular2 and typescript, I got this 3 errors, I don't understand how to fix trailing whitespace and file should end with a newline.
The errors come from tslint which defines some rules on your project and check if your code matches the rules. You need to either fix the error or ignore/disable those rules.
file should end with a newline
You can ignore this rule on
tslint.json
by adding this on therules
object property"eofline": false
-
trailing whitespace
You can ignore this rule on
tslint.json
by adding this on therules
object property"no-trailing-whitespace": false
More about the rules: https://palantir.github.io/tslint/rules/
The error is coming from your code linter.
A code linter looks for code formatting inconsistencies and throws exceptions when you violate some rules (that you can specify manually).
This means it's a formatting error on your code. Your linter is basically telling you to add an empty line at the end of the file events/event-list.component.ts
. Moreover, there is a trailing whitespace somewhere in that file. There are text editor tools that can do this built-in or with a plugin, and I suggest looking for that feature on your editor. If not, you can look for online tools that strip trailing whitespace on your code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With