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

Issue: Honour file ending rules in data files #364

Closed
davidsneighbour opened this issue Jun 27, 2022 · 1 comment
Closed

Issue: Honour file ending rules in data files #364

davidsneighbour opened this issue Jun 27, 2022 · 1 comment
Labels
bug Something isn't working Project: v8.0.0

Comments

@davidsneighbour
Copy link
Contributor

Editing a data file via frontMatter.data.files and Dashboard > Data results in the saved/changed file being saved without "newline at the end of the file". My linting rules expect a newline, so my linting always results in an extra step to add a new line.

Would it be possible to somehow check the file before changing it and using the existing characters after the json is closed (] or }) somehow? Or maybe add a config variable that enables newline/no-newline for edited files?

@davidsneighbour davidsneighbour added the bug Something isn't working label Jun 27, 2022
@estruyf
Copy link
Owner

estruyf commented Jun 28, 2022

@davidsneighbour instead of checking the file, I'll use the files.insertFinalNewLine setting from VS Code.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Project: v8.0.0
Projects
None yet
Development

No branches or pull requests

2 participants