Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Cannot read configuration when encoding is UTF8 with BOM. #17

Closed
dufrannea opened this issue Apr 15, 2016 · 2 comments
Closed

Cannot read configuration when encoding is UTF8 with BOM. #17

dufrannea opened this issue Apr 15, 2016 · 2 comments

Comments

@dufrannea
Copy link

Hi,

My tslint.json is using the UTF8 with BOM encoding, and fails to be read using fs.readFile and JSON.parse (see here).

This is a choice made by nodejs, that fs.readFile* does not remove BOM when present. I think it might be a good idea to strip it by default using for example the strip-bom library.

I'd be glad to do that if you consider it as useful.

Cheers !

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Apr 15, 2016

Yes, please do! That would be useful.

Also, do use the code inline rather than use the npm module. No need for that dependency in the build process.

dufrannea pushed a commit to dufrannea/TSLint.MSBuild that referenced this issue Apr 18, 2016
dufrannea pushed a commit to dufrannea/TSLint.MSBuild that referenced this issue Apr 18, 2016
Fixes casing in comments.

Issue : JoshuaKGoldberg#17
@JoshuaKGoldberg
Copy link
Owner

Resolved by #18.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants