Skip to content

TypeScript configuration files can't have comments #85

Closed
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

🐛 Bug Report

  • tslint-to-eslint-config version: 0.1.8
  • ESLint version: N/A
  • Node version: N/A

Actual Behavior

If you've put non-JSON things in your tsconfig.json, such as comments, tslint-to-eslint-config --typescript tsconfig.json won't load the file. This is because the file is printed with cat on the CLI, then passed to JSON.parse in code.

Expected Behavior

TypeScript supports comments. We should too!

Reproduction

  1. Create a tsconfig.json with comments in it
  2. Run tslint-to-eslint-config --typescript tsconfig.json

Metadata

Metadata

Labels

status: accepting prsPlease, send in a PR to resolve this! ✨type: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions