Read the statement by Michael Teeuw here.
config,js beginner
-
@berne You do have one error remove the lonley
]
but keep the],
.In addition, the linter you is way to sensitive, try the one I posted, or simply use Visual Studio codes Intelisense, it will automatically show you errors…
Linter: https://jshint.com/
-
every module looks lie this
{ module:"name", position: " pos", header: "????", config: { } },
try to make sure the [ and { line up
inside the config the same [, { and comma pattern
one tricky thin is onside arrays (lists of things), when the things are groups like calendar and rss feed
there needs to be a comma after the LAST entry too{ module: "calendar", header: "Kalender", position: "top_left", config: { calendars: [ { symbol: "calendar-check", url: "https://calendar.google.com/calendar/ical/berntsson88%40gmail.com/public/basic.ics" } // < ----- missing comma ] } },
using jslint is a pain… you need to check a bunch of things on the bottom of the page,
else get lots of useless errors,… single quotes, whitespace, -
@sdetweil There is no comma needed after the last entry, a comma is only needed if an object is followed by another object, a comma after a last object is not mandatory.
-
102 Expected ‘}’ to match ‘{’ from line 90 and instead saw ‘]’.
108 Expected ‘]’ to match ‘[’ from line 28 and instead saw ‘}’.
109 Expected ‘}’ to match ‘{’ from line 11 and instead saw ‘]’.
109 Missing semicolon.
109 Unrecoverable syntax error. (94% scanned).okej, igot this,
we can take 102 dose that mean i just need to swap to }?
109 i have no ide what that translate :S -
@idoodler yeh, i can never tell… some modules use the extra comma , some don’t … looked thru my config and it has one everyplace… doesn’t hurt…
-
@berne on 101 u have ] and then on 102 u have another ]
use a good editor Notepad++ on windows… it will show you the matching ( { and [ with ], } and )
-
Expected '}' to match '{' from line 90 and instead saw ']'.
- Remove the
]
in the line above (Line 101) This will validate your config you can ignore the other warnings.
- Remove the
-
@sdetweil but can i trust https://jshint.com/
and do what it saying to get it right, like 102
just swap ] to }’ on 102i what to learn… but is really hard, i Appreciate you time and @idoodler too
-
@berne I recomend you to to checkout the structure of the existing
config.js
file.You may also check out the W3Schools documentation: https://www.w3schools.com/js/js_objects.asp
-