mirror of
https://github.com/go-gitea/gitea
synced 2026-02-03 11:10:40 +00:00
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:
@@ -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'],
|
||||
},
|
||||
]);
|
||||
Reference in New Issue
Block a user