Codelyzer: transformStyle eats errors

Created on 14 Dec 2016  路  3Comments  路  Source: mgechev/codelyzer

Given this in .codelyzer.js

module.exports = {
    transformStyle(code, url, decorator) {
        throw new Error('Something went horribly wrong');
    },
};

When running the lint task it will not display the error, which makes it look like the styles are passing lint!

transformTemplate does not suffer from the same issue.

Node: 6.9.1
Tslint: 4.0.2
Codelyzer: 2.0.0-beta.3
Angular: 2.2.3

All 3 comments

It's intentional to not throw when a style is not transformed successfully but this doesn't eat linting errors.

It might be a good idea to log the errors but still some text editors/IDEs tslint plugins (VSCode tslint for instance) crashes when you log something on stderror.

馃槙 Lost a couple hours due to this. No warning whatsoever that your transform or styles are broken is pretty worrying to me

I agree, I will add a bolded warning to the README.md file.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Bigous picture Bigous  路  4Comments

rolandjitsu picture rolandjitsu  路  5Comments

negberts picture negberts  路  3Comments

davidanaya picture davidanaya  路  4Comments

fabioemoutinho picture fabioemoutinho  路  5Comments