jscs-dev/node-jscs

"ValidateIndentation: Expected indentation of 0 characters" for files saved in UTF-8-BOM

aliakseimaniuk opened this issue · 2 comments

JSCS version: 3.0.4

Code example:
(function () {
'use strict';
})();

JSCS output:
validateIndentation: Expected indentation of 0 characters at "filename.js" :
1 |(function () {
--------^
2 | 'use strict';
3 |

Configuration:
{
"preset": "airbnb",
"validateIndentation": 4,
"validateLineBreaks": "CRLF"
}

Replaced with cst/cst#123

This is really a problem in cst/Babylon, but if anyone wants to just ignore it in JSCS temporarily (it at least gave me a chance to do a JSCS --fix), you can add this to validate-indentation.js: 500.
if (i === 0 && line.length === 1 && line.charCodeAt(0) === 65279) { continue; }