-
Improvement
-
Resolution: Unresolved
-
Low
-
None
As suggested by brendanheywood we should make the eslint errors clearer.
Instead of fudging the line numbers a simpler solution could be to dump out the line of the snippet that got sent off to the inner linter. It could also show a caret with the position of the error like this:
/admin/tool/dataflows/templates/available-fields.mustache - WARNING: ESLint error []: Parsing error: Unexpected token expression ( ), Line: 3 Column: 13
line 3: for (let i = 0; i < expression.length; i++) {
^
Also on reflect I don't completely agree with the 'we are just passing back a raw error message' concept. There is still assumed knowledge missing which is that the mustache linter has taken a subset of the template and outsourced it to a different linter. If there was any issue at all with an inner linter of any type then in the generic case I think the outer linter should have something like 'There was an issue linting the #js chunk on lines 51-69 and it's error was: ... verbatim whatever error'
- is blocked by
-
MDLSITE-6745 Issue with moodle ci mustache linter failing on {{#js}}
- Closed
- links to