prantlf / jsonlint

JSON/CJSON/JSON5 parser, syntax & schema validator and pretty-printer with a command-line client, written in pure JavaScript.
http://prantlf.github.io/jsonlint/
MIT License
38 stars 9 forks source link

Include newline at end of files #4

Closed stevelacey closed 2 years ago

stevelacey commented 4 years ago

A new line at the end of files should probably be the default, I could make it configurable if not, but it seems like a sensible default to me.

codecov[bot] commented 4 years ago

Codecov Report

Merging #4 into master will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #4   +/-   ##
=======================================
  Coverage   87.21%   87.21%           
=======================================
  Files           5        5           
  Lines         391      391           
=======================================
  Hits          341      341           
  Misses         50       50
Impacted Files Coverage Δ
lib/cli.js 77.1% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1a7c5ba...208ce7e. Read the comment docs.

stevelacey commented 4 years ago

@prantlf ping

prantlf commented 2 years ago

I included this feature as an opt-in by 226019e, released with 11.1.0, using the command-like switch -r|--trailing-newline.

Thanks for the idea nevertheless!