Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a diff writer instead of complete override for CSON editor config conversions #756

Open
JoshuaKGoldberg opened this issue Oct 18, 2020 · 1 comment
Labels
area: editor configs Related to outputting IDE settings files status: accepting prs Please, send in a PR to resolve this! ✨ type: enhancement New feature or request

Comments

@JoshuaKGoldberg
Copy link
Member

🚀 Feature Request

Forking off of #744: I can't find any kind of CSON diff writer equivalent to jsondiffpatch... does such a thing exist?

Existing Behavior

Atom config file writes completely rewrite the target file.

Change Proposal

Take in the benefits of a diff patch: basically #744 but for JSON files.

One of two possible cases is possible:

  • A CSON diff patcher exists and is available on npm, and tslint-to-eslint-config should use it
  • ☝ does not exist, and could be written to resolve this issue (note: please write it as a separate npm package, not a part of this repo -- separation of concerns!).
@JoshuaKGoldberg JoshuaKGoldberg added type: enhancement New feature or request status: accepting prs Please, send in a PR to resolve this! ✨ area: editor configs Related to outputting IDE settings files labels Oct 18, 2020
@KingDarBoja
Copy link
Collaborator

KingDarBoja commented Oct 18, 2020

I have an idea based on cson documentation:

  • Convert the CSON file into JSON.
  • Do whatever change on the converted json file.
  • Use the jsondiffdispatch and then convert the result back to CSON.
  • Profit (?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: editor configs Related to outputting IDE settings files status: accepting prs Please, send in a PR to resolve this! ✨ type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants