<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tommy</title>
    <description>The latest articles on DEV Community by Tommy (@tommy_art).</description>
    <link>https://dev.to/tommy_art</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3893356%2F201566df-5426-4804-8ad9-ee921f371d2c.png</url>
      <title>DEV Community: Tommy</title>
      <link>https://dev.to/tommy_art</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tommy_art"/>
    <language>en</language>
    <item>
      <title>The JSON config files quietly breaking your JS build (and how to fix them)</title>
      <dc:creator>Tommy</dc:creator>
      <pubDate>Fri, 12 Jun 2026 06:58:06 +0000</pubDate>
      <link>https://dev.to/tommy_art/the-json-config-files-quietly-breaking-your-js-build-and-how-to-fix-them-30j0</link>
      <guid>https://dev.to/tommy_art/the-json-config-files-quietly-breaking-your-js-build-and-how-to-fix-them-30j0</guid>
      <description>&lt;p&gt;Half the "weird" build failures in a JavaScript/TypeScript project aren't code bugs — they're malformed JSON in a config file. &lt;code&gt;.eslintrc.json&lt;/code&gt;, &lt;code&gt;tsconfig.json&lt;/code&gt;, &lt;code&gt;vercel.json&lt;/code&gt;, &lt;code&gt;turbo.json&lt;/code&gt; all &lt;em&gt;look&lt;/em&gt; like JSON but each has its own quirks, and a single trailing comma can take down your whole pipeline with a cryptic message.&lt;/p&gt;

&lt;p&gt;Here are the traps I hit most often, and how to stop wasting time on them.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Trailing commas (the #1 culprit)
&lt;/h2&gt;

&lt;p&gt;This is valid JavaScript but &lt;strong&gt;invalid JSON&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"extends"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"next"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"rules"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"no-unused-vars"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"warn"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That comma after &lt;code&gt;"warn"&lt;/code&gt; throws &lt;code&gt;Unexpected token } in JSON&lt;/code&gt;. ESLint, tsc, and Vercel's build all parse these files as strict JSON — no trailing commas allowed.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Comments don't belong in plain &lt;code&gt;.json&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;tsconfig.json&lt;/code&gt; tolerates comments (it's JSONC). &lt;code&gt;.eslintrc.json&lt;/code&gt; and &lt;code&gt;vercel.json&lt;/code&gt; &lt;strong&gt;do not&lt;/strong&gt;. Copy a commented snippet from a blog into the wrong file and the parser dies. If you need comments, use the &lt;code&gt;.js&lt;/code&gt;/&lt;code&gt;.cjs&lt;/code&gt; variant of the config instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. &lt;code&gt;vercel.json&lt;/code&gt; and &lt;code&gt;turbo.json&lt;/code&gt; have schemas — use them
&lt;/h2&gt;

&lt;p&gt;Both validate against a JSON Schema. A misspelled key (&lt;code&gt;build&lt;/code&gt; vs &lt;code&gt;buildCommand&lt;/code&gt;) won't error locally but will silently do nothing on deploy. Validating against the schema catches these before you push. I keep notes on the exact gotchas here: &lt;a href="https://jsonic.io/guides/vercel-json" rel="noopener noreferrer"&gt;vercel.json guide&lt;/a&gt; and &lt;a href="https://jsonic.io/guides/turbo-json" rel="noopener noreferrer"&gt;turbo.json guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. ESLint flat config + JSON
&lt;/h2&gt;

&lt;p&gt;Migrating to flat config trips people up because the JSON shape changed. The most common failure is still just malformed JSON, not the new structure. I wrote up the specific cases here: &lt;a href="https://jsonic.io/guides/eslint-config" rel="noopener noreferrer"&gt;validating .eslintrc.json&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A 10-second fix for all of the above
&lt;/h2&gt;

&lt;p&gt;Whenever a config file misbehaves, paste it into a strict JSON validator first — it points to the exact line/column of the problem instead of a vague build error. I built a free in-browser one (no signup, nothing uploaded) for exactly this: &lt;a href="https://jsonic.io" rel="noopener noreferrer"&gt;jsonic&lt;/a&gt;. It formats, validates, and shows a precise error locator, which turns "why is my build broken" into a five-second fix.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Before debugging your build, validate your config JSON. Trailing commas and stray comments cause more failed CI runs than they have any right to.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>json</category>
      <category>webdev</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Why I built yet another JSON formatter (and what I did differently)</title>
      <dc:creator>Tommy</dc:creator>
      <pubDate>Thu, 23 Apr 2026 03:35:59 +0000</pubDate>
      <link>https://dev.to/tommy_art/why-i-built-yet-another-json-formatter-and-what-i-did-differently-4am3</link>
      <guid>https://dev.to/tommy_art/why-i-built-yet-another-json-formatter-and-what-i-did-differently-4am3</guid>
      <description>&lt;p&gt;I've been pasting JSON into random online tools for years. Formatter, type generator, diff —&lt;br&gt;
you name it, there's already 10 versions of it online.&lt;/p&gt;

&lt;p&gt;So why build another one?&lt;/p&gt;

&lt;p&gt;One day I was debugging a prod API response and copy-pasted the payload into the first&lt;br&gt;
JSON formatter that came up in Google. Then I looked at the network tab.&lt;/p&gt;

&lt;p&gt;It had sent my data to a server.&lt;/p&gt;

&lt;p&gt;Not a big deal in isolation, but it got me thinking: how many times have I done this&lt;br&gt;
without checking? How many times has someone on my team done it?&lt;/p&gt;

&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://jsonic.io" rel="noopener noreferrer"&gt;Jsonic&lt;/a&gt; — a small toolkit of JSON utilities that run entirely&lt;br&gt;
in the browser. No server. No uploads. Nothing leaves your machine.&lt;/p&gt;

&lt;p&gt;Current tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Formatter / Minifier / Validator&lt;/strong&gt; — the basics, done cleanly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JSON → TypeScript&lt;/strong&gt; — infers proper types including nested objects, arrays,
nullable fields&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JSON → CSV&lt;/strong&gt; — handles nested structures by flattening&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;JSON → YAML&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CSV → JSON&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JSON Diff&lt;/strong&gt; — structural diff, not a naive text comparison&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The interesting technical bits
&lt;/h2&gt;

&lt;p&gt;The TypeScript inference was harder than expected. The naive approach (just map&lt;br&gt;
JSON types to TS primitives) falls apart quickly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Arrays with mixed types → &lt;code&gt;(string | number)[]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Fields that are &lt;code&gt;null&lt;/code&gt; in the sample but probably typed → &lt;code&gt;string | null&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Deeply nested objects → recursive interface generation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The diff was the other tricky one. Text diff on JSON is nearly useless — whitespace&lt;br&gt;
and key order changes produce noise. I implemented a structural diff that compares&lt;br&gt;
the parsed objects, which means reordered keys and re-formatted values don't show&lt;br&gt;
up as changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;More tools (TOML, XML, Base64), and eventually some light content so it ranks for&lt;br&gt;
the searches that bring people to these tools in the first place.&lt;/p&gt;

&lt;p&gt;If you use JSON tools regularly, I'd love to know what you reach for most.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>tooling</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
