Closed Aaronius closed 6 years ago
There's an assumption being made that format and verify will be called with api being the this context:
format
verify
this
https://github.com/CSSLint/csslint/blob/master/src/core/CSSLint.js#L140 https://github.com/CSSLint/csslint/blob/master/src/core/CSSLint.js#L233
This isn't always the case though. In the case of htmlhint, it's calling without a this context:
https://github.com/yaniswang/HTMLHint/blob/master/src/rules/csslint.js#L26
Which causes issues when CSSLint access methods on this thinking it's the api.
api
There's an assumption being made that
format
andverify
will be called with api being thethis
context:https://github.com/CSSLint/csslint/blob/master/src/core/CSSLint.js#L140 https://github.com/CSSLint/csslint/blob/master/src/core/CSSLint.js#L233
This isn't always the case though. In the case of htmlhint, it's calling without a
this
context:https://github.com/yaniswang/HTMLHint/blob/master/src/rules/csslint.js#L26
Which causes issues when CSSLint access methods on
this
thinking it's theapi
.