A few days ago I noticed Brackets was no longer linting JSON files. I had recently updated so I assumed it was a bug with that particular extension. Like a good developer, I checked the console and when I didn't see anything, I filed a report and moved on. (For folks curious, the extension I was using is called "JSONLint Extension for Brackets" by Ingo Richter. Oh, and for what I used when it was't working - I used JSONLint.com.) Turns out the issue was a mistake I made in my preferences.
That's not really ideal so I checked out the Preferences docs on how I could correct this.
I focused my attention on two settings: linting.prefer and lintingUsePrefferedOnly. The first lets you specify an order of preferred linters and the second specifies that you only want to use the preferred one. So I added this to my global preferences:
Seems legit, right? I prefer JSHint and I only want to use that. However, this was the root of my issues. Because this preference was global, it applied to all file types. When reading the docs, I had focused in on the table of settings and missed this crucial detail:
Within either file, there are three levels of specificity at which you can set a preference:
- default - global (user-level file) or project-global (project-level file)
- "path" layer - overrides in effect for files that match the given path/filename wildcard
- "language" layer - overrides in effect for files that Brackets detects as the given programming language (this is also filename/extension based, but it's easier to work with since Brackets already understands many file extensions out of the box, and additional languages supported by Brackets extensions can automatically be used here too).