Skip to content

About

Flint’s JSON plugin supports linting .json source code. It comes provided with the flint npm package.

Flint’s JSON plugin provides the following preset:

PresetRecommendedDescription
logical✅ AlwaysCommon rules for finding bugs and good practices in JSON files.

Flint recommends using the logical preset:

flint.config.ts
import { defineConfig, json } from "flint";
export default defineConfig({
use: [
{
files: json.files.all,
rules: json.presets.logical,
},
],
});

Rules that find bugs and enforce good JSON practices for most-to-all JSON files.

flint.config.ts
import { defineConfig, json } from "flint";
export default defineConfig({
use: [
{
files: json.files.all,
rules: json.presets.logical,
},
],
});
Flint NamePresetBiome Rule(s)Deno Lint Rule(s)ESLint Rule(s)Oxlint Rule(s)
keyDuplicatesLogicalno-dupe-keysjsonc/no-dupe-keys
keyNormalizationLogicaljson/no-unnormalized-keys
valueSafetyLogicaljson/no-unsafe-values

Flint’s JSON plugin provides the following files selector:

  • all: **/*.json
Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.