aurelia / aurelia/cli

Convert configs from .json to .js or .ts

Open
#837 6 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
402
Forks
134
PR merge metrics
No merged PRs in 30d

Description

**I'm submitting a _discussion_ request**

* **Language:**
all

* **Loader/bundler:**
all

**Current behavior:**

Config files are now mostly in .json format which does not allow comments.
https://stackoverflow.com/questions/244777/can-comments-be-used-in-json

* **What is the _desired_ behavior?**
Have most config files in .js format
Like webpack.config.js
```
module.exports = {
// same json, but now it can have comments along
}

```

* **What is the motivation / use case for changing the behavior?**

I think it would be useful to have commented config files.
It improves usage by new developers. And is generally a good practice.
Like in website usage - every additional step increases drop rate.
Figuring out what that line means and how to use it now requires..
If it's not mentioned in the docs -> hours of googling and parsing the issues
That is for the patient ones

Some drawbacks: I guess that now configs are read and modified as objects and are written the same way by the CLI.
Maintaining that ease of modifying config with CLI would be a challenge.

there is a jsonc parser by MS
https://github.com/Microsoft/node-jsonc-parser

but no writer of course..

Well It is a dream of improving something for newcomers
Not actionable

Contributor guide

Open the contributing guide

Research direction

No implementation file or test is named. Start by inventorying the JSON configuration files and tracing how the CLI reads, modifies, and writes them. Done would require an agreed scope for converting configurations, preserving CLI editing behavior, and tests for the supported formats.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.