Add JSON linting (#36192)

Uses https://github.com/eslint/json to lint all JSON and JSONC files in the repo.
This commit is contained in:
silverwind
2025-12-19 07:27:21 +01:00
committed by GitHub
parent 36aa39fffe
commit b915e6908c
6 changed files with 80 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import {defineConfig, globalIgnores} from 'eslint/config';
import json from '@eslint/json';
export default defineConfig([
globalIgnores([
'**/.venv',
'**/node_modules',
'**/public',
]),
{
files: ['**/*.json'],
plugins: {json},
language: 'json/json',
extends: ['json/recommended'],
},
{
files: [
'tsconfig.json',
'.devcontainer/*.json',
'.vscode/*.json',
'contrib/ide/vscode/*.json',
],
plugins: {json},
language: 'json/jsonc',
languageOptions: {
allowTrailingCommas: true,
},
extends: ['json/recommended'],
},
]);